We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30765
    • 66 Posts
    I notice the 3.x versions of TinyMCE automatically wrap inline HTML markup in <p> tags. This causes problems with our layouts, which often rely on having inline images that are not wrapped in a paragraph.

    The moxiecode site says the solution is to set
    forced_root_block
    to false:

    http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/forced_root_block

    However, I’m not sure how I should do this in the MODx plugin. Should this be added in the configuration tab on the TinyMCE plugin page? If so, how do I set the value to false, rather than set the value to ’false’ as a string, which obviously wouldn’t help much? (forced_root_block should be set either to false or do the value of the block tag, ’p’ by default.)

    Or is there a text file I should be editing to add a forced_root_block variable with a value of false? Which file?

    Thanks
    Matt
      • 30765
      • 66 Posts
      Ah well ... for anyone else who comes across this, the fix is to edit assets/plugins/tinymce3101/jscripts/tiny_mce/tiny_mce.js and change the value of forced_root_block to false. I’m sure this isn’t the ’right’ way but, y’know, it works.
        • 25046
        • 194 Posts
        This is my problem too. I am trying to enter a MaxiGallery call and the editor keeps wrapping it in a <p> tag which breaks my layout.
          • 26931
          • 2,314 Posts
          Hi there,

          I’m trying to disable "forced_root_block" in an 9.6.3 RC2 installation without success. in tiny_mce_src.js i changed
          forced_root_block : 'p',
          to
          forced_root_block : false,
          , but tinyMCE still keeps wrapping every element. Despite mentioned above, it didn’t work to change anything in tiny_mce.js, i got a blank editor...it looks like all settings should be made in tiny_mce_src.js...

          any ideas?

          cheers, j
            • 30765
            • 66 Posts
            Are you sure it’s not being cached? Clear your cache and see if that helps.

            My tiny_mce.js is here for reference:

            http://idealog.co.nz/assets/plugins/tinymce3101/jscripts/tiny_mce/tiny_mce.js

            I’m sure tiny_mce_src.js is just for convenience, so you can see the settings in a readable format.

            Cheers
            Matt
              • 26931
              • 2,314 Posts
              Hi tuatara!

              yes, i cleared browser- and MODx-cache.
              ...i’ll check your file, thank you!

              cheers, j

              *edit: laugh it’s working now!
                • 2901
                • 277 Posts
                Hi All

                well I am also back to this issue with TinyMCE 3.201 in the newest version of MODx 0.9.6.3 Tiny MCE persistently keeps adding a <p>to all TV’s and chunks.
                I’ve put forced_root_block to  false, as well as
                force_p_newlines to 0, also tried it with false. No luck.

                Anyone an Idea what else I could do?

                Thanks in advance
                Beat
                  • 2901
                  • 277 Posts
                  Hi all
                  forced_root_block


                  works well! I’ve changes it in the wrong file :’( !

                  It has to be changed to false in "tiny_mce.js" and not in "tiny_mce_src.js"

                  Sorry for the confusion.

                  cheers
                    • 4429
                    • 429 Posts
                    forced_root_block
                    appears in 9 locations. What exactly should be edited?
                      • 26931
                      • 2,314 Posts
                      hi,

                      the part where you have to set it from
                      forced_root_block:true,
                      to
                      forced_root_block:false,


                      j