Php 文本区域';使用TinyMCE的jquery不会更改s值
我使用tiny mce作为php中的编辑器。但它不起作用Php 文本区域';使用TinyMCE的jquery不会更改s值,php,jquery,html,tinymce,tinymce-4,Php,Jquery,Html,Tinymce,Tinymce 4,我使用tiny mce作为php中的编辑器。但它不起作用 <script src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script> <script type="application/javascript"> $(document).ready(function(){ tinymce.init({selector:'#album_description_input'}
<script src="http://tinymce.cachefly.net/4.0/tinymce.min.js"></script>
<script type="application/javascript">
$(document).ready(function(){
tinymce.init({selector:'#album_description_input'});
$('#create_picture_album_form').ajaxForm({
beforeSubmit : function(){
/*$('#album_description_input').html("Hello");*/
$('#album_description_input').html(tinymce.get('album_description_input').getContent());
}
});
});
</script>
注意:我使用的是
action=“upload.php”
。因此不需要tinyMCE.triggerSave()代码>您有一个,
在这里},
。很抱歉,我刚刚粘贴了一些重要的块。但这并不是问题所在@johnbupitt尽管php没有问题,但我正在粘贴它。那么,你的问题标题是误导性的。只要我知道TinyMce
有两种不同的用法。Ajax提交:需要添加tinyMCE.triggerSave()代码>PHP提交:需要添加$('#相册描述输入').html(tinymce.get('album描述输入').getContent())代码>。由于我使用php提交,jquery无法工作。我能做什么?
<textarea name="album_description_input" id="album_description_input"></textarea>
$album_head = array(
'base_url' => base_url(),
'album_head_big_picture_path' => $big_final_path,
'album_head_small_picture_path' => $small_final_path,
'album_title' => $_POST['album_title_text_input'],
'album_project_type' => $_POST['album_project_type_input'],
'album_description' => $_POST['album_description_input'],
'status' => 'activated',
'date_of_modification' => date("d-M-Y"),
'time_of_modification' => date("h:m:s"),
'user_of_modification' => $this->session->userdata('user_id'),
'user_ip' => $this->input->ip_address()
);
$album_head_id = $this->site_management_model->insert_album_head($album_head);