We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36527
    • 120 Posts
    Hi guys,

    Love MODx and have created a few sites in it now. One thing is still bugging me though.

    Can someone please tell me where (and what code/tagsto use) in the TINY Plugin directory to add configs to Tiny to make it :

    1. When copy/pasting stop adding
    tags - add <p>’s only.

    2. On submit/save auto cleanup code to XHTML and perhaps convert the br’s to p’s as per point 1.

    I know this can be done from reading the moxiecode site, but have not got a clue what and how and where to do it (web designer, not a programmer!!)

    TIA
      • 4018
      • 1,131 Posts
      Try going into the plugin configuration and disabling the Cleanup option (http://wiki.modxcms.com/index.php/TinyMCE). As to the methods of the cleanup routine, that’s more a question for MoxieCode and not one I have much control over. sad

      Jeff
        Jeff Whitfield

        "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
        • 36527
        • 120 Posts
        Jeff,

        Thanks for the reply.

        I have found the relevant setting I need but not sure in the MODx Tiny implementation where to put it.

        Normally it seems this is called in the js init call on the page and would I believe solve my issue.

        convert_newlines_to_brs : false,
        force_p_newlines: true,
        force_br_newlines : false,
        remove_linebreaks : true,

        Jeff - may I ask your advice where does one put this?
          • 4018
          • 1,131 Posts
          Been meaning to address this. I’ll work on getting an extra field added in the plugin config that will allow for custom parameters. Should be able to get it done and uploaded before the weekend is up. smiley

          Jeff
            Jeff Whitfield

            "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
            • 36527
            • 120 Posts
            Jeff,

            Your a star - thank you very much indeed.
              • 4018
              • 1,131 Posts
              Done! It’s been implemented in version 2.1.1.1a...just a minor revision. wink

              http://modxcms.com/TinyMCE-2.1.1.1-1475.html

              Should work like a charm! Be sure and read the updated wiki page regarding the new parameter (http://wiki.modxcms.com/index.php/TinyMCE). Let me know how it works! smiley

              Jeff
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                • 36527
                • 120 Posts
                Jeff,

                Spot on - works like a charm - thanks for all your efforts smiley
                  • 25447
                  • 10 Posts
                  Good day, Jeff

                  Installed v 2.1.1.1a on 0.9.6 but custom parameters doesn’t work.
                  Actually I want to prohibit tiny mce to make a new lines in code. Tried to apply
                  remove_linebreaks : true
                  by adding this line to textarea named "Plugin configuration" in Resources - Manage Resources - Plugins - TinyMCE - 2.1.1.1a: - Confuguration, after
                  ....
                  Buttons 4;text; 
                  &webAlign=Web Toolbar Alignment;list;ltr,rtl;ltr
                  but nothing happened. sad

                  Also tried to copy lines from http://wiki.modxcms.com/index.php/TinyMCE, but nothing changes. What am I doing wrong? Or may be another solution to make Tiny mce don’t make a new line for tags?

                  Thanks in advance.

                    • 4018
                    • 1,131 Posts
                    Roma, what theme are you trying to use? I think it only works with the Content Editor and Custom themes.
                      Jeff Whitfield

                      "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                      • 25447
                      • 10 Posts
                      I am using a Custom Theme in manager section