Yii中引用插件和ckeditor body与P标签去除
来源:互联网 发布:手机淘宝上怎么开网店 编辑:程序博客网 时间:2024/06/06 16:29
在Yii中引用插件
注:插件和扩展不一样
1,源码放在project/ckeditor/*
2,在代码create,update中引用
Php代码
<?php
include_once "/ckeditor/ckeditor.php";
// Create a class instance.
$CKEditor = new CKEditor();
// Path to the CKEditor directory.
$CKEditor->basePath = Yii::app()->baseUrl.'/ckeditor/';
// Replace a textarea element with an id (or name) of "textarea_id".
$CKEditor->replace("News_content");
?>
引入插件方法二:
第一,比如说,我们要使用 Zend framework的东西。我们把zend framework解压到 prtected/vendors里面,现在的文件夹为 protected/vendors/Zend/Search/Lucene.php
第二,在controller文件的头部,插入下面代码。
Yii::import(’application.vendors.*’);
require once(’Zend/Search/Lucene.php’);
上面代码包含了Lucene.php这个类文件。因为我们用到的是相对路径,所以我们需要改变PHP加载文件的路径,Yii::import 一定要在require_once 之前。
第三,一旦我们设置好了,我们就可以在controller里面使用了。比如说
$lucene=new Zend Search Lucene($pathOfIndex);
$hits=$lucene->find(strtolower($keyword));
项目中使用到了ckeditor ,但在比编辑框的下方多出两个标签,分别是一个 body与P标签,查询代码后发现不是我们自己增加,而是组件自己就有的问题
经过查询在使用的js申请处 新增 CKEDITOR.config.removePlugins='elementspath'; 就能去除掉此标签
- Yii中引用插件和ckeditor body与P标签去除
- ckeditor 去除自带的<p>标签
- ckeditor中去掉p标签
- CKEditor去除<p></p>
- CKEditor去除<p></p>
- 将ckeditor中<p>段落去除
- CKEDITOR 中<p>标签引发的问题
- Yii引用CKeditor编辑器
- Ckeditor 中的<p>的去除
- 去除CKEditor自动添加的<p></p>标签的方法, 有两种办法:
- ckeditor插件引用
- yii中Label标签与LabelEx标签的区别
- Yii整合Ckeditor和Ckfinder上传文件
- Yii 中引用bootstrap
- C# 正则表达式去除<p>标签
- 去除ueditor自动默认添加p标签
- h标签与p标签
- head标签与body标签的区别
- poj 3304——Segments
- [leetcode刷题系列]Valid Parentheses
- 把db数据库放到assert下,然后拷贝到某个地方使用
- AC自动机算法与AC自动机专辑
- Hive体系结构 —— 深入浅出学Hive
- Yii中引用插件和ckeditor body与P标签去除
- JDBC访问SQL Server2008
- Hive的原理—— 深入浅出学Hive
- ACMer感想帖/退役帖汇总
- 软件测试知识点
- Matlab连续读取多个文件
- 剑指Offer算法实现之十二:打印1到最大的n位数
- git回滚
- 百度地图中的覆盖物