We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inputRules
wrappingInputRule() create InputRule for atom node, such as <hr>. it can't work due inner method findWrappingInside() always return null.
wrappingInputRule()
<hr>
findWrappingInside()
const schema = new Schema({ marks: basicSchema.spec.marks, nodes: basicSchema.spec.nodes .append({ hr: { parseDOM: [{ tag: 'hr' }] }, }), }); const rules = [ wrappingInputRule(/^\s*---\s$/, schema.nodes.hr), wrappingInputRule(/^\s*>\s$/,schema.nodes.blockquote), ]; const state = EditorState.create({ schema, plugins: [ // ... inputRules({ rules }), ], }); const view = new EditorView(container, { state });
if input > will create blockquote node, but input --- can't create hr node.
>
---
The text was updated successfully, but these errors were encountered:
You cannot wrap anything in an atom node. As such, wrappingInputRule not working for such nodes is the expected behavior.
wrappingInputRule
Sorry, something went wrong.
wrap() method is too complex if inputrule for atom node. has some wrap method for it?
No branches or pull requests
wrappingInputRule()
create InputRule for atom node, such as<hr>
. it can't work due inner methodfindWrappingInside()
always return null.if input
>
will create blockquote node, but input---
can't create hr node.The text was updated successfully, but these errors were encountered: