Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
TinyMCE doing weird things
Bowker
TS 7.2.1
THIS ONLY OCCURS IN INTERNET EXPLORER (Only tested in IE-8)
I have three different, probably related somehow, issues with TinyMCE. This is a new installation.
In each case below the content is being entered in HTML mode.
1) <meta http-equiv="refresh" content="30;url=****.html"/> is having the http-equiv attribute is ripped out.
We've tried each of the following without success:
IWTinyMCECustomConfig("custom1", "extended_valid_elements", "meta[http-equiv|content]");
IWTinyMCECustomConfig("custom1", "extended_valid_elements", "*");
IWTinyMCECustomConfig("custom1", "valid_elements", "*");
2) I put in <ddb x="hi">xxxxx</ddb> what TinyMCE cleans that to is:
<ddb x="hi"></ddb><ddb></ddb>xxxxx<ddb></ddb><ddb></ddb>
Then going back into HTML mode, it becomes:
<ddb x="hi"></ddb><ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb>xxxxx<ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb><ddb></ddb>
3) <div id="abc" onclick="alert('hi');">click here</div> became <div onclick="function onclick() { function onclick() { alert('hi') } }" id="abc">click here</div>
Find more posts tagged with
Comments
Rick Poulin
The first one might be due to the fact that TinyMCE is meant for editing the body of a page, not the header. That's why script tags don't work so well either. While adding elements and attributes in format
IWTinyMCECustomConfig("custom1", "valid_elements", "element[attr1|attr2]");
has worked for me before (though, specifying the whole default string from
http://tinymce.moxiecode.com/wiki.php/Configuration:valid_elements
plus my additions), I don't know whether it does something funny with tags that always belong exclusively in the head. You wouldn't be using WYSIWYG for that anyway, so TinyMCE's really not all that useful to you. I'd suggest using a textarea with a solid validation-regex instead.
Can't say I've experienced the other two.
Bowker
In case anyone cares - I've opened a case with support on this.
pann0204
In case anyone cares - I've opened a case with support on this.
Hi - If you got a solution for onclick issue could you pls share, I'm facing similar problem
Regards,
Pawan
Bowker
only one of the issue i had was corrected
We have workaround for one of you issue
For the issue
See the onclick" attribute in the content is replaced with "function onclick {"
Add below lines to tiny_mce_src.js file.
if ((n.indexOf('onclick') == 0)&&(v != null ))
v = ('' + v).replace(/^function\s+onclick\(\)\s+\{\s+(.*)\s+\}$/, '$1');
after the below lines.
if (n.indexOf('on') === 0 && v)
v = ('' + v).replace(/^function\s+anonymous\(\)\s+\{\s+(.*)\s+\}$/, '$1');
I think this fixed it issue. We bailed on IE8 for editing content with this version if TinyMCE. The killer is the latest version of TinyMCE works much better but is not compatible with FormsPublisher.