tinymce

TinyMCE 4 - remove() or destroy()

不问归期 提交于 2019-12-18 11:08:51
问题 I am using TinyMCE editor. I want to remove or destroy tinymce editors (Page contain more then one editor). Also remove classes and IDs added by tinyMCE. But leave editable contents I tried : tinymce.remove() tinymce.destroy() tinymce.execCommand('mceRemoveControl',true,'.editable'); Please note: my editor class is .editable , And I have more then one editors in my page. 回答1: You need an editor id (which usually equals your editor html root elements id (in most cases a textarea)). Example:

Problems implementing TinyMCE in CodeIgniter

时光总嘲笑我的痴心妄想 提交于 2019-12-18 09:49:48
问题 I am trying to implement TinyMCE in CodeIgniter. I've created a view file and called it from a controller. I have uploaded all files into my CI project folder and showed the path of the files. But it is not working. Here is the view file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Full featured example</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!--

Tinymce Image drag and drop issue on Internet Explorer?

久未见 提交于 2019-12-18 09:31:06
问题 i have html page where i am using tinymce editor. when i open the mockup in firefox browser and now drag/drop an jpg image at any position in tinymce editor, it gets inserted correctly. But when i do the same process in IE/Chrome browser, the moment i dropped an image, it does not place the image inside tinymce editor instead the whole browser relocates to the url of the image. I am not able to understand why image is not placed inside tinymce editor when html page is opened up in IE and

TinyMCE disable escaping

混江龙づ霸主 提交于 2019-12-18 08:32:17
问题 I'm using tinyMCE to edit content from an existing website. This website has links in the format: http://localhost/start.jsp%3Fparam=value where the %3F is the escaped string for the question mark character. When TinyMCE edits a page containing one of these links, it converts the "%" sign into "%25" which breaks the link. How can I disable tinyMCE's escaping of percent signs? I have the following configuration set: tinyMCE.init({ mode: "specific_textareas", editor_encoding: "raw", editor

TinyMCE disable escaping

不打扰是莪最后的温柔 提交于 2019-12-18 08:32:09
问题 I'm using tinyMCE to edit content from an existing website. This website has links in the format: http://localhost/start.jsp%3Fparam=value where the %3F is the escaped string for the question mark character. When TinyMCE edits a page containing one of these links, it converts the "%" sign into "%25" which breaks the link. How can I disable tinyMCE's escaping of percent signs? I have the following configuration set: tinyMCE.init({ mode: "specific_textareas", editor_encoding: "raw", editor

How to set the width of textarea using tinymce?

佐手、 提交于 2019-12-18 05:41:21
问题 I tried a several methods to set the width of the tinymce textarea. My 1st attempt: height: '200px', width: '220px' // inside tinyMCE.init({ In the 2nd attempt: <textarea name="editorial" cols="40" rows="20" id="editorial" style="width: 40em; height: 20em"><?=$row['editorial']?></textarea> But still, I am not able to get the width as per my requirement. Any ideas please? 回答1: I think the problem may be with the toolbars in your TinyMCE init function. Try this example, and let me know if it

How do I initialize TinyMCE on a ajax loaded textarea in 4.x?

折月煮酒 提交于 2019-12-18 03:57:27
问题 I am upgrading to tinyMCE 4.x and I am attempting to initialize tinyMCE on a textarea loaded via AJAX. In 3.x I did something of the sort: TinyMCE - attach to divs loaded via AJAX calls but this does not seem to work in 4.x. 回答1: tinymce.remove(); tinymce.init(); This works well! 回答2: In TinyMCE 4.x mceRemoveControl and mceAddControl have been removed. You have to use mceRemoveEditor and mceAddEditor instead. Got it from: [Resolved] mceRemoveControl and mceAddControl in tinymce 4 Otherwise,

How do I initialize TinyMCE on a ajax loaded textarea in 4.x?

不想你离开。 提交于 2019-12-18 03:57:02
问题 I am upgrading to tinyMCE 4.x and I am attempting to initialize tinyMCE on a textarea loaded via AJAX. In 3.x I did something of the sort: TinyMCE - attach to divs loaded via AJAX calls but this does not seem to work in 4.x. 回答1: tinymce.remove(); tinymce.init(); This works well! 回答2: In TinyMCE 4.x mceRemoveControl and mceAddControl have been removed. You have to use mceRemoveEditor and mceAddEditor instead. Got it from: [Resolved] mceRemoveControl and mceAddControl in tinymce 4 Otherwise,

VUE 中使用TinyMCE踩的坑,初始化第一次有效,之后初始化无效

六眼飞鱼酱① 提交于 2019-12-18 02:14:00
VUE 中使用TinyMCE踩的坑,初始化第一次有效,之后初始化无效 不多BB看图 第一次初始化有效 第二次进入页面 初始化便无效 必须刷新页面才可以 问题原因 : 初始化 tinymce 文本编辑器,确保 selector 唯一性 当 selector 选中同一个 dom id 时,tinymce 只 init 一次, 解决方案: 1、每次都动态改变 selector 所选中 dom id 即可,具体怎么动态改,我也不知道我是看别人这么说的 点这里看原文 2、既然 dom id只init一次,那么不用ID选择器用类选择器试试 当然这里也要改 问题解决 写个博客记录一下 下次就不会犯错了 来源: CSDN 作者: 朱某碳 链接: https://blog.csdn.net/qq_42669758/article/details/103588112

tinymce adding p tags automatically?

浪尽此生 提交于 2019-12-17 23:42:04
问题 Im using tinymce and saving it to a database. When I edit the saved content using tinymce and save again, it inserts a p tag at the beginning. Editing the content over and over again leaves a large gap at the beginning of the content. DOes anyone know a fix? 回答1: TinyMce automatically add " <p> " in new lines. You can set this option in tinyMce initialization like this: tinyMCE.init({ mode : "textareas", theme : "advanced", force_br_newlines : false, force_p_newlines : false, forced_root