feat: add comment rendering support to HTML converter#14
Merged
Conversation
Add full support for rendering Word document comments in HTML output: - CommentRenderMode enum with three modes: - EndnoteStyle: Comments at end with bidirectional links (default) - Inline: Comments as tooltips with data attributes - Margin: CSS-positioned margin comments - New WmlToHtmlConverterSettings properties: - RenderComments: Enable/disable comment rendering - CommentRenderMode: Select rendering mode - CommentCssClassPrefix: Customize CSS class names - IncludeCommentMetadata: Include author/date in output - Implementation details: - CommentInfo and CommentTracker helper classes - Handle commentRangeStart/End/Reference elements - Comment highlighting spans with configurable CSS - Full metadata support (author, date, initials) - WASM/npm updates: - ConvertDocxToHtmlAdvanced method with comment parameters - TypeScript CommentRenderMode enum and ConversionOptions - Tests: 6 new tests for comment rendering (HC014-HC019)
- Remove ConvertDocxToHtmlAdvanced, keep single ConvertDocxToHtmlWithOptions - Add commentRenderMode parameter: -1=disabled, 0=EndnoteStyle, 1=Inline, 2=Margin - Add CommentRenderMode.Disabled (-1) to TypeScript enum - Simplify ConversionOptions by removing redundant renderComments boolean - Simplify index.ts convertDocxToHtml function
JSv4
added a commit
that referenced
this pull request
Dec 21, 2025
…onts - Add FontClassifier helper to classify unknown fonts by name patterns - "sans" pattern → sans-serif fallback - "mono", "code", "courier" patterns → monospace fallback - Other fonts default to serif - Add CJK font fallback chains for East Asian text: - Japanese (ja-JP): Noto Serif CJK JP, Yu Mincho, MS Mincho, etc. - Simplified Chinese (zh-hans): Noto Serif CJK SC, Microsoft YaHei, SimSun, etc. - Traditional Chinese (zh-hant): Noto Serif CJK TC, Microsoft JhengHei, PMingLiU, etc. - Korean (ko): Noto Serif CJK KR, Malgun Gothic, Batang, etc. - Fix Courier New and Lucida Console to include monospace fallback - Update CreateFontCssProperty to accept language context Addresses converter gaps #13 (Limited Font Fallback) and #14 (No CJK Font-Family Fallback Chain)
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CommentRenderModeenum:EndnoteStyle(default),Inline, andMarginRenderComments,CommentRenderMode,CommentCssClassPrefix,IncludeCommentMetadataConvertDocxToHtmlAdvancedmethod and TypeScript typesTest plan