mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04: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:
parent
d2246bfb30
commit
5e2f164026
9 changed files with 134 additions and 11 deletions
|
@ -27,7 +27,10 @@ const changeProperty = (
|
|||
callback: (element: ExcalidrawElement) => ExcalidrawElement,
|
||||
) => {
|
||||
return elements.map((element) => {
|
||||
if (appState.selectedElementIds[element.id]) {
|
||||
if (
|
||||
appState.selectedElementIds[element.id] ||
|
||||
element.id === appState.editingElement?.id
|
||||
) {
|
||||
return callback(element);
|
||||
}
|
||||
return element;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue