在xml中加入圖片,發佈JetBrains Plugin的圖文並茂description

有時候我們在JetBrains發佈插件時,需要加入一些圖片到plugin.xml的description標籤使得“圖文並茂”,like this:

這時候,我們可以藉助html標籤來實現,在description中插入CDATA 區段,添加如下示例代碼:

    <description><![CDATA[
      Generate Null Object for object:<br>
      Provide an object as a surrogate for the lack of an object of a given type.<br>
      The Null Object provides intelligent do nothing behavior, hiding the details from its collaborators.<br>

      Please contact me if you have any questions: <a href="http://blog.imuxuan.com">ForDeer</a> <br>
      <br>
      <b>Preview</b><br>
      <br>
      <img src="https://raw.githubusercontent.com/leotyndale/EnDebugBubble/master/sc/null_object.gif"/>

    ]]>
    </description>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章