-
Notifications
You must be signed in to change notification settings - Fork 551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tip: prefill an empty editor with <p><br></p>
to avoid a small bug
#174
Comments
<p><br></p>
to avoid insertImage bug<p><br></p>
to avoid a small bug
<p><br></p>
to avoid a small bug<p><br></p>
to avoid a small bug
@dvtan thanks! Slotted this for v2. |
Just realized this particular method won't work with #140 because it uses a |
Maybe only review image handler: result: () => {
const url = window.prompt('Enter the image URL')
if (url) document.execCommand('insertHTML', false, '<p><img src="' + url '"></img></p>');
} But it weighs down the function ... so to see if this is the goal of this library ? |
I fixed it using:
|
like this:
Most of the time images get inserted inside
<p></p>
tags. But if the user starts uploading images before he writes even a single letter, the image will be inserted at the top level since there's nothing else there.Oh and will also need this in case user writes something and deletes it all again (in which case Pell sets it back to completely blank):
The text was updated successfully, but these errors were encountered: