From 9e30da1f2506928f0e096810cf0a77b2c15d964d Mon Sep 17 00:00:00 2001
From: Amir Angel <36531255+17Amir17@users.noreply.github.com>
Date: Wed, 7 Feb 2024 15:28:03 +0200
Subject: [PATCH 1/3] fix: rm editorHtml
---
src/simpleWebEditor/editorHtml.ts | 245 ------------------------------
1 file changed, 245 deletions(-)
delete mode 100644 src/simpleWebEditor/editorHtml.ts
diff --git a/src/simpleWebEditor/editorHtml.ts b/src/simpleWebEditor/editorHtml.ts
deleted file mode 100644
index fbb483f..0000000
--- a/src/simpleWebEditor/editorHtml.ts
+++ /dev/null
@@ -1,245 +0,0 @@
-/* eslint-disable */
-export const editorHtml = String.raw`
-
-
-
-
-
- RichTextEditor
-
-
-
-
-
-
-
-
-`.replace(/\\([`$])/g, '\$1')
\ No newline at end of file
From 049d9466b159d6d8d782564989b6010cb45fade7 Mon Sep 17 00:00:00 2001
From: Amir Angel <36531255+17Amir17@users.noreply.github.com>
Date: Wed, 7 Feb 2024 15:29:44 +0200
Subject: [PATCH 2/3] fix: move to build where ignored
---
scripts/buildEditor.js | 2 +-
src/RichText/RichText.tsx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/buildEditor.js b/scripts/buildEditor.js
index 136b462..5ceb474 100644
--- a/scripts/buildEditor.js
+++ b/scripts/buildEditor.js
@@ -20,7 +20,7 @@ const build = async () => {
const editorPath = path.join(webDIR, 'build/index.html');
const editorHtml = fs.readFileSync(editorPath, 'utf8');
const editorTs = createContent(editorHtml);
- const editorTsPath = path.join(webDIR, 'editorHtml.ts');
+ const editorTsPath = path.join(webDIR, 'build/editorHtml.ts');
fs.writeFileSync(editorTsPath, editorTs);
console.log('Built Editor!');
} catch (error) {
diff --git a/src/RichText/RichText.tsx b/src/RichText/RichText.tsx
index 1f8c71e..727a2c5 100644
--- a/src/RichText/RichText.tsx
+++ b/src/RichText/RichText.tsx
@@ -6,7 +6,7 @@ import {
type WebViewMessageEvent,
} from 'react-native-webview';
-import { editorHtml } from '../simpleWebEditor/editorHtml';
+import { editorHtml } from '../simpleWebEditor/build/editorHtml';
import { type EditorMessage } from '../types/Messaging';
import { useKeyboard } from '../utils';
From af9baf21d473a98c5c2935f925f688a6db2afb7e Mon Sep 17 00:00:00 2001
From: Amir Angel <36531255+17Amir17@users.noreply.github.com>
Date: Wed, 7 Feb 2024 15:32:20 +0200
Subject: [PATCH 3/3] fix: ts-ignore
---
src/RichText/RichText.tsx | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/RichText/RichText.tsx b/src/RichText/RichText.tsx
index 727a2c5..db9d661 100644
--- a/src/RichText/RichText.tsx
+++ b/src/RichText/RichText.tsx
@@ -6,6 +6,7 @@ import {
type WebViewMessageEvent,
} from 'react-native-webview';
+// @ts-ignore - this file is built
import { editorHtml } from '../simpleWebEditor/build/editorHtml';
import { type EditorMessage } from '../types/Messaging';