Yes, but those are custom buttons I added which are a bit more complex in that they have specific callback functions to create the link dialogs, etc.
If you’re just looking to add your own “regular” textile formatting buttons, it’s much easier. In that case you could use the last commented line in the default buttons as a basis for your new button:
//teButtons.push(new TextileEditorButton('[id]', '[image.png]', '[open]', '[close]', '[accesskey]', '[Title]', '[simple or extended]'));So quick example - if you wanted to add a code button you could do something like:
teButtons.push(new TextileEditorButton('ed_code', 'code.png', '@', '@', 'c', 'Code'));...and of course add the icon to the teh/images folder
edit/add: and if you do the icons are of course the ever-popular famfam silk icons
Oh nice! I’m sorry I didn’t even see that code commented out in there. I’m curious though, what is the “accesskey” and “simple or extended”?
Also I noticed that the button code had this for the heading 2 button:
'h2', '\n',
The h2 when output as textile should be h2.[space] which the button does correctly but I’m not sure how ‘h2’, ‘\n’ for the opening and closing tag in the config file translates into “h2.[space]”? That make sense?
Lastly, I believe I’ve found a bug in IE7. I’m not sure if you really test in IE7 or not or even care (I know some developers don’t even bother) but I thought I would bring it up:
Everything seems to work fine in IE7 except the URL and Email buttons when highlighting the text FIRST.
So, for example we were just testing some things out and typed this:
This is a test for textile helper extension.
We then highlighted the word “helper.” With “helper” highlighted we clicked on the URL button and typed in our URL (doesn’t seem to make a difference what the URL is) and clicked OK.
We then get this as output:
This is a test for textile “This is a test for textile helper extension. (This is a test for textile helper extension.)”:http://www.example.com extension.
Seems to be the same deal with the Email button. If we take this sentence:
This is a test for textile helper extension. Contact Tiger Woods here.
And then highlight “Tiger Woods” and click the Email button, fill in the email address and click OK. Here is what we get:
This is a test for textile helper extension. Contact [ email=name.name@test.com ]This is a test for textile helper extension. Contact Tiger Woods here.[ /email ] here.
Everything in FireFox seems fine. I prefer Firefox but unfortunately our users at work (ones updating the site) like IE7. If I have to though, I’ll upgrade them to FireFox.
Thanks
