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

    I tried to find a tutorial to create a plugin to load external .js files (load an editor that doesn't exist in modx plugins) into the manager without success.

    Can give me some tips or point into the right direction to achieve that?

    Thank you for your time!

    Jordi.
      • 3749
      • 24,544 Posts
      To load a JS file, you can use code like this in a plugin attached to the appropriate System Event (e.g, OnManagerPageBeforeRender):

      $modx->regClientStartupScript('url/of/js/file');


      That said, I think it's unlikely that you'll get a third-party editor to work in the modExt-based Manager without a lot of frustrating work.

      Have you looked at the Redactor, TinyMCE, CKEditor, Ace, and CodeMirror extras (assuming that you mean MODX Revolution)?

        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
        • 47671
        • 2 Posts
        Hi Bob,

        We're actually trying to install Redactor although we have already purchased a license for it and the only Redactor package we can find is a subscription based, which isn't ideal for the projects we're working on.

        I'm struggling to find any decent guides on making a text editor package - do you have any useful resources we should check out?

        We've put together a hack by adding JavaScript in the template footer for now, but this isn't ideal.

        Thanks

        Gary
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          If you view the pricing they do have one time licenses here: https://www.modmore.com/extras/redactor/pricing/
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 3749
            • 24,544 Posts
            I'm still not clear on what you're trying to do. Your message makes it sound like you're trying to create a package to install Redactor on multiple sites, but without buying additional licenses. I'm sure that's not what you mean, so maybe you're intending to create your own text editor package from scratch. That would be a monster job and with all the Open Source editors out there, I wouldn't consider 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
              • 47671
              • 2 Posts
              Thanks for the responses.

              Regarding the licence, We have already purchased a license direct from Imperavi who make Redactor. Our license is for unlimited domains and integration on unlimited websites, therefor we would rather install this ourselves using our own license if possible.

                • 18373 ☆ A M B ☆
                • 3,141 Posts
                We've got a new version of our "Redactor for MODX" package coming out soon that's based on the latest version (v1.5 is still based on Imperavi v9, our v2 will be based on Imperavi v10) and I would really recommend to just piggyback on the work we've been doing, rather than trying to do it all yourself. That way, you also get a fully integrated media manager, a bunch of plugins we custom developed and support in case things don't work.

                We've spent an incredible amount of hours over the last two years developing and maintaining the MODX integration, and to get unlimited licenses from us is still cheaper than the OEM license from Imperavi. The only disadvantage is that it is limited to MODX, so if you want to also use it in other projects or in the front-end, you'll need an Imperavi license.
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.