将 ckeditor 分配给一个字符串
assign ckeditor to a string
include_once 'include/ckeditor/ckeditor.php' ;
require_once 'include/ckfinder/ckfinder.php' ;
//ckeditor code
$ckeditor = new CKEditor() ;
$ckeditor->basePath = $_path['url'] . '/include/ckeditor/' ;
CKFinder::SetupCKEditor( $ckeditor, $_path['url'] . '/include/ckfinder' ) ;
$ckeditor->editor('reason_data', $reason_data);
有一个页面有一个 table 并且需要在 element.The 中加载 CKeditor 整个 html 被分配给一个 PHP 字符串,它被创建为sql query.I 的响应不确定如何将 ckeditor 代码放入字符串中。
$absent_leave_table = '<table width="100%" border="0"
cellpadding="5" cellspacing="0" class="display absent_tbl">';
$absent_leave_table .='<tr><td>col1</td>
<td><input type="text" id="startdate1">value from database</td></tr>'...;
在一些之间我需要粘贴 ckeditor code.I 我很困惑如何在字符串变量中分配 ckeditor 代码absent_leave_table
。
CKEditor 在客户端执行。
您要编辑的内容应该用稍后转换为编辑器的元素(文本区域或 div)包裹起来。
当您包装此类内容时,您应该执行适当的 JS 方法,该方法将在适当的位置初始化编辑器。如:CKEDITOR.replace, CKEDITOR.inline等
我认为分析 this example 会有帮助。这里编辑器在网站上多次创建和销毁。
或者 this one 双击后创建编辑器。
总而言之,我认为您可以用一些 div 或文本区域包裹要编辑的内容。执行JS代码在适当的地方初始化编辑器。
include_once 'include/ckeditor/ckeditor.php' ;
require_once 'include/ckfinder/ckfinder.php' ;
//ckeditor code
$ckeditor = new CKEditor() ;
$ckeditor->basePath = $_path['url'] . '/include/ckeditor/' ;
CKFinder::SetupCKEditor( $ckeditor, $_path['url'] . '/include/ckfinder' ) ;
$ckeditor->editor('reason_data', $reason_data);
有一个页面有一个 table 并且需要在 element.The 中加载 CKeditor 整个 html 被分配给一个 PHP 字符串,它被创建为sql query.I 的响应不确定如何将 ckeditor 代码放入字符串中。
$absent_leave_table = '<table width="100%" border="0"
cellpadding="5" cellspacing="0" class="display absent_tbl">';
$absent_leave_table .='<tr><td>col1</td>
<td><input type="text" id="startdate1">value from database</td></tr>'...;
在一些之间我需要粘贴 ckeditor code.I 我很困惑如何在字符串变量中分配 ckeditor 代码absent_leave_table
。
CKEditor 在客户端执行。 您要编辑的内容应该用稍后转换为编辑器的元素(文本区域或 div)包裹起来。 当您包装此类内容时,您应该执行适当的 JS 方法,该方法将在适当的位置初始化编辑器。如:CKEDITOR.replace, CKEDITOR.inline等
我认为分析 this example 会有帮助。这里编辑器在网站上多次创建和销毁。 或者 this one 双击后创建编辑器。
总而言之,我认为您可以用一些 div 或文本区域包裹要编辑的内容。执行JS代码在适当的地方初始化编辑器。