ckeditor

Insert image to CKEditor

匿名 (未验证) 提交于 2019-12-03 01:10:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I trying to use CKEditor5 and CKEditor-react in my electron app. And i want to paste image in editor, but i have an error filerepository-no-upload-adapter: Upload adapter is not defined. Docs says that I mast using cloud. But my app must working locally and without internet Can someone help me? 回答1: The docs say, in short, this: To handle image upload in CKEditor 5 you can use one of these: use the built-in Easy Image adapter (cloud service), use the built-in CKFinder adapter (can work locally if you want), write your own adapter (in which

How can I add rel = “nofollow” to a link in CKEditor if it's an external link

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i want to give rel="nofollow" to my external links which its content managed by ckeditor. example.com = my site externallink.com = any external link For example: <p> Lorem <a href="https://example.com/an-article.html">ipsum</a> dolar <a href="http://externallink.com/example.html" rel="nofollow">sit</a> amet. </p> This solution: editor.dataProcessor.htmlFilter.addRules( { elements : { a : function( element ) { if ( !element.attributes.rel ) element.attributes.rel = 'nofollow'; } } }); from https://stackoverflow.com/a/6930940/1848929 adds

Angular material 2 tabs with ckeditor

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a problem while trying to put ng2-ckeditor within a md-tab of angular-material2. Here's the code: HTML : <md-tab-group> <md-tab> <ckeditor [(ngModel)]="content"></ckeditor> </md-tab> </md-tab-group> The problem is that I get an error whenever I click on something in the ckeditor: ckeditor.js:438 Uncaught TypeError: Cannot read property 'getSelection' of undefined at CKEDITOR.dom.selection.getNative (ckeditor.js:438) at CKEDITOR.dom.selection (ckeditor.js:436) at a.CKEDITOR.editor.getSelection (ckeditor.js:434) at $.onOpen (ckeditor.js

CKEditor in CodeIgniter

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I wanna load CKEditor in CodeIgniter,I search a lot,but can't understand their way. I placed ckeditor in application/plugins folder and now I wanna make editor ,so I do following in Controller Method. include APPPATH.'plugins/ckeditor/ckeditor.php'; $CKEditor = new CKEditor(); $CKEditor->basePath = '/'.APPPATH.'plugins/ckeditor/'; $initialValue = ' This is some sample text . '; echo $CKEditor->editor("editor1", $initialValue); but it makes simple teaxaria only ,with This is some sample text . value. where is the problem and how should I

ckeditor getData() doesnt seem to work as it should

匿名 (未验证) 提交于 2019-12-03 00:53:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: First off I'll start off by saying I am new to javascript so hopefully this isn't a complete face palm question. That being said, the following code should alert the value of the editor when the user clicks off of it. <script type = 'text/javascript' > function openEditor (){ html = "Hello World" ; config = { startupFocus : true }; editor = CKEDITOR . appendTo ( 'textBox' , config , html ); if ( editor ) { editor . on ( 'blur' , function ( event ) { var ckvalue = CKEDITOR . instances . editor . getData (); alert ( ckvalue ); }); }

ckeditor - Uncaught TypeError: Cannot read property &#039;icons&#039; of null

匿名 (未验证) 提交于 2019-12-03 00:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When trying to use ckeditor for the first time. ckeditor works, but when I try to add imageupload and uploadloadwidget plugins then I get the error: Uncaught TypeError: Cannot read property 'icons' of null Does anyone have any ideas as to what might be causing it? <script src="//cdn.ckeditor.com/4.5.6/basic/ckeditor.js"></script> <script> $(document).ready(function () { CKEDITOR.plugins.addExternal('imageupload', '/ckeditor/plugins/imageupload/'); CKEDITOR.plugins.addExternal('uploadwidget', '/ckeditor/plugins/uploadwidget/'); CKEDITOR

if(str(saved_path).split(&#039;.&#039;)[1].lower() != &#039;gif&#039;): IndexError: list index out of range ERROR basehttp 124 &quot;POST /ckeditor/upload/ HTTP/1.1&quot; 500 96995

匿名 (未验证) 提交于 2019-12-03 00:39:02
用python写Django项目的时候 用了CKEditor富文本编辑器,编辑文本,上传图片的时候,当我点击上传到服务器,一开始网页 页面弹出 ‘不正确的服务器响应‘,我上网查,看到说版本的原因,我又去降pip install django-ckeditor==4.5.3 然后又出来其他问题 TypeError: build attrs() got an unexpected keyword argument ‘name‘ TypeError:build attrs()得到了一个意想不到的关键字参数“名称”,还是版本不行 ,我又升到最新,重新开始检查 ‘不正确的服务器响应‘的问题,最后发现原来我们将通过Django上传的图片保存到了FastDFS中,而保存在FastDFS中的文件名没有后缀名,ckeditor在处理上传后的文件名按照有后缀名来处理,所以会出现bug错误, 修正方法 找到虚拟环境目录中的ckeditor_uploader/views.py文件,如 ~/.virtualenvs/meiduo/lib/python3.5/site-packages/ckeditor_uploader/views.py 将第95行代码修改如下: if(str(saved_path).split('.')[1].lower() != 'gif'): IndexError: list

富文本编辑器ckeditor的使用

匿名 (未验证) 提交于 2019-12-03 00:36:02
首先需要下载所需要的ckeditor版本, 官网下载: http://download.cksource.com/CKEditor/CKEditor 。 我这里用的是 CKEditor4.4.6 标准版standard。 官网下载: http://download.cksource.com/CKEditor/CKEditor/CKEditor 4.4.6/ckeditor_4.4.6_standard.zip html页面上需要指定类名为ckeditor <textarea rows="" cols="" class="ckeditor" name="shopDetail"></textarea> 点击图片 弹出 若没有上传按钮,在config.js里面添加 // 上传图片路径 config.filebrowserImageUploadUrl = "/back/shopinfo/uploadFile"; 就会有了,同时这也是上传图片的路径,也就是action的路径。 接下来controller的内容 @RequestMapping("uploadFile") public void uploadFile(@RequestParam("upload") MultipartFile uploadfile,HttpServletRequest request

ckfinder+ckeditor配置经验

匿名 (未验证) 提交于 2019-12-02 23:57:01
1,单独使用ckfinder <div> <script type="text/javascript" src="../ckfinder/ckfinder.js"></script> <script type="text/javascript"> function BrowseServer(inputId) { var finder = new CKFinder() ; finder.basePath = '../ckfinder/'; //导入CKFinder的路径 finder.selectActionFunction = SetFileField; //设置文件被选中时的函数 finder.selectActionData = inputId; //接收地址的input ID finder.popup() ; } //文件选中时执行 function SetFileField(fileUrl,data) { document.getElementById(data["selectActionData"]).value = fileUrl ; } </script> <p> <asp:TextBox ID="txtImgPath" runat="server"></asp:TextBox> <input type="button" value=" 浏 览 " onclick=

Django学习:使用富文本编辑器(15)

匿名 (未验证) 提交于 2019-12-02 23:56:01
目前后台写博客的页面比较简陋,只能用来设置一些简单的文字,或者格式,而且编写不太方便。为了方便博客编写,可以使用富文本编辑器。 新增一篇文章进行测试 进入详情页,加粗效果并没有显示出来 修改详情页的模板页面 blog_detail.html ---- snip ---- < div class = 'blog-content' >{{ blog . content | safe }}</ div > ---- snip ---- 此时刷新详情页,加粗效果显示了出来。 但是在博客类型显示摘要的时候,会显示出 <b></b> 标签 修改博客列表的模板页面 blog_list.html ---- snip ---- <p> {{ blog . content | straptags | truncatechars_html : 120 }}</ p > ---- snip ---- 此时博客列表显示正常。 开始使用 django-ckeditor 编辑器 安装 django-ckeditor pip install django-ckeditor 在项目中进行注册 settings.py ---- snip ---- INSTALLED_APPS = [ 'django.contrib.admin' , 'django.contrib.auth' , 'django.contrib