Problem/Motivation

Sometimes reference texts can be very long and it make be desirable only to show the citation number (or text) without the full reference text.

Steps to reproduce

Use the CK Editor enabled field

Proposed resolution

Add a checkbox option to the text format configuration:

Screenshot from filter settings

Use that to change the output in the editor preview:

Screenshot of editor preview

Remaining tasks

Do the work

User interface changes

Ability to show only citation number (or text) without full reference text

API changes

N/A

Data model changes

N/A

Issue fork footnotes-3473262

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

scott_euser created an issue. See original summary.

sirclickalot’s picture

StatusFileSize
new34.19 KB
new10.86 KB

I whole-heartedly second this with an illustration…

BEFORE

footnotes_in_ckeditor_before

AFTER

footnotes_in_ckeditor_after

scott_euser’s picture

Its definitely opinionated unfortunately, so it needs to be configurable.

scott_euser’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new44.88 KB
new102.62 KB

New checkbox + input field to control the preview

Screenshot from filter settings

Settings from above screenshot applied in editor preview:

Screenshot of editor preview

scott_euser’s picture

Test coverage now passes

sirclickalot’s picture

Hi @scott_euser,

This all sounds VERY encouraging indeed and I am looking forward to trying it out.

Just one thing though, and I humbly apologies if I was not clear, I not looking for the word 'fn' as a literal; as I hoped to make clear by use of the # character, what I'm after is the actual footnote number itself.

scott_euser’s picture

The number itself won't work though as the WYSIWYG is unaware of how many other WYSIWYGs are on the page. You'll have to pick a generic character or perhaps unicode symbol (it's controllable).

scott_euser’s picture

Best to consider eg one of the symbols listed on the Wikipedia page https://en.wikipedia.org/wiki/Note_(typography)

scott_euser’s picture

Oh just to clarify I'm talking about auto-numbering only. If you manually number the citations with actual values those will show in the preview.

jstoller’s picture

Status: Needs review » Reviewed & tested by the community

MR !93 works as advertised, and provides a much better user experience, IMHO.

  • scott_euser committed aca5a442 on 4.0.x
    feat: #3473262 Add the ability to hide the reference text in the CK...
scott_euser’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for checking. Given its opt-in + has test coverage going to merge this in now

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

scott_euser’s picture

If someone wants to work on this:

what I'm after is the actual footnote number itself

It can be in a follow-up (but I really don't see how the back-end text format could ever reliably be aware of all possible formatted texts in the front-end theme without some complex auto-submit preview and pulling that calculated info back into the particular CKE instance - does not seem possible (or at least not without a huge amount of effort and extra pressure server)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.