mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 19:01:52 +08:00
6 lines
164 B
Plaintext
6 lines
164 B
Plaintext
|
export function stringToHTML(string) {
|
||
|
const parser = new DOMParser();
|
||
|
const doc = parser.parseFromString(string, "text/html");
|
||
|
return doc.body.firstChild;
|
||
|
}
|