mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Lexical: Further fixes
- Improved node resizer positioning to be more accurate - Fixed drop handling not running within editor margin space - Made media dom update smarter to reduce reloads - Fixed media alignment, broken due to added wrapper
This commit is contained in:
@ -70,4 +70,12 @@ export function extractStyleMapFromElement(element: HTMLElement): StyleMap {
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
export function setOrRemoveAttribute(element: HTMLElement, name: string, value: string|null|undefined) {
|
||||
if (value) {
|
||||
element.setAttribute(name, value);
|
||||
} else {
|
||||
element.removeAttribute(name);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user