diff --git a/examples/draft-0-10-0/playground/src/App.css b/examples/draft-0-10-0/playground/src/App.css index 3192189fcb..5ed23255bb 100644 --- a/examples/draft-0-10-0/playground/src/App.css +++ b/examples/draft-0-10-0/playground/src/App.css @@ -19,6 +19,7 @@ } .playground-main select { + width: 100px; background: #843131; } @@ -102,6 +103,21 @@ color: #C15757; } +.nav-main .nav-experiment-selector option, +.nav-main .nav-experiment-selector { + background: transparent; + border: none; + color: #fff; + cursor: pointer; + outline: none; + text-align-last: right; +} + +.nav-main .nav-experiment-selector option { + color: #000; + padding: 10px 0px; +} + .nav-home img { vertical-align: -17px; margin-right: 4px; @@ -140,3 +156,14 @@ /** sad :( but seems to not be a way to overwrite that by configuration */ background: var(--main-background) !important; } + +.RichEditor-editor { + padding: 10px 20px; +} + +/** + * basic style for handling nested lists + */ +.RichEditor-editor li[data-block] li[data-block] { + margin-left: 20px; +} diff --git a/examples/draft-0-10-0/playground/src/App.js b/examples/draft-0-10-0/playground/src/App.js index 46a92d2717..5ffd92fb19 100644 --- a/examples/draft-0-10-0/playground/src/App.js +++ b/examples/draft-0-10-0/playground/src/App.js @@ -17,15 +17,21 @@ import DraftJsRichEditorExample from './DraftJsRichEditorExample'; import JSONTree from 'react-json-tree'; import {convertToHTML} from 'draft-convert'; import PanelGroup from 'react-panelgroup'; +import gkx from 'draft-js/lib/gkx'; +import convertFromHTMLModern from 'draft-js/lib/convertFromHTMLToContentBlocks2'; import { ContentState, EditorState, - convertFromHTML, + convertFromHTML as convertFromHTMLClassic, convertToRaw, convertFromRaw, } from 'draft-js'; +const fromHTML = gkx('draft_refactored_html_importer') + ? convertFromHTMLModern + : convertFromHTMLClassic; + const theme = { scheme: 'monokai', author: 'wimer hazenberg (http://www.monokai.nl)', @@ -58,9 +64,18 @@ const baseRawContent = { entityMap: {}, }; -const baseHtmlContent = ` -
paragraph inside blockquote
+const baseHtmlContent = `