Disable automatic reizing of tables?

Hi

Everytime I change to a different not and come back to a note with tables, the tables in the current note are resized or shrunk to some min size. Is there a way to stop this behavior? I would like absolute width, or whatever sizing I do to the table to stay in place.

thanks

I assume (by way of your other post) that you mean the tables in the richtext editor?

You can set it to a fixed width by editing userstyle.css:

.mce-item-table {
    width: 50%;
}

You won't be able to have it sized according to what you set in the richtext editor though because markdown (gfm extension) doesn't have syntax for table sizes on an individual basis.

1 Like

Thanks for the reply. I guess I meant the WYSIWYG editor. It is definitely not a what I see what I get editor, because of this table issue.

I will try the absolute size option.

Is it possible to make it always resize to the current page size/borders are?

The width is a percentage, if you specified it in px then it is an absolute fixed width, if you set it to % then it is responsive and sizes according to the space it has. So in this case just change it to 100%.

1 Like

Thanks, that is an improvement for me. I hope that the developer of this extension sees this post.

thanks

It isn't quite that simple. The richtext editor uses an editor called TinyMCE which is an editor that creates its output in HTML. Joplin is then converting that HTML to markdown when it saves the data which is why you see the format change when you reload the page or switch notes as it creates the HTML again from the saved markdown.
By its very nature markdown is more limited than HTML so TinyMCE offers additional stlying options which are perfectly easy to do in HTML but simply don't have markdown tags that can do the same, for example there is no markdown option to change the colour of some text, it has to be done in the CSS file which isn't very specific and can't easily differentiate between two markdown items of the same type.

The way the table is displayed is otherwise (mostly) the same as the default renderer where the tables are resized automatically which is a desirable style for many people.

1 Like

So, the choice of Markdown was not perfect for a idea capturing note-taking app given we need media rich pages sometimes. Would not have been better to rely on html and render markdown as html when needed? Please bear in mind I am not a developer, I am just facing markdown related limitations as a user regularly not just in Joplin but in other markdown note-taking apps too.

How about the regular markdown editor? That one does not seem to respect the css settings you recommended when it comes to tables. It shrinks the tables unfortunately.

It is a topic that has come up a few times before but currently the intention seems to be to stay with markdown as the base rather than having to deal with full HTML. There are definitely some issues with the richtext editor integration which have been noted before (and was on this year's GSoC ideas list for improvement).

Joplin does have an HTML note type which it uses to import enex files without losing formatting or to scrape websites fully without conversion to markdown but it isn't user accessible - I wonder if there is any merit in exploring the concept of providing a "soft locked" note where if you chose to keep it in HTML then the markdown editor is disabled until you explicitly choose to convert it.

Its a completely different selector as it isn't anything to do with TinyMCE.

table {
	width: 100%;
}
1 Like

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