Would it be possible to set the default filter to "Strip Tags"? Or at least give administrators the ability to set the default ourselves? My organization is testing this module for use on a policy website to allow visitors to compare revisions, but the feedback thus far has shown a heavy dislike for the "Raw" filter being the default. And our content creators are finding it just as annoying as our audience. Everyone overwhelmingly would rather compare content first, not markup.

Thank you for creating a much needed module!

Issue fork diff-3165141

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

gallegosj created an issue. See original summary.

mihai11’s picture

StatusFileSize
new3.41 KB

I have created a patch for you problem. A new configuration has been added on General settings form under FIELD BASED LAYOUT SETTINGS.

bbu23’s picture

Status: Active » Needs review
daddison’s picture

The patch applied cleanly for me and works as expected.

gallegosj’s picture

Also confirming, patch at #2 worked for me as expected.

charlie1volley’s picture

Applied successfully and works as designed. Thanks for a great module and the patch at #2 to add this very useful option.

yepa’s picture

Version: 8.x-1.0 » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new46.74 KB
new15.27 KB

The patch applied cleanly on Drupal 8.9.8
the code review did not show any errors.

On the config page (admin/config/content/diff/general), we can now choose the default filter:
Diff default filter

The configuration is correctly exported:
Diff default filter config export

It works as expected and it's much appreciated by editors (UX).

gallegosj’s picture

When can we expect this to be ported over?

dbielke1986’s picture

Would be great to have this feature in a official release

bkosborne’s picture

Seems important to get this in, especially now that CKEditor 5 collapses all HTML into a single line, making the "raw" comparison method pretty useless. See #3351660: [DrupalHtmlEngine] CKEditor 5 saves content as single line HTML making revision diffing impossible

acbramley’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Thanks for the work on this one. I've recently taken up maintainership of this project and am looking through the RTBC issues.

I agree here that having the Raw as the default is undesirable.

To get this in, I'll need the patch applied against the latest 8.x-1.x code in an MR with tests.

Thanks!

dbielke1986’s picture

Status: Needs work » Needs review

Just created a fork and an MR with the changes of #2

Please review and test.

acbramley’s picture

Status: Needs review » Needs work

Thanks for that, we still need automated tests as well as some phpstan fixes.

pahles’s picture

I tried updating the module today but this patch no longer gets applied. Composer just hangs. It works when I revert to 8.x-1.1 but cannot be applied in 8x-1.2 or 8x-1.3.

jeroent’s picture

Version: 8.x-1.x-dev » 2.x-dev

JeroenT changed the visibility of the branch 3165141-set-the-default to hidden.

jeroent’s picture

Status: Needs work » Needs review

I created a new MR for version 2.x and added test coverage.

jeroent’s picture

jeroent’s picture

StatusFileSize
new12.36 KB
gbyte’s picture

Status: Needs review » Reviewed & tested by the community

Works as advertised, code looks clean.

heddn’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs tests +Needs reroll

Needs a rebase

jeroent’s picture

Status: Needs work » Needs review

In rebased the -dev branch to the MR.

heddn’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll

Posted feedback on MR.

jeroent’s picture

@heddn,
I can't find any feedback on the MR?

heddn’s picture

Oops. Posted now.

jeroent’s picture

Status: Needs work » Needs review