Live Preview: Add Support for tables (Render Tables as per "reading" view)

I found a way to deal with line breaks in tables manually and make the text in source view cleaner, in other words, match the preview mode.

It can be a solution before the feature proposed here is implemented.

Table in Preview Mode

image


Table in Source / Live Preview

image


The actual text of the table above

-tx-
|      Form      | Description                    |
|:--------------:| ------------------------------ |
|    `Normal`    | A normal line...               |
| Long Paragragh | This is a long paragraph: <br> |\
|                | Here is the second line <br>   |\
|                | Here is the third line         |


How?

  1. Install the plugin: alx-plugins/table-extended. It allows row span.
  2. In your custom css, add this line:
    .HyperMD-table-row br { display: none; } /* So <br> won't mess up your text*/
    
  3. Use <br> to force a newline.
2 Likes

I think this feature should be high on the list since it makes switching to obsidian kind of painful and I still have to look out for other apps and might end up using them at the end as much as obsidian or decide to use them more in some cases since switching is uncomfortable.

Giving an all in one solution will build a stronger community. I am really happy that you plan to add this, meanwhile I am forced to find a semi perfect workaround

thanks for the feedback and great state of obisidian so far! I appreciate that you take time to answer and have a responsive board.

5 Likes

It’s hard for me to imagine what could be more important than fully functional tables. This is literally one of the most critical function of all text editors. Microsoft 19 years, to not compete with Word and Excel, deliberately avoids adding Cells Merging function to OneNote, just one function, 19 years! By the way - incredibly important function, which can increase Obsidian audience like nothing else. And you’re say it not a priority? This is absurd.
Go back to the roots of “word processors”, in 90s business bought computers often just for spreadsheets and databases because it was new and most efficient way to sort some small text information. Nothing has changed since then, without tables to quickly store and sort numbers, links to notes and files, previews of pictures and so on - Obsidian literally crippled as niche soft. Voluntarily loses in the market of the most versatile text-file organizers.

4 Likes

Obsidan isn’t a table centric editor, actuallly most of markdown editor has problems with tables; this just mean it may not fit to everyone workflow.
About discussion which feature should be on dev list, there are only 2 persons (and cats) who do the development, and you could see which features they are currently working on the trello board which was posted a few posts before;
There are other features that are important to other users (I know it is hard to imagine) and devs have only limited amount of time; I also support tables and voted for it, but the constant nagging and criticising how bad is Obsidian without tables, doesn’t help at all; I apologize for being sarcastic but Obsidian isn’t Excel or Notion (and the former may fit much better @Tre’s table-centric workflow)

3 Likes

@echej Table-centric workflow? You don’t get it. Obsidian - one of so many markdown editors. Why it’s popular but 99% of others are not? Supreme customization through plugins and snippets! Take it away and no one will needed more static residue than in competitors. People want versatility and customization, and tables offer tremendous opportunities with both. That is why they will sooner or later be in all markdown editors, on the level of Typora implementation. The rest - lose competition as it is today in relation to Obsidian.
The problem with tables is not in some workflows but in diversity of a tool. Tables - the same tool as others, but there are more opportunities to use them, often or rarely, than in the case of other tools. All I want - to remind about it, like so many others people in this thread.

2 Likes

I think what @echej is meaning is that tables are not the reason why people are into obsidian in the first place but what @Tre is pointing out is that tables still are an important feature.

Just one way I can think of using tables beyond their normal functionality for information organisation in an obsidian centered way is creating one entry file where I list all my vaults markdown files in a table with different columns like ‘name’, ‘description’, ‘function’, ‘importance’ or whatever and being able to filter and sort them would be pretty neat in my opinion and adjust to the obsidian way of thinking pretty nice in my opinion.

Or creating a table for all headings of a file etc.

So even though it might be considered as an important feature we have to respect limited resources from obsidian and when we just look at the feature request board we can clearly see by unsolved and activity that tables is by far not the most requested features by obsidians! So screaming out louder and ranting on them is just respectless imo.

so what to do? We can support obsidian with giving our money or make our own plugin for this which shouldn’t be too hard I guess since a lot of editors already have this.

I’m quite convinced that with table support being so bad in markdown (as evidenced by litterally every other tool giving it a WYSIWYG experience even though they translate it to plain markdown afterwise), a lot of people who would otherwise have table in their workflow are just avoiding doing so because it is a pain. I also find myself walking around the issue writing two level bullet lists just because i know it will be faster than authoring and maintaining a table that will require back and forth between edit and rendered view just to ensure i wrote in the write cell.

I have similar problem with what could be a quick doodle to illustrate a problem, if i just had to take a pen and write in the editor and i could draw right into the note like a real notebook i would… but just because it means i need plugin (the same, setup in every computer synced with same options), creating an excalidraw drawing and embedding it into my note (or create macro and stuff to have it done), draw my doodle, then get back to the rest of my page… I find myself writing a paragraph of text explaining exactly what i would have put in the drawing, and then come up later if i have excess time to do the illustration.

Regardless of all the fancy idea about semantic tags and infinite canvas and mindmap that i fully hope to see one day, table is a very very very basic feature (because it perclude to the text editor, not even to PKM features) that is not covered, and it’s kinda putting ones head in the sand to prefer to pretend that it’s probably not in everyone’s workflow, it’s just not available and people learned to work around it.

If they didn’t see it that way they wouldn’t even have made the preview mode, and let people directly do the markdown in side-by-side view like before :wink: Maybe woule be great to have a vote feature to select the priorities between multiple new features

5 Likes

@tobei I like the idea of letting people vote which is the most important feature request. I would even be fine if supporters have little higher voting importance.

Lets make a feature request for this :slight_smile:

1 Like

I came up with a workaround for the issue, still not the best but might be sufficient enough for some cases lol

use the embed files syntax and open in typora or marktext or any other

image

It’s a pity that Joplin open .md only through import and resets merge cell layout after restarting. Although for the first import it show merging cells correct and has appropriate tool.

I would already be happy if the tables are rendered in Live Preview like they are in Reading Mode. And if you click on them that you see the code displayed above the rendered table, similar how it works for latex equations. I see the UI elements to control the table rows as something extra to be added by a plugin or so.

6 Likes

Yes, basic but temporarily sufficient implementation of tables in Logseq - modes instantly switch with mouse click on a table and maintained depending on text cursor position.

I think maybe a plug-in can temporary do that. Maybe around a code block and preview it like dataview, or button.

I think it can be pretty interesting with the table extended plug-in.

After the table edition in typora is very cool so I dream to saw that in Obsidian.

3 Likes

@Mara-Li you gonna make that plug-in?

If only I had this level of programming!

@Mara-Li I don’t know if it is as easy to make that plug-in as you say otherwise someone would have already done it, I think :grinning:

1 Like

Yeah, that would maybe even be better, just how it now works for dataview, switching between code and render. And the advanced table plugin has already buttons for these table operations.

I’m sure many of us would’ve come across @ganesshkumar new plugin (still not avail in community plugin). Posting here for reference. Maybe rendered table in live preview via plugin is more possible now?

1 Like

In 0.14.1, currently available to insiders, tables will render in live preview. I want to be clear that this is not cell-by-cell wyswyg editor. The whole table switches from reader view to code view and viceversa.

I will close this FR. If you are interested in cell-by-cell editor, follow this other FR https://forum.obsidian.md/t/live-preview-edit-table-cell-by-cell/34110.

Plugins that currently facilitate table input:

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.