RTE: cleanup imported document code

I am currently moving some content from Dokuwiki (dokuwiki [DokuWiki]) to Discourse. The Dokuwiki syntax is not clean markdown, therefore it needs manual editing. I normally use the old editor as I can see all characters there. But with the old editor I see strange “jumping effects”: when you mark a text block and try to format it, the cursor jumps up and down. Re-formatting of longer text is nearly impossible that way, as you always have to re-position your editing window again. It is hard to describe this, I could only show it with screencasts … The effect was describe earlier in Cursor jumping around in composer / editor text box

The RTE editor editor does not show this effect. But I am missing an option to clean up junky code imported from other systems …

1 like

Can you share what this junk code looks like?

1 like

How much? Tens, hundreds, thousands of posts?

If it’s more than a few, it probably makes sense to get an import script to do it. If it’s not that many, then it likely still would make sense to get some code to fix the markdown rather than trying to edit it by hand. (An even more wacky solution would be to have a plugin handle the docuwiki edditites).