[jifty-devel] a wiki editing toolbar
Agostini yves
agostini at univ-metz.fr
Fri Apr 27 04:26:52 EDT 2007
I'm making a toolbar to help in writing textarea fields
(see http://www.crium.univ-metz.fr/docs/devel/jifty/toolbar.jpg )
I use a fragment to write the toolbar :
----
<div id='toolbar' style='float:right;border:1px solid #ccc;'>
<script type='text/javascript'>
addButton('/static/img/js/bold.png','Bold','\*\*','\*\*','Bold');
addButton('/static/img/js/italic.png','Italic','\_','\_','Italic');
addButton('/static/img/js/h1.png','Title','','\n=======\n','Title');
addButton('/static/img/js/h2.png','Heading 2','','\n-------\n','Heading 2');
addButton('/static/img/js/h3.png','Heading 3','### ',' ###\n','Heading 3');
</script>
</div>
----
# addButton : image, help text, first tag before selected text, last tag, default text if nothing is selected
see http://www.crium.univ-metz.fr/docs/devel/jifty/app.js
most of the code comes from wikibit.js (wikipedia) and seems to come from phpBB
good points is that it's easy to change the toolbar to add button, translate text, change tags, ...
but it's not usable in a jifty page region (javascript is cut off),
moreover I don't make test with IE and there's strange behavior with many textarea by page.
Do you want I put some elements (images, js, cookbook) in trunk ? or somebody have a better tool ?
--
Agostini yves <agostini at univ-metz.fr>
More information about the jifty-devel
mailing list