We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    I have managed to hack out a very crude plugin for the markItUp editor. This is much like any RTE, only without the WYSIWYG part. No messing with MODx tags, no "helpful" cleanup of the HTML you want. A cross between TinyMCE and CodeMirror. Highlight text and click toolbar buttons to add HTML tags. Has image and URL insertion, too.

    While I hope to refine it and get it working better, it does work, and just needs tweaking that I can't do right now (dratted eyes!). To-do includes adapting the includeJs() and includeCss() functions from the managermanager utilities functions. Also need be able to adjust the sets and skins via plugin configuration instead of hard-coding the paths. And of course fix it so that it's a regular recognized RTE for the site configuration (or user settings or whatever). And something's not quite right with the styling, but my eyes are on the blur again and it seemed good to throw it out at this point for others to pick up and run with.

    Create a folder in your assets/plugins for markitup - assets/plugins/markitup.

    In that folder, put the stuff from markitup - the .js file and the sets, skins and templates folders. Make your custom sets as you like. Make sure the main jquery library is available.

    Paste the following into a new plugin, and check the onDocFormRender and onDocFormPreRender events. Edit the paths to the libraries, sets and skins (at least until the plugin configuration can be set up to do that).

    Disable or turn off the regular rich text editor.

    Anyway, this is more a proof-of-concept, to get it started, and certainly is not intended to be a finished product.



      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
      • 7662 ☆ A M B ☆
      • 276 Posts
        http://modx.im - Russian community
        http://extras.evolution-cms.com - Repository for Evolution
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I knew somebody had to have done this. And definitely the proper way to do it.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          You know, it's really easy to add MODx tags to that sets.js file...
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 13428 ☆ A M B ☆
            • 1,031 Posts
            markitup Editor should be a new tv type and it should not replace the current RTE since it is not a RTE in my opinion.

            BTW: tv type rendering is a mess in Evo and there should be regClient functions in the backend.