Hi all,
I’m trying to configure tinyMCE so that it generates HTML code (
and not
) but can not find how to do that...
... how can I modify tinyMCE.init ??
regards
-
MODX Staff
- 2,502 Posts
I don’t think you can. TinyMCE and FCKEditor both either ouput crap or XHTML. You could use a plugin to strip the space-slash in
and <link /> and <img /> elements from the content just before it goes to the browser. It would then be valid and you wouldn’t need to hack Tiny as I think the replacements are all mode driven and in the core not part of a plugin. Otherwise you can check the TinyMCE forums for more info.
Cheers,
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
Here is the configuration option I think you are looking for:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/element_format
A complete list of all configuration options is here:
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration
-
MODX Staff
- 2,502 Posts
WOW! I am happy to be wrong. I don’t EVER use XHTML on my own projects and never found this.
Thanks for this link.
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 2,502 Posts
Okay,
I am wrong. But I love it! Thanks both.
Cheers,
Jay
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 2,502 Posts
/asssets/plugins/tinymce(version)/tinymce.functions.php and look for $tinymceinit .= and insert it around there. It should work. This is around line 139 in version TinyMCE 3.
There may well be a better/ more correct way but that is my instinct.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub
-
MODX Staff
- 2,502 Posts
I don’t know if there is a way to append or override this with a config setting. I agree this is a hassle.
Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup
magician.
Blog ✦
Twitter ✦
LinkedIn ✦
GitHub