Also use text editor (CKEditor) for "summary" of a text field

Created on 18 February 2016, over 8 years ago
Updated 31 May 2024, 23 days ago

Problem/Motivation

The Summary part of the textfield should have a WYSIWYG Editor because the format applies to body and summary.

Proposed resolution

@todo
- Lock down the format for summary in the widget. (?)

Remaining tasks

  1. Update this summary to accurately reflect the proposed change.
  2. Fix the existing test failures.
  3. Add new tests to cover the new functionality.
  4. Move this back to 'Needs review'
  5. Reviews/refinements.
  6. RTBC.
  7. Commit.

User interface changes

WYSIWYG editor available on the separate 'Summary' field on text areas that support them.

Before

After

API changes

TBD.

Data model changes

TBD, hopefully none.

โœจ Feature request
Status

Needs work

Version

11.0 ๐Ÿ”ฅ

Component
Textย  โ†’

Last updated 2 days ago

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany webflo

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs framework manager review

    It is used to alert the framework manager core committer(s) that an issue significantly impacts (or has the potential to impact) multiple subsystems or represents a significant change or addition in architecture or public APIs, and their signoff is needed (see the governance policy draft for more information). If an issue significantly impacts only one subsystem, use Needs subsystem maintainer review instead, and make sure the issue component is set to the correct subsystem.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States DamienMcKenna NH, USA

    Have confirmed that #116 works well on 9.5.x.

    There is some test coverage included in the patch, so is additional test coverage required?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Hetal.Solanki

    #116 is working in Drupal 9.5.2

    Thank You!!

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia karoda_manoj indore

    Does any one have solution for this issue ? I want to use ckeditor5 in summery field in drupal 9.

  • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina hanoii ๐Ÿ‡ฆ๐Ÿ‡ทUTC-3

    I applied #2671162-116: Also use text editor (CKEditor) for "summary" of a text field โ†’ on 11.x and manually edit the editor.js file as the es6 file was removed.

    Also, some of the test files modified on the patch there were removed in #3270438: Remove CKEditor 4 from core โ†’ so leaving the other tests.

  • last update about 1 year ago
    Custom Commands Failed
  • last update about 1 year ago
    Custom Commands Failed
  • First commit to issue fork.
  • last update 12 months ago
    Custom Commands Failed
  • Status changed to Needs review 12 months ago
  • ๐Ÿ‡ท๐Ÿ‡ดRomania vasike Ramnicu Valcea

    latest patch seems not to apply anymore

    re-rolled and created a new MR from it ...

    let's see what happens.

  • Status changed to Needs work 12 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Also for open tags

  • last update 12 months ago
    Build Successful
  • last update 12 months ago
    Build Successful
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Gauravvv Delhi, India

    Fixed linting error in editor.js file.

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland sir_squall

    Do we have a patch who is working well for the last drupal 9 version?

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland sir_squall

    Or maybe drupal 10?

  • ๐Ÿ‡ช๐Ÿ‡ธSpain oierbravo

    Tested #122 with 10.1.3 and works as intended.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance PhilY ๐Ÿ‡ช๐Ÿ‡บ๐Ÿ‡ซ๐Ÿ‡ท Paris, France

    Patch #122 โœจ Also use text editor (CKEditor) for "summary" of a text field Needs work works for me using Drupal 10.1.4 (don't forget to force reload your browser page to allow new js to refresh).

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States DamienMcKenna NH, USA

    #122 rerolled.

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland sir_squall

    I just tested it again on drupal 10.1.8-dev and it's not working anymore, do you know when this will be included in core?

  • ๐Ÿ‡จ๐Ÿ‡ญSwitzerland sir_squall

    did someone have a patch working for 10.2 at least?

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States redbrickone

    I'm also curious about the status of getting this in Drupal 10. Any chance to get a patch rolled to 10.2.2?

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany 4kant

    #132 applies cleanly on drupal 10.2.2.

    CKeditor didnยดt show up until I turned on "Always show the summary field" in content typeยดs form display for the body field.

    Is that intended?

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany 4kant

    Supplement to my comment #136:
    I just realized that for new nodes CKeditor shows up without the checkmark as mentioned above.
    But for existing nodes I have to do that.

  • ๐Ÿ‡ฏ๐Ÿ‡ดJordan Rahaf Albawab

    I applied patch #132 to Drupal 10.2, but nothing changed because in the editor.libraries.yml file, drupal.editor has the version set as VERSION. Therefore, I rerolled the patch and removed it. If this is incorrect, please don't hesitate to provide the correct solution.

  • Pipeline finished with Failed
    4 months ago
    Total: 566s
    #105741
  • Pipeline finished with Failed
    4 months ago
    Total: 276s
    #107292
  • Pipeline finished with Failed
    4 months ago
    Total: 531s
    #107324
  • Pipeline finished with Failed
    4 months ago
    Total: 172s
    #107859
  • Pipeline finished with Failed
    4 months ago
    Total: 267s
    #107881
  • Pipeline finished with Failed
    4 months ago
    Total: 638s
    #107899
  • Pipeline finished with Success
    4 months ago
    Total: 538s
    #108369
  • Status changed to Needs review 4 months ago
  • ๐Ÿ‡ท๐Ÿ‡ดRomania vasike Ramnicu Valcea

    made the MR green "again" after some updates from 11.x
    A lot of errors on tests ... Needs review, for now ... so maybe there could code improvements - code review.

    Wondering if we still need the "Needs tests" tag ...

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Tagging for usability.

    My only concern is this feels odd. You essentially have two full text fields now so why not add 2 fields.

    But will leave for usability

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Also going to tag for framework thoughts.

    But notes I'm seeing

    Will need a configuration on the field for this feature, should not be the default added.
    Will need to be able to limit the formatters, separate from the feature that was already added to filter formats from the main field. I imagine people won't want Full HTML to be used in their summary.
    Will need a formatter configuration that will filter the summary now as the "Summary or trimmed" formatter don't believe is any longer safe.

    Personally I'm wondering if this belongs in a contrib module vs core.

    As sub maintainer I'm kinda -1 but this issue pre-dates me putting that hat on so will defer to the framework managers.

  • Status changed to Needs work 4 months ago
  • The Needs Review Queue Bot โ†’ tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide โ†’ to find step-by-step guides for working with issues.

  • ๐Ÿ‡ฏ๐Ÿ‡ดJordan IbrahimTameme

    I applied #138 patch and it worked but there was an issue with unrecognized setAttribute function inside an event handler that casued an error and max length not working, setAttribute is a method that only works on individual DOM elements, not on jQuery objects or collections of elements.

    To fix this, I modified the event handler to iterate over each element in field using .each(), allowing us to correctly call setAttribute on each raw DOM element individually.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States banoodle San Francisco, CA

    I'm truly grateful for the efforts here, but ideally, I would like to be able to have this option on any full-text field - not just "body."

    The 10.2 patch (132) works well for Body fields. Is the ultimate D11 fix also just going to target the body field?

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia junaidpv Kannur, Kerala

    It now just works for body fields??

    The original patch I posted in #23 were supposed to work with any long text field with summary. But I see it now evolved lot more but restricted to just body fields as there are some hard coding for body fields. Definitely it needs to be a generic one.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 607s
    #177747
  • Pipeline finished with Success
    about 1 month ago
    Total: 575s
    #179065
  • Status changed to Needs review about 1 month ago
  • ๐Ÿ‡ท๐Ÿ‡ดRomania vasike Ramnicu Valcea

    Updated the MR - fix tests. made it green

    I think this was in "Needs Review"

    About the latest comments ... it's NOT only about the body field.... it's a generic solution for all text with summary fields.
    Maybe the confusion is from tests ... that uses the already existing body field.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States smustgrave

    Believe this should be postponed on ๐ŸŒฑ [Meta] Deprecate text_with_summary Active

  • ๐Ÿ‡ท๐Ÿ‡ดRomania vasike Ramnicu Valcea

    let's have https://www.drupal.org/project/drupal/issues/3427095 ๐ŸŒฑ [Meta] Deprecate text_with_summary Active linked ... at least

  • Status changed to Needs work 23 days ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States benjifisher Boston area

    @smustgrave:

    When you tag an issue for usability review, please make it easy for the usability team to review the issue. Update the issue summary:

    • The "Proposed resolution" section should describe all the changes made in the issue.
    • The "User interface changes" should show the existing UI and the proposed UI.
    • The "Remaining tasks" should include one explaining the usability issue(s).

    Most of the time, I prefer to have plain text in the "Proposed resolution" section and screenshots in the "User interface changes" section. For this issue, (1) needs work (already noted in the "Remaining tasks"), (2) is already in good shape, and (3) is missing.

    You can also attend the weekly usability meeting to present an issue.

    I am setting the status to NW.

    Usability review

    We discussed this issue at ๐Ÿ“Œ Drupal Usability Meeting 2024-05-31 Needs work . That issue will have a link to a recording of the meeting.

    For the record, the attendees at the usability meeting were @benjifisher, @rkoller, @simohell, @shaal, and @SKAUGHT.

    If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.

    The only usability issue we see in the comments is from Comment #140:

    My only concern is this feels odd. You essentially have two full text fields now so why not add 2 fields.

    As far as we can tell, that is out of scope for this issue. It is certainly relevant for ๐ŸŒฑ [Meta] Deprecate text_with_summary Active , but in the context of this issue, we have two text fields and they both use the same text format. It makes sense to use CKEditor for both of them.

    We also discussed whether it was worth the effort to discuss this issue, considering #3427095. We decided it is worth our time: if the text_with_summary is deprecated in Drupal 11 and removed in Drupal 12, that means it will still be around for several years.

    We only tested the updated code on the Body field during the meeting, and I just noticed Comments #144, #145. Personally, I agree: if we are going to make this change, then it should apply to all text_with_summary fields, not just the body field.

Production build 0.69.0 2024