我正在尝试做一些许多人似乎能够做到但我无法实现任何解决方案的事情.该TinyMCE的控制工作得很好,在一个asp.net的形式,直到你有一个UpdatePanel,然后回发后坏括起来.我尝试了一些像RegisterClientScriptBlock方法的修复,但仍然不成功,我在回发后仍然失去了tinyMCE控件.
下面是一个完整的测试项目(VS 2008),它在UpdatePanel外部提供一个Control,内部有一个控件,每个项目都有一个按钮来生成回发.同样在项目中我有一个EditorTest控件,其中包含我尝试的一些调用的注释代码,以防它给任何人任何想法.
以下是MCE论坛上一些解决方案的一些来源:
AJAX
UpdatePanel
我正在开发一个插件,当TinyMCE用作Visual编辑器时,使用TinyMCE命令将文本插入到正文内容编辑区域.目前,只需运行该命令即可.如果它工作,那么TinyMCE是活动的,如果没有,那么我有自定义JS用于HTML编辑器.
然而,我的问题是:有没有办法检查TinyMCE是否处于活动状态而不仅仅是运行命令并且当它不是时它会失败?
我按如下方式初始化了TinyMCE.我想在用户按下输入而不是段落时强制换行.我正在尝试跟随,但没有工作.我正在使用TinyMCE版本3_3_8.
tinyMCE.init({
mode: "exact",
theme: "advanced",
elements: "textAreaId",
cleanup: false,
theme_advanced_toolbar_location: "",
theme_advanced_buttons1: "",
theme_advanced_buttons2: "",
theme_advanced_buttons3: "",
height: 200,
width: 300,
forced_root_block : false,
force_br_newlines : true,
force_p_newlines : false,
oninit: InitPosition
}); //init ends
Run Code Online (Sandbox Code Playgroud)
我试图定义forced_root_block : "",但它仍然无法正常工作.
我究竟做错了什么?
你好我想在用户在tinyMCE textarea中写完并点击外面的某个地方(onBlur)时做一些事情.到目前为止,我试过:
$('#id_topic_text_parent').live('blur',function(){
alert('asd')
//I saw #id_topic_text_parent in firebug, it is span containing the tiny mce
});
Run Code Online (Sandbox Code Playgroud)
也
$('#id_topic_title').blur(*and*)live('blur...
tinyMCE.activeEditor.blur(*and*)live('blur...
Run Code Online (Sandbox Code Playgroud)
但它不会工作.
你能帮助我吗?
我使用tinymce作为动态生成至少5个文本的网页.
我使用的配置仅适用于第一个textarea.
tinyMCE.init({
height : "300",
mode : "exact",
elements : "content",
theme : "simple",
editor_selector : "mceEditor",
...
<textarea class="mceEditor" name="content" rows="15" cols="40">content</textarea>
Run Code Online (Sandbox Code Playgroud)
什么是在所有人中 启用tinymce编辑的配置textarea.
当您从word文档复制并粘贴到tinyMCE编辑器时,有时会出现不需要的<p>标记:
<p> </p>
<div class="starpasspro-example-question">
<p><strong>Example: Levels of strategy</strong></p>
<p>Microsoft is one of the world’s largest organisations, providing corporate solutions to businesses throughout the world to help them realise their fullest potential. At Microsoft, there are three levels of strategy as follows:</p>
</div>
<p> </p>
Run Code Online (Sandbox Code Playgroud)
这里生成的代码我想以<p>任何方式删除标签吗?
出于某种原因,我需要执行:
tinyMCE.activeEditor.setContent(text, {format : 'html'});
Run Code Online (Sandbox Code Playgroud)
之后,如何将光标放到文本的末尾?
我想为文本添加更改字体样式;
为此,我使用这个脚本:
tinymce.init({
selector: selector_id,
theme: "modern",
theme_modern_font_sizes: ["6px,7px,8px,9px,10px,11px,12px,13px,14px,15px,16px,17px,18px,19px,20px,21px,22px,23px,24px,25px,26px,27px,28px,29px,30px,31px,32px,36px,38px,40px"],
font_size_style_values: ["6px,7px,8px,9px,10px,11px,12px,13px,14px,15px,16px,17px,18px,19px,20px,21px,22px,23px,24px,25px,26px,27px,28px,29px,30px,31px,32px,36px,38px,40px"],
/* width: 300,
height: 300, */
plugins: [
"advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
"searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
"save table contextmenu directionality template paste textcolor"
],
content_css: "./style.css",
toolbar: "insertfile undo redo | fontsizeselect | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | …Run Code Online (Sandbox Code Playgroud) 我正在尝试将一个Font-Awsome图标添加到我添加到tinyMCE的按钮中:
ed.addButton('youtube', {
title: 'Add Video' ,
icon: 'icon-youtube',
onclick: function () {
//do stuff here...
}
Run Code Online (Sandbox Code Playgroud)
使用像文档建议的图像是不可接受的,但由于某种原因,我无法使这项工作.有任何想法吗?