Hello,
I want to intercept the content which is pasted, so that when a specific google drive link is pasted, I ask the user the choice to insert either the link or a google drive embed.
I tried to that with handlePaste but accessing the pasted content is done through getAsString but the function is async so impossible to know if I should return true or false from handlePaste. That could work inside transformPastedText, but this method can’t access the view
.
Would like to do something like that:
transformPastedText(text,plain){
if (is_google_drive_link(text)){
//ask_user_what he wants to do async, but can't access view
return ""
}
return text
}
Is that possible to do that kind of thing ?
Thanks