Skip to content
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

Include editor in context for renderHTML #3877

Closed
1 task
Flamenco opened this issue Mar 25, 2023 · 0 comments · Fixed by #3909
Closed
1 task

Include editor in context for renderHTML #3877

Flamenco opened this issue Mar 25, 2023 · 0 comments · Fixed by #3909

Comments

@Flamenco
Copy link
Contributor

What problem are you facing?

I am trying to set the cursor of my element based on the editor. Specifically this:

    const style = editor.isEditable ? 'cursor:pointer;' : undefined
   return [ 'div', {style}, [....] ]

The editor is not included in this or the method parameter.

What’s the solution you would like to see?

Include editor in the context or this.

renderHTML({editor}) {
}

or

renderHTML({}) {
  const editor = this.editor
}

What alternatives did you consider?

I am grabbing the editor from another plugin method that is called before renderHTML, and then storing it outside the plugin.

Anything to add? (optional)

No response

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
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 a pull request may close this issue.

1 participant