Commit graph

4 commits

Author SHA1 Message Date
koehr
2085e22688 Fixes problems with bogus root level text nodes
Depending on the browser in different situations the root node itself is
selected and new text ends up in a text node on root level instead of a new
paragraph. This happens in:

 * Firefox: after inserting a closed block like a horizontal rule
 * Chromium: after inserting or selecting such a closed block

Now instead of inserting a paragraph directly after inserting an HR, the editor
simply checks for normal text input inside the root node and wraps the newly
written text with a paragraph (and moves the caret to the end of the paragraph
because chromium moves it to the beginning of the line)
2020-04-03 00:24:57 +02:00
koehr
8668838238 fix menu sync
this loops the search for marks until a block element is found, because marks
are nested elements like for example `<p><b><i>bold and italic</i></b></p>`.
2020-04-01 19:53:26 +02:00
koehr
5986e599fd implements basic menu functionalities
this includes standard block elements (headers, paragraphs, lists, rulers)
but not marks (bold, italic)
and for sure not special elements like the stat block
2020-04-01 16:54:12 +02:00
koehr
42dfa704d7 remove tiptap, start simple homegrown richtext functionalities
* menu now sends command events and button states
* menu state is synced with the elements at caret postion
* menu functionalities are not yet implemented
2020-03-31 15:56:08 +02:00