Merge pull request #4980 from Ocelot-Social-Community/4896-Pasting-Of-Some-Embedded-Links-Does-Not-Work

fix: 🍰 Replace Hashtag In d.tube Url
This commit is contained in:
Alexander Friedland 2022-06-22 15:54:26 +02:00 committed by GitHub
commit 607f98761c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,13 @@ export default class EventHandler extends Extension {
new Plugin({
props: {
transformPastedText(text) {
/* remove hashtag from d.tube url
* hashtags in url general are not a problem because the following link work like expected:
* http://www.nsosp.org/de/Quanten-Fluss-Theorie/index.php#OM:FrQFT:Home:Inhalt
*/
if (text.search(/d.tube/) > 0) {
text = text.replace(/\/#!\//gim, '/')
}
return text.trim()
},
transformPastedHTML(html) {