6
चयन के आधार पर एक ckeditor प्लगइन मेनू बटन की स्थिति टॉगल करने का सही तरीका क्या है?एक CKEditor प्लगइन बटन
उदाहरण के लिए, एक लिंक/अनलिंक प्लगइन में, अगर कर्सर एक लिंक में है तो मैं केवल अनलिंक सक्षम करना चाहता हूं।
editor.addCommand("unlink", {
exec: function (editor) {
//do something here
},
refresh: function (editor, path) {
// never seems to get fired. Is this even the right hook?
}
});
editor.ui.addButton("Unlink", {
label: "Unlink",
command: "unlink"
});
सहायता के लिए धन्यवाद!