Skip to content

Conversation

@MrHeer
Copy link
Contributor

@MrHeer MrHeer commented Dec 12, 2019

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
New tests added? not needed
Fixed tickets Fixes #1772
License MIT

Description

word wrap in TOC

@MrHeer MrHeer marked this pull request as ready for review December 12, 2019 16:02
Copy link
Contributor

@fxha fxha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MrHeer Thanks for your contribution! There is an issue with long words that are not wrapped but only at spaces. It would be also nice to add a settings option to wrap words or use a scrollbar, so the user can use the preferred one.

@MrHeer
Copy link
Contributor Author

MrHeer commented Dec 21, 2019

Thank you, I will add a settings option later.

@renehummen
Copy link

Would it be possible to shorten entries that exceed the TOC width (instead of adding the scrollbar option)? E.g. an "extra long heading example" would become "extra long hea...".

This would allow to keep TOC entries at a single line per heading (without the need for a scrollbar), while still giving sufficient context to a user who wants to jump to a specific position in the document.

@Jocs
Copy link
Member

Jocs commented Dec 27, 2019

Would it be possible to shorten entries that exceed the TOC width (instead of adding the scrollbar option)? E.g. an "extra long heading example" would become "extra long hea...".

I don't quite understand what you mean, just one line. If there are a lot of titles, scroll bars may also appear?

@Jocs Jocs merged commit 3f2e334 into marktext:develop Dec 27, 2019
@renehummen
Copy link

Would it be possible to shorten entries that exceed the TOC width (instead of adding the scrollbar option)? E.g. an "extra long heading example" would become "extra long hea...".

I don't quite understand what you mean, just one line. If there are a lot of titles, scroll bars may also appear?

@Jocs I will check TOC once this new feature becomes available in a (pre-)release and create a new issue with mockups to clarify what I mean in case this PR does not yet offer what I had in mind.

@MrHeer MrHeer deleted the word-wrap branch February 7, 2020 00:19
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.

[Feature Request] Add an option to enable word wrap in outline

4 participants