は、エディタのbodyタグに属し、属性はcontenteditable="true"
です。それはそれらの厄介なサイズ変更要素を追加するものです。
この属性をfalse
に設定すると、何も編集できなくなります。
あなたがする必要があるのは、リスナーonMouseDown
です。ユーザーが問題の要素をクリックしている場合... contenteditable="false"
に設定します。それ以外の要素の場合はcontenteditable="true"
に設定します。
(function() {
tinymce.create('tinymce.plugins.yourplugin', {
init : function(ed, url) {
ed.onMouseDown.add(function(ed, e) {
var body = ed.getBody();
if(jQuery(e.target).hasClass('target-in-question')) {
jQuery(body).attr({'contenteditable': false})
// and whatever else you want to do when clicking on that element
}else {
jQuery(body).attr({'contenteditable': true})
}
});
},
createControl : function(n, cm) {
return null;
},
});
tinymce.PluginManager.add('yourplugin', tinymce.plugins.yourpluginl);
})();
たこと(矢印キーは動作しません)編集を再開するために、エディタに戻す]をクリックする必要がありますということです!どうもありがとうございます!!!! – 100pwd
これは['resize:false'](https://www.tinymce.com/docs/configure/editor-appearance/#resize)になりました。 – Tiny