mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-13 20:39:54 +02:00
PoC: Expose wysiwyg element to manipulate from outside (#1356)
* expose wysiwyg element to manipulate from outside * keep focus after changing style * update editingElement correctly * remove mistake * update text only * proper check for element * udpate snapshots * add error log * remove try catch handler * remove blur event * add proper types * merge if condition * simplify if condition Co-Authored-By: Lipis <lipiridis@gmail.com> Co-authored-by: dwelle <luzar.david@gmail.com> Co-authored-by: Lipis <lipiridis@gmail.com> Co-authored-by: Fausto95 <faustino.kialungila@gmail.com>
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "./types";
|
||||
import {
|
||||
ExcalidrawElement,
|
||||
NonDeletedExcalidrawElement,
|
||||
NonDeleted,
|
||||
} from "./types";
|
||||
import { isInvisiblySmallElement } from "./sizeHelpers";
|
||||
|
||||
export {
|
||||
@@ -68,3 +72,9 @@ export function getNonDeletedElements(elements: readonly ExcalidrawElement[]) {
|
||||
readonly NonDeletedExcalidrawElement[]
|
||||
);
|
||||
}
|
||||
|
||||
export function isNonDeletedElement<T extends ExcalidrawElement>(
|
||||
element: T,
|
||||
): element is NonDeleted<T> {
|
||||
return !element.isDeleted;
|
||||
}
|
||||
|
Reference in New Issue
Block a user