fix: Add ability to convert between checklist and other types of list

This commit is contained in:
Tom Moor
2022-03-23 00:27:22 -07:00
parent 7f15eb287d
commit 8aa25fd7d6
21 changed files with 147 additions and 100 deletions

View File

@@ -17,11 +17,12 @@ limitations under the License.
// This file is based on the implementation found here:
// https://bitbucket.org/atlassian/design-system-mirror/src/master/editor/editor-core/src/plugins/text-formatting/commands/text-formatting.ts
import { EditorState, Transaction, TextSelection } from "prosemirror-state";
import { EditorState, TextSelection } from "prosemirror-state";
import isMarkActive from "../queries/isMarkActive";
import { Dispatch } from "../types";
export default function moveRight() {
return (state: EditorState, dispatch: (tr: Transaction) => void): boolean => {
return (state: EditorState, dispatch: Dispatch): boolean => {
const { code_inline } = state.schema.marks;
const { empty, $cursor } = state.selection as TextSelection;
if (!empty || !$cursor) {