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.
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.
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?
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?
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.
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?
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
is working on a reply...