Closed Ardius closed 7 years ago
Yeah so because you're inserting the <hr>
inline (into the HTML) it isn't an editable element (for example like an element), instead its just part of a text elements HTML body. To make it selectable, draggable, etc. you'd need to create a new element type for <hr>
s, however a <hr>
would currently be treated as a static element outside of text element (e.g <p>test</p><hr>
) and so that probably isn't required, you'd just need your tool to insert a hr as a static element.
Starting from (copying) ContentTools.Tools.LineBreak i create a class to add the HR tag. It works, but i can't select the horizontal line to add styles. Is just possible to delete it as it is a character (with del or backspace). I know that there is a list of "editable elements" (p, li, img, ...) but i don't find a way to add hr.
However, this is the tool ss it is now: