You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case that I need to validate a node data based on editor.value.document.data, which I use to keep some global editor state. Unfortunately in data callback in schema rules we dont have access to it.
What's the expected behavior?
If we could add editor passed as 2nd argument to data callback, I could read current editor.value.document.data and normalize this node with schema normalize. Now I guess I will need to resort to lower level normalizeNode with worse performance.
Apologies for potential duplicate #1960 , I guess the answer will be the same, but maybe we could think of a global editor/document data which wouldn't break memoization?
The text was updated successfully, but these errors were encountered:
Hey @klis87, I understand your need, but like you said I've already addressed this in #1960. In the current architecture for how normalizing works this isn't really possible.
Do you want to request a feature or report a bug?
Feature
What's the current behavior?
Currently you can define many schema rules. I am interested in
data
specifically:I have a use case that I need to validate a node
data
based oneditor.value.document.data
, which I use to keep some global editor state. Unfortunately indata
callback in schema rules we dont have access to it.What's the expected behavior?
If we could add
editor
passed as 2nd argument todata
callback, I could read currenteditor.value.document.data
and normalize this node with schemanormalize
. Now I guess I will need to resort to lower levelnormalizeNode
with worse performance.Apologies for potential duplicate #1960 , I guess the answer will be the same, but maybe we could think of a global editor/document data which wouldn't break memoization?
The text was updated successfully, but these errors were encountered: