removeTag

Removes the specified tag from the HTML and keeps its child nodes.

import { EditorUtils } from '@progress/kendo-react-editor';
const html = EditorUtils.removeTag('<p>some <span>content</span></p>', 'span|p');

Parameters

html string

The input HTML.

tag string

A tag or multiple tags separated by a vertical slash which will be removed. For example, span or b|i|u|span.

Returns

string - The resulting HTML.

 /