Add citation support in blockquote within WYSIWYG

Created on 11 March 2024, 4 months ago

Problem/Motivation

https://www.drupal.org/project/civictheme/issues/3415738 πŸ› Decommission the 'Quote' standalone component RTBC decommissions "Quote" standalone component. This means that Quote now has to live in "Content" component.

Content authors would use "Quote" button in WYSIWYG editor to create the <blockquote> tag.

But this button does not provide the capability to easily enter citation details via UI making the content author going to the HTML view of the content and adding the <cite> tag manually.

This ticket is about enhancing the functionality of the standard "Quote" button to add a support for the citation field.

Steps to reproduce

1. Create a Page content
2. Add quote using the Quote button
3. Observe that visaually the quote appears satisfactory within the WYSISYWG editor. All good.
4. Observe that there is no way to specify citation details - there is no field.

Proposed resolution

There is already a module that handles this functionality https://www.drupal.org/project/ckeditor_quote β†’

Since this is a module and it is not included into GovCMS distro, CivicTheme would need to implement and maintain this functionality on it's own.

We need to look at that module and see if we can implement a standalone field within the WYSIWYG editor for the citation to be entered.

Remaining tasks

1. Assess the https://www.drupal.org/project/ckeditor_quote β†’ code to see if we can use similar approach. Do not copy/paste the code. We just need to understand how the plugin system can work for us to provide the field.
2. Assess if it is possible to extend existing "Quote" plugin rather than implement a new one (unlike the module above that provides a separate button).
2. Implement and PR with the field. Note that the citation value should go to the <cite> tag within <blockquote> tag.

User interface changes

None

API changes

None

Data model changes

None

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¦πŸ‡ΊAustralia alex.skrypnyk Melbourne

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

Comments & Activities

Production build 0.69.0 2024