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
    treigh, good stuff!
    In addition, don't forget to protect your chunks with a suffix: TinymceWrapperContent-personal
      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.
      • 30585
      • 833 Posts
      Quote from: donshakespeare at Sep 21, 2015, 08:09 PM
      treigh, good stuff!
      In addition, don't forget to protect your chunks with a suffix: TinymceWrapperContent-personal

      Will do. Thanks again for this great tool! I'm really having fun with it.
        A MODx Fanatic
      • Yes, I just got into it myself, and find it to be very nice. A modification of one of the chunks, and a small patch to the code and it works great in conjunction with Lingua. Just to repeat and clarify the Lingua issue, the selector in the TinymceWrapperContent chunk needs to be changed to
        selector : "textarea[id^=ta]"

        And line 427 of the plugin needs to add a delay to give Lingua time to load its various internal parts - note the this,{delay:2100} part:
              $modx->regClientStartupHTMLBlock("<script>" . $browserFunctions . $autoSaveTextAreas . $browserTVs . "Ext.onReady(function () {" . $intro . $desc . $con . $richTv . $enableDisableTinyClick . "},this,{delay:2100});</script>");
        
          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
          • 42562
          • 1,145 Posts
          Thanks to sottwell for suggesting that this be a feature.
          addTinyMCEloadDelay comes in next release
            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.
            • 30585
            • 833 Posts
            @donshakespeare, is there a way to change the CSS file for the content area? With the other editors, you simply have to provide the editor_css_path in system settings to load custom styles for the content area. Any idea how we can achieve this?
              A MODx Fanatic
              • 42562
              • 1,145 Posts
              One-liner!
              http://www.tinymce.com/wiki.php/Configuration:content_css

              In whatever textarea you want
              tinymce.init({
                ...
                content_css: "httpMyVeryOwnLovelyCSS.css"
              })
                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.
                • 30585
                • 833 Posts
                That's what I'm talking about! Life should be this easy man -- thank you so much!
                  A MODx Fanatic
                  • 42562
                  • 1,145 Posts
                  You are welcome.
                  TinyMCE is a full-of-awe species all on its own, wait till you start using its API...
                    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.
                    • 33657
                    • 128 Posts
                    You said you can turn on or off the MCE Wrapper for any Template variable?

                    is it possible to turn them off for All TVs by default and then turn them on for specific TVS?

                    How would I accomplish that
                    assuming my TV i want on are called "Questions" and "Answers" [ed. note: zurie last edited this post 8 years, 6 months ago.]
                      • 42562
                      • 1,145 Posts
                      MODx Manager does not give TVs specific permanent identifiers, so it would be rather difficult to target any one TV. (You can try targeting the temporary numbers that MODx attaches to the ID of each TV)
                      All the TVs are given a common class, this is the class that TinymceWrapper currently targets.
                      So TVs (all T Vs) can be turned off or on (not individually)

                      Now, in the frontend, NewsPublisher is so kind to append the TV names to respective IDs.
                      With this NewsPublisher idea, a simple plugin can be written to append TV names to the ID or CLASS of textareas in the Manager before each is rendered.


                      Then in TinymceWrapperTVs, do
                      tinymce.init({
                      mode : "exact", //DO NOT TOUCH
                      selector : "textarea[id^=QandA].modx-richtext",
                       //can make life easier by adding common prefix to all the TVs (QandA) you wish to target
                      ...})

                      Or
                      tinymce.init({
                      mode : "exact", //DO NOT TOUCH
                      selector : "#questionTV.modx-richtext, #answerTV.modx-richtext",
                      ...})


                      Write the simple plugin, and all is cakewalk.
                        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.