vue-editify 0.2.27 → 0.2.28

Sign up to get free protection for your applications and to get access to all the features.
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.27";
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.27",
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.5.0",
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",
@@ -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 row = getMatchElementByRange(editor.value, dataRangeCaches.value, { parsedom: 'tr' })
209
- if (row) {
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
@@ -100,7 +100,7 @@ const install = (app: App) => {
100
100
  app.component(Editify.name!, Editify)
101
101
  }
102
102
  //版本号
103
- const version = '0.2.27'
103
+ const version = '0.2.28'
104
104
 
105
105
  //导出组件和安装函数
106
106
  export { Editify as default, Editify, install, AlexElement, version }