tinymce

I use AntiXSS but I still can hack page

独自空忆成欢 提交于 2019-12-22 21:30:30
问题 I don't know if I am doing this right. I first time build something to prevent attack on page. I will start from the bottom: I have property: public string Description {get;set;} User can set it's value through tinyMCE tinyMCE.init({ mode: "textareas", theme: "advanced", encoding : "xml"... In controller before I save this in database I do: model.Description = HttpUtility.HtmlDecode(model.Description); In database I have a value like: <p>bla bla bla</p> I added AntiXSS library to my project:

Vue中使用Tinymce-edtio

浪尽此生 提交于 2019-12-22 19:36:05
Vue中使用Tinymec-edtio 一、资源下载 二、初始化组件 三、插件Plugins 四、上传图片 Tinymce中文文档 一、资源下载 tinymce 官方为 vue 项目提供了一个组件 tinymce-vue 使用 npm 安装 npm install @tinymce/tinymce-vue -S npm install tinymce -S 或 使用 yarn 安装 yarn add @tinymce/tinymce-vue -S yarn add tinymce -S 安装完成之后将 node_modules 中的 tinymce/skins 复制到 public 目录下,外层包一个 tinymce 文件方便识别 如果是使用 vue-cli 3.x 构建的项目,就放到 public 目录下 如果是使用 vue-cli 2.x 构建的项目,就放到 static 目录下 由于tinymec 默认为英文界面,需要安装一个 中文包 ,将这个语言包放在之前 publicb 下的 tinymce 文件 二、初始化组件 在页面中引入一下文件 import tinymce from 'tinymce/tinymce' import 'tinymce/themes/silver/theme' //不引入主题会导致 Uncaught SyntaxError: Unexpected

tinymce icons in internet explorer

丶灬走出姿态 提交于 2019-12-22 17:47:14
问题 I'm using TinyMCE but the images for the icons don't show up in Internet Explorer. I've checked the discussion here, but I'm already doing the necessary code right. In firebug when I'm using firefox, I can check the CSS and I do see that the image (img/icons.gif) is loading, so it must be loading in IE as well, but the toolbar is still blank. If I roll over the toolbar, I get the right tooltips and can figure out which button it is, which means the buttons in the advacned are working. I think

Wordpress WYSIWYG editor automatically adding span classes with style

久未见 提交于 2019-12-22 11:35:18
问题 For some reason my WYSIWYG editor in Wordpress automatically adds span classes with style when I create a bullet list with the button. It's very annoying because I want my text to be a certain size, but the span class hardcodes the style and it messes the size up. Does anyone know how to remove this automatic adding of the span class? This site is for a customer and he/she doesn't know how to use HTML, that is why this has to work with the WYSIWYG editor. Help much appreciated. Thanks. 回答1: I

How I can add multi TinyMCE editors with different config for each one?

蹲街弑〆低调 提交于 2019-12-22 11:06:34
问题 I want to add multi TinyMCE editors and each one has its own configuration in one page? How I can do it? 回答1: You could do something like this: jQuery version: $('textarea.editor1').tinymce( { script_url : '../admin/tiny_mce/tiny_mce.js', theme : "simple", plugins : "", // put plugins here setup : function(ed) { ed.onInit.add(function(ed) { }); } }); $('textarea.editor2').tinymce( { script_url : '../admin/tiny_mce/tiny_mce.js', theme : "simple", plugins : "", // put plugins here setup :

下载我完成的tinyMCE

匆匆过客 提交于 2019-12-22 10:36:46
在要插入编辑器的页面直接加入 <h:form id="Form1"> <fieldset> <s:validateAll> <div class="entry"> <a:cnCol tableName="testrichtext" fieldName="title"/> <div class="input"> <h:inputText id="title" value="#{testrichtext.title}" /> <br/><span class="errors"><h:message for="title" /></span> </div> </div> <div class="entry"> <a:cnCol tableName="testrichtext" fieldName="content"/> <script language="javascript" type="text/javascript" src="jscripts/tiny_mce/tiny_mce.js"></script> <script language="javascript" type="text/javascript" src="jscripts/tiny_mce/tiny_mce_advanced.js"></script> <h:inputTextarea id="mainText"

TinyMCE(三)——编辑内容

╄→гoц情女王★ 提交于 2019-12-22 10:36:36
edit example 1 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 <% 3 String path = request.getContextPath(); 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 5 %> 6 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 8 <html> 9 <head> 10 <script type="text/javascript" src="<%=path %>/tinymce/jscripts/tiny_mce/tiny_mce.js"></script> 11 <script type="text/javascript"> 12 tinyMCE.init({ 13 // General options 14 mode : "textareas", 15 theme : "advanced", 16 plugins : "autolink,lists,pagebreak,style,layer

How to set target attribute in tinyMCE

我只是一个虾纸丫 提交于 2019-12-22 10:36:30
问题 I have set a link to some text using tinymce.execCommand("CreateLink", False, theLink) . The problem is that I want to set "Target=_blank" . How do I set a Target attribute after the above? Thanks. 回答1: You need to identify the correct html element in your tinymce editor. You can use this code to replace/set the target attribute of your link $(ed.getBody()).find('a [href="'+theLink+'"]').attr('Target', '_blank'); Be aware that you might have the same link in the editor already. In this case

TinyMCE bug via jquery load

末鹿安然 提交于 2019-12-22 10:33:28
问题 I have this kind of strange bug when I load tinymce via jquery load , After the first time I click the dropdown to select one item from the list (bullet list , number list , style list , paragraph list ), I get the bug as shown in the image when I reload the form via jquery load. Any idea? 回答1: jQuery is attaching the drop down elements to the body tag instead of within the editor you have created. While this fixes some IE issue, it fails to deal with editor dom elements being loaded

tinymce setContent removes new lines

微笑、不失礼 提交于 2019-12-22 10:00:12
问题 If I have content preloaded in textarea then I have new lines converted to "br" tags. But if I try to set content dynamically (not pasting) to tinymce textarea by using its setContent function new lines are missing. I use v.3.4.7, tried v.3.5.6 (the latest by far) and it removes new lines even on page loading. <script type="text/javascript"> tinyMCE.init({ mode: "textareas", editor_selector: "EmailBody", theme: "advanced", language: "en", charLimit: 10, plugins: "table,advhr,advlink