We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19369
    • 1,098 Posts
    Hi, I have just found out about CodeMirror (http://codemirror.net/), is there a working implementation with MODx?
    I have tried this but doesn’t work for me: http://www.modxcms.cz/forums/tema-codemirror-pro-modx-evolution-plugin
      • 21262
      • 1 Posts
      http://modx.com/extras/package/codemirror

      Should be able to install it through the package management in manager wink.

      Edit: Whoops didn’t read the rest of the title.
        • 36404
        • 307 Posts
        hi,

        for evolution, you have something quite similar with editarea

        now, i think it wouldn’t be a hassle to write a plugin based en code mirror for Evo...

        Have swing
          réfléchir avant d'agir
          • 19369
          • 1,098 Posts
          I don’t like EditArea because it’s too slow and I have also noticed some bugs.
            • 3749
            • 24,544 Posts
            Quote from: microcipcip at May 19, 2011, 01:15 AM

            I don’t like EditArea because it’s too slow and I have also noticed some bugs.

            I’ve noticed some bugs in CodeMirror. wink

            It’s been a while, so maybe they are fixed now.
              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
              • 37059
              • 368 Posts
              I too have noticed some bugs, and it doesn’t look there’s been a new version since last September, so I doubt they’re fixed wink

              My advice is, stick with Editarea. CodeMirror looks like it has great potential, but in its current implementation it annoyed me so much that I uninstalled it from all my sites. I now either use It’sAllText with jEdit or simply stumble along with no highlighting. I know Splittingred is a little busy smiley but I hope soon he will find time to fix and improve the package. Syntax highlighting on the backend make everything easier (when it works right).
                Jason
                • 19369
                • 1,098 Posts
                Quote from: kenquad at May 19, 2011, 02:51 PM

                I too have noticed some bugs, and it doesn’t look there’s been a new version since last September, so I doubt they’re fixed wink

                My advice is, stick with Editarea. CodeMirror looks like it has great potential, but in its current implementation it annoyed me so much that I uninstalled it from all my sites. I now either use It’sAllText with jEdit or simply stumble along with no highlighting. I know Splittingred is a little busy smiley but I hope soon he will find time to fix and improve the package. Syntax highlighting on the backend make everything easier (when it works right).

                What are the "major" bug of CodeMirror? I am asking because I have only tried the demo and I didn’t notice any. I am also using "It’s All Text" at the moment because EditArea takes lot of time to load.

                Edit: CodeMirror 2.0 was released on 28-03-2011, did you try it or you’re talking about the previous release?
                  • 3749
                  • 24,544 Posts
                  I’m pretty sure I didn’t try that version. What annoyed me was that there were parentheses that didn’t show up on the screen when editing, but were saved to the DB -- causing PHP syntax errors that were the devil to find. I ended up retyping the whole line to correct them.

                  I also didn’t like CM’s tendency to highlight the whole end of a document in red while I typed because there were syntax errors until I finished the line.

                  If you’ve used a really good code editor like PhpStorm or NetBeans, the features of CM are pretty minimal. That said, I agree that a lightweight syntax highlighter in the Manager is a valuable tool.
                    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
                    • 19369
                    • 1,098 Posts
                    Thanks BobRay. In this page (http://codemirror.net/internals.html) the developer says that CodeMirror 2.0 is "a complete rewrite and rethink of the old code base", so maybe those errors have been fixed.

                    I know that CodeMirror doesn’t have many features, but I am more interested in the speed than the number of features. Usually I make the layout in html/css using notepad++ and then I create a MODx Template, so I need a simple and fast editor highlighter, and CodeMirror does seem to be simple and VERY fast.
                      • 37059
                      • 368 Posts
                      Quote from: microcipcip at May 20, 2011, 02:38 AM

                      What are the "major" bug of CodeMirror? I am asking because I have only tried the demo and I didn’t notice any. I am also using "It’s All Text" at the moment because EditArea takes lot of time to load.

                      Codemirror’s indenting is, in my opinion, broken to the point of being nearly random. Instead of making the code easier to read, it makes it more confusing. I might have kept using it if there was only a way to turn of auto-indentation altogether!


                      Edit: CodeMirror 2.0 was released on 28-03-2011, did you try it or you’re talking about the previous release?

                      It’s true that there’s a new version of the core library, but take a look at http://modx.com/extras/package/codemirror - the MODx extra has not been updated since last September. If indeed CM 2.0 is in fact a great improvement, I hope that Splittingred will get the new library implemented soon (it’s not like he has anything else to do wink). If and when that happens, I’ll be back to try it smiley
                        Jason