5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-29 18:36:21 +00:00
panel/app/javascript/etc/new_editor.js

15 lines
374 B
JavaScript
Raw Permalink Normal View History

import SuttyEditor from "@suttyweb/editor";
2022-12-29 18:55:36 +00:00
import "@suttyweb/editor/dist/editor.css";
document.addEventListener("turbolinks:load", () => {
document.querySelectorAll(".new-editor").forEach((editorContainer) => {
new SuttyEditor({
target: editorContainer,
props: {
textareaEl: editorContainer.querySelector("textarea"),
},
});
});
});