My MODx Revolution

TinyMCE Wrapper for MODx Manager

Complete Back/Frontend Content Solution: TinyMCE CDN, TinyJSONGallery, TinyMagicPublisher, 3 Custom File Browsers

Request:

  1. I need always, the latest and best version of TinyMCE to work with all aspects of my MODX manager / frontend - with seamless connection to NewsPublisher. I want complete perfection!
  2. I do not want to fight with MODx in order to utilize any and all TinyMCE plugins/configurations; I don't want to ask basic TinyMCE-related questions in the MODx forum.
  3. I want ability to disable individual TinyMCE  textareas (introtext / description / content / File / Image / RichText TVs / Quick-Update-Resource)
  4. I want, besides the native MODX file browser, other browsers of my delicate choice. In fact, I need full support for elFinder, Responsive FileManager and Roxy Fileman.
  5. I want Quick Update/Create multiple Resources at the same time, plus a fantastic MODX resource tree to show up in TinyMCE link_list, plus a floating bar when I select text, plus ability to edit my source code in CodeMirror...
  6. I want automatic integration with any and all 3rd Party MODX Extras.
  7. And of course I want a novel Image Gallery to boot.

The MODX Extra - Forum Discussions - Slack channel

TinymceWrapper is incompatible with FixedPre

STEPS

  1. Install and test TinymceWrapper resource back and frontend. It should work right away if the plugin is activated and there is no interference by another RTE. It automatically sets itself as default RTEditor for resources. Deactivate the plugin to use other RTEs.
    Please observe the chunks and snippets it created for you.
    To configure, find TinymceWrapper Plugin -> properties tab.
  2. To populate link_list with MODX resources, look at chunk TinymceWrapperContent which has a call to $TinymceWrapperLinkList. You will need pdoTools(pdoMenu) or whatever else you use to 'get resources'.
  3. elFinder -  find the snippet elfinderConnector -> go to properties to configure. For advanced settings, edit the elFinder volume chunks.

    elFinder Possible url options: all standard elFinder features (find in official WIKI)

    - Open the elFinder resource created for you:
    tw_elfinder_browser.html?rememberLastDir=0&useBrowserHistory=0
    &folder=assets&pset=customSet&unlocked=1
    &hide=234p&defaultView=icons
    &sort=name&sortDirect=desc

    - By default, elFinder will lock all your folders. Change setting by viewing the properties of the elFinder snippet. Find the snippet, right-click on it, find properties. Best to create your own property set.
    1. unlocked=1 - If you are an admin use this to lock all folders from the browser
    2. rememberLastDir and useBrowserHistory - must be 0 if you use folder to quickly target destination
    3. hide - you have 6 volumes (1,2,3,4,5,p) to work with, you can hide any via browser when you want. To hide p (personal folder) hide=p, to hide 2,4 and 5 and p, use hide=2345p
    4. folder - if you have multiple volumes, only the first will work. You may hide the rest except the one you wish to target. Say you wish to target in {volume 4} myImages/the business/wonderful acres/pdfs 
      do tw_elfinder_browser.html?hide=1235p&folder=myImages/the business/wonderful acres/pdfs
    5. pset - by now you have created your own Property Set to backup your settings. To use it, do  tw_elfinder_browser.html?pset=customSet...

  4. Responsive FileManager -  find the snippet responsivefilemanagerConnector-> go to properties to configure. For advanced settings, invent something!
    1. Please see official WIKI for all the parameters that RFM URL supports
    2. We added one, pset=yourCustomPSet

Roadmap:

  1. create more awesome themes
  2. handcraft some powerful plugins
  3. add the very awesome Pydio file browser

Philosophy:

  • TinyMCE has the best community I can think of, RTE-wise. In my opinion, this RTE is also best.
  • Keep TinyMCE's actual init absolutely apart from any form of PHP: all exposed to the user in readable chunks
  • Allow users to do whatever user wants with the actual TinyMCE plugin folder from Tinymce.com: to update or not to update
  • Allow user to use existing compatible TinyMCE / custom filemanager plugins
  • Do not obscure anything if possible
  • Make it possible that any/all questions generated by this Wrapper can be asked and solved on the tinymce.com forum, that is, they have nothing to do with MODx per se
  • Be beautiful, be simple!

24 Comment(s)

    Xman

    Sep 09, 2015 at 01:39 AM

    It's a great extra!
    I've just a problem to install the TinyMce Table plugin.
    In TinymceWrapperContent:

    plugins: "…table…"
    toolbar: "…table…"
    contextmenu: "…inserttable tableprops deletetable cell row column…"

    When I insert table, the code generated is only Line Break.

    Can you help me make the right configuration?

    Reply to this

      Excellent-Functionality

      Sep 09, 2015 at 06:30 AM

      Thanks, Xman.

      DonQuicky has a solution here: MODx support comments for tinymcewrapper #528436. Please let me know if this is what you are looking for.
      I am sure the problem can be easily solved.
      Cheers.

      Reply to this

    batpyiiikob

    Nov 01, 2015 at 10:33 PM

    Hello. I add image in TinymceWrapper and change params (width or height).. but it not save.
    Image not resized on frontend :(

    Reply to this

      Excellent-Functionality

      Nov 08, 2015 at 11:54 PM

      What do you mean, 'frontend'? You mean backend (Manager?)

      Reply to this

    daniel

    Dec 16, 2015 at 10:40 AM

    it's not working over SSL (https)

    Reply to this

    Anne Miles

    Feb 03, 2016 at 03:07 PM

    Dearest Mr Shakespeare,

    I unfortunately do not wish to use Newspublisher, is it still possible for me to use this tool?

    I'm having troubles.

    is there a demo somewhere?

    Reply to this

      Excellent-Functionality

      Feb 03, 2016 at 06:02 PM

      Only Demo is in the Extra's resource, viewed backend or frontend.
      What troubles in particular, let us troubleshoot it.

      The Extra requires NewsPublsher, for now, for frontend magic

      Reply to this

    Miek

    Feb 19, 2016 at 02:19 AM

    Love it, thanks so much!

    Just added a subdomain to my MODX Manager (context) and would like to use the same template as my main domain. Unfortunately, only the text/structure loads, so no images/menus/... I just get a white page with my text content.

    Is there a way to fix this?

    Reply to this

    Ashok

    Apr 27, 2016 at 04:34 AM

    I am getting the below Error when trying the Creating new document. This started after installing Tinymce and Tinymcewrapper plugin.

    Call to a member function getTVValue() on null in /hsphere/local/home/ortogonal/ortogonal.se/core/cache/includes/elements/modplugin/29.include.cache.php on line 162

    Please help me to get rid out of this issue which I am facing currently.

    Reply to this

      Excellent-Functionality

      May 24, 2016 at 12:03 AM

      Sorry for your pains. Issue is fixed. Please upgrade to latest 2.3.1+

      Reply to this

    LK

    Jul 22, 2016 at 03:02 AM

    When I install I can see it appearing fro summary (introtext) but my content and descriptions are completely blank and not editable just a checkbox which is already checked?

    Reply to this

      donshakespeare

      Jul 23, 2016 at 04:56 AM

      Blank means your editor skin did not load, and perhaps some TintMCE local plugin. Check your browser for errors and please report back.
      Are you using this TinymceWrapper on a multi-domain MODX setup?

      Reply to this

        LK

        Jul 23, 2016 at 07:38 AM

        Thank you for the reply. It's a single domain and the editor loaded fine for other sections, I'll check the console log shortly and report back though. Also tested on two different domains/servers one was a clean MODX install.

        LK

        Jul 26, 2016 at 05:29 AM

        Sorry for the late reply.

        The error I get in the console is this:

        TypeError: this.getDoc(...) is undefined

    donshakespeare

    Jul 27, 2016 at 01:32 PM

    As per this report:
    https://forums.modx.com/thread/97694/support-comments-for-tinymcewrapper?page=26#dis-post-542429

    Copy this plugin:
    modxMagicHoverLink.js from https://github.com/donShakespeare/modxMagicHoverLink

    And replace/update:
    yoursite.com/assets/components/tinymcewrapper/tinymceplugins/modxMagicHoverLink.js

    Refresh page, and you should be golden.

    Reply to this

      LK

      Jul 28, 2016 at 06:38 AM

      Thanks. That seems to have fixed things for the most part.

      Though if I click on the generated TinymceWrapper resource the preloader doesnt ever finish - though the text editor has loaded. Also is the JSON image gallery meant to be empty on this test resource?

      Many thanks again for your help.

      Reply to this

      donshakespeare

      Jul 29, 2016 at 01:39 AM

      LK, TinyMCE Version 4.4.0 - June 30, 2016 was an update that broke TinyJSONGallery.
      https://www.tinymce.com/docs/changelog/
      And no, the gallery should load demo images.

      I will be releasing a patch soon to address all this mini issues.
      Thanks for using and reporting.

      Reply to this

        dB

        Aug 09, 2016 at 07:23 AM

        Hi,

        I've just started using your brilliant TinyMCEwrapper since TinyMCE stopped working in latest MODX release.

        A great feature of TinyMCE was the ability to paste as text, to removed formatting when copying from Word documents.

        Is it possible to "paste as text" in TinyMCEwrapper? If not, would you consider adding this feature?

        Thanks

        donshakespeare

        Aug 10, 2016 at 02:25 AM

        dB, thanks for the feedback.

        Plain-text pasting is not a feature of any one MODX Extra, but of TinyMCE itself. It is governed by the powerful paste plugin.
        https://www.tinymce.com/docs/plugins/paste/

        So, in your chunk:


        tinymce.init({
        plugins: "..., paste, ....",
        toolbar: "..., paste, ....",
        paste_as_text: true
        });

        OR else just hold Ctrl key and right-click (Paste as plain text Ctrl + Shift + V)
        Remember, all of TinyMCE's unmatchable power is open to you. By TinymceWrapper using CDN, you are not jipped in any way. Enjoy!

    John

    Nov 16, 2016 at 03:50 PM

    Hi, how do I disable the Description and Summary tinymce edit boxes from showing up? I want to disable it sitewide and not just on one resource.

    There should be a global setting for that in System Settings.

    Reply to this

      donshakespeare

      Nov 17, 2016 at 03:28 PM

      Hello John,

      TinymceWrapper does not use System Settings, as it should not clutter up those settings.

      All its global settings are in its plugin properties.

      You'll find more than two ways to disable anything you want in those plugin settings.

      Reply to this

        John

        Nov 18, 2016 at 08:53 AM

        Thank you.

POST YOUR COMMENT





Please wrap your code with <pre class='prettyprint linenums'></pre>
Or just click the html tags above