File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -414,6 +414,8 @@ public static function js($id, $options)
414414 window[_instance+'_atValues'] = _config.atValues;
415415 window[_instance+'_hashtagValues'] = _config.hashValues;
416416 window[_instance+'_linkValues'] = _config.linkValues;
417+ window[_instance+'_originalValue'] = element.value;
418+
417419
418420 window[_instance] = new Quill('#'+_id+'_Editor', {
419421 theme: _config.theme,
@@ -475,7 +477,11 @@ public static function js($id, $options)
475477 document.getElementById(_id+'_Editor').firstChild.innerHTML = element.value;
476478
477479 window[_instance].on('editor-change', function () {
478- if (document.getElementById(_id).getAttribute('disabled') !== 'disabled') {
480+ if (
481+ document.getElementById(_id).getAttribute('disabled') !== 'disabled'
482+ && document.getElementById(_id).getAttribute('readonly') !== 'readonly'
483+ && document.getElementById(_id+'_Editor').firstChild.innerHTML !== window[_instance+'_originalValue']
484+ ) {
479485 element.value = document.getElementById(_id+'_Editor').firstChild.innerHTML;
480486
481487 let event = new CustomEvent('grafite-form-change', { 'bubbles': true });
You can’t perform that action at this time.
0 commit comments