feat(main): Add base theme: This is the falcon theme out of the box.
This is falcon v3.1.2
This commit is contained in:
13
falcon/_dev/js/theme/utils/parseToHtml.js
Normal file
13
falcon/_dev/js/theme/utils/parseToHtml.js
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Convert a template string into HTML DOM nodes
|
||||
* @param {String} str The template string
|
||||
* @return {Node} The template HTML
|
||||
*/
|
||||
const parseToHtml = (str) => {
|
||||
const parser = new DOMParser();
|
||||
const doc = parser.parseFromString(str, 'text/html');
|
||||
|
||||
return doc.body.children[0];
|
||||
};
|
||||
|
||||
export default parseToHtml;
|
||||
Reference in New Issue
Block a user