Hi All,
Thanks in advance to anyone that can help.
I need to write a custom validation / prompt to stop anyone inserting a table within a table, i know this sounds like a bizarre request but there is method in my madness.... to put it simly we convert the html from ckeditor to RTF, and tables nested in tables are causing us headache after headache, so we with to stop this happening at the source.
Please could someone, a) explain how this could be done b) sample code would be much appreciated.
Please be aware that we are very new to the in's and outs of ckeditor, but have written a few custom plugins to link to custom site functionality.
Thanks again.
Thanks in advance to anyone that can help.
I need to write a custom validation / prompt to stop anyone inserting a table within a table, i know this sounds like a bizarre request but there is method in my madness.... to put it simly we convert the html from ckeditor to RTF, and tables nested in tables are causing us headache after headache, so we with to stop this happening at the source.
Please could someone, a) explain how this could be done b) sample code would be much appreciated.
Please be aware that we are very new to the in's and outs of ckeditor, but have written a few custom plugins to link to custom site functionality.
Thanks again.

Re: Custom validation on button click
var editor = youreditor; var rules = { elements: { table : function (element) { // If the table is within a table if(element.parent.name == 'td' || element.parent.name == 'tr' || element.parent.name == 'th' || element.parent.name == 'tbody') { // Replace the table with a div, keeping it's content var fakeElement = editor.createFakeParserElement(element, '', 'div'); // Transpose properties from the table element to the new fake element fakeElement.children = element.children; fakeElement.isEmpty = !fakeElement.children.length; fakeElement.parent = element.parent; fakeElement.next = element.next; fakeElement.previous = element.previous; fakeElement.returnPoint = element.returnPoint; return fakeElement; } } } // Apply rules on input and output filters editor.dataProcessor.dataFilter.addRules(rules); editor.dataProcessor.htmlFilter.addRules(rules);http://docs.cksource.com/CKEditor_3.x/D ... _Processor