How to use nib-converter - 2 common examples

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>
github nib-edit / Nib / packages / docs / demo / ConvertToHTML / index.jsx View on Github external
const ConvertToHTMLDemo = () =&gt; {
  const [content, setContent] = useState();
  const htmlStr = NibConverter.convertToHTML((content || defaultValue).doc);
  return (
    <div>
      </div>

nib-converter

Converter for nib-editor to HTML

GPL-3.0
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis