ckeditor

Ckeditor Link with basepath

自闭症网瘾萝莉.ら 提交于 2019-12-05 05:37:48
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 sets the URL as http///myfolder/mypage.php Is this possible or is there an addon that can do this for me?

Call CKEditor by class

萝らか妹 提交于 2019-12-05 03:47:28
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" value="preview" class="button_preview" style="display:none"> </p> <div class="editor" > </div> </div>

ckeditor: “a is undefined”

与世无争的帅哥 提交于 2019-12-05 02:58:38
I just added CKEditor to my website, but I'm getting the following error in my console: I followed the installation guide as it's written so I have no idea what's wrong. Here's, briefly, what my call looks like: <textarea id="full-editor" name="full-editor" rows="10" columns="6"></textarea> <script type="text/javascript"> CKEDITOR.replace('#full-editor'); </script> Aah.. try this Remove # from the selector inside CKEDITOR.replace('#full-editor'); According to installation guide you shared, this is what u need CKEDITOR.replace('full-editor'); // NO #. You must have got confused with jQuery This

Is there a way to override CKEditor's config file for each instance of the editor?

和自甴很熟 提交于 2019-12-05 02:33:25
I have a global size and height set CKEDITOR.editorConfig = function( config ) { config.height = '400px'; config.width = '600px'; ... And I would like to change this height and width for only one instance of the editor on a seperate page. Has anyone else accomplished this? Yes. When you create the editor on the page, you can override CKEDITOR.replace(editorName, { height: 448, width: 448, customConfig: '/path/to/yourconfig.js' }); In fact as a performance recommendation you can put all the configuration options here and save the loading of the config file separately. You might do this in a

Ckeditor character limitation with charcount plugin

故事扮演 提交于 2019-12-05 01:49:49
问题 How can i prevent users to enter new characters after max character limit is reached ? Ckeditor charcount plugin just shows me the remaining characters, i want it to stop at 0. But it goes minus integers. Here's my html code. <textarea id="myTextEditor1" name="myTextEditor"></textarea> <script type="text/javascript"> CKEDITOR.replace('myTextEditor1', { height: 200, extraPlugins: 'charcount', maxLength: 10, toolbar: 'TinyBare', toolbar_TinyBare: [ ['Bold','Italic','Underline'], ['Undo','Redo']

Selenium and ckEditor

六月ゝ 毕业季﹏ 提交于 2019-12-05 01:00:38
Does anybody know How I can get the ckEdtior to work with Selenium. I'm not able to get the focus to the "html edit" field or change the value of the html field. Does anybody has experience with this ? Just for completing the anwser: I got it to work with: runScript("CKEDITOR.instances['InstanceName'].setData('<p>testContent</p>');") It did not work with the getEval command. When I have had a to test against WYSIWYG editors I have had to build my own mechanism to work in the content area. Normally it involves having to set the inner HTML of object and then start using the page manipulators in

CKEditor - have it return markdown syntax instead of HTML

混江龙づ霸主 提交于 2019-12-05 00:40:27
问题 I'm working on a CMS platform and I am planning to use CKEditor as it seems to offer everything I need. One thing that is a bit of a bother to me is that I want my content to be in markdown format instead of html and while I found a BBCode extension for this, I couldn't figure out how it can be remade to support markdown. I tried to find an editor that does markdown out of the box, but the ones I found are way too simple for what I need and CKEditor has the benefit of having a plugin system

CKEditor 3.1 - getClipboardData

有些话、适合烂在心里 提交于 2019-12-04 22:48:48
Is there anyway to get the html clipboard data as done in getClipboardData() in plugin clipboard.js? Can anyone pls give me some guidelines to do that? In previous version I can get data simply by calling CKEDITOR.getClipboardData() but this is no longer available in CKEditor 3.1. Many thanks, Kristin I don't know why the function was removed from CKEditor's core, but the "paste from clipboard" functionality continues to exist in the pasteText plugin . It should be possible to execute the plugin's function directly programmatically, but I don't know how this is done yet. As a last resort, you

How to check CK editor version

馋奶兔 提交于 2019-12-04 22:14:17
There is an existing CK editor folder in my project. How can I find out it's version? Is it documented? kumar just make an alert as below in the config.js file, it gives the value alert(CKEDITOR.version); or you can see it directly in the file ckeditor_php4.php, for eg: var $version = '3.6.3'; working demo : alert(CKEDITOR.version); console.log("CKEDITOR.version ==",CKEDITOR.version); <head> <meta charset="utf-8"> <title>CKEditor</title> <script src="https://cdn.ckeditor.com/4.11.4/standard/ckeditor.js"></script> </head> <body> <textarea id="editor1"></textarea> <script> CKEDITOR.replace(

Input Validation When Using a Rich Text Editor

跟風遠走 提交于 2019-12-04 21:20:00
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 that are enabled in the editor? So basically I want to sanitize everything except for a few key things