With the current editor, if you add a link that doesn't contain https:// or http:// in front of the URL, it will use the link as 'https://yourownwebsite.com' + '/' + 'yourLink'
instead of taking you straight to yourLink
.
Is there any way to set up CKEditor5 so that both www.example.com and example.com would become accepted links?
I found an answer on Stackoverflow to potentially parse links myself, however, I don't know how to implement it in the editor. Is there a way I could modify the editor build so as to pre-filter the URL insert with this line of code below?
The line of code below is all I'd like to implement as a pre-filter for link insertion:
link = (link.indexOf('://') === -1) ? 'http://' + link : link;