mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 15:16:21 +00:00
18 lines
386 B
JavaScript
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,
|
|
},
|
|
});
|
|
}
|
|
}
|