How to make remark-directive work with img? #1216
-
I want to enable passing props as arguments to an img element. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@edward1127 welcome! What you show in your example is attributes syntax, which has no standard.
These attributes plugins are not standardized though, so, you milage may vary. |
Beta Was this translation helpful? Give feedback.
@edward1127 welcome!
You are asking two separate questions here.
https://github.com/micromark/micromark-extension-directive#syntax has examples of directive syntax, you are welcome to make an image directive.
The example you shared is not a directive so it will not work in remark directive.
What you show in your example is attributes syntax, which has no standard.
There are some plugins you could look into:
These attributes plugins are not standardized though, so, you milage may vary.