1
|
<?php
|
2
|
$WB_DIRECTORY = substr(WB_PATH, strlen($_SERVER['DOCUMENT_ROOT'])).'/media/';
|
3
|
?>
|
4
|
|
5
|
<script type="text/javascript">
|
6
|
_editor_url = "<?php echo WB_URL;?>/modules/htmlarea/htmlarea/";
|
7
|
_editor_lang = "en";
|
8
|
</script>
|
9
|
|
10
|
<script type="text/javascript" src="<?php echo WB_URL;?>/modules/htmlarea/htmlarea/htmlarea.js"></script>
|
11
|
<script type="text/javascript">
|
12
|
HTMLArea.loadPlugin("ContextMenu");
|
13
|
HTMLArea.loadPlugin("TableOperations");
|
14
|
window.onload = function() {
|
15
|
<?php
|
16
|
foreach($id_list AS $textarea_id)
|
17
|
{
|
18
|
echo 'var editor = new HTMLArea("'.$textarea_id.'"); '
|
19
|
.'editor.registerPlugin(ContextMenu);'
|
20
|
.'editor.registerPlugin(TableOperations);'
|
21
|
.'editor.config.pageStyle = "body { '.stripslashes(WYSIWYG_STYLE).' }";'
|
22
|
.'editor.generate();';
|
23
|
}
|
24
|
?>
|
25
|
}
|
26
|
</script>
|
27
|
|
28
|
<?php
|
29
|
function show_wysiwyg_editor($name,$id,$content,$width,$height) {
|
30
|
echo '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
|
31
|
}
|
32
|
?>
|