LEPTON CMS
7.3.0
feel free to keep it strictly simple...
Loading...
Searching...
No Matches
function.display_wysiwyg_editor.php
Go to the documentation of this file.
1
<?php
2
19
// include secure.php to protect this file and the whole CMS!
20
if
(!defined(
"SEC_FILE"
)){define(
"SEC_FILE"
,
'/framework/secure.php'
);}
21
if
(defined(
'LEPTON_PATH'
)) {
22
include LEPTON_PATH.SEC_FILE;
23
}
else
{
24
$oneback =
"../"
;
25
$root
= $oneback;
26
$level
= 1;
27
while
((
$level
< 10) && (!file_exists(
$root
.SEC_FILE))) {
28
$root
.= $oneback;
29
$level
+= 1;
30
}
31
if
(file_exists(
$root
.SEC_FILE)) {
32
include
$root
.SEC_FILE;
33
}
else
{
34
trigger_error(sprintf(
"[ <b>%s</b> ] Can't include secure.php!"
, $_SERVER[
'SCRIPT_NAME'
]), E_USER_ERROR);
35
}
36
}
37
// end include secure file
38
39
52
function
display_wysiwyg_editor
(
53
string
$name,
54
string
$id,
55
string
$content,
56
int
|
null
$width =
null
,
57
int
|
null
$height =
null
,
58
bool
$prompt =
false
59
): string
60
{
61
62
// using constant in buffering causes sometimes errors!
63
$classname = WYSIWYG_EDITOR;
64
if
($classname ==
'none'
)
65
{
66
$result =
'<textarea name="'
.$name.
'" id="'
.$id.
'" style="width: '
.$width.
'; height: '
.$height.
';">'
.$content.
'</textarea>'
;
67
}
68
else
69
{
70
ob_start();
71
$classname::show_wysiwyg_editor($name, $id, $content, $width, $height,
true
);
72
$result = ob_get_clean();
73
}
74
75
76
if
($prompt ==
true
)
77
{
78
echo $result;
79
return
""
;
80
}
81
else
82
{
83
return
$result;
84
}
85
}
display_wysiwyg_editor
display_wysiwyg_editor(string $name, string $id, string $content, int|null $width=null, int|null $height=null, bool $prompt=false)
Definition
function.display_wysiwyg_editor.php:52
$root
$root
Definition
function.display_wysiwyg_editor.php:25
$level
$level
Definition
function.display_wysiwyg_editor.php:26
SVN
upload
framework
functions
function.display_wysiwyg_editor.php
Generated by
1.12.0