Comments (17)
Updated this to be the main issue for keyboard shortcuts - this needs lots of research about what shortcuts we can safely use (Cross-browser) and what actions we can perform on our Markdown using the CodeMirror API.
I would suggest that we try to replicate as many of the Mou formatting shortcuts as we can, to begin with, and see how it goes.
from ghost.
Fo reference this is the Mou shortcuts;
Actions
- Copy HTML: Option + Cmd + C
- Strong: Select text, Cmd + B
- Emphasize: Select text, Cmd + I
- Inline Code: Select text, Cmd + K / Ctrl+Shift+K (Ctrl+K is reserved)
- Strikethrough: Select text,
Cmd + UCtrl+Alt+U - Link: Select text, Control + Shift + L
- Image: Select text, Control + Shift + I
- Select Word: Control + Option + W
- Select Line: Shift + Cmd + L
- Select All: Cmd + A
- Deselect All:
Cmd + D - Convert to Uppercase: Select text, Control + U
- Convert to Lowercase: Select text, Control + Shift + U
- Convert to Titlecase: Select text, Control + Option + Shift + U
- Convert to List: Select lines, Control + L
- Convert to Blockquote: Select lines, Control + Q
- Convert to H1:
Cmd + 1Alt+1 - Convert to H2:
Cmd + 2Alt+2 - Convert to H3:
Cmd + 3Alt+3 - Convert to H4:
Cmd + 4Alt+4 - Convert to H5:
Cmd + 5Alt+5 - Convert to H6:
Cmd + 6Alt+6 - Convert Spaces to Tabs: Control + [
- Convert Tabs to Spaces: Control + ]
- Insert Current Date: Control + Shift + 1
- Insert Current Time: Control + Shift + 2
- Insert entity <: Control + Shift + ,
- Insert entity >: Control + Shift + .
- Insert entity &: Control + Shift + 7
- Insert entity Space: Control + Shift + Space
- Insert Scriptogr.am Header: Control + Shift + G
- Shift Line Left: Select lines, Cmd + [
- Shift Line Right: Select lines, Cmd + ]
- New Line: Cmd + Return
- Comment: Cmd + /
- Hard Linebreak: Control + Return
*If Cmd
is specified, for Windows replace with Ctrl
.
from ghost.
I'll add Publishing action shortcuts in tomorrow to get this done.
from ghost.
Btw, the alt + 3 shortcut conflicts with making a hash on my macbook air. I thought alt+3 was the hash key on most macs (there's never a key like on normal keyboards).. this is incredibly confusing because every time I want to add a hash, I get 3 :(
from ghost.
'tis true! Sorry about that. I'll change the shortcut to something more fitting, maybe Ctrl+Alt+number?
from ghost.
maybe Ctrl+Alt+number?
👍
from ghost.
Can this be closed?
from ghost.
Definitely not - far from done. One thing I just noticed - adding a link via keyboard shortcut:
- Select word to turn into link
- Press Ctrl+Shft+L
- Turns into word
Expected behaviour: http://
is highlighted, so I can paste in my URL if I've got one ready (just like Mou)
Actual behaviour: the whole [word](http://)
is highlighted.
from ghost.
Marking this as top priority as I think we need to ensure that we can do what we need to do with the current CodeMirror setup. If we can't this will act as an early warning that we need better (our own) tools.
from ghost.
Does this issue need any more shortcuts adding @JohnONolan?
from ghost.
Looks very good. Is there any way we can do the very first thing on the list? Copy/export HTML? I think it should be possible :)
from ghost.
It is possible but to safely copy stuff to the clipboard you'd need Flash.
from ghost.
Good point - can you have a look into this and report back on what the overhead and implications would be?
from ghost.
Overhead and implications = filesize, pageload time, translation issues, compatibility with other components, implementation requirements, etc.
from ghost.
Ok digging a little further, Github now uses (which seems the best option);
- Repo: https://github.com/zeroclipboard/ZeroClipboard
- Size: 11.709 kb
- Pageload increase: ~0.5s (max)
- Compatibility: Standalone so can be just implemented
- Implementation: Requires a button
This implementation problem with requiring a button will keep occurring, because Flash doesn't allow you to copy something to the clipboard unless it is focused (which we cant do) or unless it's clicked (the button).
from ghost.
Roger that - any less reliable (progressive enhancement?) alternatives to using flash? HTML5 API or anything that we can make use of?
from ghost.
Added rough implementation of Copy to HTML. (waiting on modals)
from ghost.
Related Issues (20)
- HTML Cards and embedded HTML is broken HOT 1
- Recommendations do not work for Instagram profiles HOT 1
- `fiction` tag should make byline change to _fiction by_ {authorName} HOT 2
- Database suggestion from Planetscale HOT 1
- Html Admin API incorrectly parses figure with a href as img HOT 1
- Comment failed to initialize version: "0.15" HOT 2
- Code Syntax highlighting is unpredictable HOT 2
- Hacked by this
- Navigation strips the subdirectory name while trying to create a navigation item HOT 1
- {{tiers}} helper has regression in 5.80 - "free" tier shown in list.
- Integrations - FirstPromoter always showing as "active" HOT 2
- Admin API - Create Paid Members support HOT 1
- Node Version Requirement Not Declared Fine Enough HOT 4
- Wrong DNS records shown HOT 1
- Error updating to Ghost 5.80 from 5.23, blog down, please help HOT 1
- Comments broken in latest release HOT 5
- Internal tags not all displayed in admin panel
- Korean Romanization is Wrong HOT 3
- Ghost cannot connect to Mysql AWS RDS instance with latest CA from AWS HOT 2
- Handlebars special partial "@partial-block" gets reported as unknown global HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghost.