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

[MT-4449] Autoformat #64

Merged
merged 31 commits into from
Jan 12, 2022
Merged

[MT-4449] Autoformat #64

merged 31 commits into from
Jan 12, 2022

Conversation

aspirisen
Copy link
Contributor

@aspirisen aspirisen requested a review from e1himself December 28, 2021 15:08
@aspirisen aspirisen self-assigned this Dec 28, 2021
@linear
Copy link

linear bot commented Dec 28, 2021

MT-4449 Editor - Detect ordered and unordered lists, headings and quotes

From Productboard from @jesse :

if you start typing certain characters like: * or - or 1.

--

General rules

I found two patterns on what happens if you create a list by typing */-/1./>/#/## + space and then press the Backspace key, and this indeed will solve the issue you pointed about achieving having the shortcut characters as regular text.

Notion and Craft will remove everything, both the format and the introduced characters will disappear from the line. This is very frustrating.

Google Docs and Coda will remove the formatting, you get a regular, unformatted */-/1./>/#/## content and you can continue typing an unformatted line. This is what I found most useful and will allow users to choose the desired output: https://cln.sh/ArqoHP. This is how it should behave.

List of shortcuts

  • 1. → Ordered list
  • - → Unordered list
  • * → Unordered list
  • > → Quote
  • # → Heading 1
  • ## → Heading 2

@e1himself e1himself added the Type - Feature New feature or request label Dec 28, 2021
@e1himself e1himself changed the title MT-4449: Autoformat [MT-4449] Autoformat Dec 28, 2021
…oformat

# Conflicts:
#	package-lock.json
#	packages/slate-commons/src/commands/index.ts
#	packages/slate-commons/src/types/Extension.ts
#	packages/slate-editor/package.json
#	packages/slate-editor/src/modules/editor-v4/getEnabledExtensions.ts
#	packages/slate-editor/src/modules/editor-v4/types/index.ts
# Conflicts:
#	packages/slate-editor/src/modules/editor-v4/getEnabledExtensions.ts
@digitalbase
Copy link

hi @aspirisen what is the state of this PR?

Copy link
Contributor

@e1himself e1himself left a comment

Choose a reason for hiding this comment

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

@aspirisen
Copy link
Contributor Author

@digitalbase going to be merged

@aspirisen aspirisen merged commit daa844a into master Jan 12, 2022
@aspirisen aspirisen deleted the feature/MT-4449-autoformat branch January 12, 2022 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type - Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants