Jesse Vincent > Jifty > Jifty::Plugin::CodePress

Download:
Jifty-0.70824.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  13
Open  4
Stalled  1
View/Report Bugs
Module Version: 0.02   Source  

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 Template::Declare

  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

syntax highlighting: