add comment to document how comment formatting buttons work
This commit is contained in:
parent
52f9465578
commit
b52158e7cf
1 changed files with 6 additions and 1 deletions
|
@ -52,7 +52,12 @@
|
||||||
});*/
|
});*/
|
||||||
|
|
||||||
/* setup comment textarea buttons */
|
/* setup comment textarea buttons */
|
||||||
|
/* comment textarea buttons needs some "data-*" attributes to work:
|
||||||
|
* data-role="insert-formatting" : to mark the element as a formatting button
|
||||||
|
* data-comment="<string>" : string for "Comment", used by insertFormatting() function
|
||||||
|
* data-bbcode="<string>" : name of the bbcode element to insert. insertFormatting() will insert it as "[name][/name]"
|
||||||
|
* data-id="<string>" : id of the comment, used to find other comment-related element, like the textarea
|
||||||
|
* */
|
||||||
$('[data-role="insert-formatting"]').on('click', function(e) {
|
$('[data-role="insert-formatting"]').on('click', function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var o = $(this);
|
var o = $(this);
|
||||||
|
|
Loading…
Reference in a new issue