Sha256: 9dce53b5b5a346cbe5a58d073a2ececfbc0d4a8bff60ba373b802d8a96251d59
Contents?: true
Size: 438 Bytes
Versions: 23
Compression:
Stored size: 438 Bytes
Contents
const $ = window.$ import { Controller } from "stimulus" export default class extends Controller { static targets = [ "trix" ] initInsertEventNotesIntoTrixEditor(event) { event.preventDefault() let notes = $(event.target).data("notes") if (notes && this.trix) { this.trix.insertHTML(notes) } else { alert("There are no notes to insert") } } get trix() { return this.trixTarget.editor } }
Version data entries
23 entries across 23 versions & 1 rubygems