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

    I use modx 0.9.6.3 with tinymce

    If I do:

    {{chunk-call}} this results in <p>{{chunk-call}}</p> in the html source code.

    I have html in the chunk, resulting in:

    <p>
    <div>
    ... more html ... 
    </div>
    </p>


    IE now takes the closing </p> and trims it to <p></p> resulting in visible space which mustn’t be there.

    I tried to use custom css in tinymce, but obviously this only changes the opening p-tag, not the closing.

    I tried editing the html, but when I switch back to tiny again the p-tags are there again.

    Any clues how to prevent tiny from putting p-tags around the chunk-call?

    Cheers
    Frisco
      • 26931
      • 2,314 Posts
        • 10190
        • 187 Posts
        Hi sharkbait,

        I saw this one, and tried it, but it doesn’t help me. To be more specific, here’s a more thorough description of what I do and what happens - maybe I should just do it another way round?

        In the manager in an article I write with tinymce:

        text text text
        {{chunk-start-call}}
        This is a headline type H2
        bla bla bla
        {{chunk-end-call}}

        As the chunk-start-call stands in a new line and is followed by a headline, the chunk call is wrapped in p tags.

        Any other clues how to get rid of them?

        Maybe I should use a plugin which uses the OnWebPagePrerender trigger and use str_replace() to delete the p tags around the chunk call?

        Or would it be possible to add an entry to tinymce’s format list (where the headline, blockquote, cite things reside) called "empty" so that I could explicitly format the line with the chunk call - empty should than just add nothing - no p, no h2 or any other html tag?

        Cheers
        Frisco
          • 26931
          • 2,314 Posts
          actually you should avoid placing chunks in your editor field, but maybe here’s a solution for what you try to archieve (
          TinyMce and predefined templates setup ):
          http://modxcms.com/forums/index.php/topic,30069.msg182569.html#msg182569
          and
          http://modxcms.com/forums/index.php/topic,31097.msg188847.html#msg188847
            • 10190
            • 187 Posts
            I’ve never heard not to use chunks in the editor, why are you recommending that?

            Your tip regarding tinymce templates is worth a try, thanks alot - if I had known that before, I wouldn’t have used chunks to output html around some text (I use that for content boxes which can be put everywhere in the content).

            Thanks alot,
            Frisco