ckeditor

CKEditor - how to get the template attributes

南笙酒味 提交于 2019-12-11 23:37:14
问题 I'm using CKEditor 's template plugin to load the templates in the editor. In the templates I've defined likt this. templates: [ { title: "Quickclick 1", image: "template1.png", description: "Quickclick 1 template", html_et: "<span>test1</span>", html:' <span>test</span>' }] When the user selects a template, the html is loaded which is fine. But also, it would be great if there is a way to get the property of the current selected template from the CKEditor instance. I need to get the html_et

Ckeditor in Rails 3

本秂侑毒 提交于 2019-12-11 23:27:06
问题 I have added ckeditor(gem "ckeditor", "3.7.3") in my rails 3.2 app and is working fine. But the problem is I want on specific things out of the whole toolbar , I have seen this. Here it has mentioned two types of toolbar Full and Easy,where Easy is configued as shown here. So the question is how do I get the information of all the variables so that I use only what I need. 回答1: If you create an /app/assets/javascripts/ckeditor directory and then a config.js file in that, you can add some

新一代富文本编辑器——CKEditor5

妖精的绣舞 提交于 2019-12-11 23:24:31
概述 CKEditor是个跨时代的、轻量级的富文本编辑器,具有诸多优点: 无字号、字体概念,其一、二、三级标题及正文的字号、字体都是固定的,用户不必单独设置字体、字号。 不同段落之间,自动增加距离,代替了以往输入回车的尴尬。全文只要段落内,行距均固定(约1.5倍),无需调整。 其表格不但具有自适应宽度的响应式效果,还可设置首行及首列的不同效果(用于标题)。 快捷键可插入图片,且图片可自动适应位置、大小,如:大图片直接占宽度的100%,而较小的图片自动排列至左侧或右侧,自动给文字腾出更多位置。在前端,还可点击图片后自动放大。 CKEditor 5 (文献): https://ckeditor.com/ckeditor-5/demo/#document CKEditor 5 (内联): https://ckeditor.com/ckeditor-5/demo/#inline 主标题、正文、其他用不同的文本框分开。 CKEditor生态系统文档 首页: https://ckeditor.com/docs/index.html 5: https://ckeditor.com/docs/ckeditor5/latest/builds/ 下载 https://ckeditor.com/ckeditor-5/download/ 来源: https://www.cnblogs.com/xiaohi

CkFinder “Edit” mode how to set Save Changes preferences (Overwrite File)

拟墨画扇 提交于 2019-12-11 21:15:39
问题 We are evaluating CkFinder 3.2.0, we have an issue with setting some configurations/preferences. After uploading an image, user can select it and making some modification using "Edit" feature. At the moment of saving the modified image, a dialog appears giving the option to Overwrite File or not, if user select NO, a "Save As" text box appear. We need to: Disable Overwrite File option at all. When an "Edit" on an image happens we want just to create a new file (no overwrite option), with a

Adding class in table in ckeditor for rails application

让人想犯罪 __ 提交于 2019-12-11 20:20:44
问题 I want to add a class named "table" to the table that is created by default. I also want to change the value of border from table dialogue box of ckeditor. I am in big trouble. 回答1: I got the answer: CKEDITOR.on('dialogDefinition', function (ev) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if (dialogName === 'table') { var addCssClass = dialogDefinition.getContents('advanced').get('advCSSClasses'); addCssClass['default'] = 'table-class'; } }); 来源: https:/

Image Margins in CKEditor

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 18:29:09
问题 The Image properties dialog has HSpace and VSpace settings. When I go to the advanced tab, I can see that it's actually setting the margin styles. I want to be able to set each margin individually. For example, a right-aligned image would have a left and bottom margin, but not top or right. Is there a way to allow for setting each of the four margins individually? 回答1: Using CSS in preferred over inline styles. You can create your own styles and apply them to your image using CK's stylesheets

When is a ckeditor instance well and truly loaded?

孤人 提交于 2019-12-11 18:23:44
问题 I want to manipulate a CKEDITOR instance once it is well and truly loaded, meaning I've fetched a series of things and inserted them with setData. The problem is, I call a function once I'm done doing setData that manipulates the DOM of the loaded data, and it does nothing, because apparently the data hasn't actually been loaded and displayed or... whatever it is that CKEDITOR does with it exactly. If I do a setTimeout(...., 3000) or thereabouts, it does work. Of course, that is an Ugly Hack

localHost down when adding new item to the database

对着背影说爱祢 提交于 2019-12-11 17:38:53
问题 I've been seeing the weirdest thing in my life I have: Controller, EF Auto-generated Model And a view for an articles system. in that system, I have an action for adding an article and it looks like that in the browser : the code in the Controller : [HttpPost] public ActionResult AddArticle(NewsData art, HttpPostedFileBase file) { if (file != null) { string pic = Path.GetFileName(file.FileName); string paths = Path.Combine(Server.MapPath("~/NewsPhotos/{0}"), pic); // file is uploaded file

How to disable ckeditor cloudservices

你。 提交于 2019-12-11 17:28:39
问题 I'm working on a Drupal site that just updated its ckeditor library from 4.5.x to 4.9.2. On one of our servers the image button suddenly stopped appearing and I find the error "Error code: cloudservices-no-token-url." in the browser javascript console when I load any page with ckeditor. I'm hoping I can disable cloudservices to resolve the error. I tried using config.removePlugins = 'easyimage'; in config.js. Are there other addons that use cloudservices I need to disable? 回答1: The simplest

Cannot read property 'getComputedStyle' of undefined ckeditor

。_饼干妹妹 提交于 2019-12-11 17:17:00
问题 I use ckeditor on my website, and from time to time when I load my page I get this error which blocks the ckeditor: "Cannot read property 'getComputedStyle' of undefined ckeditor" Here's the code that initializes the ckeditor : CKEDITOR.replace('TA_comments', { toolbar: 'MyToolbar_user', on: { 'instanceReady': function (evt) { //Set the focus to your editor CKEDITOR.instances.TA_comments.focus(); } } }); Any idea where it can come because it's really a random problem on all browsers? Thanks !