This commit is contained in:
2025-10-02 08:16:11 +01:00
parent 6d833c7d3b
commit 979728e6c8
30 changed files with 695 additions and 100 deletions
+5 -2
View File
@@ -84,7 +84,7 @@ export default function TinyMCEEditor<KeyType extends string>({
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<KeyType extends string>({
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<KeyType extends string>({
"bg-background-light dark:bg-background-dark",
wrapperWrapperProps?.className
)}
onInput={(e) => {
console.log(`Input Detected`);
}}
>
{showLabel && (
<label
@@ -16,7 +16,8 @@ export default function useTinyMCE() {
}
const script = document.createElement("script");
script.src = "https://datasquirel.com/tinymce-public/tinymce.min.js";
script.src =
"https://www.datasquirel.com/tinymce-public/tinymce.min.js";
script.async = true;
document.head.appendChild(script);