Open jolanglinais opened 4 years ago
The markdown transform expects a plain JSON object. Can you try with that? I'm suspecting that what you are passing isn't proper JSON.
(Note: I believe that's why it's working with JSON.parse(JSON.stringify(...))
)
Changing title. We need to migrate to a functional approach to transformations and avoid mutations.
Describe the bug In the
slateToCiceroMarkDom
I’m running into this error wherenode.children
is read only and errors because it cannot be reassigned.The error is
Uncaught TypeError: Cannot assign to read only property 'children' of object '#<Object>'
which occurs at that line I linked above.To Reproduce Steps to reproduce the behavior:
slate-0.50.x
branch in this editor tocicero-ui
slate57
branch.Expected behavior Currently this works:
JSON.parse(JSON.stringify(Node.fragment(editor, editor.selection));
, but I expect this to not be required.Screenshots
Additional context