- Issue created by @jpontet
- Status changed to Needs review
about 1 year ago 8:04am 26 October 2023 - last update
about 1 year ago 13 pass - last update
about 1 year ago 13 pass - πΊπΈUnited States fskreuz
Here's a version of the patch for CKEditor 5, and the relevant documentation:
- https://ckeditor.com/docs/ckeditor5/latest/features/read-only.html
- https://ckeditor.com/docs/ckeditor5/latest/api/module_core_editor_editor... - Status changed to RTBC
about 1 year ago 9:52pm 20 November 2023 - π¨π¦Canada geekygnr Waterloo
I tested it out and it works. Patch seems like a simple enough edition.
- π¬π§United Kingdom AaronMcHale Edinburgh, Scotland
There was already an open issue for this, but I've closed it since it did not have a patch and this issue does.
β¨ Compatibility with CKEditor5 (and take advantage of the CKE5 Restricted Editing Mode) Closed: duplicate
Please consider searching for existing issues before creating new ones, thank you.
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
IICR this will work for CKEditor4, but not CKEditor5 introduced in Drupal 9.3 and default in D10. Shouldn't stop this to be RTBC, but we might want to check with CK5 and create a separate issue.
- π¬π§United Kingdom AaronMcHale Edinburgh, Scotland
@penyaskito have you tested the latest MR to be sure that it does not work? Because in my testing this module works as is for CKE4, but not CKE5, and while I haven't tested the MR here (yet), my assumption is that it makes this work for CKE5.
- πΊπΈUnited States fskreuz
There are two patches in this issue:
- #2 is for when you're using CKEditor 4.
- #4 is for when you're using CKEditor 5.And so...
- If content_lock decides to go with CKEditor 4, then patch #2 is the one to merge.
- If content_lock decides to go with CKEditor 5, then patch #4 is the one to merge.
- If content_lock decides to support both versions, a new patch with both changes would probably be needed.This will need a maintainer's input.
- Merge request !21Issue #3396683: Include any CKEditor instances in form locking. β (Merged) created by smustgrave
- First commit to issue fork.
- Status changed to Needs work
9 months ago 5:35pm 21 March 2024 - πΊπΈUnited States smustgrave
Tried the MR and patch #4 but neither seem to work with ckeditor5 fields.
- πΊπΈUnited States smustgrave
π Disable all input elements with JS lock Needs work may be related.
- Status changed to RTBC
9 months ago 7:46pm 21 March 2024 - πΊπΈUnited States smustgrave
Actually doing another test on a different sites #4 worked.
So I did a fresh install and #4 worked. Updated the MR
- Status changed to Postponed: needs info
9 months ago 7:51pm 21 March 2024 - πΊπΈUnited States smustgrave
Actually sorry for the noise. Does π Ckeditor field not getting disabled on locked form RTBC address the issue? From my testing it does but maybe someone else can confirm and maintainer move over credit.
- π¬π§United Kingdom AaronMcHale Edinburgh, Scotland
@smustgrave in your last comment you linked this issue, did you mean to link a different one?
- π¬π§United Kingdom AaronMcHale Edinburgh, Scotland
In any case, my feeling is that since CKE5 provides an actual API for disabling the editor, maybe using that here is a more robust and future proof solution?
- πΊπΈUnited States smustgrave
Sorry π Disable all input elements with JS lock Needs work
- Status changed to Closed: duplicate
9 months ago 2:59pm 26 March 2024 - Status changed to Needs work
9 months ago 11:17pm 27 March 2024 - πΊπΈUnited States smustgrave
Okay I was able to replicate this issue when using "Lock form using JS."
- πΊπΈUnited States smustgrave
The MR does fix the problem. But some reason why I try to extend testContentLockNode by checking the js form. All the assertion messages fail.
- Status changed to Needs review
9 months ago 12:26am 28 March 2024 - πΊπΈUnited States smustgrave
Figured out why, this setting has to be in a javascript test duh.
- First commit to issue fork.
-
alexpott β
committed 42623782 on 8.x-2.x authored by
smustgrave β
Issue #3396683 by smustgrave, jpontet, fskreuz, AaronMcHale: Ckeditor...
-
alexpott β
committed 42623782 on 8.x-2.x authored by
smustgrave β
- Status changed to Fixed
9 months ago 8:37am 28 March 2024 - π¬π§United Kingdom AaronMcHale Edinburgh, Scotland
Great to see this get committed.
In testing, I note that this only works with CKE5 when the JS locking feature is enabled. I wonder if that's something which needs to be addressed, or if that's more of a "by design" and it just needs to be documented. My worry is that because CKE5 is the default editor in Drupal, if that option isn't on by default then it could result in people thinking that this module still doesn't work with CKE5.
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
@Aaron From what I tested, if you are not using JS locking, it just works (TM). If I'm right, it's because of the
$form['#disabled'] = TRUE;
Β‘ncontent_lock_form_alter
- π¬π§United Kingdom AaronMcHale Edinburgh, Scotland
@penyaskito are you testing with CKEditor5? Because yes CKEditor4 is disabled fine, this issue is specifically about CKEditor5 and here we used the CKEditor5 API to disable the editor, but from my testing that only seems to work if JS Lock is turned on.
- πͺπΈSpain penyaskito Seville π, Spain πͺπΈ, UTC+2 πͺπΊ
Yes. No js locks, ckeditor5, even custom plugin buttons are disabled (but one, but that's probably an issue on our custom plugin).
The styling could be different for having some visual indicator, but I cannot edit that text. Automatically closed - issue fixed for 2 weeks with no activity.