Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markdown table could not display when imported #2026

Closed
kkonghao opened this issue Jun 19, 2021 · 15 comments
Closed

markdown table could not display when imported #2026

kkonghao opened this issue Jun 19, 2021 · 15 comments

Comments

@kkonghao
Copy link

import result is:
image

@zadam
Copy link
Owner

zadam commented Jun 21, 2021

Hi, Trilium uses CommonMark parser. Tables in Markdown are not standardized and (I assume) therefore not supported by this library.

@b3taman
Copy link

b3taman commented Aug 24, 2021

Is it possible to add the ckeditor5-markdown-gfm plugin? Their example at https://ckeditor.com/docs/ckeditor5/latest/features/markdown.html includes a table. Since it is GitHub Flavoured Markdown, lots of people will be very happy.

@zadam
Copy link
Owner

zadam commented Aug 24, 2021

That's a different thing. Import (and conversion) happens on the backend, CKEditor is not involved in the import process.

@b3taman
Copy link

b3taman commented Aug 26, 2021

Thank you for the reply [especially thank you for creating this — I have been using it for a few days and see enormous potential for positive impact in my life].

I understand; perhaps this should be the start of a new thread, because it has shifted to using the editor and is no longer about importing MD-formatted files.

If the ckeditor5-markdown-gfm plugin were to be used, then I assume the following would hold:

  1. The ability to use full GitHub MD syntax.
  2. The ability to switch between interpreted ("WYSIWIG") mode and "raw" mode. In the latter you would see the actual markdown code.

Both would be extremely useful. Is it possible?

@zadam
Copy link
Owner

zadam commented Aug 26, 2021

I don't plan to do this. Trilium is not meant to be Markdown editor. Having Markdown option would mean doing a lot of things twice, various incompatibility issues etc.

@b3taman
Copy link

b3taman commented Aug 27, 2021

Your call, obviously. I guess I misunderstood the scope of second and the second-last bullets under Features at the GitHub page.

It looks like Trilium is a fantastic fit for so much I would like to do, so I guess I'll be discovering more as I go along.

Thanks for your work on it.

@pcause
Copy link

pcause commented Oct 23, 2021

There seem to be a number of libraries that will convert commonmark but also gfm, handle tables and other things. Looking at the code for importer, seems these could drop in without huge amount of work. The dialogue for import would need to have an option on which to pick if you allwed multiple, or if one, which options to enable. These seemed widely used/promising:

markdown-it
showdown
marked

@olunju
Copy link

olunju commented Jan 19, 2022

Hi, Trilium uses CommonMark parser. Tables in Markdown are not standardized and (I assume) therefore not supported by this library.

Hi! zadam , I was looking for someone with a similar problem and I saw this, When exporting as markdown file, the code block is not wrapped with ' ``` ', is this normal?

@zadam
Copy link
Owner

zadam commented Jan 19, 2022

According to common mark it is possible to either use ``` or four spaces. The converter uses four spaces.

@olunju
Copy link

olunju commented Jan 20, 2022

According to common mark it is possible to either use ``` or four spaces. The converter uses four spaces.

sorry, I always thought only use ```

@antoniotejada
Copy link

antoniotejada commented Apr 25, 2022

I wasted some time debugging why table importing wasn't working, so I added a note to the wiki https://github.com/zadam/trilium/wiki/Markdown/3686af75918ba299fb47a16b3245ef2006a508fb

For reference this is Commonmark's position regarding tables

@samchugit
Copy link

According to common mark it is possible to either use ``` or four spaces. The converter uses four spaces.

sorry, I always thought only use ```

It's not a trilium problem, but I got a workaround by modifying some source code and needs to recompile. See #2963.

@olunju
Copy link

olunju commented Jul 6, 2022

It's not a trilium problem, but I got a workaround by modifying some source code and needs to recompile. See #2963.

Thank you for your reply. Maybe I will try it

@livingfree2023
Copy link

still hoping to have table markdown to take notes from ChatGPT

zadam added a commit that referenced this issue Jul 15, 2023
@zadam
Copy link
Owner

zadam commented Jul 15, 2023

support for tables will be in 0.61

@zadam zadam closed this as completed Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants