我希望第二个文本编辑器没有tinymce但是仍然会出现如何删除它?
<!DOCTYPE html>
<html>
<head>
<script src="<?php echo site_url('assets/tinymce/js/tinymce/tinymce.min.js'); ?>"></script>
<!-- <script>tinymce.init({ selector:'textarea' });</script> -->
<script>
tinymce.init({
selector: 'textarea',
height: 200,
width: 600,
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table contextmenu paste code'
],
toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
content_css: '<?php echo base_url('assets/tinymce/css/codepen.min.css'); ?>',
file_browser_callback: RoxyFileBrowser
});
function RoxyFileBrowser(field_name, url, type, win) {
var roxyFileman = '<?php echo base_url('assets/fileman/index.html'); ?>'
if (roxyFileman.indexOf("?") < 0) {
roxyFileman += "?type=" + type;
}
else {
roxyFileman += "&type=" + type;
}
roxyFileman += '&input=' + field_name + '&value=' + win.document.getElementById(field_name).value;
if(tinyMCE.activeEditor.settings.language){
roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language;
}
tinyMCE.activeEditor.windowManager.open({
file: roxyFileman,
title: 'File Manager',
width: 800,
height: 400,
resizable: "yes",
plugins: "media",
inline: "yes",
close_previous: "no"
}, { window: win, input: field_name });
return false;
}
</script>
</head>
<body>
<textarea>Easy! You should check out MoxieManager!</textarea><br><br>
<textarea>I am hoping this one without tinymce</textarea>
</body>
</html>
我可能需要有人帮助我区分如何区分第一个文本编辑器(使用tinymce)和第二个文本编辑器(我希望不使用tinymce)。
我将tinymce声明或设置放在顶部。
答案 0 :(得分:0)
<!DOCTYPE html>
<html>
<head>
<script src="<?php echo site_url('assets/tinymce/js/tinymce/tinymce.min.js'); ?>"></script>
<!-- <script>tinymce.init({ selector:'textarea' });</script> -->
<script>
tinymce.init({
selector: 'textarea.number1',
height: 200,
width: 600,
menubar: false,
plugins: [
'advlist autolink lists link image charmap print preview anchor',
'searchreplace visualblocks code fullscreen',
'insertdatetime media table contextmenu paste code'
],
toolbar: 'undo redo | insert | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image',
content_css: '<?php echo base_url('assets/tinymce/css/codepen.min.css'); ?>',
file_browser_callback: RoxyFileBrowser
});
function RoxyFileBrowser(field_name, url, type, win) {
var roxyFileman = '<?php echo base_url('assets/fileman/index.html'); ?>'
if (roxyFileman.indexOf("?") < 0) {
roxyFileman += "?type=" + type;
}
else {
roxyFileman += "&type=" + type;
}
roxyFileman += '&input=' + field_name + '&value=' + win.document.getElementById(field_name).value;
if(tinyMCE.activeEditor.settings.language){
roxyFileman += '&langCode=' + tinyMCE.activeEditor.settings.language;
}
tinyMCE.activeEditor.windowManager.open({
file: roxyFileman,
title: 'File Manager',
width: 800,
height: 400,
resizable: "yes",
plugins: "media",
inline: "yes",
close_previous: "no"
}, { window: win, input: field_name });
return false;
}
</script>
</head>
<body>
<textarea class="number1">Easy! You should check out MoxieManager!</textarea><br><br>
<textarea>I am hoping this one without tinymce</textarea>
</body>
</html>
我终于能够区分第一条短信(带有tinymce)和第二条短信(没有tinymce)。
现在,我想知道为什么我使用选择器:selector:&#39; textarea.number1&#39;,
和选择器:&#39; textarea&#39;它显示了不同的微小mce)?第一个没有图片上传,第二个没有图片上传。