tinyMCE is not adding code for links


Testing MCE in Plone 5 I see it is a big improvement over the MCE in Plone 4.

However, adding a link doesn't work for me. I have tried to create internal and external links and nothing happens.

  1. I configure as below:

  2. Save, go back to page, no visible change except the link and unlink icons on toolbar is lit indicating that MCE thinks there is a link.

  3. I look at the code I see that no link code is there.

Has anyone else had this issue?

Make sure you click on the thing in the search box, so that it's selected.

tried again. same thing.

Note that it isn't pasting any of the html link code into the page after I configure the link, not just that it doesn't link to the right object.

I've done this same action in MCE in Plone 4 and it worked fine.


Maybe this is a silly question but are you actually highlighting text to be linked?

  • What version of Plone, what browser version? Specifics here so we can try reproducing.
  • Are there any errors in the browser console?
  • Do you have any customizations? Have you done any custom builds of javascript?

Well I feel dumb. @vangheem you were exactly right, I hadn't highlighted the text. Sorry for the dumb question.

It's not a dumb question... this is something I ran into myself :wink: so maybe we need more UI hints about that.

Thanks, but is was at least silly :joy:

I can think of a few ways to prevent or reduce this

  1. the link button shouldn't light up unless text is selected. Or,
  2. the code generated when no content is selected did not include an "href", I assume because there was nothing to reference. So, when the code is
    Being placed into tinymce window, do code check for 'href'. If not there raise warning to check for text to be highlighted. OR,

3). In the pop up box where you define the link , put colored text to the effect "ensure you have selected text for the link". This might help but I'll admit it has the possible side effect of making people believe that the words are a dynamic warning and means they, for a fact, did not select text.

Yeah its ux bug. If you try to do something with good intentions and it doesn't seem to work then its a ux bug.
There are lots of possible solutions but one I've seen before is to include the linked text in the dialog and make it mandatory so you can insert a link even when you haven't highlighted anything.

1 Like