javascript - Getting "The operation is insecure" error when adding tinymce via tinyMCE.EditorManager.execCommand( 'mceAddControl',false, newId); -
Edit: See my issue for search issues and solutions Even if this is the same domain, the iframe calling reference Was due to
I did not know why this error was occurring. I am going through these steps:
-
Remove the TMEEECE editor
-
Change the id of texture < / li>
-
Code
/ / Remove the tinyMCE editor for this text area ("true" TinyMCE.EditorManager.execCommand ('mceRemoveControl', false, myTextArea.id);) // id myTextArea.id = replace newId; // Add a small MES editor (does not help in changing "true") tinyMCE.EditorManager.execCommand ('mceAddControl', false, newID);
The last error is the error
operation is unsafe why does it? For anyone facing this type of problem, what was the issue and how it was resolved:
topic
- < p> I was submitting a form to the iframe of a domain (because its file was in the input, I could not use AJAX)
-
Ifframe then called a method in the parent window so that it was realized that it was done:
window.parent.myObject.handleResponse ({});
In the law
handleResponse I was removign adn to add tinymce editors
The problem is that tinymce creates its iframes, even if it was the same root / domain and not cross-root, browser (firefox) as an insecure operation for a child's frame. Was rejected in order to call the parental window method which does something else in the iframe. Despite having the same domain for all of them, calling references did not allow this.
Solution
-
Before sending, the form for the iframe, a "watcher" to
setInterval Start through the medium, which checks for a response value to be set.
yes
window.parent.myObject.handleResponse ({}); Just set that response value
When the viewer (which was originally introduced in the context of the original window) has set the variable, it is all Tinned Editor Can change.
-
Comments
Post a Comment