5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-03 10:56:09 +00:00
panel/app/javascript/etc/new_editor.js
2023-03-31 18:03:34 -03:00

15 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"),
},
});
});
});