jodit
Version:
Jodit is an awesome and useful wysiwyg editor with filebrowser
15 lines (14 loc) • 532 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
*/
export function execSpellCommand(jodit, commandSentence) {
const [command, value] = commandSentence.split('::');
if (command.toLowerCase() === 'open' &&
value &&
/^(javascript:|data:|vbscript:)/i.test(value.trim())) {
return;
}
jodit.execCommand(command, null, value);
}