ckeditor

How to define CKEditor5 two-way converter with view defined as RegExp or function?

跟風遠走 提交于 2020-01-25 00:27:26
问题 I'd like to create plugin which allows on many values, which are considered as range not a list. So I thought, that I could use attributeToElement, but it seems to accept only specific values, which are kept in object, what is not possible for my case. I wonder how to define view elements with entire range of possible values (in my case colors). I thought about matching them with some sort of RegExp or function. How can I achieve that? 回答1: Actually it seems to be not possible to use

CKEditor 集成CKFinder集成

元气小坏坏 提交于 2020-01-24 13:51:25
lCKEditor原名FckEditor,著名的HTML编辑器,可以在线编辑HTML内容,演示一下。 打开 。自己人用CKEditor,网友用UBBEditor。 l配置参考文档,主要将ckeditor中的(adapters、images、lang、plugins、skins、themes、ckeditor.js、config.js、contents.css)解压到js目录,然后“显示所有文件”,将ckeditor的目录“包含在项目中”,在发帖页面引用ckeditor.js,然后设置多行文本框的class="ckeditor"(CSS强大)(服务端控件CssClas=" ckeditor ",客户端控件要设定cols、rows属性,一般不直接用html控件),代码中仍然可以通过TextBox控件的Text属性来访问编辑器内容。 l由于页面提交的时候asp.net会把富文本编辑器中的html内容当成攻击内容,因此需要在aspx中的Page标签中设置 ValidateRequest="false" 来禁用攻击检测(2010中还要根据报错信息修改WebConfig来禁用XSS检测)。 lCKFinder是一个CKEditor插件,用来为CKEditor提供文件的上传的功能。将bin\Release下的CKFinder.dll添加到项目的引用;将core、ckfinder.js

Cannot set property 'dir' of undefined ckeditor in Angular2

本秂侑毒 提交于 2020-01-24 03:51:31
问题 I am getting "Cannot set property 'dir' of undefined" whenever I try to load Ckeditor. I am using angular-cli for development of my Angular2 application. CKEditor version : 4.4.7 When i run the application using ng serve. This issue doesn't reproduce but when i run this application using ssl then i get this issue for CKEditor. I have added basepath in index.html but still facing the issue. I have tried this : 1) <script type="text/javascript"> window.CKEDITOR_BASEPATH = '//localhost/assets

CKEditor escape html

不羁岁月 提交于 2020-01-24 00:40:15
问题 I have CKEditor on post text where I want to insert html-code. Something like this: <pre> <code class="html"> <img src="path/to/img.jpg" /> </code> </pre> But when I save the text, CKEditor interprets img-tag as actual html-image and shows broken image. How I can prevent that and tell to escape html-code in pre-code block 回答1: <pre> <code class="html"> <img src="path/to/img.jpg" /> </code> </pre> This is an image inside a pre element. What you want to create is: <pre> <code class="html"> <img

ckeditor property to resize a image

青春壹個敷衍的年華 提交于 2020-01-24 00:34:06
问题 Is there any property in ckeditor that will resize the image after uploading to a specified dimension. for eg: if user uploads a image of 1000*1000 px and doesn't resize it, it can be a massacre. As i am saving and displaying on the same page without refresh using ajax. All i want is to automatically resize image on upload from ckeditor. As well, is there any way that i can find using jquery whether there is any image in the text saved by user, as a user may or may not upload a image, I am

ckeditor font style 13 px

拜拜、爱过 提交于 2020-01-23 12:54:27
问题 I had earlier asked question about it. But after trying out all the possiblities where the error occurs, I have found that in ckeditor if you copy some text and paste it, it is default pasted as <p style="font-size: 13px;"> example picture HTML CODE <div><p>Original Text</p> <p><strong><u>The quick brown fox jumps over the lazy dog</u></strong></p> <p>The quick brown fox jumps over the lazy dog</p> <p>Copied Text</p> <p style="font-size: 13px;"><strong><u>The quick brown fox jumps over the

Removing HTML element in CKEditor

别等时光非礼了梦想. 提交于 2020-01-23 01:21:07
问题 I am creating a CKEditor plugin. As part of this plugin, I would like to be able to remove some arbitrary HTML element from the editor's content. An <img id="remove-me" /> for instance. I know I can get the contents ( var contents = e.getData(); ) and replace the contents with something else ( e.setData(newContents); ). I know I could do a string/regex replace, but that gets tricky since the user may add some arbitrary attributes or spacing to the HTML. I would love to be able to use

ckeditor image align center customization

怎甘沉沦 提交于 2020-01-21 05:36:28
问题 After researching at least a dozen threads on image centering in regards to ckeditor I wanted to post what I am using for one of our company applications and see if any other geeks have tips or suggestions for improvement. I am posting this on stackoverflow because it's where we all go for help and I know others are researching this same topic. Our editor is used for email templates so I wanted to make sure the style attributes are also reinserted into the img tag attributes: <img align="left

ckeditor escapes all text - how can I prevent it from doing so

亡梦爱人 提交于 2020-01-17 10:56:30
问题 I dont want the ckeditor to escape text written. I use the editor such that customers can write their their own mailtemplates, and I give them code snippets they can paste in the around in the text in the editor to merge in dynamic data, ala ${customer.name}. The text is then persisted to database and retrieved again other places in code and filled with data through Freemarker. And here the problem amerge - Freemarker uses < and > characters, but the ckeditor escapes them. How can I configure

ckeditor escapes all text - how can I prevent it from doing so

被刻印的时光 ゝ 提交于 2020-01-17 10:55:47
问题 I dont want the ckeditor to escape text written. I use the editor such that customers can write their their own mailtemplates, and I give them code snippets they can paste in the around in the text in the editor to merge in dynamic data, ala ${customer.name}. The text is then persisted to database and retrieved again other places in code and filled with data through Freemarker. And here the problem amerge - Freemarker uses < and > characters, but the ckeditor escapes them. How can I configure