How to use the nib-converter.convertFromHTML function in nib-converter

To help you get started, we’ve selected a few nib-converter examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nib-edit / Nib / packages / docs / demo / ConvertFromHTML / index.jsx View on Github external
const ConvertFromHTMLDemo = () => {
  const [html, setHTML] = useState();
  const [updateEditor, setUpdateEditor] = useState();
  const defaultValue = NibConverter.convertFromHTML(html);
  useEffect(() => {
    if (updateEditor) setUpdateEditor(false);
  }, [updateEditor]);
  return (
    <div>
      <textarea value="{html}" placeholder="Enter HTML"> setHTML(evt.target.value)}
      /&gt;
      &lt;button
        className="docs_btn nib-html_btn"
        type="button"
        onClick={() =&gt; setUpdateEditor(true)}
      &gt;</textarea></div>

nib-converter

Converter for nib-editor to HTML

GPL-3.0
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis