fckeditor

How to check whether CKEditor has some text in it?

谁说我不能喝 提交于 2020-12-28 07:02:04
问题 I have an HTML form with a few fields. One of them is a textarea managed by CKEditor. When the user wants to submit the form, I want to check whether he entered values in all the fields. I know how I can check if CKEditor control has anything in it, but it could be "empty" HTML tags without any text in it. How do I check for text? Server side I'm using something like PHP's trim(strip_tags($content)), so I'd like to have the same in JavaScript. A solution using jQuery would also be usable. 回答1

How to check whether CKEditor has some text in it?

不打扰是莪最后的温柔 提交于 2020-12-28 06:56:05
问题 I have an HTML form with a few fields. One of them is a textarea managed by CKEditor. When the user wants to submit the form, I want to check whether he entered values in all the fields. I know how I can check if CKEditor control has anything in it, but it could be "empty" HTML tags without any text in it. How do I check for text? Server side I'm using something like PHP's trim(strip_tags($content)), so I'd like to have the same in JavaScript. A solution using jQuery would also be usable. 回答1

How to check whether CKEditor has some text in it?

孤人 提交于 2020-12-28 06:54:33
问题 I have an HTML form with a few fields. One of them is a textarea managed by CKEditor. When the user wants to submit the form, I want to check whether he entered values in all the fields. I know how I can check if CKEditor control has anything in it, but it could be "empty" HTML tags without any text in it. How do I check for text? Server side I'm using something like PHP's trim(strip_tags($content)), so I'd like to have the same in JavaScript. A solution using jQuery would also be usable. 回答1

溯源黑帽利用 Web 编辑器漏洞非法植入 SEO 页面事件

隐身守侯 提交于 2020-08-10 06:18:39
作者:SanLorewalker@知道创宇404积极防御实验室 一、背景 知道创宇威胁情报中心-业务安全舆情监测平台不断发现大量网站被植入非法SEO内容页面,且最近有明显上升的现象,2020年4月至6月发现了6,802个网站被植入了4,955,586个非法SEO内容页面,知道创宇404积极防御实验室的安全研究员针对该现象了进行了分析、溯源。 被非法植入SEO页面的域名备案省份分布如下: 图 1 非法植入SEO页面省份分布图 其中,企业占了67%;政府机关、事业单位等国家机构占比4%,如下图: 图 2 网站性质分布比例图 被植入非法SEO页面的存活统计如下: 图 3 非法SEO页面存活比例图   二、详细分析 访问这些被植入的页面会自动跳转到博彩网站、色情网站。这些页面通过嵌入大量暗链、伪装成404错误页面、写入到PDF文件内容中等多种方法来提高在搜索引擎中的排名。 1. 非法SEO页面植入案例 被植入的非法SEO页面有如下几种: 图 4 访问页面后跳转到博彩网站 图 5 页面内包含大量色情信息以及暗链 图 6 页面内包大量暗链以及非法捏造新闻内容 图 7 非法植入传奇页面 图 8 在html头部隐藏植入博彩信息和页面跳转脚本 图 9 404页面伪装 图 10 直接植入博彩页面 图 11 将博彩信息植入PDF文件内 图 12 搜狗页面隐藏色情页面内容   2. 日志分析 经分析

Tinymce在ASP.NET中的使用方法

烂漫一生 提交于 2020-03-23 12:11:15
现在做网页,用FCKEditor用得比较多,它的实现原理是在要加入FCKEditor的地方加入一个iframe,并将其src指向FCKeditor/editor/fckeditor.html?InstanceName=commodityBrief&Toolbar=Default,至于后面的参数,根据情况不同,参数传递得不一样,然后里面用Table来实现顶部的工具栏,接着下面再用一个iframe,src指向fckblank.html,来实现编辑区。 整体上显得有些臃肿。于是找了找其它的HTML编辑器,大概有FreeTextBox,TinyMCE,这里要介绍的就是TinyMCE。这是一款基于JS的编辑器,网方介绍如下: TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL by Moxiecode Systems AB . It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances. TinyMCE is very easy to integrate into other

FCKEditor文件上传提示信息的汉化

馋奶兔 提交于 2020-02-16 23:30:23
FCKEditor文件上传提示信息的汉化 在FCKeditor中,虽然可以自动监测客户端语言,但是仍有小部分信息未能得到汉化。例如上传图片、Flash时,上传成功和上传失败的对话框提示信息均为英文,只要找到相应的提示文本,修改为中文即可。 这里以汉化上传图片时的提示信息为例: 用DW或者UE打开 FCKeditor/editor/dialog/fck_image 下的 fck_image.js 文件,首先找到438行, 把原文“Your file has been successfully uploaded”,替换为“文件已成功上传!”,同理, 第447行,“A file with the same name is already available. The uploaded file has been renamed to”替换为“同名文件已经存在。 刚才上传的文件已自动命名为:”, 第450行,“文件类型不正确!”替换“Invalid file type”, 第 453行,“你可能没有足够的权限上传文件,请检查服务器设置。”替换“Security error. You probably don't have enough permissions to upload. Please check your server.”, 第456行,“'文件上传失败!错误号:”替换

介绍几款所见即所得的WEB在线编辑器

穿精又带淫゛_ 提交于 2020-01-08 23:37:56
From:http://homepage.yesky.com/62/2489062.shtml 1.FCKeditor 编辑器   FCKeditor is compatible with most internet browsers which include: IE 5.5+ (Windows), Firefox 1.0+, Mozilla 1.3+ and Netscape 7+.   最新版本:FCKeditor 2.0   语言环境:多国语言   特性功能:所见所得,支持平台众多,支持XHTML 1.0,文本格式设置,常见的编辑,复制,粘贴,撤销,文件上传等功能   授权方式:Open Source & Free   官方地址:http://www.fckeditor.net/   下载地址:http://www.fckeditor.net/download/default.html   演示:http://www.fckeditor.net/demo/default.html   小节:FCKeditor的2.0版比1.6版有了许多的改进。首先是FCKeditor的文件结构更加清晰,   可以更方便地将其部署在自己的系统中。另外2.0版开始支持了Firefox浏览器    2.WebEditor   WebEditor系列文档控件

从文本JavaScript中删除HTML

我与影子孤独终老i 提交于 2020-01-06 14:03:48
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 有没有一种简单的方法可以在JavaScript中获取html字符串并去除html? #1楼 这是一个解决@MikeSamuel安全问题的版本: function strip(html) { try { var doc = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null); doc.documentElement.innerHTML = html; return doc.documentElement.textContent||doc.documentElement.innerText; } catch(e) { return ""; } } 请注意,如果HTML标记不是有效的XML,则它将返回一个空字符串(aka,标记必须关闭并且属性必须用引号引起来)。 这不是理想的选择,但是确实避免了潜在的安全利用问题。 如果您没有有效的XML标记,则可以尝试使用: var doc = document.implementation.createHTMLDocument(""); 但是由于其他原因,这也不是一个完美的解决方案。 #2楼 使用jQuery,您可以简单地通过使用来检索它 $('

how to add a dropdown/button to ckeditor to insert content when selecting a dropdownItem

天大地大妈咪最大 提交于 2020-01-05 06:07:59
问题 I need to be able to add a dropdown or button to the ckeditor's toolbar that will pop up a list, and when a listitem would be clicked the text of that list item would be added to the ckeditor's content I also need to be ablee to change the content of that list, like to have a function: function SetListsContent(arr) { //fill the list with the array arr ... } 回答1: For this first of all add plugin. code to add plugin is below: CKEDITOR.plugins.add( 'language', { requires: 'selection', init:

how to add a dropdown/button to ckeditor to insert content when selecting a dropdownItem

匆匆过客 提交于 2020-01-05 06:03:26
问题 I need to be able to add a dropdown or button to the ckeditor's toolbar that will pop up a list, and when a listitem would be clicked the text of that list item would be added to the ckeditor's content I also need to be ablee to change the content of that list, like to have a function: function SetListsContent(arr) { //fill the list with the array arr ... } 回答1: For this first of all add plugin. code to add plugin is below: CKEDITOR.plugins.add( 'language', { requires: 'selection', init: