1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-21 07:32:24 +01:00
Jim Fisher f1b7d18f43
Official custom inlines example (#4615)
* Official custom inlines example

This generalizes the "links" example to an "inlines" example, adding
a new example of an inline: an "editable button".

Firstly, this is important to demonstrate that Slate really does allow
_custom_ elements, and not just "standard" ones like links that you'll
find in any editor.

Secondly, it's important to show an example of an inline where "offset"
movement should be used. With links, it's arguable that the cursor
positions <link>foo<cursor/></link> and <link>foo</link><cursor/>
should be considered the same, because they display in the same
position. But with the editable button, the cursor is clearly in a
different position, and so offset movement should be used.

* lint

* fix integration test

* update readme

* try again
2021-10-22 13:19:41 -07:00
..