Forum

Thread tagged as: Question

link title attribute via markitup

Is there way to configure markitup that will allow the editor to add a title attribute to a link?

Peter Hammarling

Peter Hammarling 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Which language are you using? Markdown?

I think so - I've used the default Perch set up and haven't added any plugins

Drew McLellan

Drew McLellan 2638 points
Perch Support

I think the syntax is:

[Google](https://www.google.com "Google's Homepage")

What markitup actually outputs in the perch interface is this

"read more ...":page-url.php

The url is not wrapped in brackets like in your example.

I've tried many formats for manually adding the attribute after the url but they mostly just show the attribute as visible text in the page output.

On markitup's own web page demo, when you enter a link it first pops up a field for entering the url, then pops up a field asking for the title. In Perch that second field is not presented.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's Textile formatting, in that case.

I think you need this:

"link text(with title)":https://example.com/

Thanks again Drew - formatted like that does produce the title text on hover.

There is still the drawback that this requires manual intervention and although I can put a note about it in the help text there are editors who won't read it or won't get it. Is there not a way to configure markitup so that editors are automatically asked to add the title text?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can add it to the MarkItUp editor - I think it used to be in there and we removed it because it was annoying.

You'll need to edit the MarkItUp configuration to do that.

OK. I'll have a look at the difference between the standard markitup download and your version. I'm not at home at all with js but maybe I'll be able to bodge something together by luck.