Skip to content

Can't add links to images in editor #3476

@jonasdekeukelaere

Description

@jonasdekeukelaere

Bug Report

Q A
Critical Bug no
Version 5.x.x

Problem description

You can't add a link to an image in the editors (ckeditor). The display name is required, but when you fill that in, the image dissapears:
Capto_Capture 2021-10-25_12-22-42_pm

I've already had a quick look in the code and it appears that when you disable the validation for display text, the image just disappears. Looks like there is no check on html (image) elements in that bit: https://github.com/forkcms/forkcms/blob/master/src/Backend/Core/Js/ckeditor/plugins/medialibrary/dialogs/linkDialog.js#L107

Steps to reproduce

https://demo.forkcms.com/private/en/pages/edit?id=1&token=fm5iyzlmt4

  • Add editor to page
  • Add image to editor
  • Add link to image

Expected behavior / Proposed solution

Add link to image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions