javascript - CKEDITOR Support for Bootstrap Table -


I want to add support for CKEDITOR v4.0 for bootstrap tables. But it can also come under a more general styling position.

I have enabled tables in the Ceciditor and want to assign a custom class to any table generated in the editor. For example: & lt; Table & gt; & Lt; Thead & gt; & Lt; TR & gt; ...

should be created:

  & lt; Table class = "table" & gt; & Lt; Thead & gt; & Lt; TR & gt; ...   

How can I go about doing this with tables in CKEDITOR?

I have tried to use the data processor found in documents, although they do not work for table elements.

  CKEDITOR.replace (myElement, {... on: {loaded: function (e) {var rule = {element: {table: function (element) {// Add bootstrap table class to ckeditor table $ (element) AddClass ('table');}}}; e.editor.dataProcessor.dataFilter.addRules (rules); e.editor.dataProcessor HtmlFilter.addRules (rule );}}});   

if you want You can add the styles.js file to your ckeditor folder to be able to convert the user from within the editor to the class of the table:

  {name: 'My Table Class', Element: 'table', attributes: {'class': 'myTableClass'}}    

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -