Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Normalization: enforce rows / cells only inside table? #13

Closed
jasonphillips opened this issue Oct 26, 2016 · 1 comment · Fixed by #17
Closed

Normalization: enforce rows / cells only inside table? #13

jasonphillips opened this issue Oct 26, 2016 · 1 comment · Fixed by #17
Assignees

Comments

@jasonphillips
Copy link

(Excellent plugin; this one was really the tipping point in my switch to Slate after struggling to handle table abstractions myself within the quirks and API limitations of Draft)

I see that the schema enforces certain normalization rules (in the form of "parent may only contain children of type x"; ie, tables may contain rows, rows may contain cells) but I'm occasionally seeing a situation where a paste operation by the user ends up inserting rows without an enclosing table. I haven't fully explored all the schema normalization / transformation operations available in slate's current iteration, but would it be possible to include rules of the type "child can only appear within parent type Y" so that these table-fragment paste operations would automatically wrap an enclosing table tag when needed?

@SamyPesse
Copy link
Member

@jasonphillips Yes, you're right.

We are going to fix this in the upcoming release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants