FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Widg plugin

Feed 1 posts, 2 voices

Avatar
651 posts

I'd like to build a widg plugin. It's a very simple thing and adds a toolbar to textarea's. What would be the best way to go about this? As far as I can tell right now, I would need to:

  • build a widg plugin
  • allow the plugin to write this string into the page: <script type="text/javascript" src="scripts/widgEditor.js"></script>
  • allow the plugin to disable every filter except the <none> filter
  • include some custom CSS code for the widg toolbar

And then it would work...

 
Avatar
541 posts

check the markdown and textile plugin you will have a nice idea about it !!

for the javascript including, you will have to call it the same name as your plugin name (ID)

ie: markdown will be markdown.js ... same for the css file.

if you want to remove a filter you will need to cal in your index.php file: Filter::remove('markdown'); Filter::remove('textile'); ...

the little doc by now is only this: http://www.madebyfrog.com/docs/plugins-api/writing-a-plugin.html ... I will try to do my best to make it evoluate!!