Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

how to add a custom button

edited June 2012 in Vanilla 2.0 - 2.8

hi, i want to add a custom button which give a custom output . . .
example (geshi syntaxhighliter) :
<pre lang="cpp"></pre>

i've discover that i need to start from buttonbar.js file . . .
but i'm a bit stranger javascript programming . . .
can anybody help me ??

Tagged:

Answers

  • peregrineperegrine MVP
    edited June 2012

    if you are not a stranger to php and you understand case statements. You could start by cloning the easy ones in javascript like bold and change it to em>. Then create an image for for it and progress from there. if you get that working, move on to cloning the code multiline button and try your geisha.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • well, i've done that by cloning the script inside buttonbar.js file . . .
    but it just create <pre></pre> . . .
    and when i include lang="cpp" it make <pre lang="cpp"></pre lang="cpp"> . . .
    thats the problem . . .

  • ShellShell New
    edited December 2012

    $(TextArea).insertRoundTag('pre', htmlOpts, {lang:'cpp'});

Sign In or Register to comment.