开发者

CKEditor RichCombo

开发者 https://www.devze.com 2022-12-22 14:45 出处:网络
Does anybody know how to disable the default CKEditor behavior that changes the RichCombo label on cl开发者_开发百科ick?I want the label to remain untouched regardless of the user selection.In the ric

Does anybody know how to disable the default CKEditor behavior that changes the RichCombo label on cl开发者_开发百科ick? I want the label to remain untouched regardless of the user selection.


In the richcombo plugin you can alter it at the setValue function (line 292) deleting all the code after the first line

this._.value = value;

After you verify that this is what you want you can try to put it in a plugin if you don't like to alter the source files. (I didn't try this)


A less hackish way to do it is to set the value to empty when the user moves away from the current selection.

  editor.on('selectionChange', function(evt) {
  if (mydropdown && mydropdown.getValue())
    mydropdown.setValue('');
  }

If you need to always show it empty run setTimeout(function(){editor.selectionChange();}, 0) in your click function.

0

精彩评论

暂无评论...
验证码 换一张
取 消