@ckeditor/ckeditor5-paste-from-office 48.4.0-alpha.7 → 48.5.0-alpha.0
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.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1048,7 +1048,8 @@ function removeBoldWrapper(documentFragment, writer) {
|
|
|
1048
1048
|
* @internal
|
|
1049
1049
|
*/
|
|
1050
1050
|
function transformBlockBrsToParagraphs(documentFragment, writer) {
|
|
1051
|
-
const
|
|
1051
|
+
const viewDocument = new ViewDocument(writer.document.stylesProcessor);
|
|
1052
|
+
const domConverter = new ViewDomConverter(viewDocument, { renderingMode: "data" });
|
|
1052
1053
|
const blockElements = domConverter.blockElements;
|
|
1053
1054
|
const inlineObjectElements = domConverter.inlineObjectElements;
|
|
1054
1055
|
const elementsToReplace = [];
|
|
@@ -1357,7 +1358,8 @@ function parsePasteOfficeHtml(htmlString, stylesProcessor) {
|
|
|
1357
1358
|
* @param htmlDocument Native `Document` object to be transformed.
|
|
1358
1359
|
*/
|
|
1359
1360
|
function documentToView(htmlDocument, stylesProcessor) {
|
|
1360
|
-
const
|
|
1361
|
+
const viewDocument = new ViewDocument(stylesProcessor);
|
|
1362
|
+
const domConverter = new ViewDomConverter(viewDocument, { renderingMode: "data" });
|
|
1361
1363
|
const fragment = htmlDocument.createDocumentFragment();
|
|
1362
1364
|
const nodes = htmlDocument.body.childNodes;
|
|
1363
1365
|
while (nodes.length > 0) fragment.appendChild(nodes[0]);
|