Account created on 1 March 2011, over 13 years ago
#

Merge Requests

Recent comments

πŸ‡¦πŸ‡ΊAustralia TinaRey

I created a new fork and did a bit of work on this – it's a rough WIP but there's a few native dialogs now :) (added 2 screenshots)
- created a new library dialogNative with the idea to have both in parallel and switch over bit by bit
- changed editor and field_ui to use the new library:
editor: on a wysiwyg field, change the text format between basic_html and full_html
field_ui: on a content type, manage fields and attempt to delete one
in both cases a native dialog should pop up and the buttons should work

Notes/questions/next steps
- The existing Drupal.dialog.showModal() and the native showModal() function have the same name, which gets slightly confusing.
- showModal() and show() seem to be doing mostly the same thing, just one with and one without backdrop? What did I miss?
- Atm I've just set app/core/lib/Drupal/Core/Render/MainContent/DialogRenderer.php and app/core/lib/Drupal/Core/Render/MainContent/ModalRenderer.php to use the new native library but if we want both in parallel, this probably needs another solution. Too backend-y for me.
- Currently ajax response data is just put out again as is, this probably needs some checks.
- There's currently nothing for focus, tabbable, or the whole button change thing, I assume we need some of that back in.
- Needs tests
- Needs styling

πŸ‡¦πŸ‡ΊAustralia TinaRey

TinaRey β†’ made their first commit to this issue’s fork.

πŸ‡¦πŸ‡ΊAustralia TinaRey

I could replicate the issue in a pretty fresh Drupal 10 install with full_html, other formats with several ways of adding tags, ids, classes etc in the allowed list etc and at some point noticed that the h2 doesn't get stripped if it's applied via UI; only via source. That's when I went to their demo page for the "source" button which says it allows all sorts of dangerous html. The test case is as minimal as

<h2>
    <div>Test</div>
</h2>

I left a comment in the upstream issue https://github.com/ckeditor/ckeditor5/issues/13803#issuecomment-1558319636

πŸ‡¦πŸ‡ΊAustralia TinaRey

Looks like this might be the same: https://www.drupal.org/project/drupal/issues/3349893 πŸ› [upstream] [GHS] CKEditor 5 removes s that wrap HTML elements not natively supported by CKEditor 5 Fixed
(added this issue to the CKEditor report).

πŸ‡¦πŸ‡ΊAustralia TinaRey

Looks like that's a ckeditor bug, it happens on the demo page for the source input https://ckeditor.com/ckeditor-5/demo/html-support/
If you select h2 via the heading dropdown, it stays.

Production build 0.69.0 2024