Browse Source

编辑器问题修复

tags/6.2.12
tianya 1 year ago
parent
commit
1319eb5c45
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/system/inc/inc_fun_funAdmin.php

+ 3
- 2
src/system/inc/inc_fun_funAdmin.php View File

@@ -140,6 +140,7 @@ function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype
} }
if ($GLOBALS['cfg_html_editor'] == 'ckeditor') { if ($GLOBALS['cfg_html_editor'] == 'ckeditor') {
$addConfig = ""; $addConfig = "";
$fvalue = htmlspecialchars($fvalue);
if (defined("DEDEADMIN")) { if (defined("DEDEADMIN")) {
$emoji = ""; $emoji = "";
if ($GLOBALS['cfg_db_language'] == "utf8mb4") { if ($GLOBALS['cfg_db_language'] == "utf8mb4") {
@@ -152,7 +153,7 @@ function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype
} }
$code = <<<EOT $code = <<<EOT
<script src="{$GLOBALS['cfg_static_dir']}/ckeditor/ckeditor.js"></script> <script src="{$GLOBALS['cfg_static_dir']}/ckeditor/ckeditor.js"></script>
<div id="{$fname}" name="{$fname}">{$fvalue}</div>
<textarea id="{$fname}" name="{$fname}">{$fvalue}</textarea>
<script>var editor = CKEDITOR.replace('{$fname}'{$addConfig});</script> <script>var editor = CKEDITOR.replace('{$fname}'{$addConfig});</script>
EOT; EOT;
if ($gtype == "print") { if ($gtype == "print") {
@@ -165,7 +166,7 @@ EOT;
/** /**
* 获取更新信息 * 获取更新信息
* *
* @return void
* @return string
*/ */
function SpGetNewInfo() function SpGetNewInfo()
{ {


Loading…
Cancel
Save