LEPTON CMS 7.3.0
feel free to keep it strictly simple...
Loading...
Searching...
No Matches
function.show_wysiwyg_editor.php
Go to the documentation of this file.
1<?php
2
18// include secure.php to protect this file and the whole CMS!
19if(!defined("SEC_FILE")){define("SEC_FILE",'/framework/secure.php' );}
20if (defined('LEPTON_PATH')) {
21 include LEPTON_PATH.SEC_FILE;
22} else {
23 $oneback = "../";
24 $root = $oneback;
25 $level = 1;
26 while (($level < 10) && (!file_exists($root.SEC_FILE))) {
27 $root .= $oneback;
28 $level += 1;
29 }
30 if (file_exists($root.SEC_FILE)) {
31 include $root.SEC_FILE;
32 } else {
33 trigger_error(sprintf("[ <b>%s</b> ] Can't include secure.php!", $_SERVER['SCRIPT_NAME']), E_USER_ERROR);
34 }
35}
36// end include secure file
37
52function show_wysiwyg_editor( $name, $id, $content, $width, $height, $prompt=true )
53{
54 $info = '@DEPRECATED_TEMP 20250211: this function will be removed in L* > 7.3.0, use display_wysiwyg_editor() instead';
55 echo(LEPTON_tools::display($info, 'pre','ui orange message'));
56 $sHTML = '<textarea name="'.$name.'" id="'.$id.'" style="width: '.$width.'; height: '.$height.';">'.$content.'</textarea>';
57
58 if( true === $prompt)
59 {
60 echo $sHTML;
61 }
62 else
63 {
64 return $sHTML;
65 }
66}
static display(mixed $something_to_display="", string $tag="pre", string|null $css_class=null, bool|null $useVarDump=null)
show_wysiwyg_editor( $name, $id, $content, $width, $height, $prompt=true)