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

19 lines
386 B
JavaScript
Raw Normal View History

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,
},
});
}
}