Closed ocavue closed 5 years ago
@marijnh
Thanks for your quick fix 😍.
I noticed that TextNode.withText()
, as well as TextNode
itself, are undocumented: they have no comments so that I can't find them in https://prosemirror.net/docs/ref.
Should I use these classes or methods in my own project? More specifically, does these undocumented API has the same backward compatibility as those documented API?
does these undocumented API has the same backward compatibility as those documented API?
No, and actually it's kind of bad style that I used them from another package (though it seems there was already an occurrence in the markdown package). I guess it would be cleaner to just change this to a call to schema.text
.
Base on the document,
Node.copy()
method should accept aFragment
object, butmaybeMerge
gives it a string.https://github.com/ProseMirror/prosemirror-markdown/blob/6e9b03a59d3df714296ef6ee87322f5bc996ad33/src/from_markdown.js#L5-L8