0
我需要光標的樣式改變爲「指針」時,編輯器是隻讀模式我嘗試了兩種解決方案:CKEDITOR光標樣式
更改文本樣式
CKEDITOR.instances.editor1.on('contentDom', function() { CKEDITOR.instances.editor1.editable().attachListener( CKEDITOR.instances.editor1.editable(), 'mouseover', function(evt) { if (evt.data.getTarget().is('p')) {evt.data.getTarget().setAttributes ({'style':"cursor:pointer "}) ;}//cursor:pointer }); CKEDITOR.instances.editor1.editable().attachListener( CKEDITOR.instances.editor1.editable(), 'mouseout', function(evt) { if (evt.data.getTarget().is('p')) {evt.data.getTarget().setAttributes ({'style':"cursor:pointer"}) ;} }); });
CKEDITOR.document.getDocumentElement().setStyle("cursor","pointer");
第一個光標在文本上工作。
第二個改變了除編輯器以外的所有頁面中的光標。