diff --git a/ckez/src/archive/web/js/ckez/CKeditor.js b/ckez/src/archive/web/js/ckez/CKeditor.js index 8e562ed6..5f2c866d 100644 --- a/ckez/src/archive/web/js/ckez/CKeditor.js +++ b/ckez/src/archive/web/js/ckez/CKeditor.js @@ -26,14 +26,14 @@ ckez.CKeditor = zk.$extends(zul.Widget, { if (editor) { if (fromServer) { // ZKCK-12: need to format the value from server first before set to ckeditor - editor.setData(jq(this.$n('cnt')).html(v).text()); + v = jq(this.$n('cnt')).html(v).text(); + editor.setData(v); // Issue #9: update editor's previousValue if set value from server // to prevent unexpect onChange event editor._.previousValue = editor.dataProcessor.toHtml(v); } else { editor.setData(v); } - } }], autoHeight: null, diff --git a/test/addon/ckeztest/src/archive/test2/B-ZKCK-12.zul b/test/addon/ckeztest/src/archive/test2/B-ZKCK-12.zul index c3fd5e84..1098ce5d 100644 --- a/test/addon/ckeztest/src/archive/test2/B-ZKCK-12.zul +++ b/test/addon/ckeztest/src/archive/test2/B-ZKCK-12.zul @@ -13,15 +13,32 @@ B-ZKCK-12.zul Copyright (C) Potix Corporation. All Rights Reserved. --> + + + + + + + + + + + + + - - - -