Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
i've installed module with dependencies and correct libraries entry.
on switching between source and rendered output <i class="icon-twitter"></i> Twitter
becomes <p>Twitter </p>
the module has no UI I can see but the report page says its installed and there are no errors but i can't see it listed as a css file in the browser debugger.
Comment | File | Size | Author |
---|---|---|---|
#3 | drupal_8_editor_stripping_tags-2925519-3.patch | 1.51 KB | Daniel.Moberly |
Comments
Comment #2
Syntapse CreditAttribution: Syntapse as a volunteer commentedComment #3
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedVery true. Unfortunately this is the way the Drupal editor works out of the gate - you have to include a character in the tag normally to keep it in place. For example
<i class="fa fa-flag"> </i>
will keep the tag visible. However, this is very counter-intuitive for normal users, as they are expecting to simply use the tags, especially since that is how they are demonstrated on the fontawesome site.
Introducing a patch to prevent both
<i>
and<span>
tags from being stripped when empty in the Drupal CKEditor.Comment #4
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedComment #6
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedComment #7
Syntapse CreditAttribution: Syntapse as a volunteer commentedadding the nbsp; worked ok but still not displaying font-awesome. cant see any errors in the report.
Comment #8
Syntapse CreditAttribution: Syntapse as a volunteer commentedapplying patch has broken my site...
Comment #9
Syntapse CreditAttribution: Syntapse as a volunteer commentedmoved this comment to a new issue.
Comment #10
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedAre you applying the patch against dev or live? The dev version should already have this patch included as it has been committed.
Comment #11
Syntapse CreditAttribution: Syntapse as a volunteer commentedComment #12
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedComment #13
Daniel.Moberly CreditAttribution: Daniel.Moberly commentedReleased in 8.x-1.3
Comment #15
selwynpolit CreditAttribution: selwynpolit commentedWhen using basic HTML text format and limiting allowed HTML tags, CKeditor continues to strip out
<i>
tags even if you add<i class="">
to the allowed HTML tags. I found a workaround that will hopefully help others at https://drupal.stackexchange.com/questions/198783/ckeditor-strips-i-tagsTLDR;
change the Fontawesome Admin>Configuration>Font Awesome settings>Font Awesome Tag from “i” to “span” and add
<span class="">
tags to allowed HTML tags. This way Fontawesome won't use<i>
tags but will rather use<span>
and you can get ckeditor to not strip those out.