From 478e2487ffa1932d71acf97067db420af1a14760 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Sat, 18 Mar 2023 21:06:04 +0200
Subject: [PATCH] preserve white spaces

---
 .../src/ExternalAPIContentService/replaceText.js              | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/wax-prosemirror-services/src/ExternalAPIContentService/replaceText.js b/wax-prosemirror-services/src/ExternalAPIContentService/replaceText.js
index 4e1741a5c..84522aaff 100644
--- a/wax-prosemirror-services/src/ExternalAPIContentService/replaceText.js
+++ b/wax-prosemirror-services/src/ExternalAPIContentService/replaceText.js
@@ -69,7 +69,9 @@ export default (
       const parser = DOMParser.fromSchema(
         context.pmViews.main.state.config.schema,
       );
-      const parsedContent = parser.parse(elementFromString(text));
+      const parsedContent = parser.parse(elementFromString(text), {
+        preserveWhitespace: 'full',
+      });
       // Otherwise, insert it at the placeholder's position, and remove
       // the placeholder
       // context.pmViews[context.activeViewId].dispatch(
-- 
GitLab