jodit
Version:
Jodit is an awesome and useful wysiwyg editor with filebrowser
15 lines (14 loc) • 475 B
JavaScript
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* @module helpers/checker
*/
import { isString } from "./is-string.js";
/**
* Check if a string is html or not
*/
export const isHTML = (str) => isString(str) &&
/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(str.replace(/[\r\n]/g, ''));