Skip to content

Commit 9bfd977

Browse files
authored
fix: add missing DrawingML namespaces (#1719)
1 parent 83c7d94 commit 9bfd977

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

packages/super-editor/src/core/super-converter/exporter-docx-defs.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export const DEFAULT_DOCX_DEFS = {
3030
'xmlns:v': 'urn:schemas-microsoft-com:vml',
3131
'xmlns:wp14': 'http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing',
3232
'xmlns:wp': 'http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing',
33+
'xmlns:a': 'http://schemas.openxmlformats.org/drawingml/2006/main',
34+
'xmlns:pic': 'http://schemas.openxmlformats.org/drawingml/2006/picture',
35+
'xmlns:c': 'http://schemas.openxmlformats.org/drawingml/2006/chart',
36+
'xmlns:dgm': 'http://schemas.openxmlformats.org/drawingml/2006/diagram',
37+
'xmlns:lc': 'http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas',
3338
'xmlns:w10': 'urn:schemas-microsoft-com:office:word',
3439
'xmlns:w': 'http://schemas.openxmlformats.org/wordprocessingml/2006/main',
3540
'xmlns:w14': 'http://schemas.microsoft.com/office/word/2010/wordml',

packages/super-editor/src/core/super-converter/v2/exporter/commentsExporter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export const updateCommentsXml = (commentDefs = [], commentsXml) => {
104104
const paraNode = commentDef.elements[0];
105105
if (!paraNode.attributes) paraNode.attributes = {};
106106

107+
// NOTE: Per ECMA-376, w:pPr should be first child of w:p
107108
const elements = paraNode.elements;
108109
elements.unshift(COMMENT_REF);
109110

0 commit comments

Comments
 (0)