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

Markdown toolbar: auto-continue ordered and unordered lists #17716

Open
Tracked by #14807
aitchiss opened this issue May 18, 2022 · 1 comment
Open
Tracked by #14807

Markdown toolbar: auto-continue ordered and unordered lists #17716

aitchiss opened this issue May 18, 2022 · 1 comment
Labels
area: publishing experience issues related to an authors experience publishing. Tags, series, etc.

Comments

@aitchiss
Copy link
Contributor

aitchiss commented May 18, 2022

The markdown toolbar currently has formatters for both ordered and unordered lists. Clicking the button will convert any highlighted text into a list by inserting - or e.g. 1. before each item. If no text is highlighted then an empty list is started.

We'd like to enhance this functionality by ensuring that as a user types their list, and presses Enter, we automatically insert the next line of list formatting.

Example: ordered list

Given the following text exists, with the cursor at the end of "Line 2":

1. Line one
2. Line two

If the user now types Enter, they should see:

1. Line one
2. Line two
3. 

And their cursor should be positioned after the 3.

Example: unordered list

Given the following text exists, with the cursor at the end of "Line 2":

- Line one
- Line two

If the user now types Enter, they should see:

- Line one
- Line two
- 

And their cursor should be positioned after the -

"Cancelling" the list formatting

We want an easy way for users to "escape" the list formatting - after we "auto insert" the next line of list formatting, if a user presses Enter again without adding any list item, we want to clear the formatting we inserted.

To continue the example above, given we have inserted 3. below:

1. Line one
2. Line two
3. 

If a user immediately presses Enter again, the 3. is cleared, leaving:

1. Line one
2. Line two

With the cursor remaining on the empty line under "Line two"

@github-actions
Copy link
Contributor

Thanks for the issue, we will take it into consideration! Our team of engineers is busy working on many types of features, please give us time to get back to you.

Feature requests that require more discussion may be closed. Read more about our feature request process on forem.dev.

To our amazing contributors: issues labeled bug are always up for grabs, but for feature requests, please wait until we add a ready for dev before starting to work on it.

To claim an issue to work on, please leave a comment. If you've claimed the issue and need help, please ping @forem-team. The OSS Community Manager or the engineers on OSS rotation will follow up.

For full info on how to contribute, please check out our contributors guide.

@aitchiss aitchiss changed the title Automatically add <code class="notranslate">n+1 number or <code class="notranslate">- for lists when hitting <code class="notranslate">Enter` key Markdown toolbar: auto-continue ordered and unordered lists May 18, 2022
@aitchiss aitchiss added area: publishing experience issues related to an authors experience publishing. Tags, series, etc. internal team only internal tasks only for Forem team members and removed internal team only internal tasks only for Forem team members labels May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: publishing experience issues related to an authors experience publishing. Tags, series, etc.
Projects
None yet
Development

No branches or pull requests

1 participant