Extend the create/edit link dialog in TinyMCE

Vote:
 

Hi,

I need to add additional link types to the create/edit link dialog available in the TinyMCE editor, namely the ability to be able to link to a Relate forum or discussion.

I've seen this article from 2 years ago https://world.episerver.com/blogs/Anders-Hattestad/Dates/2015/2/extending-the-hyperlink-with-custom-field/ but it doesn't look like it will be that easy. Also, it's not clear where the various code components shoudl reside or if any configuration is required.

Are there other approaches that anyone else has used recently and that has been successful?

Thanks,

Mark

#178370
May 10, 2017 10:33
Vote:
 

Hi Mark

You can always create a block thats used to generate the link and drag that straight into the TinyMCE edtior.

David

#178377
May 10, 2017 12:07
Vote:
 

Hi David,

Ok, I hadn't considered that. How would that work with a link that needs to be part of a sentence e.g. "Please click here to see more"

I've just done a quick test with an existing block and it didn't quite work as above.

Thanks,

Mark

#178378
May 10, 2017 12:16
Vote:
 

Hi Mark

You should be able to control what's rendered in the block when its used in TinyMCE, afraid I've never actually tried it myself. One thing to bear in mind (as I remember) is that the block is rendered in a div which might explain the behaviour you are seeing.

David

#178382
May 10, 2017 13:12
* 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.