The current floating link element exposes no button to trigger the insertion and relies on the user pressing enter. This is not a problem in itself but, if the user is placing the WYSIWYG editor within a form pressing enter will trigger the parent form's onSubmit method and the link will not be inserted.
As such I have wrapped the floating insert in an blank form element which takes the form context away from the parent and means submission is handled by plate opposed to the wrapper.
The link to be inserted into the editor
## What happened
Pressing enter triggered the parent form's submit method which means the link is never inserted.
onKeyDownCapture
. When the key is Enter
or the keyCode
is 13
we call e.preventDefault()
which stops the wrapping form from submitting.I have forked this repo and implemented solution number 3 here: https://github.com/PaulSinghDev/plate-update-floating-link
Click here to add a bounty via Algora.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too