We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21255
    • 215 Posts
    This experimental Plugin replaces the standard textarea for editing snippets with CodePress. To use it, extract archive to plugins folder, create a new plugin with the code from codepress.plugin.php and toggle ’OnSnipFormRender’ event.

    Edit: Don’t use this version, it has been obsoleted. Try 0.2 instead.
      • 6726
      • 7,075 Posts
      There was already something to that effect, but it was not a *live* syntax highlighting... this is awesome !
      I have been dreaming about this for a long time... Off to install this baby grin

      It this works fine, I say we bundle this plugin with the MODx distribution...

      Edit : Just wondering... how difficult would it be to add this for template editing ?
      It would be nice having html with syntax highlighting... and modules, plugins and possibly other content too...
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 21255
        • 215 Posts
        The CodePress editor already supports HTML/CSS highlighting among PHP and others, too. It seems to be quite easy to make that work for template editing, chunks, and so. Will do it by time if nobody else does wink
          • 6726
          • 7,075 Posts
          Yeah well, too bad I can’t help there, my php training is planned in december...

          Anyway, thanks smiley
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
          • This is a GREAT tool grin Exactly what I’am looking for... Now I have a replacement for all my [[Include]] wink

            David, I have made some tests and it works fine with Chunks and Templates...
              Ackwa - Web Design & Development agency | Tours - France | Follow me on Twitter...
              • 22221
              • 283 Posts
              Waow grin grin!!!

              I dream of something like that. This Plugin is a must have. it’s work well and it’s easy to use it with template, chunk, plugin and module editing. Just replace the line
              if($e->name=='OnSnipFormRender') {
              

              by
              if($e->name=='OnSnipFormRender' || $e->name=='OnChunkFormRender' || $e->name=='OnPluginFormRender' || $e->name=='OnModFormRender' || $e->name=='OnTempFormRender') {
              

              And add the following events : OnChunkFormRender, OnPluginFormRender, OnModFormRender, OnTempFormRender

              For the moment I don’t succed in using it with document editing. Any idea ?
                • 6726
                • 7,075 Posts
                Thanks guys !

                @OncleBen31 : I’ll try this code !

                I imagine what you tried and didn’t get to work for documents is add

                $e->name==’OnDocFormRender’

                to the list.

                I am no dev as you know, but when you tried it, did you turn off WYSIWYG ? If WYSIWYG is on, it is logical since it’s not a textarea but a richtext area.

                Plus, if there are several plugin which listen to the same event, that could also be the cause of it... There is a new feature in 0.9.5 which allows to control the execution ordrer of plugins, maybe look in that direction...



                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l'outil id
                  • 22221
                  • 283 Posts
                  I’ve already test without the Rich Text Editor : still doesn’t work. And I’ve test to change the order execution with Button Botom Bar... and no change.
                    • 6726
                    • 7,075 Posts
                    Ok... thanks.

                    Maybe someone from the dev team could help us here smiley
                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l'outil id
                      • 22221
                      • 283 Posts
                      Quote from: davidm at Oct 18, 2006, 10:04 AM

                      Maybe someone from the dev team could help us here smiley
                      Please wink

                      If there is RegExp master, I think it will be easy for him to add some code in the javascript to add the MODx tag for highlighting.