zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.34k stars 1.92k forks source link

Unordered Lists Invisible #3888

Open brootas opened 1 year ago

brootas commented 1 year ago

I'm attempting to migrate my notes from WikidPad to Trilium because I can no longer use WikidPad with wine on MacOS.

I have about 500 notes. I was able to get them all imported and had to rebuild the tree hierarchy by hand because that didn't seem to translate between the two apps. Not a problem, but I realized after that process that there are many sections of my notes that are invisible.

I can see in 'Code -> Plain Text' view that the information is there, albeit between <ul> and </ul> tags. When I look in regular 'Text' view in Trilium, anything between those tags is gone. (I tried other views as well, like 'HTML', 'Web', etc., but these did not work either.)

I have lots of notes, so editing them all by hand isn't an option for me.

Is there a way to be able to see my full notes, including the unordered lists portions in Text view?

Thanks!

I am using Version 0.59.4.

Here is my log: trilium-2023-04-28.log

zadam commented 1 year ago

Without seeing the notes I can only guess - they contain complex HTML which CKEditor doesn't understand. Alternatively they contain inline styling which makes the content disappear.

You could try running it through some HTML processor to simplify the content / strip the inline styles.

brootas commented 1 year ago

The html processor idea was helpful. I noticed that Trilium prefers to use <p margin...> tags, so wrote a python script that keeps track of how many levels of indentation, and replaces the <ul> tags with more or less margin for each paragraph accordingly.

It imported well!

Alternatively, I discovered that if I renamed all of the .wiki files to .md, zipped them all, and disabled the 'Import HTML, Markdown, and TXT as text notes....' option while importing, it makes a nice plain text import straight from the original WikidPad files (no fancy exporting needed).

I poked around and didn't see anything in the Appearance settings that would allow my to turn the line numbers on or off in text/markdown view. That would be a beneficial feature for me.

Thanks for your helpful ideas!

Maybe this will help recovering WikidPad users to migrate to Trilium in the future. 🤞🏻