diff --git a/CHANGELOG.md b/CHANGELOG.md index 7838aa2..ce7223a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## docx-wasm@0.0.278-rc7 (19. Jun, 2023) + +- Support indent right for js + ## docx-wasm@0.0.278-rc6 (19. Jun, 2023) - [Breaking] make docGrid optional diff --git a/docx-wasm/js/paragraph-property.ts b/docx-wasm/js/paragraph-property.ts index 3bf2639..ee21eb6 100644 --- a/docx-wasm/js/paragraph-property.ts +++ b/docx-wasm/js/paragraph-property.ts @@ -56,6 +56,7 @@ export type ParagraphProperty = { left: number; specialIndentKind?: SpecialIndentKind; specialIndentSize?: number; + right?: number; }; numbering?: { id: number; @@ -221,7 +222,12 @@ export const setParagraphProperty = ( break; } } - target = target.indent(indent.left, kind, indent.specialIndentSize) as T; + target = target.indent( + indent.left, + kind, + indent.specialIndentSize, + indent.right + ) as T; } if (typeof property.numbering !== "undefined") { diff --git a/docx-wasm/js/paragraph.ts b/docx-wasm/js/paragraph.ts index 8594675..0d332e7 100644 --- a/docx-wasm/js/paragraph.ts +++ b/docx-wasm/js/paragraph.ts @@ -83,9 +83,15 @@ export class Paragraph { indent( left: number, specialIndentKind?: SpecialIndentKind, - specialIndentSize?: number + specialIndentSize?: number, + right?: number ) { - this.property.indent = { left, specialIndentKind, specialIndentSize }; + this.property.indent = { + left, + specialIndentKind, + specialIndentSize, + right, + }; return this; } diff --git a/docx-wasm/package.json b/docx-wasm/package.json index dc30e9e..635517d 100644 --- a/docx-wasm/package.json +++ b/docx-wasm/package.json @@ -1,6 +1,6 @@ { "name": "docx-wasm", - "version": "0.0.278-rc6", + "version": "0.0.278-rc7", "main": "dist/node/index.js", "browser": "dist/web/index.js", "author": "bokuweb ", diff --git a/docx-wasm/src/paragraph.rs b/docx-wasm/src/paragraph.rs index aebce75..a18a974 100644 --- a/docx-wasm/src/paragraph.rs +++ b/docx-wasm/src/paragraph.rs @@ -146,12 +146,13 @@ impl Paragraph { left: i32, special_indent_kind: Option, special_indent_size: Option, + right: Option, ) -> Paragraph { let special_indent = create_special_indent(special_indent_kind, special_indent_size); self.0.property = self .0 .property - .indent(Some(left), special_indent, None, None); + .indent(Some(left), special_indent, right, None); self }