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

Desktop: Configure tinymce to handle the first table row as header #10059

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Desktop: Configure tinymce to handle the first table row as header #10059

merged 1 commit into from
Mar 5, 2024

Conversation

marph91
Copy link
Contributor

@marph91 marph91 commented Mar 5, 2024

This was once implemented in #8163, but got accidentally reverted in #8393. Related forum discussion: https://discourse.joplinapp.org/t/how-do-i-create-tables-with-headers-in-rich-editor/35610

This PR doesn't change anything on the UI. Only the tables are inserted with header row by default.

Previously, the header could be only added by switching away and opening the note again. The default table doesn't have a header.
@laurent22
Copy link
Owner

Do you have a screenshot or video of how it will look?

@marph91
Copy link
Contributor Author

marph91 commented Mar 5, 2024

Sure:

joplin_table_with_header.mp4

@laurent22
Copy link
Owner

That's great, thank you for this change!

@laurent22 laurent22 merged commit be2f4d3 into laurent22:dev Mar 5, 2024
10 checks passed
@MMachado05
Copy link

MMachado05 commented Mar 6, 2024

Thank you so much! While I don't usually have this use case, does this still allow for headerless tables when in the RTE? I'm assuming that was implemented because it was a requested feature, at some point.

Also, please let me know if it's improper to comment on a merged PR like this! 😬

@marph91
Copy link
Contributor Author

marph91 commented Mar 8, 2024

I guess a forum post or a new github issue would be more suited, since headerless tables are a new topic with some more challenges: We would need to check if headerless tables are in the markdown spec and if we want to support them at all. In fact, many don't support it: https://stackoverflow.com/a/17543474/7410886.

If they should be supported, someone would need to implement the switch logic, check the markdown <-> HTML conversions and figure out all edge cases. Right now, there are some inconsistencies, like a headerless table will get a table with header if you edit any cell in the RTE and switch back to markdown.

I don't use headerless tables either. I guess they were only implemented, because it's the default behavior in TinyMCE.

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

Successfully merging this pull request may close these issues.

3 participants