Sha256: c6f44557efaadb97cb80e61e50c9306b7f8869fb3f9ddd6d8f2a6c0641e5c1bd
Contents?: true
Size: 653 Bytes
Versions: 1
Compression:
Stored size: 653 Bytes
Contents
const $ = window.$ import { Controller } from "stimulus" export default class extends Controller { insert(event) { // Note the trix_edito_helper is not inserting the correct class atm // so for now we are just selecting the one and only (hopefully) trix-editor on the page // let editorSelector = this.data.get("target-input") let modal = $("#snippets-modal") let snippetBody = $(event.target).parent().closest("tr").find(".body").html() let targetInputSelector = $(modal).data("target") trix = document.querySelector("trix-editor") trix.editor.insertHTML(snippetBody) $(modal).foundation("reveal", "close") } }
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
renalware-core-2.0.144 | app/javascript/renalware/controllers/snippets_controller.js |