It first started in CKEditor 4 in IE (using IE 10) and on deleting some table rows, the editor just freezes: can't be scrolled, buttons can't be clicked. It forces a page reload and losing any changes to the content.
So I thought CKEditor 4 context menus still dont work properly in IE and so I created my simply plugin to try alleviate the problem and it is shown below but it shows the same behaviour. I'm using CKEditor 3 for this plugin development.
CKEDITOR.plugins.add('tableRow',
{
init: function(editor)
{
var pluginName = 'tableRow';
editor.addCommand(pluginName+'Add', { exec : function( editor ) {
try
{
var sel = editor.getSelection();
element = sel.getStartElement();
if ( element )
{
var row = element.getAscendant( 'tr', true );
if(row) {
// find number of cells
var table = row.getParent();
var count = row.getChildren().count();
var newRow = editor.document.createElement( 'tr' );
for(var i = 0; i < count; i++){
var cell = editor.document.createElement( 'td' );
cell.setHtml(' ');
newRow.append(cell);
}
table.append(newRow);
}
}
}catch(err){
}
}});
editor.addCommand(pluginName+'Delete', { exec : function( editor ) {
try
{
var sel = editor.getSelection();
element = sel.getStartElement();
if ( element )
{
element = element.getAscendant( 'tr', true );
if(element) {
element.remove();
// should check the table to see if no more rows then delete table as well
}
}
}
catch(err){
}
}});
editor.ui.addButton('tableRowAdd',{
label: 'Add Row',
command: pluginName + "Add",
icon: this.path + 'images/rowAdd.png'
});
editor.ui.addButton('tableRowDelete', {
label: 'Delete Row',
command: pluginName + "Delete",
icon: this.path + 'images/rowDelete.png'
});
}
});
Can you reproduce it on our
Can you reproduce it on our demo page? If so, it would be great if you could report it on our Development site. Thanks!
Documentation Manager, CKSource
See CKEditor 5 docs, CKEditor 4 docs, CKEditor 3 docs, CKFinder 3 docs, CKFinder 2 docs for help.
Visit the new CKEditor SDK for samples showcasing editor features to try out and download!