ckeditor

ckeditor实现WORD粘贴图片自动上传

眉间皱痕 提交于 2019-12-01 07:46:57
自动导入Word图片,或者粘贴Word内容时自动上传所有的图片,并且最终保留Word样式,这应该是Web编辑器里面最基本的一个需求功能了。一般情况下我们将Word内容粘贴到Web编辑器(富文本编辑器)中时,编辑器都无法自动上传图片。需要用户手动一张张上传Word图片。如果只有一张图片还能够接受,如果图片数量比较多,这种操作就显得非常的麻烦。 1 、只粘贴图片并上传到服务器 config.extraPlugins = 'uploadimage'; //config.uploadUrl = ' 上传路径'; config.imageUploadUrl= ' 上传路径'; 请求 文件上传的默认请求是一个文件,作为具有“upload”字段的表单数据。 响应:文件已成功上传 当文件成功上传时的JSON响应: uploaded- 设置为1。 fileName - 上传文件的名称。 url - 上传文件的URL。 响应:文件无法上传 uploaded- 设置为0。 error.message - 要显示给用户的错误消息。 using System; using System.Web; using System.IO; namespace WordPasterCK4 { public partial class upload : System.Web.UI.Page { protected

How to set and lock the CKEditor window size?

流过昼夜 提交于 2019-12-01 07:37:34
CKEditor creates a resizable window of some default size. Is it possible to set the window to my desired size and prevent it from being resized? Styles do not work, including explicit style or rows attribute in the textarea tag. jQuery also does not work (with it's height function). codewaggle Use these config settings: Starting height and width: config.height = '111px'; config.width = 111; Is the CkEditor window resizeable: config.resize_enabled = false; //false says not resizable You can let it be resizable, but control the direction (vertical or horizontal) and the minimum and maximum

changing the background color for ckEditor

冷暖自知 提交于 2019-12-01 07:24:16
问题 I need to change the background color dynamically on load with my ckEditor the page that it is on is a dynamically loading page where they user has a specific bg color. I can not load a css it has to be just the editor body background color so i tried window.onload=function(){ CKEDITOR.instances.editor_data.addCss( 'body { background-color: #efefef; }' ); } i do not get an error, but also do not get any changes i also tried CKEDITOR.instances.editor_data.addCss( '#cke_editor_data { background

How do I get this HTML to display formatted, without tags?

时间秒杀一切 提交于 2019-12-01 06:56:07
问题 I created a blog (for coding practice). I use a Rich Text Editor (ckeditor) and save the post to a database. When I pull the post out to display in a Label.Text, it shows all the HTML tags: <p><strong>there was</strong> once a fox that lived</p> <p> in the<span style="color: #ff0000"> woods</span></p> How do I get the post to display, with the proper formatting (paragraph, color, etc.), but without the HTML tags? 回答1: FYI: The literal produced the same result as the Label ... but I got my

How to integrate CKEditor in GWT

旧时模样 提交于 2019-12-01 06:42:37
I'm looking for a way to integrate CKEditor in my GWT project. I've made some googling and found this project: https://code.google.com/p/gwt-ckeditor/ which has been abandoned for years. So the CKEditor is completely outdated. I've also seen the CKEditor being loaded outside of GWT into a textarea created in GWT. I'm not sure if that's a good way. If someone could give me some advises, it would be highly appreciated. Thanks by advance You can use JSNI for activate the CKEditor. For loadning the javascript file, either you load this in the html page, or by using ScriptInjector and StyleInjector

CKEditor plugin to set classes

北城余情 提交于 2019-12-01 06:27:44
What I want to do is something similar to the native foreground / background colors dialog. The difference is, it will have buttons with colors directly in a toolbar. So one plugin has to have multiple buttons, with different styles (colors). The other problem is, that this native plugin sets CSS color and background-color properties. I need to use classes instead, like this: text <span class="fg red">colored text</span> text and text <span class="bg blue">colored background</span> text Clicking into colors have to change color of a span with fg class (and background colors - bg class) How can

CKEditor - Editor Width Overflows in Webkit Browsers

只谈情不闲聊 提交于 2019-12-01 06:22:28
问题 I discovered that the toolbars don't automatically wrap in WebKit browswers (Safari, Chrome). There is a three year old bug reported for CKEditor 3, but it was closed. Maybe this is a regression? I'm not setting a width in my configuration. I want the editor to expand to the available width automatically. The editor is inside a div element that has the overflow: hidden; style applied to it. Here's my toolbar configuration: config.toolbar = [ {name:'clipboard', items:['Cut', 'Copy', 'Paste',

How to extract plain text from ckeditor generated html in JAVA

痞子三分冷 提交于 2019-12-01 06:21:34
I am using ckeditor to compose the emails, I am using the html generated by it to send the html emails ad i also need the text version also, So having both html and plain text version in emails will avoid the spam. What is the way to get the text from ckeditor html code in java. This is quite simple JavaScript call: CKEDITOR.instances.yourEditorInstance.getData() Returns: <h1>Apollo 11</h1> <p><b>Apollo 11</b> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en

CKEditor MVC 3 implementation

守給你的承諾、 提交于 2019-12-01 06:03:07
Learning mvc and I am trying to implement a page with 3 fields Name-Surname-Description So in my learning example I am loading employees and I should be able to create and edit them. The description should use CKEditor . I can load employees I can save them However I cannot seem to be able to save the description,such as whatever the user types in the description field. I have seen few examples on the net but none with a solution to download,as I cannot seem to put together. I have found this guy with a cool html helper but cannot seem to be able to put an example together http://www

How to add an ajax save button with loading gif to CKeditor 4.2.1. [Working Sample Plugin]

旧巷老猫 提交于 2019-12-01 05:52:54
I'm posting this because this may be helpful for people who do not know how to display a save icon to ckeditor in normal and inline-editing mode. I was searching for a simple save plugin but couldn't find one that was working with ckeditor 4.2.1. I decided to make my own. In my answer you'll find the code for the plugin as well as a google drive download link. This download contains the save icon as well as the loading gif icon. The plugin will add a save button to the toolbar. Clicking this button will fire an asynchronous post request to the server. During the request the save button will