当前位置: 首页>>代码示例>>PHP>>正文


PHP CKEditor::replace方法代码示例

本文整理汇总了PHP中CKEditor::replace方法的典型用法代码示例。如果您正苦于以下问题:PHP CKEditor::replace方法的具体用法?PHP CKEditor::replace怎么用?PHP CKEditor::replace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CKEditor的用法示例。


在下文中一共展示了CKEditor::replace方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: create

 function create($fieldName, $options = array(), $id_replace = '')
 {
     // Mặc định nếu ko định nghĩa chọn toolbar loại nào sẽ sử dụng loại simple
     // Mặc định nếu ko định nghĩa chọn ngôn ngữ nào loại nào sẽ sử dụng ngôn ngữ tiếng việt
     $options += array('toolbar' => 'simple', 'language' => 'vi', 'width' => 900);
     //định nghĩa trước một số kiểu toolbar trước
     switch ($options['toolbar']) {
         case 'extra':
             $options['toolbar'] = array(array('Source'), array('Preview'), array('PasteFromWord', '-', 'Print'), array('Undo', 'Redo', '-', 'Find', 'Replace', '-', 'RemoveFormat'), array('Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript'), array('NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'), array('JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'), array('Link', 'Anchor'), array('Image', 'Flash', 'oembed', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'), array('Styles', 'Format', 'Font', 'FontSize'), array('TextColor', 'BGColor'), array('ShowBlocks', 'Maximize'));
             /*
              * Nếu bạn khai báo phần tử image,flash,file và cho phép người sử dụng upload lên server thì phải cài đặt các chức năng tương ứng sau
              */
             /* File upload url */
             $options['filebrowserUploadUrl'] = $this->webroot . "js/ckeditor/kcfinder/upload.php?type=files";
             /* Image upload url */
             $options['filebrowserImageUploadUrl'] = $this->webroot . "js/ckeditor/kcfinder/upload.php?type=images";
             /* Flash upload url */
             $options['filebrowserFlashUploadUrl'] = $this->webroot . "js/ckeditor/kcfinder/upload.php?type=flash";
             /* Xem file đã upload */
             $options['filebrowserBrowseUrl'] = $this->webroot . "js/ckeditor/kcfinder/browse.php?type=files";
             /* Xem images đã upload */
             $options['filebrowserImageBrowseUrl'] = $this->webroot . "js/ckeditor/kcfinder/browse.php?type=images";
             /* Xem flash đã upload */
             $options['filebrowserFlashBrowseUrl'] = $this->webroot . "js/ckeditor/kcfinder/browse.php?type=flash";
             break;
         case 'users':
             $options['toolbar'] = array(array('Preview', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'), array('Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Anchor', 'Image', 'Table', 'Smiley'), array('FontSize', 'TextColor', 'BGColor'), array('Undo', 'Redo', 'RemoveFormat', 'PasteFromWord'), array('Maximize'));
             break;
             /* your case here ... */
         /* your case here ... */
         default:
             $options['toolbar'] = array(array('Preview', 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', 'Smiley', 'SpecialChar'), array('FontSize', 'TextColor', 'BGColor'), array('RemoveFormat'));
     }
     require_once WWW_ROOT . 'js' . DS . 'ckeditor' . DS . 'ckeditor.php';
     $CKEditor = new CKEditor();
     $CKEditor->basePath = $this->webroot . 'js/ckeditor/';
     $CKEditor->config = $options;
     //$attributes = $this->Form->_initInputField($fieldName, array());
     //return $CKEditor->editor($fieldName,$value);
     return $CKEditor->replace($id_replace);
     //return $CKEditor->replace($attributes['id'],$options);
     //$attributes = $this->Form->_initInputField($fieldName, array());
     //return $this->Html->scriptBlock("CKEDITOR.replace('" . $attributes['id'] . "',{{$this->Js->_parseOptions($options)}});");
 }
开发者ID:hotanlam,项目名称:japansource,代码行数:44,代码来源:TvFckHelper.php

示例2: CKEditor

		<p>
			<input type="submit" value="Submit" />
		</p>
	</form>
	<div id="footer">
		<hr />
		<p>
			CKEditor - The text editor for the Internet - <a class="samples"
				href="http://ckeditor.com/">http://ckeditor.com</a>
		</p>
		<p id="copy">
			Copyright &copy; 2003-2011, <a class="samples"
				href="http://cksource.com/">CKSource</a> - Frederico Knabben. All
			rights reserved.
		</p>
	</div>
	<?php 
// Include the CKEditor class.
include_once "../../ckeditor.php";
// Create a class instance.
$CKEditor = new CKEditor();
// Path to the CKEditor directory, ideally use an absolute path instead of a relative dir.
//   $CKEditor->basePath = '/ckeditor/'
// If not set, CKEditor will try to detect the correct path.
$CKEditor->basePath = '../../';
// Replace a textarea element with an id (or name) of "editor1".
$CKEditor->replace("editor1");
?>
</body>
</html>
开发者ID:redeyes1024,项目名称:medlii_mlm_backend,代码行数:30,代码来源:replace.php

示例3: CKEditor

<html>
<head>
<title>admin - epaper</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body>
<h1>發送電子報</h1>

<?php 
include 'bar.php';
?>

<form method="POST" action="epaper_send_exe.php">
標題:<input type="text" name="epaperSubject"><br>
內容:<textarea name="epaperContent"></textarea><br>

<?php 
include '../ckeditor/ckeditor.php';
$CKEditor = new CKEditor();
$CKEditor->config['width'] = 600;
$CKEditor->basePath = '../ckeditor/';
$CKEditor->replace("epaperContent");
?>

<input type="submit" value="送出">
</form>

</body>
</html>
开发者ID:AaronHsu219,项目名称:NTUCS_PH260,代码行数:30,代码来源:epaper_send.php

示例4: fopen

if (is_file($rutaPadre) and substr($rutaPadre, -4) == "html") {
    $gestor = fopen($rutaPadre, "r");
    $archtml = fread($gestor, filesize($rutaPadre));
    $archtml = preg_replace('/<img (.+?)>/', ' ', $archtml);
    $archtml = preg_replace('COLOR: red;', ' ', $archtml);
    $config = HTMLPurifier_Config::createDefault();
    $purifier = new HTMLPurifier();
    $clean_html = $purifier->purify($archtml);
    $asunto .= "<br><br><hr><br>\r\n                    {$clean_html}";
}
$smarty->assign("sid", SID);
//Envio de session por get
$smarty->assign("usuacodi", $usuacodi);
$smarty->assign("extn", $extn);
$smarty->assign("depecodi", $depecodi);
$smarty->assign("codigoCiu", $codigoCiu);
$smarty->assign("radPadre", $radicado);
$smarty->assign("rutaPadre", $rutaPadre);
$smarty->assign("usuanomb", $usuanomb);
$smarty->assign("usualog", $usualog);
$smarty->assign("destinatario", $destinatario);
//$smarty->assign("concopia"		, "");
//$smarty->assign("concopiaOculta" 	, "");
$smarty->assign("asunto", $asunto);
$smarty->assign("emails", $emails);
$smarty->assign("docAnex", $aneNombDoc);
$smarty->display('index.tpl');
// Replace a textarea element with an id (or name) of "textarea_id".
$CKEditor->config['height'] = 575;
$CKEditor->replace("texrich");
开发者ID:johnfelipe,项目名称:orfeo,代码行数:30,代码来源:index.php

示例5: CKEditor

	<option value="2">Hindi</option>
	<option value="3">Maths</option>
	<option value="4">Science</option>
	<option value="5">Social Science</option>
</select></p>
<p>Link<br />
<input type="text" name="link" value="http://"/></p>
<p>Expiry Date<br />
<input type="text" class="date" name="expiry" /></p>

<?php 
$action = $_GET['type'];
echo '<input type= "hidden" name="type" value="' . $action . '" />';
if ($action == 'upload') {
    echo '<p>Upload<br /><input type="file" name="doc" /></p>';
} else {
    if ($action == 'publish') {
        echo '<p>Content<br /><textarea id="editor" name="content"></textarea></p>';
        require_once "../../ui/ckeditor/ckeditor.php";
        $CKEditor = new CKEditor();
        $CKEditor->basePath = '/ckeditor/';
        $config = array();
        $config['skin'] = 'office2003';
        $config['width'] = '900';
        $CKEditor->replace("editor", $config);
    }
}
?>
<input type="submit" value="Submit" name="tutorial" />
</form>
</body>
开发者ID:nimitz92,项目名称:schoolstreet.in,代码行数:31,代码来源:Pub_Tutorial.php

示例6: CKEditor

"><br>
商品售價:<input type="text" name="productPrice" value="<?php 
echo $record['productPrice'];
?>
" size="5" maxlength="5"><br>
庫存數量:<input type="text" name="productStock" value="<?php 
echo $record['productStock'];
?>
" size="5" maxlength="5"><br>
商品圖片:<input type="file" name="productPic" value="123"><br>
商品摘要:<textarea name="productAbstract"><?php 
echo $record['productAbstract'];
?>
</textarea><br>
商品內容:<textarea name="productContent"><?php 
echo $record['productContent'];
?>
</textarea><br>

<?php 
include '../ckeditor/ckeditor.php';
$CKEditor = new CKEditor();
$CKEditor->basePath = '../ckeditor/';
$CKEditor->replace("productContent");
?>

<input type="submit" value="送出">
</form>

</body>
</html>
开发者ID:AaronHsu219,项目名称:NTUCS_PH260,代码行数:31,代码来源:product_edit.php

示例7: CKEditor

	</p>
</p>
  <?php 
}
?>
  
      <p>&nbsp;</p></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">&nbsp;</td>
  </tr>
</table>
<?php 
// Include CKEditor class.
include_once "../js/ckeditor/ckeditor.php";
// Create class instance.
$CKEditor = new CKEditor();
// Path to CKEditor directory, ideally instead of relative dir, use an absolute path:
//   $CKEditor->basePath = '/ckeditor/'
// If not set, CKEditor will try to detect the correct path.
$CKEditor->basePath = '../js/ckeditor/';
// Replace textarea with id (or name) "editor1".
$CKEditor->replace("policy");
$CKEditor->replace("policyes");
?>
</body>
</html>
开发者ID:raulcastro,项目名称:villaaqua,代码行数:30,代码来源:villarate.php


注:本文中的CKEditor::replace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。