Files
cartlog-admin/node_modules/jodit/esm/plugins/backspace/cases/check-not-collapsed.js
2026-01-01 15:25:19 +05:30

26 lines
603 B
JavaScript

/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* On Not collapsed selection - should only remove whole selected content
*
* @example
* ```html
* <p>first | stop</p><p>second | stop</p>
* ```
* result
* ```html
* <p>first | stop</p>
* ```
* @private
*/
export function checkNotCollapsed(jodit) {
if (!jodit.s.isCollapsed()) {
jodit.execCommand('Delete');
return true;
}
return false;
}