mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
chore: prosemirror 更新
This commit is contained in:
parent
3443972e88
commit
b709906bba
25542
package-lock.json
generated
25542
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
31
package.json
31
package.json
@ -16,7 +16,7 @@
|
||||
"clipboard": "^2.0.8",
|
||||
"core-js": "^3.6.5",
|
||||
"crypto-js": "^4.0.0",
|
||||
"dexie": "~3.0.3",
|
||||
"dexie": "3.0.3",
|
||||
"file-saver": "^2.0.5",
|
||||
"hfmath": "0.0.2",
|
||||
"html-to-image": "^1.10.6",
|
||||
@ -25,16 +25,17 @@
|
||||
"nanoid": "^4.0.0",
|
||||
"pinia": "^2.0.20",
|
||||
"pptxgenjs": "^3.10.0",
|
||||
"prosemirror-commands": "^1.1.7",
|
||||
"prosemirror-dropcursor": "^1.3.2",
|
||||
"prosemirror-gapcursor": "^1.1.5",
|
||||
"prosemirror-history": "^1.1.3",
|
||||
"prosemirror-inputrules": "^1.1.3",
|
||||
"prosemirror-model": "^1.13.1",
|
||||
"prosemirror-schema-basic": "^1.1.2",
|
||||
"prosemirror-schema-list": "^1.1.4",
|
||||
"prosemirror-state": "^1.3.3",
|
||||
"prosemirror-view": "^1.18.1",
|
||||
"prosemirror-commands": "^1.3.0",
|
||||
"prosemirror-dropcursor": "^1.6.0",
|
||||
"prosemirror-gapcursor": "^1.3.1",
|
||||
"prosemirror-history": "^1.3.0",
|
||||
"prosemirror-inputrules": "^1.2.0",
|
||||
"prosemirror-keymap": "^1.2.0",
|
||||
"prosemirror-model": "^1.18.1",
|
||||
"prosemirror-schema-basic": "^1.2.0",
|
||||
"prosemirror-schema-list": "^1.2.1",
|
||||
"prosemirror-state": "^1.4.1",
|
||||
"prosemirror-view": "^1.27.2",
|
||||
"register-service-worker": "^1.7.1",
|
||||
"svg-arc-to-cubic-bezier": "^3.2.0",
|
||||
"svg-pathdata": "^6.0.0",
|
||||
@ -49,14 +50,6 @@
|
||||
"@types/crypto-js": "^4.0.1",
|
||||
"@types/file-saver": "^2.0.1",
|
||||
"@types/lodash": "^4.14.181",
|
||||
"@types/prosemirror-commands": "^1.0.3",
|
||||
"@types/prosemirror-dropcursor": "^1.0.0",
|
||||
"@types/prosemirror-gapcursor": "^1.0.1",
|
||||
"@types/prosemirror-history": "^1.0.1",
|
||||
"@types/prosemirror-inputrules": "^1.0.3",
|
||||
"@types/prosemirror-keymap": "^1.0.3",
|
||||
"@types/prosemirror-schema-basic": "^1.0.1",
|
||||
"@types/prosemirror-schema-list": "^1.0.1",
|
||||
"@types/resize-observer-browser": "^0.1.4",
|
||||
"@types/svg-arc-to-cubic-bezier": "^3.2.0",
|
||||
"@types/tinycolor2": "^1.4.2",
|
||||
|
@ -2,12 +2,12 @@ import { splitListItem, liftListItem, sinkListItem } from 'prosemirror-schema-li
|
||||
import { Schema } from 'prosemirror-model'
|
||||
import { undo, redo } from 'prosemirror-history'
|
||||
import { undoInputRule } from 'prosemirror-inputrules'
|
||||
import { Command } from 'prosemirror-state'
|
||||
import {
|
||||
toggleMark,
|
||||
selectParentNode,
|
||||
joinUp,
|
||||
joinDown,
|
||||
Command,
|
||||
} from 'prosemirror-commands'
|
||||
|
||||
export const buildKeymap = (schema: Schema) => {
|
||||
|
@ -123,14 +123,14 @@ export const getMarkAttrs = (view: EditorView) => {
|
||||
return node?.marks || []
|
||||
}
|
||||
|
||||
export const getAttrValue = (marks: Mark[], markType: string, attr: string) => {
|
||||
export const getAttrValue = (marks: readonly Mark[], markType: string, attr: string) => {
|
||||
for (const mark of marks) {
|
||||
if (mark.type.name === markType && mark.attrs[attr]) return mark.attrs[attr]
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
export const isActiveMark = (marks: Mark[], markType: string) => {
|
||||
export const isActiveMark = (marks: readonly Mark[], markType: string) => {
|
||||
for (const mark of marks) {
|
||||
if (mark.type.name === markType) return true
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user