Skip to content

Commit

Permalink
Fix 262779 (#2600)
Browse files Browse the repository at this point in the history
  • Loading branch information
JiuqingSong authored May 6, 2024
1 parent 3b2154b commit f65c6a0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ export class HyperlinkPlugin implements EditorPlugin {
} catch {}
}
});
} else if (event.eventType == 'contentChanged') {
this.domHelper?.setDomAttribute('title', null /*value*/);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,4 +455,15 @@ describe('HyperlinkPlugin', () => {

plugin.dispose();
});

it('ContentChanged', () => {
const plugin = new HyperlinkPlugin();
plugin.initialize(editor);

plugin.onPluginEvent({
eventType: 'contentChanged',
} as any);

expect(setDomAttributeSpy).toHaveBeenCalledWith('title', null);
});
});

0 comments on commit f65c6a0

Please sign in to comment.