1.Replaced the previous button element for links with an anchor <a> element, ensuring proper link behavior.
2.Added editor.focus() before inserting a link to ensure correct positioning.
3.Appended a <br> after the link to prevent subsequent text from inheriting the link’s styles.
4.Added event handling for clicks on links inside the editor. Now, when users click a link, it opens in a new tab.
5.Cleaned up event listeners on component unmount
Fixes #45
All React Text Igniter Contribution checklist:
[x] The pull request does not introduce [breaking changes].
Description
1.Replaced the previous button element for links with an anchor
<a>
element, ensuring proper link behavior. 2.Added editor.focus() before inserting a link to ensure correct positioning. 3.Appended a<br>
after the link to prevent subsequent text from inheriting the link’s styles. 4.Added event handling for clicks on links inside the editor. Now, when users click a link, it opens in a new tab. 5.Cleaned up event listeners on component unmountFixes #45
All React Text Igniter Contribution checklist: