essepuntato / rash

Research Articles in Simplified HTML (RASH) Framework includes a markup language defined as a subset of HTML+RDF for writing scientific articles, and related tools to convert it into different formats, to extract data from it, etc.
https://w3id.org/people/essepuntato/papers/rash-peerj2016.html
ISC License
82 stars 24 forks source link

Adding a figurebox in a empty p, generated after pressing enter in a caption #102

Closed gspinaci closed 7 years ago

gspinaci commented 7 years ago

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.

gspinaci commented 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