Saturday, January 5, 2019

Enable codebox / spoiler code

How to enable codebox in a blog

<textarea cols="117" name="textarea" rows="10" wrap="off">
    YOUR CODE GOES HERE
</textarea>

Example:


External source , mozilla documentation


After this, use Notepad++, replace [TAB] with with 4 [SPACE].
Yup, I couldn't find a solution to actually preserve [TAB], but this trick work.
To revert [SPACE] into [TAB], just replace 4 spaces into 1 tab

Since this require HTML enable, I don't think Post a Comment allow it
other script pasting sites that I trusted are :-
1. Github
2. Google Drive

The reason why I list these because I found a lot script pasting site has either gone down or load very slow
... even forum attachment can be broken !!

--------------------------------------------

How to enable [Spoiler] tab in a blog

<div><input onclick="if(this.parentNode.getElementsByTagName('div')[0].style.display != ''){this.parentNode.getElementsByTagName('div')[0].style.display = '';this.value = 'Hide';}else{this.parentNode.getElementsByTagName('div')[0].style.display = 'none'; this.value = 'Show';}" type="button" value="Show" /><div style="display: none;">
HIDE CONTENT GOES HERE
</div></div>

Example:

HIDE CONTENT GOES HERE

External source

No comments:

Post a Comment

Linux compiler error that never shown on Visual Studio

let's just admit Visual Studio sux ... ok ? right now, if you want to host a Private Ragnarok Online server, its just better to choose...