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!
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | diff-default-filter-config-export.PNG | 15.27 KB | yepa |
| #7 | diff-default-filter.PNG | 46.74 KB | yepa |
| #2 | diff_default_filter-3165141-2.patch | 3.41 KB | mihai11 |
Issue fork diff-3165141
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:
- 3165141-set-the-default-2.x
changes, plain diff MR !95
- 3165141-set-the-default
changes, plain diff MR !50
Comments
Comment #2
mihai11 commentedI have created a patch for you problem. A new configuration has been added on General settings form under FIELD BASED LAYOUT SETTINGS.
Comment #3
bbu23Comment #4
daddison commentedThe patch applied cleanly for me and works as expected.
Comment #5
gallegosj commentedAlso confirming, patch at #2 worked for me as expected.
Comment #6
charlie1volley commentedApplied successfully and works as designed. Thanks for a great module and the patch at #2 to add this very useful option.
Comment #7
yepaThe 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:

The configuration is correctly exported:

It works as expected and it's much appreciated by editors (UX).
Comment #8
gallegosj commentedWhen can we expect this to be ported over?
Comment #9
dbielke1986 commentedWould be great to have this feature in a official release
Comment #10
bkosborneSeems 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
Comment #11
acbramley commentedThanks 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!
Comment #13
dbielke1986 commentedJust created a fork and an MR with the changes of #2
Please review and test.
Comment #14
acbramley commentedThanks for that, we still need automated tests as well as some phpstan fixes.
Comment #15
pahles commentedI 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.
Comment #16
jeroentComment #19
jeroentI created a new MR for version 2.x and added test coverage.
Comment #20
jeroentFailing test-only run: https://git.drupalcode.org/issue/diff-3165141/-/jobs/2082920
Comment #21
jeroentComment #22
gbyteWorks as advertised, code looks clean.
Comment #23
heddnNeeds a rebase
Comment #24
jeroentIn rebased the -dev branch to the MR.
Comment #25
heddnPosted feedback on MR.
Comment #26
jeroent@heddn,
I can't find any feedback on the MR?
Comment #27
heddnOops. Posted now.
Comment #28
jeroent