Hello
I am new to CKEditor so please bear with me.
I have created a plugin that adds a dropdown list into the toolbar. When an item is selected, a text (product name) is inserted using:
editor.insertHtml(htmlString)
.(see attached picture).
However, if the cursor/caret is inside a table cell, I need to automatically place a checkbox into the next column on the same row. I could rely on user to do it but I prefer not to do it.
I need to do this automation ONLY IF the caret is inside a cell and if there is another (ideally empy) cell next to my current cell on the same row.
Is it possible:
1. to detect if I am in a cell
2. check if the next cell exists on the same row (ideally, only empty cells are important; if the next cell is not empty, no checkbox needed)
3. if there is such a cell, automatically add a checkbox into that cell.
I hope the attached image is more explanatory. The first row is what I need to achieve by only placing the caret on the first column on the second row, then after selecting an item from Products list I should get both cells on the second row populated: first cell with the product name, second cell with an empty checkbox.
Thanks.
