Update Content Model demo view with missing types, formats and properties#3390
Merged
Conversation
…ties Add renderers and wiring for Content Model format parts and node properties that were missing from the debug/demo Content Model view: Aria, Role, LegacyTableBorder, BoxShadow, ImageState and Undeletable renderers, plus block Id, table/cell/list/link/image format coverage and image alt/title and entity isFakeEntity properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
vinguyen12
approved these changes
Jul 1, 2026
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
The Content Model debug/demo view (under
demo/scripts/controlsV2/sidePane/contentModel) had drifted behind theroosterjs-content-model-typesdefinitions, so several format parts and node properties were not visible or editable. This PR adds the missing renderers and wires them into the relevant views.New format-part renderers (
components/format/formatPart/):AriaFormatRenderers(ariaDescribedBy,title),RoleFormatRenderer(role),LegacyTableBorderFormatRenderers(legacyTableBorder,cellSpacing,cellPadding),BoxShadowFormatRenderer(boxShadow),ImageStateFormatRenderer(imageState),UndeletableFormatRenderer(undeletable).Wired into existing views:
BlockFormatView: addedId.LinkFormatView: addedBackgroundColor,TextAlign,Border,Size,Undeletable.ContentModelTableView: addedDirection,Size,Aria,Role,LegacyTableBorder.ContentModelTableCellView: addedBold.ContentModelListItemView: addedPadding,TextIndent,BackgroundColor, list style type/position; the list marker now uses the fullSegmentFormatView.ContentModelImageView: addedBorder,BoxShadow,Display,VerticalAlign,ImageStateformats and editablealt/titlefields.ContentModelEntityView: addedisFakeEntity.No new block/segment/block-group node types were needed — all are already dispatched; only format parts and node properties were missing.
How to test
yarn eslintnpx tsc -p demo/scripts/tsconfig.json --noEmityarn builddemo/ start the demo), open the Content Model side pane, and expand a document containing a table, list, image, link and entity.