A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
editor: do not add line break at the start of copied text (#1443)
Muhammad Alid2f65c435d0f
diff --git a/packages/editor/src/extensions/clipboard-text-serializer/index.ts b/packages/editor/src/extensions/clipboard-text-serializer/index.tsindex 0142bbc5a..8cef969f6 100644--- a/packages/editor/src/extensions/clipboard-text-serializer/index.ts+++ b/packages/editor/src/extensions/clipboard-text-serializer/index.ts@@ -53,6 +53,7 @@ function getTextBetween(slice: Slice, schema: Schema): string {if (textSerializer) {if (node.isBlock && !separated) {+ console.log("ADDING separator");text += separator;separated = true;}@@ -69,7 +70,7 @@ function getTextBetween(slice: Slice, schema: Schema): string {} else if (node.isText) {text += node?.text;separated = false;- } else if (node.isBlock) {+ } else if (node.isBlock && !!text) {text += separator;separated = true;}