diff --git a/packages/extension-image/src/image-extension.ts b/packages/extension-image/src/image-extension.ts index de2999f009294d3b1324081ac22a5fec92dec4c2..ab3cf84dd1317eafbd6465ccdc68af007131fa29 100644 --- a/packages/extension-image/src/image-extension.ts +++ b/packages/extension-image/src/image-extension.ts @@ -76,9 +76,16 @@ export const Image = TImage.extend({ }, renderHTML({ HTMLAttributes }) { + const divAttr = { + style: `text-align: ${HTMLAttributes.align};`, + } return [ - 'img', - mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), + 'div', + mergeAttributes(this.options.HTMLAttributes, divAttr), + [ + 'img', + mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), + ] ]; }, diff --git a/packages/extension-table/src/table/index.ts b/packages/extension-table/src/table/index.ts index a5f31656d2d7ab49eb2dc6188da8760d570c5ca7..d276888b65142d7bed4e2dc741fb59482471f03d 100644 --- a/packages/extension-table/src/table/index.ts +++ b/packages/extension-table/src/table/index.ts @@ -66,7 +66,7 @@ export const Table = TTable.extend({ const colgroupEls = colwidthArr.map((width) => [ 'col', - width ? { style: width } : {}, + width ? { style: `width: ${width}` } : {}, ]); if (fixedWidth) {