芝麻web文件管理V1.00
编辑当前文件:/home/felaukpo/public_html/wp-content/themes/Divi/common/utils/html-utils.js
import { isString } from 'lodash'; // import ETBuilderStore from '../stores/et-builder-store'; /** * Get the HTML of the current page. * * @returns {string} Page's HTML string. */ export function getPageHTML() { return document.getElementById('et-boc').innerHTML || ''; } /** * Strip Style tags in a HTML string. * * @param {string} htmlString HTML string. * @returns {string} HTML string. */ export function stripStyleTag(htmlString) { // Create a new DOMParser instance const parser = new DOMParser(); // Parse the HTML string into a DOM document const doc = parser.parseFromString(htmlString, 'text/html'); // Remove all nested