mindfiredigital / react-text-igniter

A powerful and intuitive HTML Editor built with React.js.
MIT License
7 stars 6 forks source link

[BUG]: Link formatting and alignment issues after inserting a link by addLink button #45

Open geekychandan opened 1 week ago

geekychandan commented 1 week ago

Describe the bug

After inserting a link using the addLink button, any subsequent text typed by the user inherits the link’s styling (e.g., blue text). Additionally, the text alignment unexpectedly changes from "justify left" to "justify center" after the link is added.

Steps to reproduce

1.Open the editor and type some texts. 2.Add a link using the addLink button. 3.After the link is inserted, continue typing. 4.Observe that the newly typed text is styled like a link. 5.Observe that the text alignment changes from "justify left" to "justify center" without user action.

Expected behavior

1.Text typed after inserting a link should not inherit the link’s styling (blue text). 2.The text alignment should remain as set by the user (e.g., "justify left") and not change unexpectedly.

What is actually happening?

There is a bug in button creation logic in the addLink function.

Screenshots

Screenshot (44)

Any additional comments?

No response

geekychandan commented 1 week ago

Hi ,

I’ve noticed this issue with the Create Link button, and I’d like to work on fixing it. Could you please assign this issue to me?

I'll make sure that after inserting a link, the editor resets the text formatting and alignment so the user can continue typing without inheriting the link styles.

Looking forward to contributing! Thank You

deepakyadav-01 commented 5 days ago

hi geekychandan , glad to see you like to contribute . you can fork the repo and solve the issue and create a pr against the issue will check and let you know.