From b52158e7cfec4c9d96baa856a68857c56c9288d3 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Wed, 29 Jul 2015 11:36:40 +0200 Subject: [PATCH] add comment to document how comment formatting buttons work --- js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index d3cce33040..53af791d91 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); -- 2.39.5