ckeditor

可以粘贴Word公式的编辑器

江枫思渺然 提交于 2020-08-15 16:35:43
由于工作需要必须将word文档内容粘贴到编辑器中使用 但发现word中的图片粘贴后变成了file:///xxxx.jpg这种内容,如果上传到服务器后其他人也访问不了,网上找了很多编辑器发现没有一个能直接解决这个问题 考虑到自己除了工作其他时间基本上不使用windows,因此打算使用nodejs来解决这一问题 发现不管什么编辑器只要将图片转换成base64后就可以直接使用(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){ res.end(

解决Ckeditor编辑器不显示html实体,自动过滤html的问题

不问归期 提交于 2020-08-14 05:03:39
解决Ckeditor编辑器不显示html实体,自动过滤html的问题 参考文章: (1)解决Ckeditor编辑器不显示html实体,自动过滤html的问题 (2)https://www.cnblogs.com/52php/p/5680937.html 备忘一下。 来源: oschina 链接: https://my.oschina.net/u/4255556/blog/4335580

nodejs 用 axios 向osc服务器上传图片[需要cookie]

偶尔善良 提交于 2020-08-05 00:10:47
通过http请求查看request数据, 复制请求头和cookie 代码 const axios = require('axios') const fs = require('fs') const img_path = './t2.jpg' const FormData = require("form-data"); const url = "https://my.oschina.net/ahaoboy/space/ckeditor_dialog_img_upload" const headers = { "accept": "*/*", "accept-language": "zh-CN,zh;q=0.9,en;q=0.8", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "cookie": "===", "referrer": "https://my.oschina.net/ahaoboy/blog/write/4326713", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103

Web编辑器复制粘贴图片上传

戏子无情 提交于 2020-07-26 15:12:20
由于工作需要必须将word文档内容粘贴到编辑器中使用 但发现word中的图片粘贴后变成了file:///xxxx.jpg这种内容,如果上传到服务器后其他人也访问不了,网上找了很多编辑器发现没有一个能直接解决这个问题 考虑到自己除了工作其他时间基本上不使用windows,因此打算使用nodejs来解决这一问题 发现不管什么编辑器只要将图片转换成base64后就可以直接使用(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){ res.end(

CKEditor 4 and jQuery UI sortable removes content after sorting

[亡魂溺海] 提交于 2020-07-20 07:35:27
问题 I've ran into an issue with CKEditor 4 and jQuery UI's sortable method where if I sort a container that has a CKEditor instance, it removes the value and throws an error "Uncaught TypeError: Cannot call method 'getSelection' of undefined". It also makes the editor uneditable. I was able to get around this in CKEditor 3 with one of the following hacks found here: CKEditor freezes on jQuery UI Reorder In looking at the Chrome DOM inspector, it appears that the contents of the iframe are removed

ckeditor validation for spaces

拥有回忆 提交于 2020-07-15 09:59:12
问题 How can i implement validation on ckeditor to prevent user from adding spaces only . Any answer within today will be greatly appreciated . following is what i tried for validations so far : //Save note from ckeditor $("input.save_note").click(function() { var note_id1 = $(this).attr("rel"); var thiss1 = this; var profile_user_id = $(this).attr("rel1"); var txt=CKEDITOR.instances.editor1.getData(); var no_space_txt = txt.replace(" ",""); // var txt = txt1.replace(/ +(?= )/g,''); var editor

laravel $data the result not show when using ckeditor

无人久伴 提交于 2020-07-10 08:39:41
问题 i have a page for maintenable email template. i used ck editor to add the text. and i have a data to read so in ckeditor i will write like Dear Valued Customer, Your application has been route approved Details : Name: {{$data->name}}, phone: {{$data->phone}}, and this will save to column text_email and i declare $data in controller but when i send the email, the ouput will show {{$data->name}} not the value of $data->name ; public function send_email($id){ $data=Data::where('id',$id)->first()

How to output CKEditor code snippets with matching styles

怎甘沉沦 提交于 2020-06-28 09:01:18
问题 I have a question to the CKEditor... First I have to say, that I searched now for over 3 hours and I don't know, if I'm so bad or why I found nothing... I'm searching for a way, how to output CKEditor-Text with the right Styles AND I added a Syntax-Highlighter-Plugin (Code Snippet) for which I also want the right styles... Can someone help me, how to format this with right styles? Input: Output: Code: <h1>Hello world!</h1> <p>I'm an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>

CKeditor jumps to top with certain css

只谈情不闲聊 提交于 2020-06-17 07:47:15
问题 CKEditor bug tracker won't let me submit a bug: == Steps to reproduce == add the css: body { height:100%; } to an editing area. Use this page and edit the CKEditor area's css with FireBug. Now scroll down and change the bottom H2 to H3 with the drop-down It jumps to the top. Expected result: Without adding the css or if you deactive it, it behaves correctly, ie., it doesn't jump to the top. Actual result: It jumps to the top. Other details (browser, OS, CKEditor version, installed plugins):

CKeditor jumps to top with certain css

三世轮回 提交于 2020-06-17 07:46:18
问题 CKEditor bug tracker won't let me submit a bug: == Steps to reproduce == add the css: body { height:100%; } to an editing area. Use this page and edit the CKEditor area's css with FireBug. Now scroll down and change the bottom H2 to H3 with the drop-down It jumps to the top. Expected result: Without adding the css or if you deactive it, it behaves correctly, ie., it doesn't jump to the top. Actual result: It jumps to the top. Other details (browser, OS, CKEditor version, installed plugins):