/** * @function stripRteStyle * @summary * Returns string with inline style tag stripped out * @param {string} stringWithStyleTag * @returns {string} */ export function stripRteStyle(stringWithStyleTag) { const regexExp = /[\s*]style="(.*?)"/g; return stringWithStyleTag.replace(regexExp, ''); } export function extractSpanText(spanElement) { const tempContainer = document.createElement('div'); tempContainer.innerHTML = spanElement; return tempContainer.textContent || tempContainer.innerText || ''; } /** * @function createOrderedListFromStringOfParagraphs * @summary * Returns string with
tags changed to
tags * @returns {string} converted string wrapped in an
', '
tags changed to
tags * @returns {string} converted string wrapped in an
', '