@tiptap/core 2.1.14 → 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +1 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/helpers/createNodeFromContent.ts +1 -0
package/dist/index.cjs
CHANGED
|
@@ -1613,6 +1613,7 @@ function createNodeFromContent(content, schema, options) {
|
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
1615
|
if (typeof content === 'string') {
|
|
1616
|
+
content = content.split('\n').map(part => part.trim()).join(''); // we need to remove new lines since the parser will add breaks
|
|
1616
1617
|
const parser = model.DOMParser.fromSchema(schema);
|
|
1617
1618
|
return options.slice
|
|
1618
1619
|
? parser.parseSlice(elementFromString(content), options.parseOptions).content
|