Use ckeditor button to allow the insertion as a anchor tag with link to asset

Created on 24 December 2024, about 17 hours ago

Problem/Motivation

Non developers require the ability to use the CKEditor5 WYSIWYG button to select a pdf file to create a link to for download with custom text, rendered an anchor tag.

Example:
For more information on current examples download this user guide often to stay up to date!

Steps to reproduce

  1. Use the widen dam and acquia_dam module.
  2. Authenticate your user.
  3. Edit some WYSIWYG content using the ckeditor 5 button "insert media" and selecting dam.
  4. Filter by PDF and locate a pdf file. Select "insert file as text with download" and fill in the text feild (which I think transforms to the alt text?)
  5. Click insert pdf

Link appears as the full pdf title instead of the human friendly text entered in the previous screen which appears as tiltext. Text is not editable in the WYSIWYG. This text is not allowed to be inline with a sentence.

Proposed resolution

Either:

  • when inserting asset as a file name allow anchor text to be rewritten and be inline to a sentence. Allow "class" to be inserted for extra styling (like if my designers wish to add a class of ".btn" to have the text appear as a button).
  • Allow a modal to pop up and edit text from ajax modal. Allow element to be inline to a sentence. Allow "class" to be inserted for extra styling.
  • Or remove "final" from classes so that I may make my own modules extending current functionality
✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cpierce42

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

Comments & Activities

Production build 0.71.5 2024