[jifty-devel] a wiki editing toolbar
Jesse Vincent
jesse at bestpractical.com
Fri Apr 27 11:03:51 EDT 2007
On Apr 27, 2007, at 3:56 AM, Agostini yves wrote:
> I'm making a toolbar to help in writing textarea fields (see
> attached image)
>
I wonder if it might make more sense to take one of the rich text
editing widgets and make a Jifty::Web::Form::Field of that type?
> 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
>
> I attached my 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>
> <toolbar.jpg>
> <app.js>
> _______________________________________________
> jifty-devel mailing list
> jifty-devel at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.bestpractical.com/pipermail/jifty-devel/attachments/20070427/62488b91/PGP-0001.pgp
More information about the jifty-devel
mailing list