Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Insert image tag when attributes differ #164

Open
jaredmoody opened this issue Jul 21, 2016 · 3 comments
Open

Insert image tag when attributes differ #164

jaredmoody opened this issue Jul 21, 2016 · 3 comments

Comments

@jaredmoody
Copy link

Currently image width, height and align are editable, but ignored when entered:

jaredmoody com 2016-07-21 14-03-28

Inserts:

![Hello](/images/2016/07/hello.jpg)

I think either those fields should not be editable, or it should insert an html image tag with those attributes, right?

@zhuochun
Copy link
Owner

By default, these attributes are not used in the image tag. You can change the image tag in config to use them, e.g.

imageTag: "{% img {align} {src} {width} {height} '{alt}' %}"

Refer to https://github.com/zhuochun/md-writer/wiki/Settings

@jaredmoody
Copy link
Author

Having those settings editable by default but not do anything makes it seem like something is broken because you would expect changing them to have some effect.

Maybe those fields could be disabled unless imageTag is set in the config?

@zhuochun
Copy link
Owner

Yep. Could disable the text box when imageTag didn't include the attribute placeholder. Thanks for the suggestion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants