I'm using tinyMCE to edit/markup text in a Zend Framework backend.
I'd like to use the generated HTML in a Flash AS3 Application.
The problem is that Flash doesn't support attributes in <span>
's, <em>
tags, <strong>
tags etc.
I guess there are two possibilities here:
- change the tinyMCE config so it uses font-tags instead of span's,
<b>
instead of<strong>
,... - Replace all the HTML-tags in Flash with Regex.
Any help would be welcome.
so this is the original html generated by tinyMCE:
<span style="color:#FF0000; font-size:24;">text, and <strong>bold text</strong></span>
And this is what I need in Flash:
<font size='24' color='#FF0000'>text and <b>bold text</b></font>
Thanks for the reply but I found a very simple Solution. TinyMCE comes with a plug-in called: legacyoutput. This will generate old-school HTML code that's readable in Flash.
how to use this:
Now your HTML will look like this:
The style attribute should be replaced by a color attribute to make it readable in Flash You can fix this by editing a rule in the legacyoutput js files (tinymce/plugins/legacyoutput/editor_plugin.js and editor_plugin_src.js):
look for "forecolor" and change the code to the following:
Now you can ouput this in Flash witouth using a single hack.