Issue Bug Closed

#83754Unable to set preconfigured values in CKEditor for title and target

Michael Straschek 02/01/18, 19:29 updated 06/08/20, 08:05

Description

In TYPO3 8.7.9, it is not possible to set custom values for title and target in the link browser, except for the first iframe (in my case “page”).

Reason: After opening the link browser ant then clicking a tab (e.g. “file”) the current form values of target & title are sent via _GET.
In both getTitleField() & getTargetField() those values (stored in $this->linkAttributeValues) will override the preconfigured values:

\TYPO3\CMS\RteCKEditor\Controller\BrowseLinksController::getTitleField

if ($this->linkAttributeValues['title']) {
  $title = $this->linkAttributeValues['title'];
} else {
  $title = $this->classesAnchorDefaultTitle[$this->displayedLinkHandlerId] ?: '';
}

\TYPO3\CMS\RteCKEditor\Controller\BrowseLinksController::getTargetField

$target = $this->linkAttributeValues['target'] ?: $this->defaultLinkTarget;

TSconfig:

RTE.classesAnchor {
  internalLink {
    class = anchor anchor--internal
    type = page
    titleText = Title for internalLink
  }

  downloadLink {
    class = anchor anchor--download
    type = file
    target = _blank
    titleText = Title for downloadLink
  }

  externalLink {
    class = anchor anchor--external
    type = url
    target = _blank
    titleText = Title for externalLink
  }

  externalDownloadLink {
    class = anchor anchor--download
    type = url
    target = _blank
    titleText = Title for externalDownloadLink
  }

  mailLink {
    class = anchor anchor--mail
    type = mail
    titleText = Title for mailLink
  }
}

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.