Пример #1
0
    ?>
 name="display"> No<br>-->
	<input type="hidden" name="type" value="<?php 
    echo jb_escape_html($_REQUEST['type']);
    ?>
">
	Help Title: <input type="text" name="title" value="<?php 
    echo JB_escape_html($data['title']);
    ?>
" size="50"><br>
	Help Message: <br>
	<?php 
    require_once JB_basedirpath() . "include/lib/ckeditor/ckeditor.php";
    $CKEditor = new CKEditor();
    $CKEditor->initialized = false;
    $CKEditor->basePath = jb_get_CK_js_base(true);
    $config = array('toolbar' => 'Basic', 'docType' => $JBMarkup->doc_type, 'width' => 40 * 15, 'height' => 25 * 15, 'language' => 'en');
    $events['instanceReady'] = 'function (ev) { ev.editor.dataProcessor.writer.selfClosingEnd = \'>\'; }';
    // turn off XHTML generation
    $CKEditor->editor('message', $data['message'], $config, $events);
    ?>
	<br>
	<input name='save' type="submit" value="Save">
	</form>


	<?php 
}
JB_admin_footer();
?>
Пример #2
0
 function editor_field()
 {
     global $FCK_LANG_FILES, $JBMarkup;
     $lang = str_replace('.js', '', $FCK_LANG_FILES[$_SESSION['LANG']]);
     if ($this->field_row['FCOMMENT'] != '') {
         echo $this->field_row['FCOMMENT'] . "<br>";
     }
     // See include/lib/ckeditor/config.js for configuration options
     require_once JB_basedirpath() . "include/lib/ckeditor/ckeditor.php";
     $CKEditor = new CKEditor();
     $CKEditor->initialized = true;
     $CKEditor->basePath = jb_get_CK_js_base(true);
     $config = array('toolbar' => 'Basic', 'docType' => $JBMarkup->doc_type, 'width' => '99%', 'height' => $this->field_row['field_height'] * 15, 'language' => $lang);
     $events['instanceReady'] = 'function (ev) { ev.editor.dataProcessor.writer.selfClosingEnd = \'>\'; }';
     // turn off XHTML generation
     $val = $this->get_data_value($this->field_row['field_id']);
     $CKEditor->editor($this->field_row['field_id'], $val, $config, $events);
 }