]> git.mxchange.org Git - friendica.git/commitdiff
add comment to document how comment formatting buttons work
authorFabrixxm <fabrix.xm@gmail.com>
Wed, 29 Jul 2015 09:36:40 +0000 (11:36 +0200)
committerFabrixxm <fabrix.xm@gmail.com>
Wed, 29 Jul 2015 09:36:40 +0000 (11:36 +0200)
js/main.js

index d3cce33040a6d8fc53b0b635fbfa1eb3e19644ab..53af791d914235680eddf975d43957e1d9191ff1 100644 (file)
                });*/
                
                /* 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) {
                        e.preventDefault();
                        var o = $(this);