Rich text editor erases HTML tags from post

If you use the markdown editor and include some raw HTML tags (e.g. br tag for table formatting), then edit the post using the rich text editor, the HTML content is lost. I don’t know if this is the case for all allowed HTML tags, but at the very least it happens for br tags. This may not be a big deal for regular posts since most users presumably stick with one type of editor, but for wiki posts this is a major issue. Over on WaniKani, we have a massive wiki post with several tables that rely on br tags for structure. However, if someone happens to edit the wiki in rich text mode, all br tags are removed, ruining the formatting of the post.

(Secondarily, there doesn’t seem to be an easy way to revert to a previous version of the wiki. If that was available, at least some of this pain would be mitigated. I can write up a feature request for that as well if the feature doesn’t already exist.)


Markdown editor:

Rich text editor:

1 Like

Use this post to see what I mean. I don’t think I can make this post a wiki myself, but admins/mods should be able to try it. (If not, it’s easy to reproduce.)

Column 1 Column 2
Text 1a
Text1b
Text 3a
Text3b
Text 2a
Text2b
Text 4a
Text4b
2 Likes

Confirmed this is a bug in our table editor, the content in cells is considered inline, but really we would need to treat it as a type of block to keep the <br> mapping going.

@renato any thoughts here, it is an edge case, but I agree it would be nice to support it.

1 Like

Just to confirm, by table editor do you mean specifically the table editor popup or some edit logic for tables in the general post editor? Because I’m referring to the post editor itself.

post editor … rich text editor does not support this at the moment, there is no workaround for it.