Subscribe: RSS
  • treigh, good stuff!
    In addition, don't forget to protect your chunks with a suffix: TinymceWrapperContent-personal
      TinymceWrapper Suite: Complete back/frontend content solution
      Structures: MODX Content Building Revolutionized

      Tips and Tutorials

    • 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
        • Thanks to sottwell for suggesting that this be a feature.
          addTinyMCEloadDelay comes in next release
            TinymceWrapper Suite: Complete back/frontend content solution
            Structures: MODX Content Building Revolutionized

            Tips and Tutorials

          • @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
            • One-liner!
              http://www.tinymce.com/wiki.php/Configuration:content_css

              In whatever textarea you want
              tinymce.init({
                ...
                content_css: "httpMyVeryOwnLovelyCSS.css"
              })
                TinymceWrapper Suite: Complete back/frontend content solution
                Structures: MODX Content Building Revolutionized

                Tips and Tutorials

              • That's what I'm talking about! Life should be this easy man -- thank you so much!
                  A MODx Fanatic
                • You are welcome.
                  TinyMCE is a full-of-awe species all on its own, wait till you start using its API...
                    TinymceWrapper Suite: Complete back/frontend content solution
                    Structures: MODX Content Building Revolutionized

                    Tips and Tutorials

                  • 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 2 years, 3 months ago.]
                    • 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 Suite: Complete back/frontend content solution
                        Structures: MODX Content Building Revolutionized

                        Tips and Tutorials