Commit 67c7c5f8 authored by bbaer's avatar bbaer
Browse files

improved the update handling for tinyMCE

parent 0f620fa3
......@@ -72,10 +72,8 @@ QfqNS.Helper = QfqNS.Helper || {};
var me = editor;
var $parent = $(config.selector);
$parent.parent('div').mouseenter(function(e) {
console.log("Mouse Enter");
console.log($parent.is('[disabled]'));
if($parent.is('[disabled]')) {
$parent.on("change", function(e, configuration) {
if(configuration.disabled || configuration.readonly) {
me.setMode("readonly");
} else {
me.setMode("design");
......
......@@ -1230,6 +1230,14 @@ var QfqNS = QfqNS || {};
try {
var element = n.Element.getElement(formElementName);
// Cleaner way to set states for tinymce
// This triggers the event on the unaccesable textarea
// The tinymce registers a listener on the textarea
// See helper/tinyMCE.js for details
if(element.$element.hasClass('qfq-tinymce')) {
element.$element.trigger("change", [configurationItem]);
}
if (configurationItem.value !== undefined) {
element.setValue(configurationItem.value);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment