ckeditor

Django-CKEditor Image Upload

↘锁芯ラ 提交于 2019-12-04 09:22:37
I've currently installed Django-CKEditor and have my own custom toolbar. I'm struggling to find how to enable image uploading. When clicking the Image button, I can only upload via URL. I know that, in the plugin, there are views to handle file browsing and uploading but I'm not sure how to activate or use these. There is sparse documentation on the plugin so I am reaching out for your help! https://github.com/shaunsephton/django-ckeditor In the current version (5) you can use RichTextUploadingField instead of RichTextField , which enables uploading and browse files button. Previously you have

In CKEditor, how can I add a “text” label to a button?

北慕城南 提交于 2019-12-04 09:10:30
问题 editor.ui.addButton( 'ImageUpload',{ label: 'Upload Image', command: 'popup_image_uploader', icon: this.path + 'images/icon.png' }); That's my current code right now. When you load the page, you only see the icon. But if you go to the demo here, you'll see that "Source" is a text. I want to add the word "Upload Image" next to the icon. 回答1: The label for CKeditor toolbar buttons have a class .cke_label which has by default display:none so the buttons are icon-only: .cke_skin_kama .cke_button

How to integrate CKEditor into Asp.net MVC

冷暖自知 提交于 2019-12-04 08:15:28
问题 Saw this post at CodeProject for FCKEditor. Can someone explain what about the new version? 回答1: It's pretty easy to do actually. First download the latest code from the website and extract it to a directory in your project (I choose /Scripts/ckeditor). Then in your view, use the same code as in the "complete sample" in this link and it should work. Basically, the important steps are: Make sure you include the ckeditor.js file in the head from your view or in your master page, however you

ckeditor strips <span> and style attributes

淺唱寂寞╮ 提交于 2019-12-04 08:12:43
I have a Drupal 7 site using ckeditor 4.2. I've created a basic page node and put a span inside an h2 heading in the body. I hard coded it in the html view. It looks fine but if I go back to edit the page, my has gotten stipped out of the html and also any style="" I've put into the html also. I've looked at the ckeditor config and text-formats. I've set the only formats allowed to be text and full html so I'm not using filtered at all. What gives? I've used the editor many times before but probably not this version. If you are using the CKeditor module then there is an option in Advanced

How to fill ckeditor from capybara with webkit or selenium driver

≡放荡痞女 提交于 2019-12-04 08:04:49
问题 How can I fill a CKEditor area within Capybara, assuming I'm using a javascript capable driver like capybara-webkit or selenium? 回答1: Inspired from what I found here, I came up with the solution of using javascript to both set the data on the hidden textarea and on the CKEditor object. Neither seemed sufficient, depending on the circumstances. def fill_in_ckeditor(locator, opts) content = opts.fetch(:with).to_json # convert to a safe javascript string page.execute_script <<-SCRIPT CKEDITOR

ckeditor编辑器Word文档粘贴自动去格式的解决方法

▼魔方 西西 提交于 2019-12-04 07:16:44
1、在config.js中加入以下红色部分语句。 CKEDITOR.editorConfig = function( config ) { //config.pasteFromWordIgnoreFontFace = true; //默认为忽略格式 config.pasteFromWordRemoveFontStyles = false; config.pasteFromWordRemoveStyles = false; }; 问题解决。 DEMO下载地址: https://dwz.cn/ORcEz9fz 来源: CSDN 作者: cwhatiscs 链接: https://blog.csdn.net/cwhatiscs/article/details/89434352

tinymce粘贴word

北城余情 提交于 2019-12-04 07:11:58
公司做的项目需要用到粘贴Word功能。就是将word内容一键粘贴到网页编辑器(在线富文本编辑器)中。Chrome+IE默认支持粘贴剪切板中的图片,但是我要粘贴的文章存在word里面,图片多达数十张,我总不能一张一张复制吧 ? 我希望打开文档doc直接复制粘贴到富文本编辑器,直接发布 网上找了很久,大部分都有一些不成熟的问题,皇天不负有心人终于让我找到了一个成熟的项目。 1、前台页面引用代码 <%@PageLanguage="C#"AutoEventWireup="true"CodeBehind="index.aspx.cs"Inherits="CKEditor353.index" %> <!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <htmlxmlns="http://www.w3.org/1999/xhtml"> <head> <title>WordPaster For CKEditor-3.x</title> <linktype="text/css"rel="Stylesheet"href="WordPaster/css/WordPaster.css"/> <linktype="text

Yii , saving an image from $_FILES , but without using models

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 06:54:25
Is this possible ? This is with a model CUploadedFile::getInstance($model,'newsimage'); $model->image->saveAs("image\path") but I don't want to create a model just so i can save my image. What I actualy need this for is ... well I am trying to make the "Upload image" function of CKEditor to work, but I need a script for the image saving. When I click the "Upload image" button i just call an action and from there I have access to the picture I have selected, using $_FILES , but I can't seem to save the file to a target directory. Is it possible to save the file to a target path ("C:\myProject

支持粘贴图片的富文本编辑器

蹲街弑〆低调 提交于 2019-12-04 06:27:08
公司做的项目需要用到粘贴Word功能。就是将word内容一键粘贴到网页编辑器(在线富文本编辑器)中。Chrome+IE默认支持粘贴剪切板中的图片,但是我要粘贴的文章存在word里面,图片多达数十张,我总不能一张一张复制吧 ? 我希望打开文档doc直接复制粘贴到富文本编辑器,直接发布 网上找了很久,大部分都有一些不成熟的问题,皇天不负有心人终于让我找到了一个成熟的项目。 1、前端引用代码 <!DOCTYPEhtml PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <htmlxmlns="http://www.w3.org/1999/xhtml"> <head> <metahttp-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>编辑器完整版实例-1.2.6.0</title> <scripttype="text/javascript" src="ueditor.config.js" charset="utf-8"></script> <scripttype="text/javascript" src="ueditor.all.js"

ueditor 如何支持word转存图片

非 Y 不嫁゛ 提交于 2019-12-04 06:26:21
公司做的项目需要用到粘贴Word功能。就是将word内容一键粘贴到网页编辑器(在线富文本编辑器)中。Chrome+IE默认支持粘贴剪切板中的图片,但是我要粘贴的文章存在word里面,图片多达数十张,我总不能一张一张复制吧 ? 我希望打开文档doc直接复制粘贴到富文本编辑器,直接发布 网上找了很久,大部分都有一些不成熟的问题,皇天不负有心人终于让我找到了一个成熟的项目。 1、前端引用代码 <!DOCTYPEhtml PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <htmlxmlns="http://www.w3.org/1999/xhtml"> <head> <metahttp-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>编辑器完整版实例-1.2.6.0</title> <scripttype="text/javascript" src="ueditor.config.js" charset="utf-8"></script> <scripttype="text/javascript" src="ueditor.all.js"