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

Add indent and outdent toolbar buttons #555

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kmantel
Copy link

@kmantel kmantel commented Aug 7, 2023

Use commands 'tabAndIndentMarkdownList' and
'shiftTabAndUnindentMarkdownList' assigned to keyboard shortcuts.

Use commands 'tabAndIndentMarkdownList' and
'shiftTabAndUnindentMarkdownList' assigned to keyboard shortcuts.
@kmantel
Copy link
Author

kmantel commented Aug 7, 2023

Solves #232

@Ionaru
Copy link
Owner

Ionaru commented Aug 20, 2023

Thank you for the contribution!

It all looks good to me except for one small thing: the placement of the buttons when enabled is maybe a little strange. I'd expect them closer to (maybe next to?) the unordered-list and ordered-list buttons like they are in MS Word.

image

I'll leave the choice to you, just say "merge" and I'll click merge. :)

LGTM

@kmantel
Copy link
Author

kmantel commented Aug 20, 2023

Thank you for the contribution!

It all looks good to me except for one small thing: the placement of the buttons when enabled is maybe a little strange. I'd expect them closer to (maybe next to?) the unordered-list and ordered-list buttons like they are in MS Word.

image

I'll leave the choice to you, just say "merge" and I'll click merge. :)

LGTM

I just added everything to the end, so it wasn't a calculated choice. Do you mean this part setting the default toolbar?

https://github.com/kmantel/easy-markdown-editor/blob/4d35093129d6388a955ab85a473167b9f24e09a7/src/js/easymde.js#L1705-L1718

   'indent': {
        name: 'indent',
        action: indent,
        className: iconClassMap['indent'],
        noDisable: true,
        title: 'Indent',
    },
    'outdent': {
        name: 'outdent',
        action: outdent,
        className: iconClassMap['outdent'],
        noDisable: true,
        title: 'Outdent',
    },

I don't mind moving them between whatever elements you prefer.

@kmantel
Copy link
Author

kmantel commented Aug 21, 2023

And I have been using outdent to the left of indent like in that image, so I'll change that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants