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 …
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).
Its not that many, but maybe enough, to think about a script-based/programatic solution. The tricky thing is that the code is dokuwiki syntax ( wiki:syntax [DokuWiki] ) plus enhanced UI code from a bootstrap3 template (https://getbootstrap.com). It looks nice but I did not have content migration in mind when I’ve setted it up this way. The main issue is not the dokuwiki syntax, but the bootstrap
… stuff. Code example:
<div class="level1"> </div> <h2 class="page-header pb-3 mb-4 mt-5">Plattenplatz ermitteln</h2> <div class="level2"> <p>Filtern auf ext4, was ist verfügbar?</p> <pre class="code"> root@tokoeka ~ # df -h -t ext4 --total Filesystem Size Used Avail Use% Mounted on /dev/mapper/pve-root 196G 39G 148G 21% / /dev/md0 486M 400M 57M 88% /boot /dev/mapper/pve-data 3.0T 560G 2.3T 20% /mnt/data /dev/mapper/pve-backup 414G 40K 393G 1% /mnt/backup total 3.6T 598G 2.8T 18% - </pre> <p> </p> <p>Filtern auf ext4, was wird genutzt?</p> <pre class="code"> root@tokoeka ~ # df -h -t ext4 --output=used Used 39G 400M 560G 40K 598G </pre> <p> </p> </div>