[英]Tinymce editor is not displaying in some textareas
I have a certain code to display some textarea
according to the number of days choosed, i need all these text areas as editor .I have given then class tinyMCE
but its not working我有一些代码可以根据选择的天数显示一些textarea
,我需要所有这些文本区域作为编辑器。我已经给了tinyMCE
类,但它不起作用
Its working if i use html code directly .Im using jquery html()
to display contents and while using this the editor is not showing如果我直接使用 html 代码,它就可以工作。我使用jquery html()
来显示内容,而在使用它时,编辑器没有显示
division +='<div class="form-group">Activity on '
+btwn[i].getDate()+' '+month+
'<div id="activity_div"><input type="hidden" name="hidden_date[]" value="'+btwn[i].getDate()+
'"/><input type="hidden" name="hidden_day[]" value="'+month+
'"/><label for="input-demo-a-1">Activity name</label><input type="text" id="test-text'+i+
'" name="activity_name[]" style="width:99.5%;"/></br><label for="input-demo-a-1">Activity detail</label><textarea id="test2-text'+i+
'" class="tinyMCE " name="activity_detail[]" style="width:99.5%;"></textarea></br><button class="btn btn-success actvty" id="actvty-btn" data-toggle="modal" data-target="#long-modal'+i+
'" rel="'+i+'">Load Activities<input type="hidden" name="n_days" value="'+d+
'"/></div></div>'
division
is the content I'm using and display it using $("#my_testing").html(division);
division
是我正在使用的内容,并使用$("#my_testing").html(division);
显示它$("#my_testing").html(division);
The editor is not showing while using this method , please help me使用此方法时编辑器未显示,请帮助我
动态添加textarea
后,您需要重新初始化 tinymce,以便它将应用于新的 textarea:
tinymce.init({selector:'.tinyMCE'});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.