mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 03:32:36 +02:00
Remove commands (#3351)
* remove commands in favor of editor-level functions * update examples * fix lint
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { jsx } from '../..'
|
||||
|
||||
export const run = editor => {
|
||||
editor.exec({ type: 'delete_backward' })
|
||||
editor.deleteBackward()
|
||||
}
|
||||
|
||||
export const input = (
|
||||
|
@@ -3,7 +3,7 @@
|
||||
import { jsx } from '../..'
|
||||
|
||||
export const run = editor => {
|
||||
editor.exec({ type: 'delete_backward' })
|
||||
editor.deleteBackward()
|
||||
}
|
||||
|
||||
export const input = (
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @jsx jsx */
|
||||
|
||||
import { Editor } from 'slate'
|
||||
import { Transforms } from 'slate'
|
||||
import { jsx } from '../..'
|
||||
|
||||
export const run = editor => {
|
||||
Editor.delete(editor)
|
||||
Transforms.delete(editor)
|
||||
}
|
||||
|
||||
export const input = (
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @jsx jsx */
|
||||
|
||||
import { Editor } from 'slate'
|
||||
import { Transforms } from 'slate'
|
||||
import { jsx } from '../..'
|
||||
|
||||
export const run = editor => {
|
||||
Editor.delete(editor)
|
||||
Transforms.delete(editor)
|
||||
}
|
||||
|
||||
export const input = (
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @jsx jsx */
|
||||
|
||||
import { Editor } from 'slate'
|
||||
import { Transforms } from 'slate'
|
||||
import { jsx } from '../..'
|
||||
|
||||
export const run = editor => {
|
||||
Editor.delete(editor)
|
||||
Transforms.delete(editor)
|
||||
}
|
||||
|
||||
export const input = (
|
||||
|
Reference in New Issue
Block a user