We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42562
    • 1,145 Posts
    Thanks for feedback.
      TinymceWrapper: Complete back/frontend content solution.
      Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
      5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
      • 37105
      • 194 Posts
      You're welcome!

      Remains one issue:

      I created a custom property, added a chunkSuffix, duplicated the used chunks with chunkSuffix appended, but when I load the RTE still the original chunk is being used. Must I tell the plugin somewhere to use the custom property set?
        Codeplaza Webdesign: for professional websites at low cost
        • 42562
        • 1,145 Posts
        Thanks for the question, I had meant to clarify the issue, since using Custom PropertySet would be a major practice.
        This discussion is for reference only http://forums.modx.com/index.php?action=thread&thread=52260&i=1

        1. Go to Plugin: TinymceWrapper
        2. Hit System events tab.
        3. Find the four checked events Name: OnDocFormPrerender...
        4. On the fourth tab of each, double-click Property Set field to select P.SET of choice

        I have attached an image to help.


          TinymceWrapper: Complete back/frontend content solution.
          Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
          5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
          • 42562
          • 1,145 Posts
          TinymceWrapper 2.1.1
          ---------------------------------
          Open the Resources created for you for mini tutorial and example of elFinder

          1. Added full support for awesome powerful elFinder file manager (BSD license) + autocreation of personal folders.
          2. Added full support for MODx native File manager. (oh yeaaa! many bottles of hard stuff to go)
          3. Added full support for beautiful Responsive FileManager (Creative Commons Attribution-NonCommercial 3.0 Unported License.) + autocreation of personal folders.
          4. Added quasi-support for Roxy file manager (GPLv3 license)
          5. TinymceWrapper has brand new options among them is newResource to allow user to specify whether to load TinyMCE for new resources.
          6. Added new chunk, TinymceWrapperCommonCode; added placeholder [[+commonTinyMCECode]] to all chunks for common code. Instead of repeating code for all chunks, place repeating common code in chunk provided - TinymceWrapperCommonCode - Things like skin_url which constantly overrides the previous is quite useless to be defined differently for multiple instances of TinyMCE on the same page. Text_pattern and so on can all go into common code. Anything common code can be overridden.
          7. Added to content/quick-update chunk example code for floating any button (fullscreen).
          8. Fixed bug that prevented quick update resource from working when user had faulty-named chunks for the other textareas. Now, if user has only one correctly-named chunk, TinyMCE will work for that one.

          Remember, if you want to survive upgrades, duplicate all chunks, retain names, add suffix, specify suffix in Plugin properties.
          Create your own property sets.
          ____________________________________

          -------Responsive FileManager-------
          ____________________________________

          1. Fixed auto detection of core path: had error for users with core folder at a non-common location
          2. Moved settings to Snippet to avoid confusion.
          3. Updated to 9.9.6
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
            • 42562
            • 1,145 Posts
            elFinder Possible url options: all standard elFinder features (find in official WIKI)

            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...


            Responsive FileManager
            -Please see official WIKI for all the URL parameters that RFM supports
            -We added one, pset=yourCustomPSet

            In TinymceWrapper Plugin properties, change the parameters you want for each browser.
            If using Native MODx browser, yes, you can change the default media source, easy peasy!

            For RFM, everything you need is exposed in the responsivefilemanagerConnector snippet properties.
            For elFinder, go to elfinderConnector.
            Take them to school.

            For auto creation of personal folders, these are the snippets that do the magic, attack them if you like:
            autoCreateFoldersTWelfinder
            autoCreateFoldersTWrfm

            FEEDBACK is highly appreciated.

            P.S (critical!!!)
            **FIXED the 404 error for browser.js**
            Redownload or open TinymceWrapper Plugin, in the code
            find
            $modx->controller->addJavascript('/demo/assets/components/tinymcewrapper/browserConnectors/browser.js');

            replace with
            $modx->controller->addJavascript(MODX_ASSETS_URL.'components/tinymcewrapper/browserConnectors/browser.js');
            [ed. note: donshakespeare last edited this post 8 years, 8 months ago.]
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
              • 42562
              • 1,145 Posts
              RE: @eminos
              RTEs might not work in Lingua non-English fields for this reason:
              1. Lingua adds the new fields on the fly.
              1a. The new fields then have the exact id as the fields they have cloned, but with a language suffix. modx-resource-description will be cloned to modx-resource-description-fr

              The whole thing works like magic, and is quite impressive.

              To use TinymceWrapper with Lingua broaden the selector:
              1. In your TinyMCE init chunks, find selector and replace the value with this kind of pattern
              something like this:
              tinymce.init({
              selector : "#modx-resource-description", ...

              should become something like:
              tinymce.init({
              selector : "textarea[id^=modx-resource-description]", ...

              The above will target textareas that begin with modx-resource-description, thus accommodating all kinds of suffixes.

              2. In the TinymceWrapper plugin, find
              "Ext.onReady(function () {" . $intro . $desc . $con . $richTv . $enableDisableTinyClick . "});

              Add some delay to accommodate the new fields being created on the fly, so that TinyMCE will catch all
              "Ext.onReady(function () {" . $intro . $desc . $con . $richTv . $enableDisableTinyClick . "},
                 this,{delay:2100}
                );


              If you use Ligua, please test.
              You may not get all the features of TinymceWrapper applicable to the Lingua new fields, I really don't know at the moment.
                TinymceWrapper: Complete back/frontend content solution.
                Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                • 42562
                • 1,145 Posts
                A new feature is coming next release. To better tune it, please tell me how you might use it.
                **Inspired by http://demo.createphp.org/what/ and of course http://medium.com

                To use TinymceWrapper in frontend to accomplish pure editing bliss

                1. open your article, myblog.html (click an edit button to trigger the magic)
                2. the button leads to myblog.html?edit=1
                3. this page is your exact article with only one difference, you can now type over existing material, in other words, your content is now editable
                4. no iframes, no forms, no inputs, no preview, no nonsense, just you and your article, the exact way people see it online. You can even edit content in fancy inline popups.

                Integration will be mighty easy for any website with any template, you need :

                1. NewsPublisher Extra
                2. TinymceWrapper Extra (optional - because all you really need is the magic snippet)

                In your template, say:
                <!DOCTYPE html>
                <html lang="en">
                <head>
                 <meta charset="UTF-8">
                 <title>my awesome site</title>
                </head>
                <body>
                  <header>
                   <h2>[[*pageitle]]</h2>
                   <div>[[*introtext]]</div>
                  </header>
                  <article>[[*content]]</article>
                </body>
                </html>

                add this tiny snippet [[!twNewsPublisherFrontendMagic]] anywhere within the body tag, and respective data attribute, like so:
                <!DOCTYPE html>
                <html lang="en">
                <head>
                 <meta charset="UTF-8">
                 <title>my awesome site</title>
                </head>
                <body>
                  <header>
                   <h2 data-tiny="np-pagetitle">[[*pageitle]]</h2>
                   <div data-tiny="np-introtext">[[*introtext]]</div>
                  </header>
                  <article data-tiny="np-content">[[*content]]</article>
                 [[!twNewsPublisherFrontendMagic]]
                </body>
                </html>

                This snippet can be extended to accommodate any TV, and possibly all MODx fields that NewsPublisher allows you to edit.
                This snippet can be extended to create new Resource like a Boss.

                To further enter nirvana via narnia ...
                I envision posting and getting info with AJAX, so that there is no page refreshing whatsoever.
                I am sure Bob Ray has a solution for AJAX, and possibly security concerns. [ed. note: donshakespeare last edited this post 8 years, 7 months ago.]
                  TinymceWrapper: Complete back/frontend content solution.
                  Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                  5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                  • 36624
                  • 535 Posts
                  oh man ! just installed on a new site.. going to test this beast and report if i can. Looks like you are on fire smiley
                    CTRL+SHIFT+U - Clear Cache
                    CTRL+SHIFT+H - Hiding Heft Panel
                    CTRL+SHIFT+N - Fast Create Resource
                    CTRL+ALT+P - Preview Recource (in edit resorce window)
                    CTRL+ALT+S - Save
                    • 42562
                    • 1,145 Posts
                    Thanks mate. My brain seems to be receiving more oxygen since my last transplant.
                      TinymceWrapper: Complete back/frontend content solution.
                      Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                      5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
                    • Hi,

                      I've read this post in this thread: http://forums.modx.com/thread/97694/support-comments-for-tinymcewrapper?page=2#dis-post-528500

                      But can't figure out how to get Tiny to work on a richtext template variable I've called richcopy (with an ID of 23).

                      Is it a case of duplicating this chunk: TinymceWrapperMIGX

                      To say: TinymceWrapperMIGX_richcopy

                      Then replacing this line:

                      elements: "tv[[+tv_id]]",
                      


                      with:

                      elements: "tv[[+23]]",
                      


                      And then add this to MIGX variable's Configuration field?

                      {"tinymce_chunk":"TinymceWrapperMIGX_richcopy"}


                      But that doesn't work so I'm most definitely failing to see how this is done.

                      Can someone provide a solid example of how one would go about making it work with a richtext TV?