Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

/var/sites/help-site.com/auto/tmp/CPAN/9677/Jifty-0.71129/plugins/CodePress/lib/Jifty/Plugin/CodePress.pm

/var/sites/help-site.com/auto/tmp/CPAN/9677/Jifty-0.71129/plugins/CodePress/lib/Jifty/Plugin/CodePress.pm


NAME

Jifty::Plugin::CodePress


DESCRIPTION

CodePress, web-based source code editor with syntax highlighting


SYNOPSIS

In etc/config.yml


  Plugins:

    - CodePress: {}

In your View do something like:


  $action->form_field( 'source',

        cols => 80, rows => 25,

        language => 'perl',

        render_as => 'Jifty::Plugin::CodePress::Textarea',

  );

or if you are using the Template::Declare manpage


  render_param(

        $action => 'source',

        cols => 80, rows => 25,

        language => 'perl',

        render_as => 'Jifty::Plugin::CodePress::Textarea',

  );


VERSION

Created from https://codepress.svn.sourceforge.net/svnroot/codepress/trunk/stable revision 219 with bunch of local changes to make it play nicer with Jifty.

This involved some hard-coding of paths (because automatic path detection from CodePress doesn't work well with Jifty's expectation of JavaScript code in /js/), addition of CodePress.instances object to track all instances and additional JavaScript event handling using DOM.Events to remove requirement to call CodePress.beforeSubmit from form submit (If you want you can still call it, and it will turn all CodePress editors back to textarea).

This also side-stepped problem with original calling schematic which created functions with names from element ids. This was problematic with Jifty because ids are automatically generated and use dashes (-) in them which aren't valid JavaScript function names.


BUGS

There seems to strange interaction between CodePress and Jifty fragments.


SEE ALSO

http://codepress.org/ - project site

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy