MacDownApp / macdown

Open source Markdown editor for macOS.
https://macdown.uranusjr.com/
9.43k stars 1.09k forks source link

modify the inserted image size #677

Open dcrozz opened 7 years ago

dcrozz commented 7 years ago

I love macdown and use it to take notes every day, but modifying the size of the inserted image is pretty annoying by input <img src="" width=""> every time. If there is a way to implement the syntax ![](pic/location/url =200x) like Mou, or just add an alternative way of cmd + shift + i to input <img src="" width=""> directly.

FranklinYu commented 7 years ago

The first suggestion is upstream related. It is actually being discussed in CommonMark. I am not sure whether Hoedown has such an extension; if not, before CommonMark and then Hoedown pick up the change, I don't think we can do anything about this.

The second suggestion of adding a shortcut to insert certain snippet is good, and I prefer this over the first one, since the produced Markdown is supported more widely. I am more conservative about adding a syntax until a significant percentage of our users require the feature. I think this is a general feature about having a keyboard shortcut to insert any user-defined snippet. We can even have placeholders (like many IDEs).

Note: There is a typo width="'' which I believe should be width="".

dcrozz commented 7 years ago

@franklinyu Thank you. I also think the second one is better for I can directly copy the file I create by macdown to the blog that supports markdown syntax such as hexo. btw. the dummy typo is fixed.

uranusjr commented 7 years ago

I am not sure whether Hoedown has such an extension

No it doesn’t. IIRC the issue has been raised, but never implemented.

FranklinYu commented 7 years ago

No it doesn’t. IIRC the issue has been raised, but never implemented.

All right, so the "keyboard shortcut for snippet" is the way to go.

uranusjr commented 7 years ago

Assign it to ⌘⇧⌥I maybe? It’s probably better to keep the standard Markdown syntax.

FranklinYu commented 7 years ago

Yes, + + + I seems good. Preferably configurable.

uranusjr commented 7 years ago

Preferably configurable.

All hotkeys on Mac (for native applications, at least) are configurable in System Preferences → Keyboard → Shortcuts. :)

sjkiss commented 6 years ago

Was this ever implemented?

FranklinYu commented 6 years ago

@sjkiss No, it has not been implemented yet.

sjkiss commented 5 years ago

Some noobs like me may end up here and have some difficulty implementing this.

  1. Select System Preferences > Keyboard > Text
  2. Add your shortcut and replacement text.
  3. This is crucial: in Macdown, select Edit > Substitutions > Text Replacement.

Otherwise it won't work. Step 3 is necessary because text replacement is not available for each mac app. HTH.

sanjogururaj47 commented 3 years ago

Has this been implemented yet? xD