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