ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
9.33k stars 3.68k forks source link

Feature request: Citations #7374

Open archonic opened 4 years ago

archonic commented 4 years ago

📝 Provide a description of the new feature

What is the expected behavior of the proposed feature?

The <cite> tag has been in recommendation since HTML 4.0.1 and has functions that could mesh well with the Blockquote plugin, and might overlap with the requested Footnote plugin.

Google Drive has a footnote feature which is very lightweight. Select text and go to Insert > Footnote. It will enter a superscript number at the end of the selection and bring the cursor to a newly entered footnote. The format of the footnote is entirely freehand.

MS Word has a suite of features around sources and references to those sources and automatic generation of bibliographies in different formats.

I think MS Word's citation feature suite is too ambitious and goes well beyond CKEditor's set of concerns. An API to manage sources raises too many questions around what metadata should be present, what structure it should take and where it would be stored. Output to a bibliography view raises many questions about formats and would take the form of at least 1 other plugin.

I think a reasonable POC would be an implementation of Google Drive's footnote functionality but with more obvious semantic linking between the selection text and the footnote entry. The selected text should be wrapped with <q> (or perhaps optionally blockquote), and have an ID which matches a list item entry containing the associated <cite>. This site proposes a reasonable mark up for a footnote / lightweight bibliography.

Here's a proposed example. Markup before citation:

<p>Cassius Dio once said "who would not groan at hearing that Roman knights and senators grovel before her (Cleopatra) like eunuchs?".</p>

Markup after citation:

<p> Cassius Dio once said "<q cite='#bib01'>who would not groan at hearing that Roman knights and senators grovel before her (Cleopatra) like eunuchs?</q><sup cite='#bib01'>[1]</sup>".</p>

<footnotes>
  <ol>
     <li id='#bib01'>Cassius Dio, 50:5; quoted from Cassius Dio: The 
Roman History: The Age of Augustus, (trans.) (<time datetime='1987'>
1987</time>) Scott-Kilvert I.; reprinted in <cite>AA100 Assignment 
Booklet</cite> (<time datetime='2010-10'>October 2010</time>), 
Milton Keynes, The Open University, p.18.</li>
  </ol>
</footnotes>

Behaviour for what happens when clicking the <sup> reference would be up to the developer.


If you'd like to see this feature implemented, add a 👍 reaction to this post.

Mgsy commented 4 years ago

Hello, thanks for the report and the detailed description! I confirm it as a valid feature request. To everyone interested in this feature - feel free to add :+1: to the first post to bump its popularity.

Madejczyk commented 2 years ago

@Mgsy do you know in which approximately iteration that feature will be delivered?

Mgsy commented 2 years ago

@Mgsy do you know in which approximately iteration that feature will be delivered?

Unfortunately, we can't promise any ETA for this feature, as we have other priorities right now. However, if you'd like to enable support for the <cite> element, you can try to use the General HTML Support feature.