From a5c1bb2bfff34e96dedd55830f79dda7fc85cefd Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Thu, 28 Sep 2017 13:07:38 -0400 Subject: [PATCH] migrate to new slate packages --- package.json | 2 ++ .../Widgets/Markdown/MarkdownControl/RawEditor/index.js | 3 ++- .../Widgets/Markdown/MarkdownControl/VisualEditor/index.js | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e24bde3f..1bb71989 100644 --- a/package.json +++ b/package.json @@ -160,6 +160,8 @@ "slate": "^0.24.0", "slate-edit-list": "^0.8.0", "slate-edit-table": "^0.11.0", + "slate-plain-serializer": "^0.1.10", + "slate-react": "^0.1.10", "slate-soft-break": "^0.4.0", "slug": "^0.9.1", "toml-j0.4": "^1.1.1", diff --git a/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js b/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js index 38cae645..e4738b56 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js +++ b/src/components/Widgets/Markdown/MarkdownControl/RawEditor/index.js @@ -1,6 +1,7 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { Editor as Slate, Plain } from 'slate'; +import { Editor as Slate } from 'slate-react'; +import Plain from 'slate-plain-serializer'; import { debounce } from 'lodash'; import Toolbar from '../Toolbar/Toolbar'; import { Sticky } from '../../../../UI/Sticky/Sticky'; diff --git a/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js b/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js index 273a604e..b2159238 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js +++ b/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js @@ -1,7 +1,8 @@ import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { get, isEmpty, debounce } from 'lodash'; -import { Editor as Slate, State, Document, Block, Text } from 'slate'; +import { State, Document, Block, Text } from 'slate'; +import { Editor as Slate } from 'slate-react'; import { slateToMarkdown, markdownToSlate, htmlToSlate } from '../../serializers'; import registry from '../../../../../lib/registry'; import Toolbar from '../Toolbar/Toolbar';