field-editors icon indicating copy to clipboard operation
field-editors copied to clipboard

feat: allow custom plugins for slate

Open mcheng-caring opened this issue 4 years ago • 5 comments

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.

mcheng-caring avatar Apr 28 '21 04:04 mcheng-caring

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.

cribbles avatar Jun 16 '21 12:06 cribbles

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

JimmyHowe avatar May 24 '22 15:05 JimmyHowe

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.

mcheng-caring avatar May 24 '22 15:05 mcheng-caring

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

github-actions[bot] avatar Aug 07 '22 07:08 github-actions[bot]

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

github-actions[bot] avatar Nov 11 '23 07:11 github-actions[bot]