We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35418
    • 23 Posts
    Ok, I’ve read every topic on this P-tag that I could find.

    Using Modx Revolution 2.1.1-pl (traditional)

    TinyMCE: tinymce-4.3.0-rc1

    I have tried everything, from this: http://modxcms.com/forums/index.php?topic=28908.0
    to manually changing files, to setting a script to listen for the document parse etc...

    No luck. Is there any solution to this? I have also reprogrammed some parts of the Back-end described here: http://modxcms.com/forums/index.php/topic,63523.msg369379.html#msg369379
    This is because the images didn’t show up on my file-list. That worked, but I never got the P-tags to disappear, tried emptying cache, flushing privileges, logging out and back in, tried to refresh. Took me hours to try out every small step, also tried some steps in combination and more.

    Eventually just ragequitted the plugin and uninstalled it, since it has ruined some of my designs. So I can only repair those designs after I get home, which means that I currently have an uglified website wink hehe.

    I hope someone knows how to fix this with ease, most of the information I have found regarding this subject is outdated.

    Greetings from Holland (and a new MODx user),
    Marinus
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can turn off TinyMCE’s block "feature" altogether with a forced_root_block setting in its configuration. Try forced_root_block: false.

      http://tinymce.moxiecode.com/wiki.php/Configuration:forced_root_block
        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
        • 35418
        • 23 Posts
        Quote from: sottwell at Jun 16, 2011, 11:25 AM

        You can turn off TinyMCE’s block "feature" altogether with a forced_root_block setting in its configuration. Try forced_root_block: false.

        http://tinymce.moxiecode.com/wiki.php/Configuration:forced_root_block


        Thanks for your reply, I’ve been setting that setting a few times now, but it doesn’t seem to work. Not even after clearing the cache and refreshing.

        Am I doing this the right way, I’m starting to wonder...
        See screenshots.
          • 35418
          • 23 Posts
          it’s crazy, I even edited it in the "tiny_mce.js"

          forced_root_block:false just replaced the "p" with false.

          Still no luck. Cleared cache, refreshed, cleared all caches everything..
            • 10449
            • 956 Posts
            Yeah, what a pain in the neck, isn’t it? One of my pet peeves... if tinyMCE was an animal, it would be a mule smiley

            fwiw, in my standard Evo config (plugin parameter) I have these extra values:

            forced_root_block:false,
            forced_root_block:0,
            force_br_newlines : true,
            force_p_newlines : false,


            Try to use 0 instead of false, and try to add the
            force_p_newlines : false 

            part too. I don’t know if they have to be used alongside each other, but it’s worth a shot...
              • 35418
              • 23 Posts
              Quote from: ganeshXL at Jun 16, 2011, 02:13 PM

              Yeah, what a pain in the neck, isn’t it? One of my pet peeves... if tinyMCE was an animal, it would be a mule smiley

              fwiw, in my standard Evo config (plugin parameter) I have these extra values:

              forced_root_block:false,
              forced_root_block:0,
              force_br_newlines : true,
              force_p_newlines : false,


              Try to use 0 instead of false, and try to add the
              force_p_newlines : false 

              part too. I don’t know if they have to be used alongside each other, but it’s worth a shot...


              Great I’ll try that! smiley

              Just did a complete search in all files in the entire TinyMCE folder containing force_root_block.
              In the Revo plugin, the force_p_newlines is already an existing value, let me try the rest too smiley

              Edit:
              Nope, doesn’t work, when I add the false as a zero, it just puts the two values together.

              Even tried this in the plugin code (last sentence):
              <?php
              /**
               * TinyMCE RichText Editor Plugin
               *
               * Events: OnRichTextEditorInit, OnRichTextEditorRegister,
               * OnBeforeManagerPageInit, OnRichTextBrowserInit
               *
               * @author Jeff Whitfield <[email protected]>
               * @author Shaun McCormick <[email protected]>
               *
               * @package tinymce
               * @subpackage build
               */
              if ($modx->event->name == 'OnRichTextEditorRegister') {
                  $modx->event->output('TinyMCE');
                  return;
              }
              require_once $modx->getOption('tiny.core_path',null,$modx->getOption('core_path').'components/tinymce/').'tinymce.class.php';
              $tiny = new TinyMCE($modx,$scriptProperties);
              
              $useEditor = $modx->getOption('use_editor',null,false);
              $whichEditor = $modx->getOption('which_editor',null,'');
              
              /* Handle event */
              switch ($modx->event->name) {
                  case 'OnRichTextEditorInit':
                      if ($useEditor && $whichEditor == 'TinyMCE') {
                          unset($scriptProperties['chunk']);
                          if (isset($forfrontend) || $modx->context->get('key') != 'mgr') {
                              $def = $modx->getOption('cultureKey',null,$modx->getOption('manager_language',null,'en'));
                              $tiny->properties['language'] = $modx->getOption('fe_editor_lang',array(),$def);
                              $tiny->properties['frontend'] = true;
              	        $tiny->properties['forced_root_block'] = 0;


              I guess it just doesn’t want to work...

              Not like I’m going to make money with this (It’s for my personal website, just for fun), but I have to admit.. I can’t even sleep because of this hehehe, I’m such a nerd for trying to fix everything I see that doesn’t work the way I want it to.. Hope any of you has the golden tip. smiley
              Only have a few hours of experience with this MODx and already doing some complicated stuff so I will absolutely keep on going with this CMS system, I see a LOT of positive things coming from this!! Going to make websites for my parents too, they are gonna love this! (and me wink)
                • 35418
                • 23 Posts
                The design of my portfolio is about to come to a finish, but I still haven’t managed to kill that darn <P> tag-automagical-mess-upper..

                How did you guys work around this? You all just accepted it? I can’t believe that. There must be a cure smiley

                Update:
                I’ll work without TinyMCE for now, it got me too much worries.

                I know it might be stupid of me to not get this to ’unwork’ but it’s not worth the irritation. Never ever in my life have I encountered a programming-problem that I couldn’t solve.
                On with it! Kicking in some jQuery right now smiley
                  • 35418
                  • 23 Posts
                  It’s crazy, my entire site is done now, but I just can’t stop the TinyMCE from automatically pasting a <p> everywhere in a document I want to edit.

                  I know I might be a bit of a nuisance (sorry for that) but I am a comprehensive person and have fixed everything in the site myself, and with all available logic in my brain, I’m starting to think that TinyMCE has some hardcoded bug that I just can’t take out?

                  How in the world do you guys (and girls) manage to work with this incredibly grotesque piece of Rich-text-editor? laugh
                    • 9995
                    • 1,613 Posts
                    dunno if this solves anything for u:

                    in css put p{margin-top:0; padding-top:0;}
                    or don’t use text editor when u only want to add a chunk or smt.

                    maybe u can give more info why u don’t want the p tags?
                      Evolution user, I like the back-end speed and simplicity smiley
                      • 35418
                      • 23 Posts
                      Quote from: fourroses666 at Jun 20, 2011, 08:18 AM

                      dunno if this solves anything for u:

                      in css put p{margin-top:0; padding-top:0;}
                      or don’t use text editor when u only want to add a chunk or smt.

                      maybe u can give more info why u don’t want the p tags?

                      It’s because I’ve rigged the system to put the main image in every post in the top of the post on the website. Because i wanted the img code in a special field i put that into the introtext hihi.

                      After that i just echo the content/text/article that belongs to the blogpost in a layer that remains hidden underneath the image until one has clicked it, like here:
                      www.marinusonline.nl

                      The site isn’t done yet, but i already put it live since nobody will visit it wink

                      I’d like to have text styling available to me, but i don’t want to be forced to use any, like a <p>

                      It’s my first site in years, so be hard on me shocked