Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): add default markdown behaviors to PTE
This change extends the core behaviors of PTE with default markdown behaviors for a more pleasant writing experience. This allows you to: 1. Use `#` characters to create headings 2. Use `>` to create a blockquote 3. Use `Backspace` at the beginning of block to clear its style 4. Use `-`, `*`, `_` or `1.` to initiate a list This is achieved by providing the `behaviors` configuration for PTE where the `coreBehaviors` are first spread into the array (to preserve core behaviors) and the additional markdown behaviors are added afterwards. The markdown behaviors require us to define what styles to use, and here we just default to the most common names for these. Later, we can figure out how to allow you to configure markdown behaviors through the Schema, but for now these sensible defaults are hard-coded. The only downsides here is that: 1. You can't opt out of markdown behaviors if you for some reason don't like them 2. You can't change the configuration if for example your lists are named something else 3. Things could potentially get confusing if you use unconventional names for styles and lists, for example if `h1` means something completely different in your context. These are downsides we'll have to live with for now.
- Loading branch information