5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 15:16:21 +00:00
panel/app/javascript/controllers/new_editor_controller.js

18 lines
386 B
JavaScript

import { Controller } from "@hotwired/stimulus";
import SuttyEditor from "@suttyweb/editor";
import "@suttyweb/editor/dist/style.css";
export default class extends Controller {
static targets = ["textarea"];
connect() {
this.editor =
new SuttyEditor({
target: this.element,
props: {
textareaEl: this.textareaTarget,
},
});
}
}