Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Update deps for and cleanup playground example #2368

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions examples/draft-0-10-0/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"codemirror": "^5.32.0",
"draft-convert": "^2.0.1",
"codemirror": "^5.52.2",
"draft-convert": "^2.1.8",
"draft-js": "file:../../..",
"immutable": "^3.8.2",
"react": "^16.2.0",
"react-app-polyfill": "^1.0.4",
"react-codemirror2": "^3.0.7",
"react-dom": "^16.2.0",
"react-json-tree": "^0.11.0",
"react-panelgroup": "^1.0.5",
"react-scripts": "3.2.0"
"react": "^16.13.1",
"react-app-polyfill": "^1.0.6",
"react-codemirror2": "^7.1.0",
"react-dom": "^16.13.1",
"react-json-tree": "^0.11.2",
"react-panelgroup": "^1.0.10",
"react-scripts": "3.4.1"
},
"scripts": {
"start": "react-scripts start",
Expand Down
4 changes: 0 additions & 4 deletions examples/draft-0-10-0/playground/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,6 @@
background: var(--main-background) !important;
}

.RichEditor-editor {
padding: 10px 20px;
}

/**
* basic style for handling nested lists
*/
Expand Down
9 changes: 3 additions & 6 deletions examples/draft-0-10-0/playground/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @format
*/

import React, {Component} from 'react';
import React from 'react';
import './DraftJsPlaygroundContainer.css';
import {Controlled as CodeMirror} from 'react-codemirror2';
import 'codemirror/lib/codemirror.css';
Expand Down Expand Up @@ -92,7 +92,7 @@ const BASE_CONTENT = {
html: baseHtmlContent,
};

class DraftJsPlaygroundContainer extends Component {
class DraftJsPlaygroundContainer extends React.Component {
constructor(props: Props) {
super(props);
this.state = {
Expand Down Expand Up @@ -133,13 +133,11 @@ class DraftJsPlaygroundContainer extends Component {

_setHTMLContent(html) {
const parsedHtml = fromHTML(html);

if (!parsedHtml) {
return;
}

const {contentBlocks, entityMap} = parsedHtml;

if (!contentBlocks) {
return;
}
Expand All @@ -160,7 +158,6 @@ class DraftJsPlaygroundContainer extends Component {

setContent = () => {
const {mode, codeMirrorValue} = this.state;

if (mode === 'html') {
this._setHTMLContent(codeMirrorValue);
} else {
Expand Down Expand Up @@ -224,7 +221,7 @@ class DraftJsPlaygroundContainer extends Component {
<a
target="_blank"
rel="noopener noreferrer"
href="https://draftjs.org/docs/overview.html#content">
href="https://draftjs.org/docs/getting-started">
Docs
</a>
</li>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
.DraftJsPlaygroundContainer-editor {
padding: 0;
background: #fff;
padding-top: 30px;
height: auto;
}

Expand All @@ -29,7 +28,6 @@
.RichEditor-editor {
cursor: text;
font-size: 16px;
margin-top: 10px;
}

.RichEditor-editor .public-DraftEditorPlaceholder-root,
Expand Down Expand Up @@ -63,9 +61,6 @@
}

.RichEditor-controls-container {
position: fixed;
top: 50px;
padding: 20px 0 0;
border-bottom: 1px solid #ccc;
background: #fff;
z-index: 10;
Expand Down
Loading