value: str | I18nData | Callable | None
value: str | I18nData | Callable | None= NoneValue to show in SoMarkDown component. If a function is provided, the function will be called each time the app loads to set the initial value of this component.
linkify: bool
linkify: bool= TrueIf True, automatically converts URL-like text to links.
typographer: bool
typographer: bool= TrueIf True, enables language-neutral replacements and quotes beautification.
katex: dict | None
katex: dict | None= NoneConfiguration dict for KaTeX options (e.g. ``{"throwOnError": False}``).
smiles: dict | None
smiles: dict | None= NoneConfiguration dict for SMILES (chemical structure) rendering options.
img_desc_enabled: bool
img_desc_enabled: bool= TrueIf True, displays image descriptions below images.
label: str | I18nData | None
label: str | I18nData | None= NoneThis parameter has no effect.
every: Timer | float | None
every: Timer | float | None= NoneContinously calls `value` to recalculate it if `value` is a function (has no effect otherwise). Can provide a Timer whose tick resets `value`, or a float that provides the regular interval for the reset Timer.
inputs: Component | Sequence[Component] | set[Component] | None
inputs: Component | Sequence[Component] | set[Component] | None= NoneComponents that are used as inputs to calculate `value` if `value` is a function (has no effect otherwise). `value` is recalculated any time the inputs change.
show_label: bool | None
show_label: bool | None= NoneThis parameter has no effect.
rtl: bool
rtl: bool= FalseIf True, sets the direction of the rendered text to right-to-left. Default is False, which renders text left-to-right.
visible: bool | Literal["hidden"]
visible: bool | Literal["hidden"]= TrueIf False, component will be hidden. If "hidden", component will be visually hidden and not take up space in the layout but still exist in the DOM.
elem_id: str | None
elem_id: str | None= NoneAn optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: list[str] | str | None
elem_classes: list[str] | str | None= NoneAn optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
render: bool
render: bool= TrueIf False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.
key: int | str | tuple[int | str, ...] | None
key: int | str | tuple[int | str, ...] | None= Nonein a gr.render, Components with the same key across re-renders are treated as the same component, not a new component. Properties set in 'preserved_by_key' are not reset across a re-render.
preserved_by_key: list[str] | str | None
preserved_by_key: list[str] | str | None= "value"A list of parameters from this component's constructor. Inside a gr.render() function, if a component is re-rendered with the same key, these (and only these) parameters will be preserved in the UI (if they have been changed by the user or an event listener) instead of re-rendered based on the values provided during constructor.
height: int | str | None
height: int | str | None= NoneThe height of the component, specified in pixels if a number is passed, or in CSS units if a string is passed. If markdown content exceeds the height, the component will scroll.
max_height: int | str | None
max_height: int | str | None= NoneThe maximum height of the component, specified in pixels if a number is passed, or in CSS units if a string is passed. If markdown content exceeds the height, the component will scroll. If markdown content is shorter than the height, the component will shrink to fit the content. Will not have any effect if `height` is set and is smaller than `max_height`.
min_height: int | str | None
min_height: int | str | None= NoneThe minimum height of the component, specified in pixels if a number is passed, or in CSS units if a string is passed. If markdown content exceeds the height, the component will expand to fit the content. Will not have any effect if `height` is set and is larger than `min_height`.
container: bool
container: bool= FalseIf True, the SoMarkDown component will be displayed in a container. Default is False.
padding: bool
padding: bool= FalseIf True, the SoMarkDown component will have a certain padding (set by the `--block-padding` CSS variable) in all directions. Default is False.
sanitize_html: bool
sanitize_html: bool= True header_links: bool
header_links: bool= False line_breaks: bool
line_breaks: bool= False buttons: list[Literal["copy"]] | None
buttons: list[Literal["copy"]] | None= None latex_delimiters: list[dict[str, str | bool]] | None
latex_delimiters: list[dict[str, str | bool]] | None= None change
changeTriggered when the value of the SoMarkDown changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.
copy
copyThis listener is triggered when the user copies content from the SoMarkDown. Uses event data gradio.CopyData to carry information about the copied content. See EventData documentation on how to use this event data