diff --git a/src/Editing.ts b/src/Editing.ts index 88611e5550..fa25f8be5e 100644 --- a/src/Editing.ts +++ b/src/Editing.ts @@ -382,7 +382,8 @@ export function Editing(Base: TBase) { ); Object.entries(action.newAttributes).forEach(([key, value]) => { - if (value) action.element.setAttribute(key, value); + if (value !== null && value !== undefined) + action.element.setAttribute(key, value); }); return true;