我是Javascript/TinyMCE的初学者,我试着理解如何从编辑器中获取HTML内容,并使用简单的alert()函数显示它.
我在HTML页面上有这个极简主义配置:
<div id="tiny">
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "specific_textareas",
editor_selector : "mceEditor"
});
</script>
</div>
<form method="post" action="somepage">
<textarea id="myarea1" class="mceEditor">This will be an editor.</textarea>
</form>
Run Code Online (Sandbox Code Playgroud)
在TinyMCE网站上,他们解释说我必须使用这个:
// Get the HTML contents of the currently active editor
console.debug(tinyMCE.activeEditor.getContent());
Run Code Online (Sandbox Code Playgroud)
而这里太
tinymce.activeEditor.getContent()
Run Code Online (Sandbox Code Playgroud)
我不知道为什么它不起作用
有人有想法吗?
当我从网页粘贴内容时tinymce,IE8中的编辑器不显示内容.
嗨,我正在添加我得到的图像. 
我的问题是1. 我有来自网页的复制内容http://ch.tbe.taleo.net/CH02/ats/careers/requisition.jsp?org=TRAILERPARK&cws=1&rid=148 并尝试粘贴到我的tinymce编辑器在Ie8中打开.2.结果在图像中显示为红色框
关于TinyMCE是否支持从Microsoft Word中粘贴的问题,我正在努力获得关于这个问题的准确答案.我想在网上可能会有很多关于这个主题的过时信息,因为我看到了以下答案:
我已经对此进行了测试,它似乎不是开箱即用的(答案#3),但我不确定这是否是由于我身边的配置/初始化问题,还是需要其他一些外部因素.
任何帮助,将不胜感激.
我刚为我的网站安装了TinyMCE编辑器.但默认背景为黑色,文本颜色为灰色.任何人都可以告诉我如何将背景更改为白色,将文本颜色更改为黑色.
我尝试着,
但是剥离了它:S
我的Tinymce init:
// General options
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Skin options
skin : "o2k7",
skin_variant : "silver",
// Example content CSS (should be your site CSS)
content_css : "css/style.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "js/template_list.js",
external_link_list_url : "js/link_list.js", …Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一个Wordpress插件.我将在WP的Tinymce编辑器中获得计数.基本上,它是一个单词计数器,它计算你的帖子很长,并在元框中给你这个消息
你的帖子有450个单词
我唯一的问题是通过javascript从Tinymce获取单词.这不起作用:
document.getElementById('content')
Run Code Online (Sandbox Code Playgroud)
Tinymce的内容是内容.但是这段代码返回NULL.我找不到Tinymce的有效ID名称.
很快,其他所有代码都准备好了,只是我无法从Wordpress的WYSIWYG编辑器中获取单词.
谢谢.
我必须在Tiny MCE中使用HTML 5 数据属性,但编辑器总是清除它们,因为它不是默认的valid_elements配置已知的属性.
所以这里有2个问题:
到目前为止,我已经尝试过:
extended_valid_elements : '@[id|class|title|style|data-options]',
Run Code Online (Sandbox Code Playgroud)
和:
extended_valid_elements : '*[id|class|title|style|data*]',
Run Code Online (Sandbox Code Playgroud)
但它不起作用:(
我想清除tinymce内容并添加新内容.我尝试使用以下代码,但它附加到旧内容.如何清除tinymce中的现有内容.
tinymce.activeEditor.execCommand('mceCleanup');
tinymce.activeEditor.execCommand('mceInsertContent', false, result.content);
Run Code Online (Sandbox Code Playgroud) 对于标准textareas,我使用placeholder="".如何扩展tinymce以便它也能以这种方式工作.
与CKEditor类似:http://alfonsoml.blogspot.com.es/2012/04/placeholder-text-in-ckeditor.html
我目前正在使用带有jQuery包的TinyMCE 4.0.5,并注意到拼写检查不起作用
我正在使用一个简单的设置
tinymce.init({
selector: "textarea",
plugins : "spellchecker",
});
Run Code Online (Sandbox Code Playgroud)
通过此设置,我可以在"工具"下看到"拼写检查"选项,但是当我点击"拼写检查"时,它会抛出错误'错误:一般'
此外,错误日志中存在错误"文件不存在:PATH/tinymce/js/tinymce/plugins/spellchecker //
但我可以在上面的路径中看到以下文件:PATH/tinymce/js/tinymce/plugins/spellchecker/plugin.min.js
tinymce ×10
javascript ×6
jquery ×2
attributes ×1
html ×1
html5 ×1
iframe ×1
ms-word ×1
php ×1
rte ×1
text-editor ×1
tinymce-4 ×1
wordpress ×1
wysiwyg ×1