Function clearHtml

  • 去除 HTML 标签

    Usage:

    const ret = clearHtml('<div>hello world</div>');
    console.log(ret);

    Output:

    hello world
    

    Parameters

    • str: string

      带html标签的字符串

    • options: {
          removeNewLine?: boolean;
      } = {}
      • Optional removeNewLine?: boolean

    Returns string

    字符串