有時候我們在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>