- Issue created by @charles belov
- 🇺🇸United States charles belov San Francisco, CA, US
I removed the patch steps from the list, as they are not necessary to reproduce the issue.
- Status changed to Postponed: needs info
about 1 year ago 7:35am 22 September 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
FYI: this approach was implemented after very careful consideration in #3273983: Do not assume that plugin supporting
also supports → .in SourceEditingRedundantTags and upgrade path You suggest:
Better yet, just tell them to add
<span lang dir>
to Source Editing once 🐛 Following instructions for error upon adding the language plug-in does not remedy the issue Postponed: needs info is fixed.But the message literally says:
[…] If none exists, you can configure the Source Editing plugin to support it.
… which is what you're asking for!
I suspect you just find the current message not precise enough? I can see that!
Would this be better?
[…] If none exists, you can configure the Source Editing plugin to support it: add to the list of "Manually editable HTML tags".
Would that help?
- 🇺🇸United States charles belov San Francisco, CA, US
Thank you for demystifying this and confirming your instructions worked.
I'd really prefer Drupal to just tell them to manually add the tag and not send people on a hunt to find a plug-in which may or may not exist when I can solve it with a click on the Source Editing tab and type 6 characters.
So:
The Language plugin needs another plugin to create , for it to be able to create the following attributes: . Enable a plugin that supports creating this tag. If none exists, you can configure the Source Editing plugin to support it.
would be replaced with:
The Language plugin cannot create with the current configuration. Within Source Editing, add "
<span>
" to the list of manually editable tags.or at most:
The Language plugin cannot create with the current configuration. Within Source Editing, add "
<span>
" to the list of manually editable tags. Alternatively, you can enable a plugin that supports creating this tag, if one exists. - 🇺🇸United States charles belov San Francisco, CA, US
Wim Leers, thank you again for the education. After reading #3273983: Do not assume that plugin supporting
also supports → , I've revised the original issue description and title.in SourceEditingRedundantTags and upgrade path - Status changed to Needs work
about 1 year ago 10:51am 22 September 2023 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
I'd really prefer Drupal to just tell them to manually add the tag and not send people on a hunt to find a plug-in which may or may not exist when I can solve it with a click on the Source Editing tab and type 6 characters.
That's not recommended from a CKEditor 5 POV. But … you're right that this is the only pragmatic choice!
So let's change this!
Could you roll a patch or create a merge request with your proposed text? 😊
- 🇺🇸United States charles belov San Francisco, CA, US
Removed the alternative, longer comment. If we don't want site builders enabling the Language plug-in just to get the span tag, we probably also don't want site builders enabling some other random plug-in that editors don't need just to get the span tag.
So, only the simple message is appropriate.
- 🇺🇸United States charles belov San Francisco, CA, US
Could you roll a patch or create a merge request with your proposed text?
Unfortunately, I am working part-time and don't have a development environment (or the know-how to set one up beyond launching a simplytest.me instance), so I don't have the bandwidth able to accomplish this.
- Assigned to tbcs
- 🇺🇸United States charles belov San Francisco, CA, US
Updated the issue description on December 28, 2023, to reflect changed behavior in Drupal 10.2.
- 🇺🇸United States charles belov San Francisco, CA, US
Changing the description and title back, as I misunderstood the issue with 10.2.0, with an update to the proposed message based on my current understanding.
- 🇺🇸United States tbcs
The fundamental issue behind this is that the ckeditor5_language plugin requires that you are able to *edit* span tags, but does not guarantee that you can create them. Only the "Source Editing" plugin allows this. It's not always desirable to allow users to edit the source even when they can set language tags.
Is it reasonable to update ckeditor5.ckeditor5.yml to read like this?
ckeditor5_language: ckeditor5: plugins: [language.TextPartLanguage] drupal: label: Language library: ckeditor5/internal.ckeditor5.language admin_library: ckeditor5/internal.admin.language class: Drupal\ckeditor5\Plugin\CKEditor5Plugin\Language toolbar_items: textPartLanguage: label: Language elements: - <span> - <span lang dir>
Changes would also have to be made to the relevant tests, notably Drupal\Tests\ckeditor5\FunctionalJavascript\AdminUITest and Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5Test
See also https://www.drupal.org/node/3283526#comment-15391076 →