1. Add CSS
.message-comment{background:#efefef;padding:5px 10px 10px;width:auto;margin:15 auto 0;line-height:1.3em;position:relative;font-weight:400;border:1px solid #ddd;font-size:14px;color:#444}2. Copy code:
.parser{background:#888;padding:3px 6px;margin:0;cursor:pointer;display:inline-block;float:left;text-align:center;color:#fff;}
#parser{padding:0;margin:10px 0 0;display:none}
#parser table,#parser2 table{margin:0 auto;width:100%}
#parser textarea#somewhere,#parser2 textarea#somewhere{background:#f8f8f8;border:1px solid #ccc;height:100px;width:100%;padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
#parser textarea#somewhere:active,#parser textarea#somewhere:focus,#parser2 textarea#somewhere:active,#parser2 textarea#somewhere:focus{border:2px solid #e8554e;outline:0}
input.button-parse{padding: 5px;}
.message-comment .strike{text-decoration: line-through;}
.message-comment:before{content:"";width:0;height:0;position:absolute;bottom:-22px;left:14px;border:11px solid transparent;border-color:#ddd transparent transparent}
.message-comment:after{content:"";width:0;height:0;position:absolute;bottom:-20px;left:15px;border:10px solid transparent;border-color:#efefef transparent transparent}
code{font-family:Consolas,Monaco,'Andale Mono',monospace;white-space:initial;word-spacing:normal;word-break:normal;hyphens:none;color:#000}
.clear{clear:both;}
.btn-message{display:block;vertical-align:middle}.mata{float:right;padding-top:1px}#isi-pesan{display:none}
<b:if cond='data:blog.pageType == "item"'>and paste it above code:
<div class='message-comment' id='message-comment'>
<div class='btn-message'>How to style text in Disqus comments:<span class='mata' id='btn-message' onclick='toggleNavPanel('isi-pesan')'><i class='fa fa-plus-square-o'/></span></div>
<div id='isi-pesan'>
<ul>
<li>To write a <b>bold</b> letter please use <code>&lt;strong&gt;&lt;/strong&gt;</code> or <code>&lt;b&gt;&lt;/b&gt;</code>.</li>
<li>To write a <i>italic</i> letter please use <code>&lt;em&gt;&lt;/em&gt;</code> or <code>&lt;i&gt;&lt;/i&gt;</code>.</li>
<li>To write a <u>underline</u> letter please use <code>&lt;u&gt;&lt;/u&gt;</code>.</li>
<li>To write a <span class='strike'>strikethrought</span> letter please use <code>&lt;strike&gt;&lt;/strike&gt;</code>.</li>
<li>To write HTML code, please use <code>&lt;code&gt;&lt;/code&gt;</code> or <code>&lt;pre&gt;&lt;/pre&gt;</code> or <code>&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;</code>, and please <b>parse</b> the code in the parser box below.</li>
</ul>
<div class='parser' onclick='toggleNavPanel2('parser')'><i class='fa fa-code'/> <span id='parser-button'>Show Parser Box</span></div>
<div class='clear'/>
<div id='parser'>
<table><tbody>
<tr> <td><textarea id='somewhere'/><br/>
<input class='button-parse' contenteditable='true' onclick='convert();' type='button' value='Parse Script'/></td> </tr>
</tbody></table>
</div>
</div>
</div>
</b:if>
</article>3. Javascript
</b:includable>
Add this JS above </body>:
<script type='text/javascript'>
//<![CDATA[
$(document).ready(function(){$(".parser").click(function(){$("#parser").slideToggle("slow")})});
function convert(){var ele1 = document.getElementById("somewhere");var replaced;replaced = ele1.value;replaced = replaced.replace(/&/ig, "&");replaced = replaced.replace(/</ig, "<");replaced = replaced.replace(/>/ig, ">");replaced = replaced.replace(/"/ig, """);replaced = replaced.replace(/±/ig, "±");replaced = replaced.replace(/©/ig, "©");replaced = replaced.replace(/®/ig, "®");replaced = replaced.replace(/ya'll/ig, "ya'll");ele1.value = replaced;};
function toggleNavPanel(e){var n=document.getElementById(e),l=document.getElementById("btn-message"),t="block";n.style.display==t?(n.style.display="none",l.innerHTML="<i class='fa fa-plus-square-o'></i>"):(n.style.display="block",l.innerHTML="<i class='fa fa-minus-square-o'></i>")};
function toggleNavPanel2(e){var n=document.getElementById(e),l=document.getElementById("parser-button"),t="block";n.style.display==t?(n.style.display="none",l.innerHTML="Show Parser Box"):(n.style.display="block",l.innerHTML="Hide Parse Box")};
//]]>
</script>
And make sure you have saved Jquery Library and Font Awesome in your template
Repost from http://www.kompiajaib.com/2015/05/pesan-komentar-dan-code-parser-untuk.html
and http://www.kompiajaib.com/2015/09/alternatif-lain-memasang-komentar.html (comment)
Leave a comment
To insert a link, use tag
[url=http://your_link]your-link[/url]
To insert the code , use the tag
<i rel="code">your-code</i>
The long code can use the tag
<i rel="pre">your-long-code</i>
To insert an image , use the code
[img]URL Image[/img]
To insert a title , use tag
<b rel="h4">Your Title here...</b>
To creat Bold text
<strong>Your text here...</strong>
To create Italic text used tag
<em>Your text here...</em>