yakovlevga / brickyeditor

WYSIWYG block editor jQuery plugin.
MIT License
115 stars 20 forks source link

ckeditor / summernote editor #9

Open rakucmr opened 6 years ago

rakucmr commented 6 years ago

can we use with other html editor?

yakovlevga commented 6 years ago

Hi! Currently it doesn't support any integration with other editors. But you could use html generated by brickyeditor as you need. Maybe in future releases I will add CKEditor support as plugin or Summernote as custom inline html editor, but now it's not priority. As I know, some CKEditor plugins already allow you to predifine templates like this. Perhaps this will suit you as solution.

oleteacher commented 6 years ago

I know it is not on your priority list but ability to use with CKEditor would help us in our classroom much:)

yakovlevga commented 6 years ago

I will try to examine this question in near future. By the way, how do you imagine this integration? Unfortunately, I have no any expertise in CKEditor for a long time. Is it must add some additional panel with templates, which will add raw html right into CKEditor worksheet? Or did you mean possibility to edit inline html in blocks with help of CKEditor instead of current built-in html tools?

oleteacher commented 6 years ago

I cannot speak for @raku and do not wish to take over his thread here...

Adding content into CKEditor worksheet/ work area would be ideal for school project. But, inline would at least allow us to use some extra CKEditor plugins.

adaniello commented 6 years ago

For now i solve by adding class bre-editable in template, then calling Summernote instance in onBlockSelect() and destroy it in onBlockDeselect(). For example:

onBlockSelect: function(block) {
  $('.bre-selected .bre-editable').summernote({
    airMode: true
  });
},
onBlockDeselect: function(block) {
  $('.bre-editable').each(function( index ) {
    $(this).summernote('destroy');
  });
}