We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f16a7c commit d2a74abCopy full SHA for d2a74ab
src/extensions/ExportWord/ExportWord.ts
@@ -1,6 +1,6 @@
1
/* eslint-disable @typescript-eslint/ban-ts-comment */
2
import { Extension } from '@tiptap/core';
3
-import { Packer } from 'docx';
+import { Packer, WidthType } from 'docx';
4
import { DocxSerializer, defaultMarks, defaultNodes } from 'prosemirror-docx';
5
6
import { ActionButton } from '@/components';
@@ -30,6 +30,16 @@ const nodeSerializer = {
30
state.renderInline(node);
31
state.closeBlock(node);
32
},
33
+ table(state: any, node: any) {
34
+ state.table(node, {
35
+ tableOptions: {
36
+ width: {
37
+ size: 100,
38
+ type: WidthType.PERCENTAGE,
39
+ },
40
41
+ });
42
43
};
44
const docxSerializer = new DocxSerializer(nodeSerializer, defaultMarks);
45
0 commit comments