- Issue created by @Anybody
- ๐ฉ๐ชGermany Anybody Porta Westfalica
Sorry, I had to correct the details as I wrongly used "Basic HTML" in my reproduction. Should have been "Full HTML".
Basic HTML works as expected, as<i>
was not allowed there!For Full HTML I'll now try, if entering
- ๐ฉ๐ชGermany Anybody Porta Westfalica
For Full HTML I'll now try, if entering in "Source Editing" fixes this.
No, that doesn't change anything. The
<i>
is always wrapped into<em>
when leaving the "Source" editing. #2722451: tags without content are stripped by CKEditor even with "Full HTML" (i.e. without ACF) โ reappeared as ๐ [upstream] [GHS] CKEditor 5 removes empty inline elements Fixed .
Is this intrinsic to Drupal or is it CKEditor behavior?
- ๐ฉ๐ชGermany Anybody Porta Westfalica
Is this intrinsic to Drupal or is it CKEditor behavior?
Seems to be Drupal-specific!
https://ckeditor.com/docs/ckeditor5/latest/features/source-editing.html
Trying that here leads to expected results:<p> <i class="fa fa-drupal">Drupal</i> </p>
- Status changed to Postponed: needs info
almost 2 years ago 2:36pm 13 February 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
- Is this reproducible in if you explicitly allow
<i>
? - Any chance you could write a test for this? ๐ ๐
This is related to ๐ [upstream] [GHS] CKEditor 5 removes empty inline elements Fixed but is definitely a different problem.
I'm 99% certain this is caused by
DrupalEmphasisEditing
โ seecore/modules/ckeditor5/js/ckeditor5_plugins/drupalEmphasis/src/drupalemphasisediting.js
. - Is this reproducible in if you explicitly allow
- ๐ฉ๐ชGermany Anybody Porta Westfalica
Any chance you could write a test for this? ๐ ๐
I'd very much like to, but currently missing spare time. I'll add an entry for our team, hopefully someone has some time to do it. Do you know a similar example to copy as a quick start? Especially for the CKEditor setup and interaction? That would speed things up a lot, I think.
I'll also ask to test 2. but if ANYONE coming here can do it, please do it and don't wait!
- Status changed to Needs work
almost 2 years ago 12:38pm 23 February 2023 - ๐ง๐ชBelgium wim leers Ghent ๐ง๐ช๐ช๐บ
Thank you!
Actually, 99% of what you need is already provided by
\Drupal\Tests\ckeditor5\FunctionalJavascript\EmphasisTest
โ you just want to explicitly test with .Basically, you want to copy
\Drupal\Tests\ckeditor5\FunctionalJavascript\EmphasisTest::testEmphasis()
, rename ittestEmphasisWithoutFilterHtml()
and modify the text format config entity'sfilter_html
to be disabled. That should reproduce it ๐คI think that'll help you get started! ๐ค
- ๐ฎ๐ณIndia karamveersingh
we also facing a similar issue on Ckeditor5 and would like to know a fixed solution. Do we've to downgrade it to 1 version means Ckeditor4?
- ๐ฉ๐ชGermany Anybody Porta Westfalica
@Wim Leers: FYI: Thanks for #12! We'll do it, but we didn't have the time yet. If anyone can do this earlier, I'd of course appreciate that. Sorry.
- ๐บ๐ธUnited States jcandan
This is bothersome. Any workarounds until a patch can be made?
Note: Additionally, when no element content is supplied, the
<i>
tag get filtered out completely.<p> <i icon-name="menu"></i> </p>
Becomes
<p></p>
- ๐บ๐ธUnited States jcandan
In an attempt to work around, I tried to use an
<svg>
. But, it gets pushed outside the<a>
it's in. Unrelated to the issue described above, but also annoying. - @ravishankar opened merge request.
ravi.shankar โ made their first commit to this issueโs fork.
- First commit to issue fork.
- last update
over 1 year ago 29,386 pass, 1 fail - last update
over 1 year ago Custom Commands Failed - ๐ฉ๐ชGermany Grevil
Tried adding a failing test, to show the problem, but it succeeds...
- last update
over 1 year ago 29,385 pass, 3 fail - last update
over 1 year ago 29,386 pass, 1 fail - ๐ฉ๐ชGermany Anybody Porta Westfalica
@Grevil: testEmphasisWithoutFilterHtml is failing as expected, but we should be sure the result is what we expect. Could you please check the test result again? Could we perhaps explicitly compare the expected result so the test shows XX expected, actual result YY?
Thanks for picking this up for me!
- ๐ฉ๐ชGermany Grevil
Unfortunately, this is NOT the "expected" failure...
I'll have a look later.
- ๐ฉ๐ชGermany Grevil
Found the problem, I forgot to copy over all changes, as I am still struggling to set up a proper dev environment for core issues...
- last update
over 1 year ago 29,396 pass - ๐ฉ๐ชGermany Grevil
Now, comment #22 ๐ (iconfont icon) wrapped into with "Full HTML" Needs work should apply, and the test will succeed (but it is expected to fail).
- last update
over 1 year ago 29,400 pass - ๐ฉ๐ชGermany Grevil
I adjusted the test accordingly, it should fail now.