We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15001
    • 697 Posts
    Hi,

    I’m new to MODx and trying to install the EditArea syntax highlighter.
    This is my first plugin install, so please pardon my ignorance.

    I followed all installation configuration steps but just cannot understand how to install the plugin in MODx.

    Here what I did :

    1) Downloaded EditArea’s archive from http://modxcms.com/Plugin-EditArea-1263.html
    2) Extracted archive and put the edit_area folder in assets/plugins.
    3) Added a new plugin in the manager, copy-paste the plugin title and description from the README file.
    4) Set the plugin setup field in Configuration tab and set the corresponding System Events as described in the EditArea’s README file.

    There is some "editarea.plugin.php" file at my site’s root that I don’t know what to do with.

    When trying to edit a document, I can see TinyMCE and "none" as available editors, but not EditArea.
    What should I do ?

    Thanks for any help.
      • 26903
      • 1,336 Posts
      EditArea is a source code editor/syntax highliter for php,css, python et al.

      I’ve used it in the past to edit snippets etc.

      I don’t think its for document content, so you won’t see it when you edit a document, you need a HTML/RTE editor like TinyMCE for this as you’ve seen.
        Use MODx, or the cat gets it!
        • 15001
        • 697 Posts
        Thanks,

        I also cannot edit snippets nor templates with EditArea, although I set it to the "Core and Manager" category.
        This makes me think that I did not install it correctly.

        TinyMCE does not suit what I want. I dislike Wysiwyg editors and I want in MODx some alternative editor with syntax highlighting.

        Is this possible ?
          • 15001
          • 697 Posts
          Installing EditArea as text editor for documents in MODx is possible.

          What I was not aware about --it was my first plugin install-- is that it is necessary to open the editarea.plugin.php plugin source file with a text editor and copy its content in the source code area of the plugin added in MODx, without the leading "<?php" marker.

          You can see in this thread a screenshot of EditArea in MODx :
          http://modxcms.com/forums/index.php/topic,8285.msg58705.html#msg58705
            • 36416
            • 589 Posts
            Quote from: Jul at Oct 16, 2008, 08:41 AM

            I also cannot edit snippets nor templates with EditArea, although I set it to the "Core and Manager" category.
            This makes me think that I did not install it correctly.

            You probably didn’t because it should show for every resource type you checked OnRender event.

            Oh, editarea.plugin.php is in the root of the site?
            It must be in assets/plugins/edit_area/ (did you decompressed plugin archive with folder structure preserved?)
              • 15001
              • 697 Posts
              Thanks for your answer.

              As you can see, I could solve the problem as you was writing your answer.

              The file structure was preserved , but with editarea.plugin.php at the root of the site.
              Else, EditAreas’s files would have been in assets/plugins/assets/plugins/editarea.
              So, I was obliged to put editarea.plugin.php at the root if I wanted to preserve the file structure.

              I pasted editarea.plugin.php code into the "code" text area for the plugin once it was created in MODx.
              Could I simply keep the code in a separate file ? (Please pardon my ignorance, I’m new to plugins.)

              I saw that there is some "manager/actions/" folder in MODx with a lot of PHP files.
              I wonder if one can put the editarea.plugin.php code in it and modify some MODx config file to make EditArea native in MODx. Does anyone knows the purpose of "manager/actions/" files ?
                • 36416
                • 589 Posts
                Quote from: Jul at Oct 16, 2008, 10:25 AM

                I pasted editarea.plugin.php code into the "code" text area for the plugin once it was created in MODx.
                Could I simply keep the code in a separate file ? (Please pardon my ignorance, I’m new to plugins.)

                No, now that I looked into EditArea archive file, you did the right thing...

                I saw that there is some "manager/actions/" folder in MODx with a lot of PHP files.
                I wonder if one can put the editarea.plugin.php code in it and modify some MODx config file to make EditArea native in MODx. Does anyone knows the purpose of "manager/actions/" files ?

                Those are native manager action handlers, its better to keep them separate from plugin functionality.
                  • 15001
                  • 697 Posts
                  Thanks.
                  • Quote from: Jul at Oct 15, 2008, 03:16 PM

                    Hi,

                    I’m new to MODx and trying to install the EditArea syntax highlighter.

                    What should I do ?

                    Thanks for any help.

                    As of EditArea 0.5.1, you can simply use the installer!

                    Here is the new thread: http://modxcms.com/forums/index.php/topic,38607.0.html
                      Mike Reid - www.pixelchutes.com
                      MODx Ambassador / Contributor
                      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                      ________________________________
                      Where every pixel matters.