From a0f14dc3ef51cb314d3aa5dd5c025ef3f2d13b87 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Mon, 11 Mar 2024 11:10:41 +0500 Subject: [PATCH] editor: minor refactor --- packages/editor/src/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/editor/src/index.ts b/packages/editor/src/index.ts index ab09b5fc6..4025f1451 100644 --- a/packages/editor/src/index.ts +++ b/packages/editor/src/index.ts @@ -112,12 +112,6 @@ declare global { var keyboardShown: boolean; } -function hasStyle(element: HTMLElement | string) { - const style = (element as HTMLElement).getAttribute("style"); - if (!style || style === "font-family: inherit;") return false; - return true; -} - globalThis["keyboardShown"] = true; const CoreExtensions = Object.entries(TiptapCoreExtensions) // we will implement our own customized clipboard serializer @@ -407,3 +401,9 @@ export { getHTMLFromFragment, type DownloadOptions }; + +function hasStyle(element: HTMLElement | string) { + const style = (element as HTMLElement).getAttribute("style"); + if (!style || style === "font-family: inherit;") return false; + return true; +}