diff --git a/js/main.js b/js/main.js index d3cce3304..53af791d9 100644 --- a/js/main.js +++ b/js/main.js @@ -52,7 +52,12 @@ });*/ /* 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 for "Comment", used by insertFormatting() function + * data-bbcode="" : name of the bbcode element to insert. insertFormatting() will insert it as "[name][/name]" + * data-id="" : id of the comment, used to find other comment-related element, like the textarea + * */ $('[data-role="insert-formatting"]').on('click', function(e) { e.preventDefault(); var o = $(this);