We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1054
    • 3 Posts
    If Codemirror isn’t working on some elements, try browser Cache cleaning — it helped me (MODX 2.0.8 + Codemirror 1.1.0-pl). smiley
      • 16681
      • 62 Posts
      Hi smiley

      Would it be easy you think to get the drag-and-drop to work?
      Have you tried to implement it? If so, what was the main issue?
      I can give it a shot if you dont have time work on it.

      Ciao,
      Lars
        Keep it SIMPLX
        • 17016
        • 138 Posts
        Thanks for the codemirror. Unfortunately it is not possible to use the shortcut ALT Gr + S anymore to save a Snippet. Is it possible to make this important shortcut working again somehow? Would be great and thanks again for the codemirror which is very helpful...
        Letti
          • 16681
          • 62 Posts
          @letti heard it was now CTRL SHIFT + S. Haven’t tried it though smiley
            Keep it SIMPLX
            • 17016
            • 138 Posts
            This shortcut is not working, too. I just tried it.
              • 17016
              • 138 Posts
              Does anybody know how it is possible to reactivate this shortcut?

              Letti
                • 2048
                • 15 Posts
                I was two problems with Codemirror :



                • wrong align between line numbers and lines
                • don’t support code php in bold ( my eyes are bad and old :s )
                how to solve : rules CSS

                • margin and padding top of containers line numbers and edit box are not same and incoherent, height lines too
                must change ’padding: 4px 0.3em 4px 0;’ in ’padding: 0.4em 0.3em 0.4em 0;’ in file /assets/components/codemirror/css/cm.css
                and put ’line-height: 1.2em;’ in /assets/components/codemirror/cm/contrib/php/css/phpcolors.css

                in fact margin top (margin-top + padding-top),font, font-size and line height must be same in cm.css and phpcolors.css for CSS class .CodeMirror-line-numbers and .editbox
                • for eyes only delete or comment ’font-weight: bold;’ in file phpcolors.css

                for me i make this on these files and is perfect now for line align
                .CodeMirror-line-numbers {
                ...
                    font-family: monospace;
                    font-size: 10pt;
                    padding: 0.4em 0.3em 0.4em 0;
                    line-height: 1.2em;
                ...
                }
                

                .editbox {
                  margin: .4em;
                  padding: 0;
                  font-family: monospace;
                  font-size: 10pt;
                  line-height:1.2em;
                	
                }
                
                


                PS : it will be great to make own theme without destroy then when update plugin codemirror ... how do this please ?

                  coding Java Android and NDS
                  • 12512
                  • 42 Posts
                  What an excellent plugin which I just discovered. Makes writing/maintaining snippets much more fun.

                  I found the following change to the way CodeMirror marks syntax errors helpful too. It changes the very irritating red background to a subtle red underline:

                  In file phpcolors.css change:

                  span.syntax-error {
                      /*background-color: red;*/
                      border-bottom: 1px dashed red;
                  }

                    • 3749
                    • 24,544 Posts
                    Nice tweak. cool

                    Thanks for reporting it.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 34950
                      • 31 Posts
                      I really like the functionality of this addon, but I have 2 questions:
                      1. Is it possible to enable CodeMirror to work with Resources, not only Elements? I have some HTML in [[*content]] field of resources, and making it consistent would make it look better imho. Maybe give this as an option, for those that don’t use TinyMce and such?
                      2. Is it planned/possible to implement drag&drop functions, I just saw it doesn’t work?