TinyMCE: Allow relative paths

Vote:
 

I followed the example here in the docs:
https://docs.developers.optimizely.com/content-management-system/docs/example-extending-hyperlink-editor-descriptor

If I set "Site relative link" to: /blog and then Publish the content. When I edit the hyperlink, "Site relative link" is no longer populated an instead "Page" is selected and the Blog page is listed.
Is this expected behavior? What is making my links change in the editor?

#322827
May 29, 2024 20:25
Vote:
 

Yes, that is pretty much standard behaviour in the TinyMCE instance in Optimizely CMS.

Whenever you enter a link (usually in External Link, but I guess also in Site Relative Link, as in your example) that matches a local page, Optimizely will change that to a Page link. Optimizely favours referencing content IDs whenever possible, so it makes sense to reference the Content ID and not the actual URL/URL segment (since page location may change but the Content ID does not). 

#322934
May 31, 2024 10:31
Vote:
 

Maybe "Site Relative Link" is for a custom "redirect", because if Optimizely is going to change that to a Page Link I don't get the point of it.

#322940
May 31, 2024 13:21
Arild Henrichsen - Jun 03, 2024 10:21
Agreed - the "Site Relative Link" option is not enabled in a vanilla Optimizely TinyMCE instance, which probably is because there's hardly any use for it.
Vote:
 

As Arild says, converting the relative URLs to Page Links is default functionality. This is what keeps the links from being broken, if you move a page and thus updating it's URL.

Have you performed step 3 in the documentation you linked to? It should alter this default behaviour.

3. To make relative links work in TinyMCE, set the convert_urls setting to false to prevent TinyMCE from converting the value.
#323035
Edited, Jun 03, 2024 9:30
Mike Malloy - Jun 03, 2024 12:36
I tried that and it did not change the behavior.
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.