1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How can i convert & display markdown links in Angular (v19) Material matTooltip

Discussão em 'Angular' iniciado por vicgoyso, Junho 6, 2025.

  1. vicgoyso

    vicgoyso Guest

    I am working on an Angular app, where in some areas i use the ngx-markdown to format and display some text. Its been straight forward using the markdown tags like so:

    <markdown class="thread-segment-message" [data]="this.message()"></markdown>

    However, now I need to format some content and pass the text as string to the Angular Material tooltip. I have the following button:

    <button
    mat-stroked-button
    [matTooltip]="
    source.fileName +
    ' \n ' +
    source.pageNoText +
    ' \n ' +
    source.linkText +
    ' \n ' +
    source.snippet
    "
    matTooltipShowDelay="1000"
    matTooltipPosition="above"
    matTooltipClass="tooltip-btn">
    <mat-icon class="icon icon--smd">archive</mat-icon>
    <span>
    <markdown class="doc-list__item" [data]="source.linkText">
    </markdown>
    </span>
    </button>


    The source link text strings (source.linkText) are formatted as links, ready to be converted: [ESDD-02-011.pdf](https://s3-ibd-sp-euwest2-abspendocumentlibra-dev.s3.eu-west-2.amazonaws.com/processed/ESDD-02-011.pdf)

    The Angular material tooltip is able to handle line breaks, however can i further format the source.linkText to appear as links in the tooltip?

    Continue reading...

Compartilhe esta Página