ckeditor

Upload Image: Cannot read property 'setCustomData' of undefined

依然范特西╮ 提交于 2019-12-10 23:35:03
问题 I am trying to embed into the editor an uploaded image. My filebrowserUploadUrl is /api/m/image and it seems to be working fine. After I clicked the Send it to the Server button, there is a script error as follows: image.js?t=H4PG:19 Uncaught TypeError: Cannot read property 'setCustomData' of undefined at textInput.onChange (image.js?t=H4PG:19) at textInput.n (ckeditor.js:10) at textInput.CKEDITOR.event.CKEDITOR.event.fire (ckeditor.js:12) at textInput.setValue (ckeditor.js:619) at textInput

Jasper Reports - Show images from html source

别等时光非礼了梦想. 提交于 2019-12-10 23:06:24
问题 I'm currently editing code created by a colleague which uses Jasper Reports to create a PDF file with certain elements of which one is a bunch of html code. This html consists of text and images (both linked and in base64 format ). Almost everything works perfectly, but I have issues with the html. Most importantly the images do not show up and secondly not all html tags get processed. Is this even possible to do with Jasper Reports ? Current code in the template where the html is supposed to

Django-ckeditor not displaying correctly in html

只愿长相守 提交于 2019-12-10 22:06:35
问题 I have a little problem, I installed Django-ckeditor in my admin section. I can perfectly use it in Admin, but when I display on the Html page it is not showing correctly, I'll put some image to have a better visual. Here is my admin ckeditor, works perfectly! Here is my html page, where the ckeditor don't works correctly How Can I resolve this issue ? (I use python 2.7.4 and Django 1.7.4) 回答1: When rendering html in templates, make sure you mark it as safe... {{ article.content|safe }} See

How do I load CKEditor with Javascript?

青春壹個敷衍的年華 提交于 2019-12-10 20:08:38
问题 I have integrated CKEditor into my commenting system for my blog, and it shows up fine when I load a new page. However, for reply comments, I have a javascript action that opens a new comment form from a "reply to this comment" link below each comment. In this case, the CKEditor doesn't load (I just get a basic non-CKEditor text-area). Do I need to add something to my javascript file so that the CKeditor loads correctly? posts/show.html.erb <%= @post.content %> <%= render 'comments/form' %>

ckeditor add “keyup” event

喜欢而已 提交于 2019-12-10 18:46:29
问题 How can I attach "keyup" event to CKEdtior (I am using the jQuery adapter) This is the code I am currently using: $('#ckeditor textarea').ckeditor(function(editorInstance) { /* attaching "keyup" doesnt seem work so I have to stick with "key" */ $('#ckeditor textarea').ckeditorGet().on('key', function(e) { /* do stuff ... */ }); }, { skin : 'office2003' }); The whole idea is to get the ckeditor content every time the content is changed. Hope someone can help here. Thanks 回答1: Ok, this seems to

CKEditor 5 save selected text and set it again as selected after recover the content

痴心易碎 提交于 2019-12-10 18:18:34
问题 I've been working around with the CKEditor 5 with: var mySelection = editor.getSelection(); to get selected text and being able to save it to a database for example. I wanted to know if there is an easier way to save selected text to a database and then after recovering the text a way to set it as selected automatically in the editor window. An easy way to save selection and set selection again in the same text. Is there a plugin or something similar? Regards 回答1: This is the way to get stuff

How to add custom file upload button in CKEditor with Cross domain support

徘徊边缘 提交于 2019-12-10 18:15:45
问题 I am using CKEditor in one of my web application. I am enabling the FileUpload option in CKEditor by setting filebrowserImageUploadUrl property. CKEDITOR.replace('editor1', { filebrowserImageUploadUrl: 'http://MyServer.com/fileupload.ashx', }); Now the problem is the location where image has to be uploaded is present on another server and my web application is hosted on another server. So whenever I tried to upload the image using Upload button, It get successfully uploaded but CKEditor

CKEditor Code Snippet plugin does not do syntax highlighting in yii2 framework

限于喜欢 提交于 2019-12-10 17:37:42
问题 I am using CKEditor and its Code Snippet plugin in yii2 php framework application. I would like to get syntax highlighting when I write some code using CKEditor, but whatever I do I can not make it work. I have tried everything from the guide like including css and highlight.js in the head but I get nothing... Declaring asset bundle also do not help, yii2 will load files, but highlighting still do not work. public $css = [ 'css/site.css', 'highlight/styles/default.css' ]; public $js = [ 'js

CKEditor 3 Dialog Positioning

China☆狼群 提交于 2019-12-10 17:34:58
问题 I have checked and tried the method posted here to set where CKEditor dialogs pop up: Programatically set the position of CKEditor's dialogs This seems to either be deprecated or incomplete. When attempting this for the 'link' dialog, the dialog box does not format correctly, as if this onShow definition replaces the default action rather than adding to it. Any suggestions to alter this code or a new method to position the link dialog closer to the menu bar? CKEDITOR.on('dialogDefinition',

ckeditor getData() doesnt seem to work as it should

送分小仙女□ 提交于 2019-12-10 17:20:16
问题 First off I'll start off by saying I am new to javascript so hopefully this isn't a complete face palm question. That being said, the following code should alert the value of the editor when the user clicks off of it. <script type='text/javascript'> function openEditor(){ html = "Hello World"; config = { startupFocus : true }; editor = CKEDITOR.appendTo( 'textBox', config, html ); if (editor) { editor.on('blur', function(event) { var ckvalue = CKEDITOR.instances.editor.getData(); alert