How to add class in image markdown in Ghost?

前端 未结 5 1011
被撕碎了的回忆
被撕碎了的回忆 2021-02-07 05:47

In Ghost, the markdown for image is

![alt](src)

Is there a hidden format for adding a class in the img tag? Or is this feature not in G

5条回答
  •  后悔当初
    2021-02-07 05:59

    in ghost the file post.hbs rendering de {{content}} whit class .kg-card-markdown you can create this function for js add class in all image in post content

    function imageResponsive() {
      $('.kg-card-markdown').each(function(){
        $('img').addClass('img-responsive');     
      });
    }
    

提交回复
热议问题