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

Numbered and Bullet point indented lists display oddly when using multiple levels of indentation #3685

Closed
jediblair opened this issue Aug 29, 2022 · 4 comments

Comments

@jediblair
Copy link

Describe the Bug

When using multiple levels of indent in numbered or bullet lists, where we jump an extra indent level from the previous line, we seem to see excess bullet/numbers leading up to the indent.

This behavior seems to occur on the sandbox environment.

Steps to Reproduce

add a multiple level bullet point list, skipping one of the levels of indent, and it will show excess bullets.

Expected Behaviour

text should just be indented to the correct level without the leading bullet points.

Screenshots or Additional Context

image

Browser Details

Chrome 104

Exact BookStack Version

v22.07.3

PHP Version

8.1

Hosting Environment

Ubuntu 22.04

@ssddanbrown
Copy link
Member

Thanks for reporting @jediblair.

I can confirm there's currently a difference between display of this in-WYSIWYG editor and on page-view which I'd see as the primary issue here.

Not totally sure what the correct display of multi-level nesting should be, think there's an argument to still show other list markings, but force nested levels to their own line. Will need to play with other platforms and play with nested markdown list behaviour to decide on an approach.

@ssddanbrown
Copy link
Member

Relevant TinyMCE issue: tinymce/tinymce#6826
What I believe is relevant TinyMCE code: https://github.com/tinymce/tinymce/blob/124bb72f8d5ac9daa21a5b2bb9e866a47c06e6b9/modules/tinymce/src/plugins/lists/main/ts/core/NormalizeLists.ts#L21

Going to be a pain to work against TinyMCE here. Commonmark does not seem to understand nested (empty) lists either.

@patbcc
Copy link

patbcc commented Sep 12, 2022

I've been hitting this issue as well. The issue only seems to occur when using the increase indentation button. Using the indent button on an ordered list gets the weird behavior described above. However, manually adding something like style="padding-left: px;" to the <ol> element works just fine. Given the not so pretty nature of the HTML code, this workaround can be a bit of a chore.

@ssddanbrown
Copy link
Member

This has now been addressed in d933fe5 by accepting the editor's default formatting option for list elements. Will be part of the next feature release. Note: this is on formatting detail, or list structure option, that would be lost if you ever switch the editor to markdown (Clean content).

If additional margin is desired for all nested lists, it would be better to approach this via style overrides instead.

@ssddanbrown ssddanbrown added this to the Next Feature Release milestone Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants