问题
I want to add a class named "table" to the table that is created by default. I also want to change the value of border from table dialogue box of ckeditor. I am in big trouble.
回答1:
I got the answer:
CKEDITOR.on('dialogDefinition', function (ev) {
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
if (dialogName === 'table') {
var addCssClass = dialogDefinition.getContents('advanced').get('advCSSClasses');
addCssClass['default'] = 'table-class';
}
});
来源:https://stackoverflow.com/questions/10592482/adding-class-in-table-in-ckeditor-for-rails-application