Can't underline in forum post
I just posted a list with underlined items to the CAC team forum (screenshot attached) that rendered the underline in the preview but then just showed <span> underline tags once published. Not sure if that's the case with italics too, but bold seemed to come through fine. I've already gone back and edited the original post so it's more readable.
#3 Updated by Raymond Hoh about 1 year ago
Colin, how did you add the
<span style="text-decoration:underline"> tag? There is no button to underline in the visual editor or code editor. Did you write it yourself in the code editor? Or did you press CTRL+U in the visual editor?
Technically, bbPress does not allow the
<span> element to be rendered for regular users. Only super administrators can bypass this, but Colin's account isn't an administrator, so the underline shouldn't have even shown in the live preview.
However, if you used the CTRL+U approach, you would see the underline in the textarea, but not in the live preview. See attached screenshot. Maybe this is what you meant, Colin?
should it use em instead?
<em> is already used for italics by the bbPress
If we want to allow underlining (and also bring back the underline button), we would have to enable the <span> element and also the
style attribute in bbPress. Adding the
style attribute would allow users to write any inline styles in their content. Is this something we want to allow?
Or we could write our own custom underline button with the following markup --
<span class="underline"> and enable the
class attribute. This would allow underlining and we wouldn't have to open up inline styles.
#4 Updated by Colin McDonald about 1 year ago
Sorry everyone, I used CTRL+U and the underlines came through in the editor, but they must not have in the preview, and then it was too late once I hit publish to know the spans would come through. I don't think it's worthwhile to enable spans in all cases just to get underlining back (I don't often use it myself, but must have just been feeling adventurous that day...).
#5 Updated by Raymond Hoh about 1 year ago
- Status changed from New to Staged for Production Release
(I don't often use it myself, but must have just been feeling adventurous that day...)
I was feeling adventurous so I decided to add the Underline button :)
The Underline button uses the following markup:
<span class="bbp-underline">Test</span> instead of
The button is available in both the Visual Editor or the Text Editor.