15 lines
501 B
JavaScript
15 lines
501 B
JavaScript
/*
|
|
* Copyright (C) 2026 Mateusz Gruszczynski @linuxiarz.pl
|
|
* Source-Available Code / Dual-Licensed.
|
|
*
|
|
* Free for non-commercial and evaluation use under terms of BSL/GPLv3.
|
|
* Commercial or production use requires a valid paid license.
|
|
* See LICENSE file in repository root for details.
|
|
*/
|
|
|
|
const ACTIVE_PREVIEW_EDIT_SELECTOR = '.preview-editable[contenteditable="true"]';
|
|
|
|
export function previewEditingHost(target) {
|
|
return target?.matches?.(ACTIVE_PREVIEW_EDIT_SELECTOR) ? target : null;
|
|
}
|