diff --git a/bun.lockb b/bun.lockb old mode 100755 new mode 100644 diff --git a/components/lib/(partials)/ModalComponent.tsx b/components/lib/(partials)/ModalComponent.tsx index 0ac05fa..ff71a83 100644 --- a/components/lib/(partials)/ModalComponent.tsx +++ b/components/lib/(partials)/ModalComponent.tsx @@ -1,4 +1,4 @@ -import React, { DetailedHTMLProps, HTMLAttributes } from "react"; +import React from "react"; import { twMerge } from "tailwind-merge"; import ReactDOM from "react-dom"; import Button from "../layout/Button"; @@ -25,6 +25,8 @@ export default function ModalComponent({ open, setOpen, ...props }: Props) { "flex flex-col items-center justify-center p-4", "twui-modal-root" )} + role="dialog" + aria-modal="true" >
{/*
{ + try { + return JSON.stringify(JSON.parse(content), null, 4); + } catch (error) { + return content; + } + })(), placeholder: placeholder ? placeholder : "", enableBasicAutocompletion: true, enableLiveAutocompletion: true, @@ -108,7 +114,7 @@ export default function AceEditor({ return function () { editor.destroy(); }; - }, [refresh, darkMode, ready, externalRefresh]); + }, [refresh, darkMode, ready, externalRefresh, content]); React.useEffect(() => { const htmlClassName = document.documentElement.className; diff --git a/components/lib/editors/TinyMCE/index.tsx b/components/lib/editors/TinyMCE/index.tsx index 09ac948..7d8c7b1 100644 --- a/components/lib/editors/TinyMCE/index.tsx +++ b/components/lib/editors/TinyMCE/index.tsx @@ -84,7 +84,7 @@ export default function TinyMCEEditor({ if (defaultValue) editor.setContent(defaultValue); setReady(true); - editor.on("input", (e) => { + editor.on("change", (e) => { changeHandler?.(editor.getContent()); }); @@ -92,7 +92,7 @@ export default function TinyMCEEditor({ useParentStyles(editor); } }, - base_url: "https://datasquirel.com/tinymce-public", + base_url: "https://www.datasquirel.com/tinymce-public", body_class: "twui-tinymce", placeholder, relative_urls: true, @@ -118,6 +118,9 @@ export default function TinyMCEEditor({ "bg-background-light dark:bg-background-dark", wrapperWrapperProps?.className )} + onInput={(e) => { + console.log(`Input Detected`); + }} > {showLabel && (