ckeditor

Get text from CK Editor textarea in JQuery

浪子不回头ぞ 提交于 2019-12-14 03:51:12
问题 I am using CK Editor in an app. <textarea name="contentDetails" id="contentDetails" rows="10" cols="80"></textarea> But I can't retrieve text from that textarea. I've tried- var content= $("#contentDetails").text(); //and also .val() & .html() But content variable remains empty. Any idea? //UPDATE - add my codes below <script> CKEDITOR.replace('contentDetails'); $(function () { $("#submitcontent").click(function (e) { e.preventDefault(); var content= $("#contentDetails").text(); }); }); <

CKFinder how to get dimension URL and Dimension (width/height) when choosing an image (files:choose)?

て烟熏妆下的殇ゞ 提交于 2019-12-14 03:49:03
问题 I am using CkFinder 3, after uploading successfully an image I need to be able to detect after an User click the "Chose" button: file name / id url width and height for original image At the moment I am using the files:choose but I cannot find this information on the cb event. Any idea how to solve it? A sample of code would be appreciate thanks. CKFinder.modal( { connectorPath: 'https://api.mysite.com/lib/ckfinder/core/connector/php/connector.php', resizeImages: false, startupFolderExpanded:

How to use multiple upload image in ckeditor image2 plugin?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-14 03:32:59
问题 Is it some configuration rule for multiple upload image in CKEditor image2 plugin? My current configuration is: editor.ckeditor({ forcePasteAsPlainText: true, extraPlugins: 'embed,autoembed,image2', image2_alignClasses: [ 'image-align-left', 'image-align-center','image-align-right' ], image2_disableResizer: true, filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images', filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token=' + editor.attr('data-token'),

How do I pass custom values to CKFinder3 when instantiating a CKEditor4 instance?

拈花ヽ惹草 提交于 2019-12-14 03:18:23
问题 I'm having some trouble using pass to pass variables to my CKFinder3 (ASP) connector when using CKEditor4. I create my editor instance with: CKFinder.setupCKEditor( myEditor, { pass: 'testVar', testVar: 'nooice', ... }); but the variable just doesn't seem to make it over to CKFinder. If I add this code to the CKFinder config directly it does work though: config.pass = 'testVar'; config.testVar = 'nooice'; That's great, but the values I want to pass will be dynamic, so I need to pass them in

CKEditor strip/filter HTML comments?

醉酒当歌 提交于 2019-12-14 02:17:30
问题 I see a lot about this smart Advanced Content Filter , but it's too smart, it handles HTML elements and doesn't let me do custom filtering. I can't figure out how to strip all inserted HTML comments. 回答1: Advanced Content Filter does not touch comments. It only filters HTML elements, nothing more. If you want to strip all comments, then using dataProcessor's filters will be the best choice. For example to filter them out on input: CKEDITOR.replace( 'editor1', { on: { pluginsLoaded: function(

How do I stop js files being cached in IE?

时光怂恿深爱的人放手 提交于 2019-12-14 02:14:14
问题 I've created a page that uses the CKEditor javascript rich edit control. It's a pretty neat control, especially seeing as it's free, but I'm having serious issues with the way it allows you to add templates. To add a template you need to modify the templates js file in the CKEditor templates folder. The documentation page describing it is here. This works fine until I want to update a template or add a new one (or anything else that requires me to modify the js file). Internet Explorer caches

CKeditor stripping font tags instead of converting to span

余生长醉 提交于 2019-12-14 02:12:47
问题 I have a CKeditor instance (version 4.1.2) with font, size, text and background color buttons in its toolbar, all completely default. It's created by replacing a <textarea> whose contents are loaded from a database. When the loaded html contains elements such as: <h3><font color="red">Big Red Heading</font></h3> CKeditor is simply stripping away the tags, to leave: <h3>Big Red Heading</h3> Whereas, my expectations (according to the docs) were that it should convert this to: <h3><span style=

CKEditor separate the toolbar from the editor

白昼怎懂夜的黑 提交于 2019-12-14 02:08:46
问题 I'm using CKEditor on a project where space for the instances is constrained to the point that it would be useful to have a remote toolbar in some fixed position, similar to TinyMCE or nicEdit. Has anyone managed this? 回答1: I found the answer to my own question using Shared Spaces lets you do what I wanted. I found the example here. http://vtk.ugent.be/best/sites/all/libraries/ckeditor/_samples/sharedspaces.html 来源: https://stackoverflow.com/questions/4567164/ckeditor-separate-the-toolbar

Adding multiple content CSS files to CKEditor

南楼画角 提交于 2019-12-14 00:57:20
问题 How can I use more than 1 css file as content CSS with CKEditor? I already added bootstrap css in the config. config.contentsCss = '/css/bootstrap.min.css'; Our designer created a 2nd css to customize some stuff and I also need to add that css file to CKEditor. I tried variations below, but no success so far: config.contentsCss = '/css/bootstrap.min.css', '/css/styles.css'; config.contentsCss = '/css/bootstrap.min.css, /css/styles.css'; I am using v 4.1.1 回答1: The config.contentsCss

Ckeditor content retrieval using PHP

南楼画角 提交于 2019-12-13 21:39:03
问题 I've been trying to integrate ckeditor in my php website, and I've encountered the following issue. Essentially, the content in ckeditor wouldn't appear in the $_POST variable after submitting the form. I looked the issue up and apparently one has to update the form field with a small piece of code. So I wrote the corresponding script and linked it to the submit button in order to get the result I want, but $_POST still shows up as empty. I'm inexperienced with Javascript so the error