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 character replacements for typing convenience & typographic correctness #113

Open
thibaudcolas opened this Issue Nov 24, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@thibaudcolas
Copy link
Collaborator

commented Nov 24, 2017

Initially discussed in #53 (comment).

[Dropbox Paper] does some character replacements (--- inside of other text becomes —, -- becomes –, smartquotes) which I'm not sure what to think of.

At this stage, this editor is still in active development – we are mostly playing catch-up with other editors feature-wise. For now we should review what other editors are doing out of the box with respect to character replacement. In particular:

  • MS Word
  • MS Word Online
  • Google Docs
  • Apple Pages
  • Dropbox Paper
  • Open Office
  • Tiny MCE
  • CKEditor
  • (others welcome)

MS Word

TODO

MS Word Online

TODO

Google Docs

  • Whenever " is typed, it replaces it with .
  • Except when it is entered right after a letter (anything that's not whitespace, when it replaces it .
  • It does not do this for pasted text, just when typing.

All of the replacement options are under Tools > Preferences:

  • Automatically capitalize words
  • Use smart quotes
  • Automatically detect links
  • Automatically detect lists
  • Suggest action items
  • Suggest contacts in comments

Replacements:

"    “ or ” after a non-space character
'    ‘ or ’ after a non-space character
# Pressing space after entering any of those
(c)  ©
(r)  ®
-->  →
...  …
1/2  ½
1/3  ⅓
1/4  ¼
1/5  ⅕
1/6  ⅙
1/8  ⅛
2/3  ⅔
2/5  ⅖
3/4  ¾
3/5  ⅗
3/8  ⅜
4/5  ⅘
5/6  ⅚
5/8  ⅝
7/8  ⅞
<--  ←
<==  ⇐
<=>  ⇔
==>  ⇒
c/o  ℅
tm   ™

Apple Pages

No character replacement at all.

Dropbox Paper

Same smartquotes behavior as Google Docs.

  • Automatically detect links
  • Automatically detect lists
  • @mentions

Replacements:

"    “ or ” after a non-space character
'    ‘ or ’ after a non-space character
# Pressing space after entering any of those
-- — (has to have a space before the first hyphen)
--- — (has to have a space before the first hyphen)
# Without pressing space
--- <hr/>
-->  →
<--  ←
...  …

Open Office

TODO

Tiny MCE

TODO

CKEditor

TODO

Edit: optionally have a way to opt-out directly in the editor? Word-style "stop converting these".

@thibaudcolas thibaudcolas added this to the Nice to have milestone Nov 24, 2017

@thibaudcolas thibaudcolas changed the title Proposal: add character replacements for typing convenience & typographic correctness Add character replacements for typing convenience & typographic correctness Dec 1, 2017

@thibaudcolas thibaudcolas modified the milestones: Nice to have, Post v1.0.0 Dec 1, 2017

@BrendanMartin

This comment has been minimized.

Copy link

commented Nov 30, 2018

I have a Wagtail site and was looking for the em/en dash and arrow shortcuts, but seems like they don't work when using --, ---, and -->, respectively. Is this still in development?

@thibaudcolas

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 30, 2018

@BrendanMartin this is just an idea at this stage. If you want to help, the original description states what are the next steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.