Skip to content

Allow attributes for wrappers #727

New issue

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

Merged

Conversation

ValJed
Copy link
Contributor

@ValJed ValJed commented Jun 4, 2020

Fix

When creating a custom node of type wrapper you cannot pass attributes as you could with a classic block type.
Simply fixed by adding a second parameter to the toggleWrap function for attributes, and by passing them to isNodeActive and wrapIn methods.

Then we can use attributes the same way we do with toggleBlockType

  commands ({ type, schema }) {
    return attrs => toggleWrap(type, attrs)
  }

By the way, thanks for the amazing work !!

@philippkuehn philippkuehn merged commit 8e17738 into ueberdosis:master Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants