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

feat: allow custom plugins for slate #702

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mcheng-caring
Copy link

Description

Adds a customPlugins prop to the RichTextEditor component. This allows the user to override existing node renderers or and/or add their own node renderers used by Slate.

@cribbles
Copy link
Contributor

Hi @mcheng-caring, thanks for the PR 👍

This approach seems fine to me, looks like you'll need to add customPlugins to the propTypes though: https://circleci.com/gh/contentful/field-editors/5967

JSYK, we're currently working on upgrading the rich text editor. When it's ready (should be sometime later this year), this will be a major version bump that will not break compatibility with the existing format, but this means you may need to rewrite any custom plugins built using this approach.

@JimmyHowe
Copy link

Hey @mcheng-caring, any update on this? I'm currently looking into a solution for code blocks for a blog and thinking around ways to do this, I created my own field that has a code editor but would be great to do it in the rich text editor directly, thanks

@mcheng-caring
Copy link
Author

Hey @mcheng-caring, any update on this? I'm currently looking into a solution for code blocks for a blog and thinking around ways to do this, I created my own field that has a code editor but would be great to do it in the rich text editor directly, thanks

Hi @JimmyHowe, at my company, we've been using a fork with the code change from this PR for over a year now with success. I haven't had the time to loop back to this PR to check what tests were failing due to time constraints and because we deprioritize getting this PR through due to the news that rich text editor was supposed to have been updated (AFAIK, the update is still only present in the next branch). If you have any questions about the fork, I can try my best to help.

@github-actions
Copy link

github-actions bot commented Aug 7, 2022

Marking pull request as stale since there was no acitivty for 30 days

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Aug 7, 2022
KCLAnthonyDiaz pushed a commit to KCLAnthonyDiaz/field-editors that referenced this pull request Aug 3, 2023
KCLAnthonyDiaz added a commit to KCLAnthonyDiaz/field-editors that referenced this pull request Aug 3, 2023
@github-actions github-actions bot removed the stale Used to mark when there was no activity for a set period of time label Oct 11, 2023
Copy link

Marking pull request as stale since there was no activity for 30 days

@github-actions github-actions bot added the stale Used to mark when there was no activity for a set period of time label Nov 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Used to mark when there was no activity for a set period of time
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants