Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
autoCorrect: Types.bool,
autoFocus: Types.bool,
className: Types.string,
defaultValue: SlateTypes.value,
id: Types.string,
onChange: Types.func,
options: Types.object,
placeholder: Types.any,
plugins: Types.array,
readOnly: Types.bool,
role: Types.string,
schema: Types.object,
spellCheck: Types.bool,
style: Types.object,
tabIndex: Types.number,
value: SlateTypes.value,
...EVENT_HANDLERS.reduce((obj, handler) => {
obj[handler] = Types.func
return obj
}, {}),
...OTHER_HANDLERS.reduce((obj, handler) => {
obj[handler] = Types.func
return obj
}, {}),
}
/**
* Default properties.
*
* @type {Object}
*/
*
* @type {Component}
*/
class Editor extends React.Component {
/**
* Property types.
*
* @type {Object}
*/
static propTypes = {
autoCorrect: Types.bool,
autoFocus: Types.bool,
className: Types.string,
defaultValue: SlateTypes.value,
id: Types.string,
onChange: Types.func,
options: Types.object,
placeholder: Types.any,
plugins: Types.array,
readOnly: Types.bool,
role: Types.string,
schema: Types.object,
spellCheck: Types.bool,
style: Types.object,
tabIndex: Types.number,
value: SlateTypes.value,
...EVENT_HANDLERS.reduce((obj, handler) => {
obj[handler] = Types.func
return obj
}, {}),
* Property types.
*
* @type {Object}
*/
static propTypes = {
autoCorrect: Types.bool,
className: Types.string,
id: Types.string,
onChange: Types.func,
readOnly: Types.bool,
role: Types.string,
spellCheck: Types.bool,
style: Types.object,
tabIndex: Types.number,
value: SlateTypes.value,
...EVENT_HANDLERS.reduce((obj, handler) => {
obj[handler] = Types.func;
return obj;
}, {}),
};
/**
* Default properties.
*
* @type {Object}
*/
static defaultProps = {
autoCorrect: true,
onChange: () => {},
readOnly: false,