Created
July 2, 2012 21:54
-
-
Save timsuzman/3035962 to your computer and use it in GitHub Desktop.
bbcode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="bbcode" style="float:left;margin-top:20px;"> | |
<b>BBcode:</b> | |
<br> | |
<textarea>[url={{server_url}}/submissions/show?id={{submission.id}}][img]{{screenshot_url(submission.screenshot_id)}}[/img][/url] | |
by {{users[submission.user_id].username}} starting from [url={{server_url}}/prompts/show?id={{prompt.id}}]{{ prompt.title }}[/url]</textarea> | |
</div> | |
// from stackoverflow | |
$("#bbcode textarea").focus(function() { | |
$this = $(this); | |
$this.select(); | |
// Work around Chrome's little problem | |
$this.mouseup(function() { | |
// Prevent further mouseup intervention | |
$this.unbind("mouseup"); | |
return false; | |
}); | |
}); | |
#bbcode textarea { | |
width:300px; | |
height:50px; | |
background-color:#F0EEE6; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment