5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 15:26:22 +00:00
panel/app/javascript/etc/new_editor.js
2023-03-31 18:03:34 -03:00

14 lines
373 B
JavaScript

import SuttyEditor from "@suttyweb/editor";
import "@suttyweb/editor/dist/style.css";
document.addEventListener("turbolinks:load", () => {
document.querySelectorAll(".new-editor").forEach((editorContainer) => {
new SuttyEditor({
target: editorContainer,
props: {
textareaEl: editorContainer.querySelector("textarea"),
},
});
});
});