participedia / frontend

DEPRECATED - see https://github.com/participedia/api/ instead
MIT License
2 stars 2 forks source link

Editing tools: shortcuts #779

Open scottofletcher opened 6 years ago

scottofletcher commented 6 years ago

Create/design keyboard shortcuts for editing functions OR allow html elements. Can be admin-only or user-facing.

Shortcuts I need (ie. that will save me a lot of time in my editing work) (keyboard combinations are just examples taken from Google Docs)

  1. insert link/link selected text Ctrl + k
  2. insert footnote/endnote Ctrl+Alt + f
  3. Heading 1 Ctrl + Alt + 1 (Heading 2 Ctrl + Alt + 2 etc.)
  4. bold Ctrl + b, italic Ctrl + i, underline Ctrl + u
  5. undo & redo (these already work)
  6. copy & paste (these already work)

Html elements - preferably the <></> kind rather than the markdown GitHub versions (which I find difficult to pick out in the text and which are annoying if you actually want a word to have asterisks at the beginning and end without spaces)

dethe commented 6 years ago

It looks like the editing control we use now supports hotkeys for bold, italic, underline, those are working for me on both Windows and Mac, in Firefox and Chrome. I'll look at how difficult is may be to add hotkeys for headings and links.

I looked at several editing widgets that work with our existing framework (React) and couldn't find any that supported endnotes, but will keep looking.

scottofletcher commented 6 years ago

Thanks Dethe! I got another email yesterday from one of our RAs asking about endnotes and hotkeys so it's definitely something that would get used.

dethe commented 6 years ago

Do you know of any non-wikipedia pages with rich text editing that support endnotes? I can only think of one, but it uses only Markdown for editing, (i.e,, italics, bold, etc.).

I haven't found any editors yet that support endnotes, but will keep looking (or get @lydia to look).

I am reminded once again of my prediction that version 4 of Participedia will be "just use MediaWiki," the engine behind wikipedia.

scottofletcher commented 6 years ago

I don't know of any but if the only one that supports endnotes uses Markdown, that's fine, I'll just have to introduce our editors and RAs to it.

We can't use MediaWiki for this version?

scottofletcher commented 6 years ago

I don't know what this is or if it's at all helpful: https://github.com/peritext/scholar-draft

dethe commented 6 years ago

That looks promising, but it's lack of demo, and text like "WIP" (work in progress) and "Not Updated" scares me.

lydia commented 6 years ago

I suspect you've got the wrong lydia @dethe ;)

dethe commented 6 years ago

Oops, sorry about that!

On Tue, May 22, 2018 at 7:25 PM, Lydia Fernandez notifications@github.com wrote:

I suspect you've got the wrong lydia @dethe https://github.com/dethe ;)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/participedia/frontend/issues/779#issuecomment-391200006, or mute the thread https://github.com/notifications/unsubscribe-auth/AABBuZ8-sOCyCLkj01PtNoOf45HwyZwMks5t1MiugaJpZM4TVi6E .

ascott commented 5 years ago

the new editor has binding support for B, I, U, undo, redo, copy, paste.

will need extend Quill's keyboard bindings to add shortcuts for H1, H2, H3, Link and Footnote. will assign to myself for post-launch.