springload / draftail

📝🍸 A configurable rich text editor built with Draft.js

Home Page:https://www.draftail.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve API to define entity types and decorators

thibaudcolas opened this issue · comments

Feature. The current entityTypes API is a bit poor. It requires extensive knowledge of Draft.js to create useful source components, and there is no clear distinction between what is "inline" and what is "block-level". Even worse, there is no way to define custom blocks for block-level entities. IMAGE and EMBED blocks are actually defined directly in Draftail.

There should also be a way to define text-only decorators – this can be hacked together with the current API (as shown on current demo site's PrismDecorator), but there should be proper support for this.