Skip to content

Commit

Permalink
Changed Rich Text Viewer markdown property to an attribute
Browse files Browse the repository at this point in the history
The markdown property cannot be set from Blazor since Blazor does not support setting properties.  To make available in Blazor, it needs to be an attribute and thus the reason for the change.
  • Loading branch information
joseahdz committed Feb 21, 2025
1 parent 3989996 commit fb4f84a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions packages/nimble-components/src/rich-text/viewer/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DesignSystem } from '@microsoft/fast-foundation';
import { observable } from '@microsoft/fast-element';
import { attr } from '@microsoft/fast-element';
import { template } from './template';
import { styles } from './styles';
import { RichTextMarkdownParser } from '../models/markdown-parser';
Expand All @@ -19,8 +19,10 @@ export class RichTextViewer extends RichText {
*
* @public
* Markdown string to render its corresponding rich text content in the component.
* @remarks
* HTML Attribute: markdown
*/
@observable
@attr
public markdown = '';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const metadata: Meta<RichTextViewerArgs> = {
markdown: {
description:
'Input markdown string for the supported text formatting options in a [CommonMark](https://commonmark.org/) flavor.',
table: { category: apiCategory.nonAttributeProperties }
table: { category: apiCategory.attributes }
},
data: {
name: 'default',
Expand Down

0 comments on commit fb4f84a

Please sign in to comment.