November Happy Hour will be moved to Thursday December 5th.

TinyMCE - Avoid href auto-prepend

Vote:
 

I have a URL which I would like to add via @Model.Url in the TinyMCE rich text editor (not ideal I know). See image below. However Episerver CMS always auto prepends "/Episerver/CMS" to the link which turns the link invalid. Any way to avoid this behavior

#228516
Sep 28, 2020 19:39
Vote:
 

TinyMCE adds this if your link does not start with a / or http:// or https:// or similar.

You can override this value by setting document_base_url: https://www.tiny.cloud/docs/configure/url-handling/#document_base_url

You could also probably control this by adding your own callback method: https://www.tiny.cloud/docs/configure/url-handling/#urlconverter_callback

Or you could hook into the ContentSaving content-event and replace "/EPiServer/CMS/@" with "@" when the content is saved.

#228517
Sep 28, 2020 20:14
Vote:
 

Why don't you just inject complete anchor tag from backend for some placeholder string like for example $$anchor?

#228550
Sep 29, 2020 10:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.