Closed gspinaci closed 7 years ago
The problem shown off with the previous function to move caret. This is it now:
tinymce.activeEditor.selection.setCursorLocation(selectedElement.parent('figure[id]')[0].nextSibling,0)
Instead of select an element and then collapse the selection, now it is moved to match the parameters
This happens when I press enter in a figcaption, in roder to call a new line outside from the figure, and while the new paragraph is empty, I try to add a new figurebox.
Because the p is empty, the current selected element is now the section, and the new figurebox is added after.