We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26113
    • 88 Posts
    I’m working on building a site which will have content entered by other non-techy users.
    I love the way the web front end offers the ability to edit content right there without having to login and manage pages.

    While building and testing, the TinyMCE editor does some really weird stuff with my HTML markup.
    For example - it repeats the last set of tags on the page when you create new lines.

    For a template - should you include any structure within the [content] area?
    I reworked my template to not include any structural markup because of how TinyMCE works.
    But I would like to use spans & classes for text rather than inline styles which Tiny uses, is there way to do this?

    Thanks
    Rich
      • 25663 MODX Staff
      • 12,272 Posts
      Are you running 0.9.5? If not, rinse and repeat ... then report the findings here. smiley
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 26113
        • 88 Posts
        I am running 0.9.5

          • 4018
          • 1,131 Posts
          Can you post some code examples so I can see what’s going on...maybe a before and after kind of thing? Sounds really odd. I suspect that you might have some tags that are not conforming right to the XHTML spec, which is what TinyMCE attempts to comply with by default.
            Jeff Whitfield

            "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
            • 16885
            • 255 Posts
            <p>This</p><p><br></p><p>Is</p><p><br></p><p>A</p><p><br></p>
            <p>Test</p><p><br></p><p>Capice?  I think so, but look, this is another 
            return</p><p><br></p><p> And this was typed after the focus was lost.<br></p>

            I typed that like ’This’ <return> ’Is’ <return> for every newline. That &nbsp;’s seem to be randomly added when the focus of the textfield is lost. Note that I didn’t manage to reproduce the wrong returns on the manager, it’s so far only happening on the frontend for me. The &nbsp;’s do show up on both pages.
            Note; I’m running the latest 0.9.5.

            Note2; I notice that TinyMCE is still not generating valid xHTML code;
            ’s, <font>’s and more of those HTML 4 ’bogus’ elements...
              • 4018
              • 1,131 Posts
              I see what you mean now. Seems to only happen when you’re using the Full-Featured theme from the front-end. The Simple and Advanced themes appear uneffected. Hmm....looks like I really need to explore options for creating more sophisticated yet secure themes for front-end use.
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
                • 26113
                • 88 Posts
                I was getting something like this (I’ve changed my template so this isnt actual code but how it had worked)...

                <div id="centercol">
                </div>
                <div id="centercol">
                </div>
                <div id="centercol">
                Some text here after 2 returns.
                the [content] tag sits in between the centercol div in the template
                </div>



                As the other user experienced as well - many repeating tags.
                I do not recall if I was using QuickEdit or working from the Manager.
                Also it’s not very Mac compatable - very, very quirky - and using it in Safari is very hard, and data does nto save properly.