parchment
parchment copied to clipboard
Adding a custom Blot
Adding a custom Blot
The Example instructs
import Parchment from 'parchment';
class LinkBlot extends Parchment.Inline {
but Parchment.Inline
does not exist, InlineBlot
does from here as class InlineBlot extends ParentBlot implements Formattable
- Is the Example documentation incorrect?
- If it is, can it be corrected, please?
- Would this be OK?
import { InlineBlot } from 'parchment';
class CustomInlineBlot extends InlineBlot {
Also, this does not work as in the example.
Parchment.register(LinkBlot);
Getting error
Property 'register' does not exist on type 'typeof import(".../node_modules/parchment/dist/typings/parchment")'