]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WysiwygEdit/spaw.php
Reformat code
[SourceForge/phpwiki.git] / lib / WysiwygEdit / spaw.php
1 <?php
2 /**
3  * Just IE 5.5+ and Gecko
4  *
5  * Download: http://sourceforge.net/projects/spaw
6  * requires installation of spaw as lib/spaw
7  * modify lib/spaw/config/spaw_control.config.php to your needs.
8  *
9  * @package WysiwygEdit
10  * @author Reini Urban
11  */
12
13 require_once 'lib/WysiwygEdit.php';
14
15 class WysiwygEdit_spaw extends WysiwygEdit
16 {
17
18     function Head($name = 'edit[content]')
19     {
20         $basepath = DATA_PATH . '/lib/spaw/';
21         $spaw_root = PHPWIKI_DIR . "/lib/spaw/";
22         $spaw_base_url = "$basepath";
23         $spaw_dir = "$basepath";
24         $this->spaw_root =& $spaw_root;
25         include_once($spaw_root . "spaw_control.class.php");
26     }
27
28     function Textarea($textarea, $wikitext, $name = 'edit[content]')
29     {
30         // global $LANG, $WikiTheme;
31         $id = "spaw_editor";
32         /*SPAW_Wysiwyg(
33               $control_name='spaweditor', // control's name
34               $value='',                  // initial value
35               $lang='',                   // language
36               $mode = '',                 // toolbar mode
37               $theme='',                  // theme (skin)
38               $width='100%',              // width
39               $height='300px',            // height
40               $css_stylesheet='',         // css stylesheet file for content
41               $dropdown_data=''           // data for dropdowns (style, font, etc.)
42         */
43         $this->SPAW = new SPAW_Wysiwyg($id, $textarea->_content);
44         $textarea->SetAttr('id', $name);
45         $this->SPAW->show();
46         $out = HTML::div(array("id" => $id, 'style' => 'display:none'),
47             $wikitext);
48         return $out;
49     }
50 }
51
52 // Local Variables:
53 // mode: php
54 // tab-width: 8
55 // c-basic-offset: 4
56 // c-hanging-comment-ender-p: nil
57 // indent-tabs-mode: nil
58 // End: