Markdown

A set of single-purpose pipes that translate the most common inline markdown markers into HTML — **bold**, *italic*, <u>underline</u> and ~~strike~~. Chain them in the order you want applied and bind via [innerHTML].

Basic usage

Hello world This is me Life should be Fun for everyone
  
    
      
        <span [innerHTML]="text | bsBold | bsItalic | bsUnderline | bsStrikethrough"></span>
        
    
  
    
      
        import { Component } from '@angular/core';
        
    
      
        import {
        
    
      
          BsBoldPipe,
        
    
      
          BsItalicPipe,
        
    
      
          BsStrikethroughPipe,
        
    
      
          BsUnderlinePipe,
        
    
      
        } from '@mintplayer/ng-bootstrap/markdown';
        
    
      
        
        
    
      
        @Component({
        
    
      
          selector: 'my-markdown-demo',
        
    
      
          templateUrl: './my-markdown-demo.component.html',
        
    
      
          imports: [BsBoldPipe, BsItalicPipe, BsStrikethroughPipe, BsUnderlinePipe],
        
    
      
        })
        
    
      
        export class MyMarkdownDemoComponent {
        
    
      
          protected text = 'Hello **world** ~~strike~~ *italic* <u>underline</u>';
        
    
      
        }