UNPKG

react-garden

Version:

React + TypeScript + ThreeJS app using Material UI on NextJS, Apollo Client, GraphQL + WordPress REST APIs, for ThreeD web development.. a part of the threed.ai code family.

35 lines (26 loc) 944 B
export const EditorUncontrolledJSXCode = ( <pre className='language-jsx'> <code className='language-jsx'>{`// ** Component Import import ReactDraftWysiwyg from '~/@core/components/react-draft-wysiwyg' const EditorUncontrolled = () => <ReactDraftWysiwyg /> export default EditorUncontrolled `}</code> </pre> ) export const EditorControlledJSXCode = ( <pre className='language-jsx'> <code className='language-jsx'>{`// ** React Imports import { useState } from 'react' // ** Third Party Imports import { EditorState } from 'draft-js' // ** Component Import import ReactDraftWysiwyg from '~/@core/components/react-draft-wysiwyg' const EditorControlled = () => { // ** State const [value, setValue] = useState(EditorState.createEmpty()) return <ReactDraftWysiwyg editorState={value} onEditorStateChange={data => setValue(data)} /> } export default EditorControlled `}</code> </pre> )