We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7045
    • 225 Posts
    Quote from: BobRay at Feb 23, 2009, 12:32 AM

    These might help:

    tinyMCE.init({
    mode : "textareas",
    cleanup_on_startup : false,
    trim_span_elements : false,
    verify_html : false,
    cleanup : false,
    convert_urls : false,
    nowrap : true,
    remove_linebreaks : false,
    convert_fonts_to_spans : false,
    fix_content_duplication: false
    });


    Fucking beautiful, your configurations worked. It now appears my white space is no longer getting stripped. Now I just need to play with those configs a little. I don’t like all of the behavior. Shit, now I have to reformat all my markup, oh well.

    Thanks BobRay and everyone else who tried.
      • 7045
      • 225 Posts
      Quote from: mrhaw at Feb 23, 2009, 11:16 AM

      Try Bob’s init above and try change plugin config --> to RAW encoding

      It’s working without "RAW encoding", but do you recommend this setting?
        • 7045
        • 225 Posts
        Ok, the final "custom parameters" that I have used under the "configuration" tab is as follow:

        cleanup_on_startup : false,
        cleanup : false,
        remove_linebreaks : false
        


        I am trying to keep as much editor functionality for my client as possible, since they have said they plan to do the updating themselves (we will see if that happens). With the above settings, I haven’t experienced any funky side effects, and now my markup is OCD approved wink

        If anyone’s markup is getting reformatted, the above settings work.

        Ty again everyone.
          • 7045
          • 225 Posts
          Ok, after playing around I have some new issues. I am using the following custom parameters:

          cleanup_on_startup : false,
          trim_span_elements : false,
          cleanup : false,
          remove_linebreaks : false,
          convert_fonts_to_spans : false,
          convert_urls : false,     -> true or false made no difference with my current problems
          fix_content_duplication: false
          


          The editor is adjusting my <img> tags. First, it is adding "mce_src=". So I end up with two source attributes. The problem is "mce_src" does not validate. The other one is that the editor keeps omitting my end tag. Again, causing a validation error.

          I found out that setting "cleanup" configs to false cause this, but that is also what enabled me to format my markup my way.

          I guess I will just have to live with jacked up looking markup.
            • 3749
            • 24,544 Posts
            Are you sure that mce_src= is ending up in the final rendered page?  I think it’s just there so Tiny can render the image in the editor and save the original src location. In theory, you should *only* see it when you are in the editor.

            I believe that convert_urls (true, iirc) is supposed to convert those mce_src values back to their original values on save.

            I would try this next:

            Turn off RTE
            Save the doc
            edit the <img tags to look like you want them
            Save again
            Turn on the RTE
            Load -- look at the tags
            save
            turn off RTE
            Load and look at the actual code

            You could also do a View Source in a previewed page to see what you’ve actually got.

            If that doesn’t work, something here might help: http://wiki.moxiecode.com/index.php/TinyMCE:Configuration
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 7045
              • 225 Posts
              Damn, for some odd reason I rolled past that link in google. I will check it out after I try your suggestions. However, I am thinking that link will be the key, a lot of good info there. And I can confirm, the mce_src is showing in the rendered code. I saw it in source view, and it throw me a validation error. Ty for the help, and I post my results soon enough.
                • 7045
                • 225 Posts
                Ok, I disabled the rich text editor, and it did pretty much what I expected. I was able to go in and format my markup the way i like, spaces, indention’s, etc., and it saved. However, it initially gumbled up all my comments horribly. That is not a real big deal.

                The problem still exists, as soon as enable it again and go into TinyMCE, all formatting gets stripped. Keeping it disabled is not a good long term option, because my client wants to be able to do the updating. However, I know I will end up doing at least some of the updating.

                All I want is for the editor to behave like all the previous versions of editors I have used. I think i will just have to play around with the link you posted to find the right configs. I know it is something small, but damn is it irritating.