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

Allow running custom normalizers before default normalizers #2361

Closed
timobetina opened this issue Nov 1, 2018 · 4 comments
Closed

Allow running custom normalizers before default normalizers #2361

timobetina opened this issue Nov 1, 2018 · 4 comments

Comments

@timobetina
Copy link

@timobetina timobetina commented Nov 1, 2018

Do you want to request a feature or report a bug?

feature

What's the current behavior?

Currently core schema rules take precedence over custom rules.
Example situation: A not valid html (such as text and blocks are siblings) is copied into editor. Then slate's defaultNormalize removes the blocks and only preserves the text.

What's the expected behavior?

It would be nice to be able to specify custom schema rules which would run before core schema rules.

@CameronAckermanSEL

This comment has been minimized.

Copy link
Contributor

@CameronAckermanSEL CameronAckermanSEL commented Nov 6, 2018

Do we have any ideas for what this interface could look like?

@Malgalad

This comment has been minimized.

Copy link
Contributor

@Malgalad Malgalad commented Nov 7, 2018

What about adding enforce property to a rule, similar to webpack? So you can add rules that run before or after other ones.

@CameronAckermanSEL

This comment has been minimized.

Copy link
Contributor

@CameronAckermanSEL CameronAckermanSEL commented Nov 7, 2018

I really like that idea :)

@ianstormtaylor ianstormtaylor mentioned this issue Nov 6, 2019
@ianstormtaylor

This comment has been minimized.

Copy link
Owner

@ianstormtaylor ianstormtaylor commented Nov 28, 2019

Fixed by #3093.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.