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
I wanted to be able to tie the readonly status from the view model of the editor window. I finally settled on doing:
Before these lines
// Get custom configuration object from the 'wysiwygConfig' binding, more settings here... http://www.tinymce.com/wiki.php/Configuration
var options = allBindings.has( 'wysiwygConfig' ) ? allBindings.get( 'wysiwygConfig' ) : null,
// Get any extensions that have been enabled for this instance.
ext = allBindings.has( 'wysiwygExtensions' ) ? allBindings.get( 'wysiwygExtensions' ) : [],
settings = configure( binding['defaults'], ext, options, arguments );
I added this:
binding['defaults'].setup = function (editor) {
editor.on('init', function (e) {
if (allBindings.has('tinyMCEReadOnly')) {
// Set read only mode on init.
editor.setMode(allBindings.get('tinyMCEReadOnly')() ? 'readonly' : '');
// now subscribe to watch for more changes
allBindings.get('tinyMCEReadOnly').subscribe(function (isReadOnly) {
if (isReadOnly === true) {
editor.setMode('readonly');
}
else {
editor.setMode('');
}
});
}
});
}
I wanted to be able to tie the readonly status from the view model of the editor window. I finally settled on doing:
Before these lines
I added this:
and now my markup:
The text was updated successfully, but these errors were encountered: