Package Exports
- ra-tinymce
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 (ra-tinymce) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
<TinyMCEEditor />
input component for React-Admin Framework
- All TinyMCE options are fully supported
- TypeScript definitions are supported
Binding of <TinyMCEEditor />
for react-admin.
Installation
$ npm install ra-tinymce --save
or
$ yarn add ra-tinymce
Basic usage
import React, { FC } from 'react';
import {
SimpleForm,
Edit,
TextInput
} from 'react-admin';
import TinyMCEInput, { TinyMCEInputProps } from 'ra-tinymce';
const PostEdit: FC<TinyMCEInputProps> = (props) => {
return (
<Edit>
<SimpleForm>
<TextInput source="title" />
<TinyMCEEditor
source="content"
init={{
height: 500,
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table paste code help wordcount'
],
toolbar: 'undo redo | formatselect | ' +
'bold italic backcolor | alignleft aligncenter ' +
'alignright alignjustify | bullist numlist outdent indent | ' +
'removeformat | help',
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
}}
/>
</SimpleForm>
</Edit>
);
};
export default PostEdit;
License
This library is licensed under the MIT Licence.
Author
This library is maintain by @anhquoctran