Change markup from span to a

Created on 5 February 2024, 12 months ago
Updated 2 March 2024, 11 months ago

Problem/Motivation

The plugin generates markup like this:

<span data-mention="@joe">@John Doe</span>

See
* https://git.drupalcode.org/sandbox/sanduhrs-3274877/-/blob/1.0.x/ckedito...
* https://git.drupalcode.org/sandbox/sanduhrs-3274877/-/blob/1.0.x/js/cked...
* https://git.drupalcode.org/sandbox/sanduhrs-3274877/-/blob/1.0.x/js/cked...
* https://git.drupalcode.org/sandbox/sanduhrs-3274877/-/blob/1.0.x/js/cked...
* https://git.drupalcode.org/sandbox/sanduhrs-3274877/-/blob/1.0.x/css/men...

This highlights the mention in the editor and when rendered in the frontend.
But we want the mention highlighted _and_ link to the mentioned entity.

Steps to reproduce

Create a mention

Proposed resolution

Change the markup to

<a href="{{ canonical_entity_path }}" data-mention-type="{{ mention_id }}" data-mention-entity-id="{{ entity_id }}" data-mention-entity-type="{{ entity_type }}">{{ mention_marker }}{{ entiy_label }}</span>

Remaining tasks

Change the markup

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Component

Code

Created by

🇩🇪Germany sanduhrs 🇪🇺 Heidelberg, Germany, Europe

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024