We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17815
    • 50 Posts
    I’m really really really tiered to write chunks, snippets etc in ModX admin - so here is very simple plugin that will fix this:

    http://code.google.com/p/modxeditarea/




    PS: I found such plugin, but it old, and with old version of editarea
      • 27708 MODX Staff
      • 2,502 Posts
      That’s cool! Nice work.

      Is there any reason you might not add it to the MODx Extras repository so people could get it from there?
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. Blog ✦ Twitter ✦ LinkedIn ✦ GitHub
        • 8790
        • 526 Posts
        Hi
        Edit area was nice,
        but this last version it has a buggy behavior (in my recent 1.02 modx install.)

        When editing - I mean each time you click somewhere in the text - text is somewhat doubled (appears 2 time one line over a ghost one), making the tool unusable.

        And in the v1 you linked here, there is at least this bug at line 16 of plugin.txt + you name the plugin folder editarea instad of edit_area as described.

        	$e->output('<script type="text/javascript" src="'.$modx->config['base_url'].'assets/plugins/editarea/edit_area/edit_area_full.js">

        sub folder editarea/edit_area/ does not exist in the archive tree. the path should be editarea/ only.

        However I’m not able to make this V1 running at all.
        Can you help ?

        Thank you
          Schtroumpf Grognon - Grouchy Smurf
          ---------------------------------
          Faites pas attention.. - Don&#39;t pay attention
          http://www.dzi-neo.net
          • 29607
          • 14 Posts
          Just a TIP for the VIM users: If you use vimperator (you should if you are a vim fan) just press Ctrl + I in the edit area, so when editing, and it popups you a vim (gvim) with the code that you are editing, when you :wq you will have the code dumped to the edit area smiley
            • 17815
            • 50 Posts
            v2 is here,
            changelog:
            i forget for template editing smiley


            Quote from: elz64 at Jan 31, 2010, 03:12 AM
            sub folder editarea/edit_area/ does not exist in the archive tree.

            when you extracting archive, dirictories must be like this:
            /assets/plugins/editarea/
              plugin.php
              ea_functions.js  
              edit_area/



            And all will work, I this you dismis this part, will add it to docs.
              • 17815
              • 50 Posts
              Quote from: mac2000 at Feb 02, 2010, 08:16 AM

              v2 is here,
              changelog:
              i forget for template editing smiley


              Quote from: elz64 at Jan 31, 2010, 03:12 AM
              sub folder editarea/edit_area/ does not exist in the archive tree.

              when you extracting archive, dirictories must be like this:
              /assets/plugins/editarea/
                plugin.php
                ea_functions.js  
                edit_area/



              And all will work, I this you dismis this part, will add it to docs and extract content of archive to plugins folder if not, you can try download v2 or event get it from svn.
                • 8790
                • 526 Posts
                hi,

                Well after having re deziped the archive and ftp it again, things gets better.

                However, the editor interface has cyrilics text (such as "Переключить редактор" at its bottom and some counting information at its status line too)

                the rest is actually in French as intented. Can I do something ?

                Thank you
                  Schtroumpf Grognon - Grouchy Smurf
                  ---------------------------------
                  Faites pas attention.. - Don&#39;t pay attention
                  http://www.dzi-neo.net
                  • 17815
                  • 50 Posts
                  Quote from: elz64 at Feb 02, 2010, 08:53 AM

                  However, the editor interface has cyrilics text (such as "Переключить редактор" at its bottom and some counting information at its status line too)
                  the rest is actually in French as intented. Can I do something ?


                  Yeah, my fault, yes you can fix it, all you need is to fix ea_functions.js file.

                  Open it and find on line 29 string like this:
                  language: 'ru',

                  and replace with this one:
                  language: getLangName(lang),

                  and all we be ok,

                  at the getLangName function you can add cases for french language, it will be something like this:
                  case 'francais': res = 'fr'; break;
                  case 'francais-utf8': res = 'fr'; break;


                  where francais and francais-utf8 are langs from modx, and fr is available lang of editarea (look into /assets/plugins/editarea/edit_area/langs)


                  fixed and downloaded to http://code.google.com/p/modxeditarea/ V3

                  many thanks for bug report
                    • 17815
                    • 50 Posts
                    Quote from: elz64 at Feb 02, 2010, 08:53 AM

                    hi,

                    Well after having re deziped the archive and ftp it again, things gets better.

                    However, the editor interface has cyrilics text (such as "Переключить редактор" at its bottom and some counting information at its status line too)

                    the rest is actually in French as intented. Can I do something ?

                    Thank you


                    Fixed and downloaded v4 http://modxeditarea.googlecode.com/files/editarea_v4.zip

                    at this moment editor will be in almost all languages that modx and editor supports (copy-pasted from tinymce plugin)
                      • 8790
                      • 526 Posts
                      ok,

                      that’s it!

                      Well last thing the plugin works for plugin and snippet edition, but not at all for chunck or template.
                      The events are correctly choosen...
                        Schtroumpf Grognon - Grouchy Smurf
                        ---------------------------------
                        Faites pas attention.. - Don&#39;t pay attention
                        http://www.dzi-neo.net