vue-editify 0.2.26 → 0.2.28
Sign up to get free protection for your applications and to get access to all the features.
- package/examples/App.vue +2 -2
- package/lib/core/tool.d.ts +1 -1
- package/lib/editify/toolbar/toolbar.vue.d.ts +1 -1
- package/lib/editify.es.js +200 -581
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +1 -1
- package/package.json +2 -2
- package/src/core/tool.ts +1 -1
- package/src/feature/table.ts +11 -2
- package/src/index.ts +1 -1
package/lib/index.d.ts
CHANGED
@@ -951,5 +951,5 @@ export type * from './editify/menu';
|
|
951
951
|
export type * from './editify/toolbar';
|
952
952
|
export { elementIsMatch, getMatchElementByElement, getMatchElementByRange, elementIsList, getListByElement, hasListInRange, rangeIsInList, elementIsTask, getTaskByElement, hasTaskInRange, rangeIsInTask, elementIsAttachment, hasAttachmentInRange, elementIsMathformula, getMathformulaByElement, hasMathformulaInRange, elementIsInfoBlock, getInfoBlockByElement, hasInfoBlockInRange, rangeIsInInfoBlock, hasPreInRange, hasTableInRange, hasQuoteInRange, rangeIsInQuote, hasLinkInRange, hasImageInRange, hasVideoInRange, queryTextStyle, setTextStyle, removeTextStyle, queryTextMark, setTextMark, removeTextMark, getRangeText, addSpaceTextToBothSides, setHeading, setIndentIncrease, setIndentDecrease, setQuote, setAlign, setList, setTask, setLineHeight, insertLink, insertImage, insertVideo, insertTable, insertCodeBlock, insertSeparator, insertAttachment, insertMathformula, insertInfoBlock } from './core/function';
|
953
953
|
declare const install: (app: App) => void;
|
954
|
-
declare const version = "0.2.
|
954
|
+
declare const version = "0.2.28";
|
955
955
|
export { Editify as default, Editify, install, AlexElement, version };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "vue-editify",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.28",
|
4
4
|
"private": false,
|
5
5
|
"sideEffects": [
|
6
6
|
"*.css"
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"lib": "vue-tsc && vite build"
|
18
18
|
},
|
19
19
|
"dependencies": {
|
20
|
-
"alex-editor": "^1.
|
20
|
+
"alex-editor": "^1.5.1",
|
21
21
|
"dap-util": "^1.5.8",
|
22
22
|
"highlight.js": "^11.8.0",
|
23
23
|
"katex": "^0.16.10",
|
package/src/core/tool.ts
CHANGED
@@ -1271,7 +1271,7 @@ export const withInstall = <T extends Component>(component: T) => {
|
|
1271
1271
|
;(component as SFCWithInstall<T>).install = (app: App) => {
|
1272
1272
|
app.component(component.name!, component)
|
1273
1273
|
}
|
1274
|
-
return component as SFCWithInstall<
|
1274
|
+
return component as SFCWithInstall<T>
|
1275
1275
|
}
|
1276
1276
|
|
1277
1277
|
/**
|
package/src/feature/table.ts
CHANGED
@@ -205,9 +205,18 @@ export const TableToolbar = defineComponent(
|
|
205
205
|
editor.value.range!.anchor.element = editor.value.range!.focus.element
|
206
206
|
editor.value.range!.anchor.offset = editor.value.range!.focus.offset
|
207
207
|
}
|
208
|
-
const
|
209
|
-
if (
|
208
|
+
const cell = getMatchElementByRange(editor.value, dataRangeCaches.value, { parsedom: 'td' })
|
209
|
+
if (cell) {
|
210
|
+
const { rowspan } = getCellSpanNumber(cell)
|
211
|
+
let row = cell.parent!
|
210
212
|
const tbody = row.parent!
|
213
|
+
if (type == 'down') {
|
214
|
+
let i = 1
|
215
|
+
while (i < rowspan) {
|
216
|
+
row = editor.value.getNextElement(row)!
|
217
|
+
i++
|
218
|
+
}
|
219
|
+
}
|
211
220
|
const { columnNumber } = getTableSize(tbody.children!)
|
212
221
|
const children: AlexElementCreateConfigType[] = []
|
213
222
|
for (let i = 0; i < columnNumber; i++) {
|
package/src/index.ts
CHANGED