Problem/Motivation

"Toggle word wrapping" (use_wrap_mode) is applied by the text editor (js/editor.js) but not by the field formatter (js/formatter.js) or the text filter (js/filter.js), so turning it on for a formatted field or a snippet has no effect.

Steps to reproduce

  1. Display a long line in a field with the Ace Format formatter, or in an snippet.
  2. Turn word wrapping on in the formatter or filter settings: the line still scrolls instead of wrapping.

Proposed resolution

  • Apply getSession().setUseWrapMode(true) in the formatter and filter behaviours when use_wrap_mode is set, matching the text editor.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ❌ Update Release Notes
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • The word-wrap setting now works on the field formatter and the text filter.

Issue fork ace_editor-3618893

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

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Title: Improve settings handling: apply word wrap on the formatter and filter, drop the unused show_gutter key » Apply the word wrap setting on the field formatter and the text filter
Issue summary: View changes

  • rajab natshah committed 976b45aa on 2.0.x
    fix: #3618893 Apply the word wrap setting on the formatter and the...
rajab natshah’s picture

Status: Needs review » Fixed

Fixed on 2.0.x.

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.

rajab natshah’s picture

Issue tags: +ace_editor-2.0.4

✅ Released ace_editor-2.0.4

Status: Fixed » Closed (fixed)

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