Sha256: 15013cf71e9f574bdd6dc957d51361d6aafb2ac0d1bbead173b28f9369c2099c
Contents?: true
Size: 790 Bytes
Versions: 16
Compression:
Stored size: 790 Bytes
Contents
import React from "react"; import ReactDOM from "react-dom"; import RichTextArea from "../components/RichTextArea"; import readyHandler from "../lib/readyHandler"; class RichText { apply () { const elems = document.querySelectorAll("textarea.rich"); elems.forEach((elem) => { this.enhance(elem); }); } enhance (elem) { const container = document.createElement("div"); elem.parentNode.appendChild(container); ReactDOM.render( <RichTextArea value={elem.value} name={elem.name} rows={elem.rows} id={elem.id} />, container ); elem.parentNode.removeChild(elem); } start () { readyHandler.ready(() => { this.apply(); }); } } export default new RichText();
Version data entries
16 entries across 16 versions & 1 rubygems