Is it possible to integrate a javascript framework (in my case CanJs) to be used within a ckeditor plugin? The goal is to reuse my custom canjs components which should be insert via a ckeditor plugin.
My simple ckeditor plugin looks something like this:
- CKEDITOR.plugins.add(
'element', {
icons: 'element',
init: function( editor ) {
editor.addCommand( 'insertElement', {
exec: function( editor ) {
editor.insertHtml( '<my-element></my-element>' );
}
});
editor.ui.addButton( 'Element', {
label: 'Insert Element',
command: 'insertElement',
toolbar: 'insert'
});
}});
-
can.Component.extend({
tag: "my-element",
template: "<div>Blah</div>"
});
Adding a my-element element via plugin or within the source code of the ckeditor is not changing the element. Is there a way to achieve this?
The same question at stackoverflow:
http://stackoverflow.com/questions/29941373/how-to-integrate-canjs-in-ckeditor