From: Fabrixxm Date: Wed, 29 Jul 2015 09:36:40 +0000 (+0200) Subject: add comment to document how comment formatting buttons work X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b52158e7cfec4c9d96baa856a68857c56c9288d3;p=friendica.git add comment to document how comment formatting buttons work --- 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);