wagtaildraftail icon indicating copy to clipboard operation
wagtaildraftail copied to clipboard

Default max level of indentation in the editor

Open tomdyson opened this issue 8 years ago • 5 comments

See screencast:

draftail-indent

tomdyson avatar May 17 '17 08:05 tomdyson

@tomdyson this is a matter of configuration of the editor, with a maxListNesting attribute (default = 1). This is what overriding the default would look like (proper documentation to come):

WAGTAILADMIN_RICH_TEXT_EDITORS = {
    'lots_of_nesting': {
        'WIDGET': 'wagtaildraftail.widgets.DraftailTextArea',
        'OPTIONS': {
            'enableHorizontalRule': True,
            'enableLineBreak': False,
            'maxListNesting': 5,
            'entityTypes': [
                DRAFT_ENTITY_TYPE_LINK,
                DRAFT_ENTITY_TYPE_DOCUMENT,
            ],
            'blockTypes': [
                DRAFT_BLOCK_TYPE_H3,
                DRAFT_BLOCK_TYPE_UL,
            ],
            'inlineStyles': [
                DRAFT_INLINE_STYLE_BOLD,
                DRAFT_INLINE_STYLE_ITALIC,
            ],
        }
    },
}

We will want this package to come with the most sensible config, so most people don't have to touch all of this – what do you think the default should be?

thibaudcolas avatar May 17 '17 09:05 thibaudcolas

Oh, great, thanks! I think the default should be unlimited, or a high number. I've just checked Dropbox Paper, which limits indents to the 7th level.

tomdyson avatar May 17 '17 09:05 tomdyson

👌 personally I don't like the idea of encouraging nesting, but aligning with other word editors is more important.

  • [x] Dropbox Paper, 7
  • [x] Medium, 0
  • [x] Google Docs, 8
  • [x] Pages, 8
  • [x] Word, 9

thibaudcolas avatar May 17 '17 13:05 thibaudcolas

Word - Office for Mac 2011 has a maximum of 9 (even in landscape)

jjanssen avatar May 17 '17 20:05 jjanssen

Let's go with 9 whenever we get to make the default config.

thibaudcolas avatar Jun 01 '17 21:06 thibaudcolas