ckeditor

Move the CKEditor inline toolbar

浪子不回头ぞ 提交于 2019-12-23 09:47:22
问题 I'm using CKEditor 4 inline. Is it possible to change the toolbar location e.g. 50px over the editor div? Thank you! 回答1: If you want to keep this "floating toolbar" behaviour, then you can move it around using these settings. But if you want to keep toolbar in one place, then check this plugin: http://ckeditor.com/addon/sharedspace There's a sample, but you need to build a CKEditor package with this plugin and then you'll be able to check it. 回答2: You can simply give margin-top: -50px; to

CKEditor - get element after click on context Menu

社会主义新天地 提交于 2019-12-23 08:55:08
问题 I added link to context menu of img in ckeditor, using this code CKEditor - Add Context Menu Item to Images How can I get the information about the image, on which user clicked? For example the id of the image. Or the path. In order to process with the selected image. 回答1: The solution was pretty easy. $('body').on('contextmenu','img',function(){ var imgid = $(this).attr('id'); alert(imgid); }) Using jquery to track click on image, we can save it's id to global variable. Then, inside the

ckeditor - Uncaught TypeError: Cannot read property 'icons' of null

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 07:24:27
问题 When trying to use ckeditor for the first time. ckeditor works, but when I try to add imageupload and uploadloadwidget plugins then I get the error: Uncaught TypeError: Cannot read property 'icons' of null Does anyone have any ideas as to what might be causing it? <script src="//cdn.ckeditor.com/4.5.6/basic/ckeditor.js"></script> <script> $(document).ready(function () { CKEDITOR.plugins.addExternal('imageupload', '/ckeditor/plugins/imageupload/'); CKEDITOR.plugins.addExternal('uploadwidget',

Clicking CKEditor content to show alert

点点圈 提交于 2019-12-23 05:23:18
问题 I'm trying to make it so that if you click the CKEditor's text area (where you type), it shows an alert, but I can't get it working and I'm not sure why. Here's the JSFiddle: http://jsfiddle.net/C7N7r/44/ Please help! HTML: <form> <textarea class="ckeditor" id="editor1">Some text.</textarea> </form> JS: CKEDITOR.replace("editor1", {}); $(document).on("click", ".cke_contents", function() { alert("CLICKED"); }); 回答1: The problem With delegated event handler you are capturing click events for

pass Ckeditor value to div text without html tags?

僤鯓⒐⒋嵵緔 提交于 2019-12-23 05:19:26
问题 I have Ckeditor in my view and I dynamicly get editor value and show them in divs. I tried many combinaiton of defining(val,html,tex, etc) like this: CKEDITOR.on('instanceCreated', function (e) { e.editor.on('contentDom', function () { e.editor.document.on('keyup', function (event) { var str = CKEDITOR.instances['editor1'].getData(); $("#mirror1").text(str); $("#mirror2").val(str); $("#mirror3").html(str); $('#mirror4').val($('<div/>').html(str).text()); } ); }); }); my divs <div id="mirror1"

CKEditor 4.3 Widget Richcombo

风格不统一 提交于 2019-12-23 04:46:07
问题 How can I insert a widget when one of the dropdown menu in Richcombo is clicked? I've read the widget tutorial here and API documentation here I tried something like this, but it didn't work CKEDITOR.plugins.add('my_plugin', { init: function(editor) { editor.ui.addRichCombo('my_plugin', { label: 'plugin1', init: function() { this.add('FIRST_NAME', 'FIRST NAME', 'Insert FIRST NAME'); }, onclick: function(value) { editor.focus(); editor.widgets.add('widget1', { upcast: function( element ) { //

CKEditor 5 React custom image upload

核能气质少年 提交于 2019-12-23 04:36:25
问题 I have spent all day trying to get CKEditor with React to work. Everything seems to be okay except the images. I I have a way to upload the images to my server already (azure). ALL I NEED is to know how to connect it to the CKEditor with React! I keep getting the error "Upload adapter is not defined." <CKEditor editor={ ClassicEditor } data={this.state.body ? this.state.body : "<p>Body text...</p>"} onInit={ editor => { // You can store the "editor" and use when it is needed. console.log(

Use CKeditor instance in Vue.js

坚强是说给别人听的谎言 提交于 2019-12-23 04:24:34
问题 I am trying to implement CKeditor in my Laravel-backoffice which build its views with Vue.js In this form I want to replace the "textarea" with name="ckeditor1" with a texteditor <form method="POST" v-on="submit: onSubmitForm"> <div class="col-md-4"> <h1>Pagina: @{{ page.name }}</h1> <h2>Pagina algemeen</h2> <div class="form-group"> <label for="name"> Name <span class="error" v-if="! page.name">*</span> </label> <input type="text" name="name" id="name" class="form-control" v-model="page.name"

Set default font/text size in RTF Control

≯℡__Kan透↙ 提交于 2019-12-23 03:13:06
问题 I found this answer Default font for Rich Text field but it doesn't help me. I need to be able to set it in the application as this is an XPiNC (Xpages in Notes Client for those reading this in the CKEditor forum) app and I have no control over what is on the system beyond IBM Notes 8.5.3FP4. Because the config.js is server side for the CKEditor, I need to do this in the code or css somehow. Is this even possible? 回答1: Add the following script block to your XPage. It will set the initial font

jquery keyup on the data inside CKEDITOR

扶醉桌前 提交于 2019-12-23 03:01:58
问题 I'm building a little fake html/css mobile phone which automatically inserts data from a several input boxes on a page like so: (the phone is inserted using an iframe..(don't ask)..) $('#mgSiteDescription').bind('keyup', function() { var iframedoc = $('.liveDemoFrame').get(0).contentDocument; $(iframedoc).find('#header h2').html($(this).val()); }); This works absolutely fine for my input fields. Now, I'm using CKEditor for my textareas which brings me to my problem. As the textarea isn't