ckeditor

CKEditor4: Make Text Differ from its HTML

余生长醉 提交于 2019-12-01 16:49:45
I add StrInsert plugin to my CKEditor. It basically adds a button, which in my editor, is labeled CRM Field . What the button does is it will append a value to my editor. For example: when I click $[FIRST_NAME] from the dropdown, it will append the text ${__VCG__VAL__FIRST_NAME} to my editor. Why did I name the dropdown $[FIRST_NAME] instead of ${__VCG__VAL__FIRST_NAME} ? Because I want the HTML to be <p>${__VCG__VAL__FIRST_NAME}</p> while the text shown in the editor is $[FIRST_NAME] As seen in screenshot_2 , the HTML shown underneath is exactly what I want, but instead of showing the text ${

CKEDITOR Copying images from word

我怕爱的太早我们不能终老 提交于 2019-12-01 16:35:48
自动导入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

ckeditor粘贴word图片且图片文件自动上传功能

狂风中的少年 提交于 2019-12-01 16:20:15
自动导入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

ckeditor dialog positioning

和自甴很熟 提交于 2019-12-01 16:16:49
Dialog windows for CKEditor by default appear in the middle of the page but if the page is an iframe with a big height the dialogs appear way down the page. Is it possible to configure CKEditor to position the dialogs in a different quadrant of the page? For example top middle? Yes, the link MDaubs gives will guide you to do what you want. I've had to do this in the past and the following snippet will demonstrate a solution for your problem: CKEDITOR.on('dialogDefinition', function(e) { var dialogName = e.data.name; var dialogDefinition = e.data.definition; dialogDefinition.onShow = function()

ckeditor 实现ctrl+v粘贴图片并上传、word粘贴带图片

こ雲淡風輕ζ 提交于 2019-12-01 15:33:33
由于工作需要必须将word文档内容粘贴到编辑器中使用 但发现word中的图片粘贴后变成了file:///xxxx.jpg这种内容,如果上传到服务器后其他人也访问不了,网上找了很多编辑器发现没有一个能直接解决这个问题 考虑到自己除了工作其他时间基本上不使用windows,因此打算使用nodejs来解决这一问题 发现不管什么编辑器只要将图片转换成ba se64 后就可以直接使用(IE8及一下可能不支持),由于编辑器中添加word文档功能也只是自己用,因此可以忽略这种浏览器了 找了很久,试用了很多编辑器,发现只有ckeditor的功能还算符合我的需求(支持自定义HTML属性) 然后我写了一个监听粘贴事件的操作,用来获取粘贴之后的file:///xxxx.jpg这种路径 < script > var service = { http : require( 'http' ), url : require( 'url' ), querystring : require( 'querystring' ), fs : require( 'fs' ), config : { timeout : 60000, charset : 'utf8' , port : 10101, host : '127.0.0.1' }, router : { index : function (res, query){

How can I set height in CKEditor 5 with Ionic?

大城市里の小女人 提交于 2019-12-01 14:32:17
I want to create a text editor using Ionic and Angular. I applied it using CKEditor 5 but the height value is not changed. According to the CKEditor 5 documentation, I can control the height value through the config attribute. I have confirmed through the config option that 'paragraphs' are translated into Korean. Is my approach wrong? Here is my source code. My source code consists of 'html', 'component.module.ts', 'component.ts'. html template <ckeditor formControlName="bbsContent" [editor]="Editor" [config]="config" style="height: 300px" data=""></ckeditor> component.module.ts import {

How to add title attribute at CKEditor images

无人久伴 提交于 2019-12-01 13:01:09
Is there a way to add the title attibute to CKEditor images? I'm using v4.1.2 and CKEditor is removing it automatically each time it's added from the HTML source view. I haven't found anything about this! You got to define config.extraAllowedContent = 'img[title]' if you want title attribute to be accepted into editor contents (see: official guide ). I have ultimate solution for this issue.. 1) Open this file: ckeditor\plugins\image2\plugin.js At the line number 343 (in my case) add below code title: this.data.alt just below "alt: this.data.alt," and enjoy.. 来源: https://stackoverflow.com

Loading Multiple CKEditors is Slow

半腔热情 提交于 2019-12-01 12:58:13
I have a lot of ckeditors on one web page for students to enter their data. I have a lot of ckeditors because each one is for one variable. Unfortunately, an input text field is too small for the data requested. The problem is that it takes too long for the web page to load and sometimes the web page hangs. I'm currently loading almost 425 editors. Here's an example of my code for three: <script type='text/javascript'>//<![CDATA[ $(window).load(function () { CKEDITOR.on('instanceReady', function (ev) { var jqScript = document.createElement('script'); var bsScript = document.createElement(

FCKeditor编辑器第一次点击总是报错(上传图片) 之后就好了

痞子三分冷 提交于 2019-12-01 12:56:43
错误: Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index. FCKeditor编辑器第一次点击总是报错(上传图片) 之后就好了,网上查了因为,点上传图片的时候不知道把图片插入到文本编辑器的什么地方(简单的说,鼠标光标没有定位到编辑器) 在FCKeditor配置文件中有初始化编辑器并置光标. 文件在:fckeditor/fckconfig.js StartupFocus=true/false 开启时FOCUS到编辑器 其他配置参数: 进入FCKeditor文件夹,将所有以“_”开头的文件和文件夹删,删除FCKeditor文件夹下后缀名为:.afp、.cfc、.cfm、.lasso、.pl、.py、.txt文件,只保留FCKeditor文件夹下fckconfig.js、fckeditor.js、fckstyles.xml、fcktemplates.xml就可以了; 进入editor文件夹,删掉“_source”文件夹,里面放的同样是源文件; lang里面放的是语言包,如果只是用简体中文,那么只保留fcklanguagemanager.js、zh-cn.js两个文件就OK,建议保留en.js(英文)、zh.js(繁体中文)两个文件,fcklanguagemanager.js是语言配置文件

How can I set height in CKEditor 5 with Ionic?

Deadly 提交于 2019-12-01 12:21:56
问题 I want to create a text editor using Ionic and Angular. I applied it using CKEditor 5 but the height value is not changed. According to the CKEditor 5 documentation, I can control the height value through the config attribute. I have confirmed through the config option that 'paragraphs' are translated into Korean. Is my approach wrong? Here is my source code. My source code consists of 'html', 'component.module.ts', 'component.ts'. html template <ckeditor formControlName="bbsContent" [editor]