This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title":"試試看", | |
| "greeting":"你好嗎" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "title":"try it", | |
| "greeting":"How are you doing" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| options: ['inline', 'blockType', 'fontSize', 'fontFamily', 'list', 'textAlign', 'colorPicker', 'link', 'embedded', 'emoji', 'image', 'remove', 'history'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inline: { | |
| inDropdown: false, | |
| className: undefined, | |
| component: undefined, | |
| dropdownClassName: undefined, | |
| options: ['bold', 'italic', 'underline', 'strikethrough', 'monospace', 'superscript', 'subscript'], | |
| bold: { icon: bold, className: undefined }, | |
| italic: { icon: italic, className: undefined }, | |
| underline: { icon: underline, className: undefined }, | |
| strikethrough: { icon: strikethrough, className: undefined }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { convertToRaw, EditorState } from 'draft-js'; | |
| import { Editor } from 'react-draft-wysiwyg'; | |
| import '../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; | |
| import draftToHtml from 'draftjs-to-html'; | |
| export default class TextEditor extends Component{ | |
| constructor(props) { | |
| super(props); | |
| this.state = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react'; | |
| import { Editor } from 'react-draft-wysiwyg'; | |
| import '../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; | |
| export default class TextEditor extends Component{ | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dynamic from 'next/dynamic' | |
| const Sample = dynamic( | |
| () => import('../Sample.js'), | |
| { ssr : false } | |
| ) | |
| Const Demo = () => { | |
| return ( | |
| <React.Fragment> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dynamic from 'next/dynamic' | |
| const Sample = dynamic( | |
| () => import('../Sample.js'), | |
| { loading: ()=> <p>loading...</p> } | |
| ) | |
| Const Demo = () => { | |
| return ( | |
| <React.Fragment> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import dynamic from 'next/dynamic' | |
| const Sample = dynamic(() => import('../Sample.js')) | |
| Const Demo = () => { | |
| return ( | |
| <React.Fragment> | |
| <Sample/> | |
| </React.Fragment> | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Suspense } from 'react'; | |
| const Sample = React.lazy(()=> import('./Sample') ); | |
| Const Demo = () => { | |
| return( | |
| <React.Fragment> | |
| <Suspense fallback={<div>Loading...</div>}> | |
| <Sample /> | |
| </Suspense> | |
| </React.Fragment> |
NewerOlder