Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tommy Poulsen 514 posts 708 karma points
    Feb 09, 2009 @ 12:11
    Tommy Poulsen
    0

    Multiline-text linebreaks seems to be skipped in macro-argument from TinyMCE

    I have this idea: I want to integrate the CodeMirror syntaxhighligh editor into a site for rendering code-snippets nicely. So I create a macro inserting the appropriate code, everything is fine. The macro (among other arguments) also takes a "editor-content" multiline-text argument.
    Now, I want to invoke the macro from the TinyMCE editor to be able to add a code-editor anywhere on my pages, but my multiline content does not render correctly. Apparently all linebreaks are skipped when I review the macro arguments in TinyMCE.
    So an argument looking like this :

    [code]foo
    bar
    3rd line[/code]

    in the html-inspection of the TinyMCE page looks like this

    [code]



    It looks as if linebreaks are skipped even before I receive them in my xslt macro code.

    Any ideas or suggestions?

    Tommy

  • Tommy Poulsen 514 posts 708 karma points
    Feb 10, 2009 @ 16:34
    Tommy Poulsen
    0

    I wonder if there is any way I can url-encode the multi-line-text-content-macro-argument (could be an xml snippet in my case, which really makes TinyMCE choke)

    - it definitely would be a sweet way of making nice, interactive snippets.

    Tommy

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Feb 10, 2009 @ 21:06
    Dan Diplo
    0

    The only thing I can thing of would be to replace the line-breaks with some other symbol (say "*") and then replace the symbol again in the macro to turn them back into line-breaks. Maybe you should report this as an issue on Codeplex?

  • Tommy Poulsen 514 posts 708 karma points
    Feb 10, 2009 @ 23:11
    Tommy Poulsen
    0

    Apparently other characters in macro text arguments also breaks the macro functionality from the editor, resulting in unpredictable behaviour.

    I added a workitem on Codeplex - if you also get frustrated with this behaviour please vote for it : http://www.codeplex.com/umbraco/WorkItem/View.aspx?WorkItemId=21084

    Tommy

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies