]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WysiwygEdit/spaw.php
trailing_spaces
[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     function Head($name='edit[content]') {
18         $basepath = DATA_PATH.'/lib/spaw/';
19         $spaw_root = PHPWIKI_DIR . "/lib/spaw/";
20         $spaw_base_url = "$basepath";
21         $spaw_dir  = "$basepath";
22         $this->spaw_root =& $spaw_root;
23         include_once($spaw_root. "spaw_control.class.php");
24     }
25
26     function Textarea($textarea, $wikitext, $name='edit[content]') {
27         // global $LANG, $WikiTheme;
28         $id = "spaw_editor";
29         /*SPAW_Wysiwyg(
30               $control_name='spaweditor', // control's name
31               $value='',                  // initial value
32               $lang='',                   // language
33               $mode = '',                 // toolbar mode
34               $theme='',                  // theme (skin)
35               $width='100%',              // width
36               $height='300px',            // height
37               $css_stylesheet='',         // css stylesheet file for content
38               $dropdown_data=''           // data for dropdowns (style, font, etc.)
39         */
40         $this->SPAW = new SPAW_Wysiwyg($id, $textarea->_content);
41         $textarea->SetAttr('id', $name);
42         $this->SPAW->show();
43         $out = HTML::div(array("id"=>$id, 'style'=>'display:none'),
44                                          $wikitext);
45         return $out;
46     }
47 }
48
49 // Local Variables:
50 // mode: php
51 // tab-width: 8
52 // c-basic-offset: 4
53 // c-hanging-comment-ender-p: nil
54 // indent-tabs-mode: nil
55 // End:
56 ?>