Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-editor-core

Package Overview
Dependencies
Maintainers
3
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-editor-core - npm Package Compare versions

Comparing version 0.8.6 to 0.8.7

20

es/EditorCore/index.d.ts

@@ -9,3 +9,3 @@ import React from 'react';

name: string;
decorators?: Array<any>;
decorators?: any[];
component?: Function;

@@ -27,7 +27,7 @@ onChange: (editorState: EditorState) => EditorState;

multiLines: boolean;
plugins: Array<Plugin>;
plugins: Plugin[];
pluginConfig?: Object;
prefixCls: string;
onChange?: (editorState: EditorState) => EditorState;
toolbars: Array<any>;
toolbars: any[];
splitLine: String;

@@ -50,3 +50,3 @@ onKeyDown?: (ev: any) => boolean;

toolbarPlugins?: List<Plugin>;
plugins?: Array<Plugin>;
plugins?: Plugin[];
compositeDecorator?: CompositeDecorator;

@@ -68,3 +68,3 @@ }

refs: {
[string: string]: any;
[str: string]: any;
editor?: any;

@@ -86,5 +86,5 @@ };

getEditorState: (needFocus?: boolean) => any;
setEditorState: (editorState: any, focusEditor?: boolean) => void;
setEditorState: (editorState: any, focusEditor?: boolean, triggerChange?: boolean) => void;
};
reloadPlugins(): Array<Plugin>;
reloadPlugins(): Plugin[];
componentWillMount(): void;

@@ -97,10 +97,10 @@ componentWillReceiveProps(nextProps: any): void;

setStyleMap(customStyleMap: any): void;
initPlugins(): Array<any>;
initPlugins(): any[];
private focusEditor(ev);
private _focus(ev);
focus(ev: any): void;
getPlugins(): Array<Plugin>;
getPlugins(): Plugin[];
getEventHandler(): Object;
getEditorState(needFocus?: boolean): EditorState;
setEditorState(editorState: EditorState, focusEditor?: boolean): void;
setEditorState(editorState: EditorState, focusEditor?: boolean, triggerChange?: boolean): void;
handleKeyBinding(ev: any): any;

@@ -107,0 +107,0 @@ handleKeyCommand(command: String): DraftHandleValue;

@@ -9,2 +9,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

/* tslint:disable:member-ordering interface-name */
import React from 'react';

@@ -123,3 +124,3 @@ import PropTypes from 'prop-types';

return this.plugins && this.plugins.size ? this.plugins.map(function (plugin) {
// 如果插件有 callbacks 方法,则认为插件已经加载。
// 如果插件有 callbacks 方法,则认为插件已经加载。
if (plugin.callbacks) {

@@ -203,3 +204,3 @@ return plugin;

});
this.setEditorState(EditorState.set(this.state.editorState, { decorator: compositeDecorator }));
this.setEditorState(EditorState.set(this.state.editorState, { decorator: compositeDecorator }), false, false);
};

@@ -223,3 +224,3 @@

};
// 处理 value 
// 处理 value

@@ -328,2 +329,3 @@

var focusEditor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var triggerChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

@@ -339,3 +341,3 @@ var newEditorState = editorState;

});
if (this.props.onChange) {
if (this.props.onChange && triggerChange) {
this.props.onChange(newEditorState);

@@ -342,0 +344,0 @@ // close this issue https://github.com/ant-design/ant-design/issues/5788

@@ -7,7 +7,7 @@ import Toolbar from './Toolbar';

onChange: (editorState: any) => void;
onUpArrow: (args: any) => any;
onDownArrow: (args: any) => any;
getEditorState: (args: any) => any;
setEditorState: (args: any) => any;
handleReturn: (args: any) => any;
onUpArrow: (_: any) => any;
onDownArrow: (_: any) => any;
getEditorState: (_: any) => any;
setEditorState: (_: any) => any;
handleReturn: (_: any) => any;
};

@@ -14,0 +14,0 @@ onChange(editorState: any): any;

import Toolbar from './Toolbar';
function noop(args) {}
function noop(_) {}
;

@@ -4,0 +4,0 @@ export function createToolbar() {

@@ -7,3 +7,3 @@ import React from 'react';

plugins: List<Plugin>;
toolbars: Array<any>;
toolbars: any[];
prefixCls: string;

@@ -10,0 +10,0 @@ className: string;

@@ -7,2 +7,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/* tslint:disable:interface-name */
import React from 'react';

@@ -9,0 +10,0 @@ import { Map } from 'immutable';

@@ -9,3 +9,3 @@ import React from 'react';

name: string;
decorators?: Array<any>;
decorators?: any[];
component?: Function;

@@ -27,7 +27,7 @@ onChange: (editorState: EditorState) => EditorState;

multiLines: boolean;
plugins: Array<Plugin>;
plugins: Plugin[];
pluginConfig?: Object;
prefixCls: string;
onChange?: (editorState: EditorState) => EditorState;
toolbars: Array<any>;
toolbars: any[];
splitLine: String;

@@ -50,3 +50,3 @@ onKeyDown?: (ev: any) => boolean;

toolbarPlugins?: List<Plugin>;
plugins?: Array<Plugin>;
plugins?: Plugin[];
compositeDecorator?: CompositeDecorator;

@@ -68,3 +68,3 @@ }

refs: {
[string: string]: any;
[str: string]: any;
editor?: any;

@@ -86,5 +86,5 @@ };

getEditorState: (needFocus?: boolean) => any;
setEditorState: (editorState: any, focusEditor?: boolean) => void;
setEditorState: (editorState: any, focusEditor?: boolean, triggerChange?: boolean) => void;
};
reloadPlugins(): Array<Plugin>;
reloadPlugins(): Plugin[];
componentWillMount(): void;

@@ -97,10 +97,10 @@ componentWillReceiveProps(nextProps: any): void;

setStyleMap(customStyleMap: any): void;
initPlugins(): Array<any>;
initPlugins(): any[];
private focusEditor(ev);
private _focus(ev);
focus(ev: any): void;
getPlugins(): Array<Plugin>;
getPlugins(): Plugin[];
getEventHandler(): Object;
getEditorState(needFocus?: boolean): EditorState;
setEditorState(editorState: EditorState, focusEditor?: boolean): void;
setEditorState(editorState: EditorState, focusEditor?: boolean, triggerChange?: boolean): void;
handleKeyBinding(ev: any): any;

@@ -107,0 +107,0 @@ handleKeyCommand(command: String): DraftHandleValue;

@@ -49,4 +49,5 @@ 'use strict';

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* tslint:disable:member-ordering interface-name */
var hasCommandModifier = _draftJs.KeyBindingUtil.hasCommandModifier;

@@ -154,3 +155,3 @@

return this.plugins && this.plugins.size ? this.plugins.map(function (plugin) {
// 如果插件有 callbacks 方法,则认为插件已经加载。
// 如果插件有 callbacks 方法,则认为插件已经加载。
if (plugin.callbacks) {

@@ -234,3 +235,3 @@ return plugin;

});
this.setEditorState(_draftJs.EditorState.set(this.state.editorState, { decorator: compositeDecorator }));
this.setEditorState(_draftJs.EditorState.set(this.state.editorState, { decorator: compositeDecorator }), false, false);
};

@@ -254,3 +255,3 @@

};
// 处理 value 
// 处理 value

@@ -359,2 +360,3 @@

var focusEditor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var triggerChange = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

@@ -370,3 +372,3 @@ var newEditorState = editorState;

});
if (this.props.onChange) {
if (this.props.onChange && triggerChange) {
this.props.onChange(newEditorState);

@@ -373,0 +375,0 @@ // close this issue https://github.com/ant-design/ant-design/issues/5788

@@ -7,7 +7,7 @@ import Toolbar from './Toolbar';

onChange: (editorState: any) => void;
onUpArrow: (args: any) => any;
onDownArrow: (args: any) => any;
getEditorState: (args: any) => any;
setEditorState: (args: any) => any;
handleReturn: (args: any) => any;
onUpArrow: (_: any) => any;
onDownArrow: (_: any) => any;
getEditorState: (_: any) => any;
setEditorState: (_: any) => any;
handleReturn: (_: any) => any;
};

@@ -14,0 +14,0 @@ onChange(editorState: any): any;

@@ -12,3 +12,3 @@ 'use strict';

function noop(args) {}
function noop(_) {}
;

@@ -15,0 +15,0 @@ function createToolbar() {

@@ -7,3 +7,3 @@ import React from 'react';

plugins: List<Plugin>;
toolbars: Array<any>;
toolbars: any[];
prefixCls: string;

@@ -10,0 +10,0 @@ className: string;

@@ -21,4 +21,5 @@ 'use strict';

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* tslint:disable:interface-name */
function noop() {}

@@ -25,0 +26,0 @@

{
"name": "rc-editor-core",
"version": "0.8.6",
"version": "0.8.7",
"description": "editor-core ui component for react",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc