You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2018. It is now read-only.
When a model is bound to both an instance of TinyMCE and something else (say a plain ol' textarea), problems arise when updating the model from said something else. This is easiest to understand with an example:
Enter some text in the plain textarea. Formatting 'splosion. Specifically, TinyMCE formats entered text after every keypress. So when I attempt to enter, say text, what I get is:
<p>t</p><p>e</p><p>x</p><p>t</p>
I don't know TinyMCE or Angular well enough to know exactly what's happening, but do know that the following code in /modules/directives/tinymce/tinymce.js appears to be triggering the behavior:
// Update model when calling setContent (such as from the source editor popup)
setup: function(ed){ed.onSetContent.add(function(ed,o){if(ed.isDirty()){ed.save();ngModel.$setViewValue(elm.val());if(!scope.$$phase)scope.$apply();}});}
For my purposes, adjusting the directive to omit the function entirely works just fine, as what I'm doing obviates the need for TinyMCE's source editor, however this obviously doesn't work for everyone.
The text was updated successfully, but these errors were encountered:
When a model is bound to both an instance of TinyMCE and something else (say a plain ol' textarea), problems arise when updating the model from said something else. This is easiest to understand with an example:
http://jsfiddle.net/EwMsa/
Enter some text in the plain textarea. Formatting 'splosion. Specifically, TinyMCE formats entered text after every keypress. So when I attempt to enter, say
text
, what I get is:I don't know TinyMCE or Angular well enough to know exactly what's happening, but do know that the following code in
/modules/directives/tinymce/tinymce.js
appears to be triggering the behavior:For my purposes, adjusting the directive to omit the function entirely works just fine, as what I'm doing obviates the need for TinyMCE's source editor, however this obviously doesn't work for everyone.
The text was updated successfully, but these errors were encountered: