ckeditor

Ckeditor Link with basepath

怎甘沉沦 提交于 2019-12-22 05:05:18
问题 Im using CKeditor however i test it on a staging environment. Then i move it to production. The problem is when im linking i dont want to use mysite.com because then it will only work on staging or production but not on both. Instead i would like to use my basepath php variable which will auto determine to use mysite.com/ or staging.mysite.com Is there any way to do this with the CKeditor URL link option. I have tried setting it to: /myfolder/mypage.php Using the other protocol, however it

Call CKEditor by class

末鹿安然 提交于 2019-12-22 04:26:06
问题 I need to call multiple instances of CKEditor automatically...actually I use the function: CKEDITOR.replace( 'editor1'); Where "editor1" is the id name of the div where I want show my CKEditor. I'm using jQuery to automate this process and I need to use the "class" tag instead the id. In particular i have this html: <div class="CKEditor"> <div class="text"> mytext </div> <p style="text-align:center" class="buttons"> <input type="button" value="edit" class="button_edit"> <input type="button"

CKEditor配置属性

我只是一个虾纸丫 提交于 2019-12-22 02:17:43
一、使用方法: 1、在页面<head>中引入ckeditor核心文件ckeditor.js <script type="text/javascript"src="ckeditor/ckeditor.js"></script> 2、在使用编辑器的地方插入HTML控件<textarea> <textarea id="TextArea1" cols="20" rows="2"class="ckeditor"></textarea> 如果是ASP.NET环境,也可用服务器端控件<TextBox> <asp:TextBox ID="tbContent" runat="server"TextMode="MultiLine" class="ckeditor"></asp:TextBox> 注意在控件中加上 class="ckeditor" 。 3、将相应的控件替换成编辑器代码 <script type="text/javascript">   CKEDITOR.replace('TextArea1');   //如果是在ASP.NET环境下用的服务器端控件<TextBox>   CKEDITOR.replace('tbContent');   //如果<TextBox>控件在母版页中,要这样写   CKEDITOR.replace('<%=tbContent.ClientID.Replace("

CKEditor add CSS styling to Preview and Editor

别等时光非礼了梦想. 提交于 2019-12-22 01:35:06
问题 Is it possible to add CSS to style the Editor text as well as the Preview? The CMS has a different set of CSS files from the public part of the website and I want the editor to try (at least) and reflect the way it would look in the site. For example, all tags with a class of .floatLeft{float:left;margin:0 10px 10px 0;} I want to look the same in the Editor. Thank you. 回答1: Setup CKEDITOR.config.contentsCss variable. CKEDITOR.config.bodyClass and CKEDITOR.config.bodyId could help too. These

How to load TypeKit fonts into a CKEditor instance using jQuery

末鹿安然 提交于 2019-12-22 01:18:28
问题 I'm trying to load TypeKit fonts into an instance of the CKEditor via jQuery. Here's my code: $('.ck-blog textarea').ckeditor(function () { CKEDITOR.scriptLoader.load( "http://use.typekit.com/zku8fnp.js", function (success) { Typekit.load(); alert(success); }, null, true); }, { resize_enabled: false, skin: 'kama', height: '500px', toolbarCanCollapse: false, toolbar_Full: toolbar, forcePasteAsPlainText: true, autoGrow_onStartup: true, templates_replaceContent: false, extraPlugins: 'autogrow

Dummy(Duplicate) Node in Ckeditor [IE]

偶尔善良 提交于 2019-12-22 01:17:05
问题 in CKEDITOR Document I have a node named User_Image <User_Image><sometags><sometags>sometext<sometags>sometext</sometags></sometags></sometags></User_Image> User_Image node i stored in Variable Uimage var Duimage=CKEDITOR.dom.element.createFromHtml(Uimage.getOuterHtml()); now just i created (dummy) duplicate node but this code supported me in all browsers other than IE. in IE Missing Customtags. the all tags are dynamic. then i try with following : var Duimage=ediInstance.document

Input Validation When Using a Rich Text Editor

半腔热情 提交于 2019-12-22 01:12:28
问题 I have an ASP.NET MVC application and I'm using CKEditor for text entry. I have turned off input validation so the HTML created from CKEditor can be passed into the controller action. I am then showing the entered HTML on a web page. I only have certain buttons on CKEditor enabled, but obviously someone could send whatever text they want down. I want to be able to show the HTML on the page after the user has entered it. How can I validate the input, but still be able to show the few things

Django-CKEditor Image Upload

余生颓废 提交于 2019-12-21 17:42:28
问题 I've currently installed Django-CKEditor and have my own custom toolbar. I'm struggling to find how to enable image uploading. When clicking the Image button, I can only upload via URL. I know that, in the plugin, there are views to handle file browsing and uploading but I'm not sure how to activate or use these. There is sparse documentation on the plugin so I am reaching out for your help! https://github.com/shaunsephton/django-ckeditor 回答1: In the current version (5) you can use

Using inline CKEditor on dynamically added text

喜夏-厌秋 提交于 2019-12-21 17:32:35
问题 I am building a web app that uses javascript to dynamically add elements to the page, that can then be edited using contentEditable="true" and CKEditor . Currently if I add an element to the page with contentEditable="true" , the element is editable but the CKEditor toolbar is not appearing. I have tried calling CKEDITOR.inlineAll() but this doesn't seem to do anything. How can I activate CKEditor inline editing on dynamically created elements? (Without refreshing the page). EDIT: I have

Insert HTML before an element in CKEditor

此生再无相见时 提交于 2019-12-21 11:57:09
问题 What is the best way to programmatically insert HTML (that represents a CKEditor widget) before an existing element in CKEditor? The content editable is not in focus and is not currently being edited. For example, suppose the contents of the editor are: <h1>Here's a title</h1> <h2>Here's a subtitle</h2> <p>Here's a paragraph</p> <p>Here's a paragraph</p> <p>Here's a paragraph</p> Now, say I have a reference to the second <p> element. What is the best way to insert html before this tag?