@potok/editor
Advanced tools
Comparing version 3.0.6 to 3.0.7
@@ -34,3 +34,9 @@ import { | ||
if (schema.marks.strong) bind('Ctrl-b', toggleMark(schema.marks.strong)); | ||
if (schema.marks.strong) bind('Mod-b', toggleMark(schema.marks.strong)); | ||
if (schema.marks.em) bind('Ctrl-i', toggleMark(schema.marks.em)); | ||
if (schema.marks.em) bind('Mod-i', toggleMark(schema.marks.em)); | ||
if (schema.marks.underlined) | ||
bind('Ctrl-u', toggleMark(schema.marks.underlined)); | ||
if (schema.marks.underlined) | ||
bind('Mod-u', toggleMark(schema.marks.underlined)); | ||
@@ -37,0 +43,0 @@ if (schema.nodes.bullet_list) { |
import React from 'react'; | ||
import { FormattedMessage, IntlProvider } from 'react-intl'; | ||
import { render as ReactDOMRender } from 'react-dom'; | ||
import _ from 'lodash'; | ||
import { Plugin, PluginKey, Selection } from 'prosemirror-state'; | ||
@@ -60,3 +61,3 @@ import { Select, customStyles } from '@potok/forms'; | ||
const handleSelect = user => { | ||
if (!user.name) return; | ||
if (!_.get(user, 'name')) return; | ||
@@ -63,0 +64,0 @@ forcedCloseMentionInput(view, true); |
@@ -352,3 +352,6 @@ // @flow | ||
if (this.state.plainContent !== plainContent) { | ||
if ( | ||
!this.isEditorContentEmpty && | ||
this.state.plainContent !== plainContent | ||
) { | ||
const nextState = { | ||
@@ -355,0 +358,0 @@ plainContent, |
{ | ||
"name": "@potok/editor", | ||
"version": "3.0.6", | ||
"version": "3.0.7", | ||
"description": "Potok.io rich text editor (based on ProseMirror)", | ||
@@ -5,0 +5,0 @@ "main": "./lib/Editor.jsx", |
75850
2422