pell
pell copied to clipboard
Can't delete custom elements
Hey, new user here. Loving pell so far!
I added some custom actions for video and others like this:
actions: [
...
'image',
{
name: 'video',
icon: '📹',
title: 'Video',
result: () => {
const url = window.prompt('Enter the video URL')
if (url) pell.exec('insertHTML', `<video src="` + url + `" width="400" controls>` +
'Your browser does not support HTML5 video.' +
'</video>')
}
},
...
]
Inserting a video link works perfectly. But if you insert it as the last thing in the input field, you can no longer remove it, or get the cursor to the other side of it anymore. Not even pressing the Delete button can delete it.
the reason is that these is none text to interact with. try add  
befor and after of video tag, like this:
result: () => {
const url = window.prompt('Enter the video URL')
if (url) pell.exec('insertHTML', ` <video src="` + url + `" width="400" controls>` +
'Your browser does not support HTML5 video.' +
'</video> ')
}
and if you want to delete this video, you should select video and it's before and after whitespace. It's a litter unfriendly. For now, I'm looking for a better way to deal video
Hi, The character for a non-breaking space needs a semi-colon at the end. i.e.  *;* Ross
On Wed, Jul 7, 2021 at 3:15 PM 小华 @.***> wrote:
and if you want to delete this video, you should select video and it's before and after whitespace. It's a litter unfriendly. For now, I'm looking for a better way to deal video
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jaredreich/pell/issues/210#issuecomment-875351543, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANWRHLPRZMY24JUEJZEA7KLTWP5K3ANCNFSM4QQS2QEQ .