Sha256: 251960295e0e11598ea41e8520769be20cc0fafafd11ae0dbeb614b74f75a94d
Contents?: true
Size: 459 Bytes
Versions: 23
Compression:
Stored size: 459 Bytes
Contents
const $ = window.$ import { Controller } from "stimulus" export default class extends Controller { insert(event) { // TODO: set up the trix editor in each page as data-target="snippets.trix" let modal = $("#snippets-modal") let snippetBody = $(event.target).parent().closest("tr").find(".body").html() let trix = document.querySelector("trix-editor") trix.editor.insertHTML(snippetBody) $(modal).foundation("reveal", "close") } }
Version data entries
23 entries across 23 versions & 1 rubygems