5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-12-01 08:56:21 +00:00
panel/app/javascript/etc/new_editor.js

15 lines
373 B
JavaScript
Raw Permalink Normal View History

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