Conversation
|
I do not think it is a good idea. It does not matter what value you get from Prosemirror or any editor, Yjs provides shared types and they should follow web standards. According to Web API, XML attribute values must always be quoted. That is why it should be always a string. |
|
Well, MDN states for Additionally, note that this case came up in the first place because we're cloning an existing element which already had somehow managed have a number as the value type. So one could just as easily argue that things should have already broken upstream when the doc/elements were created. At a minimum, there's a big difference in the behavior between creating elements and cloning them. |
Changes YXMLElement to allow numbers in attribute values
This seems like a common use case when working with YJS and Prosemirror/TipTap schemas, since anything from list values, indent values, to heading levels will contain numeric values instead of strings when converting between YJS and Prosemirror.
fixes #680