JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 503
  • Score
    100M100P100Q119262F
  • License MIT

A TinyMCE React component

Package Exports

  • tinymce-react

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tinymce-react) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TinyMCE React

A simple TinyMCE React component.

yarn add tinymce-react

Usage

Note: When the component mounts it will load in the cloud version of TinyMCE (if it hasn't already been loaded) with the given apiKey.

const React = require('react');
const TinyMCE = require('tinymce-react');


module.exports = (props) => {
    return (
        <TinyMCE 
            apiKey={YOUR_TINYMCE_API_KEY} 
            config={{
                height: 500,
                plugins: 'image table'
            }}
            content={`<p>This is some HTML</p>`} 
            onContentChanged={content => console.log(content)} 
        />
    )
}

Have a look at the TinyMCE documentation for all config options.