We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4594
    • 74 Posts
    Sorry folks, but i need help again....

    My document is HTML 4.01 strict:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">


    But TinyMCE (2.1.2) handles it like a XHTML Dokument. It closes every non-closed tag, like <img> or
    with a trailing slash.

    Example:

    <br> becomes <br />


    How can I turn off any automatic code-changing??

    I’ve tried to set the "cleanup" option to "disabled" in the configuration. But now tinyMCE inserts "mce_href="#"" in links and "mce_src="assets/..."" in image-tags. ARGGGHHH!!!

    Can anyone please help me with this strange behaviours?

    THANKS!
    • Not the answer you want but look here: http://tinymce.moxiecode.com/punbb/viewtopic.php?id=8877

      If I were you, I would consider looking at creating a plugin to convert the closed tags back to how you want them. You could use the OnBeforeDocFormSave event.
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 4594
        • 74 Posts
        Thanks for reply.

        i think developing an extra plugin for that is much to time consuming....

        its better i disable tinymce, write clean code by hand....
          • 33337
          • 3,975 Posts
          I am sure there is some TinyMCE plugin in the code which allows it to be doing xhtml’izing.

          update:

          Goto Plugins -> TinyMCE, open it.

          Goto Configuration tab.

          Look for "Web Plugins", in that field there is "xhtmlxtras" ... try removing it.

          I am not sure if it works, but no harm in trying wink
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
            • 4594
            • 74 Posts
            @zi

            that poorly does not work. i’ve removed the xhtmlxtras, but nothing has chenged. TinyMCE inserts still "/>" in non-closing tags...

            thanks for reply.
              • 33337
              • 3,975 Posts
              Quote from: captain at Oct 29, 2007, 01:57 PM

              @zi

              that poorly does not work. i’ve removed the xhtmlxtras, but nothing has chenged. TinyMCE inserts still "/>" in non-closing tags...

              thanks for reply.

              Uh oh... sorry about that man! sad ...

              Sounds people started to believe that only xhtml is standard and valid...
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 4594
                • 74 Posts
                OK. I did an ugly solution to prevent tinyMCE from inserting "/>" slashes in HTML 4.01 documents.

                i got in the core file "tiny_mce.js" and changed every hardcoded "
                " into an HTML-standard "
                ". I did the same with "... />" changing to "...>".

                Maybe now in the manager view, tinyMCE has some non-xhtml-standard "
                " tags. But i think it is even better to have clean, validating code in the frontend....

                I just can appeal to the development crew of Modx, to get rid of using an wysiwyg editor for inserting content in the next releases. I know its hard, but it is worth it smiley
                • Just disable the RTE plugin and you get to insert content all you want without the RTE.
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 4594
                    • 74 Posts
                    @rthrash

                    sure i can disable the RTE (and i do so!!). For me, as a professional webdeveloper, its easier to write code by hand.

                    BUT a client needs other possibilities to insert content, because 99,9% of clients have never heard of HTML (!) not to mention from writing it. And all i want (and i think i’m not alone) is nearly full code-control, after handing over the project to the client.

                    Just to clear out: I’m not attacking the coding team smiley
                    • No attack taken/considered. smiley

                      Like it or not, the world is headed towards XHTML. I’m not claiming that’s a good or a bad thing, but it is a reality and even a lot of the newer JS libs have XHTML doctype dependencies. If clients haven’t heard of HTML and don’t know about it then they certainly wouldn’t care one way or the other either.

                      I’m guessing there’s a lot of legacy content that can’t simply stand up to switching the doctype? In my opinion, and I’m a HUGE standards advocate, broken validation that doesn’t cause problems isn’t the end of the world. (Though those red flags and warnings at the w3c sure are annoying!)
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me