不要激活tinymce的形式

时间:2017-10-06 11:33:16

标签: javascript jquery forms tinymce

我已经将timymce添加到textarea但是当它处于活动状态时它没有发布,我的意思是,单击提交按钮什么都不做。虽然取消了tinymce形式的工作正常...可能有一些缺乏,但我找不到什么.... 这是我的代码:

....
        <script src="../libs/tinymce/js/tinymce/tinymce.min.js" type="text/javascript"></script>
        <script>
tinymce.init({
  selector: 'textarea#pagebody',
  language: 'ca',
  theme: 'modern',
  content_css: '/mnt/vmdata/iac/web/css/CQPweb-yellow.css',
  autoresize_min_height: 350,
  autoresize_bottom_margin: 30,
  plugins: 'advlist autoresize charmap colorpicker emoticons help imagetools legacyoutput media pagebreak print spellchecker template toc wordcount anchor autosave code contextmenu fullpage hr importcss link nonbreaking paste save tabfocus textcolor visualblocks autolink bbcode codesample directionality fullscreen image insertdatetime lists noneditable preview searchreplace table textpattern visualchars',
  toolbar1: 'formatselect | searchreplace bold italic strikethrough forecolor backcolor | link anchor | alignleft aligncenter alignright alignjustify outdent indent pagebreak | numlist bullist table hr | removeformat code charmap insertdatetime codesample fullpage fullscreen preview | image media | help',
  image_advtab: true,
  images_upload_url: 'postAcceptor.php',
  images_upload_base_path: '',
  images_upload_credentials: true
 });
        </script>

</head>
<body>
<form name="documentation" action="createpage.php" method="post">
<p><select size="1" name="corpusname" required>
<option style="font-size: 95%;" value="">Select corpus</option>
<?php
$result = mysqli_query($dbiac, "SELECT * FROM corpus_info") or die(mysqli_error($dbiac));
while($corpus = mysqli_fetch_array($result)){
echo "<option style='font-size: 95%;' value='".$corpus['corpus']."'>".$corpus['title']."</option>";
}
?>
</select></p>
<p><textarea name='pagebody' id='pagebody' rows='60' required></textarea></p>
<p><input type='submit' value='Create page' /></p>
</form>
.....

1 个答案:

答案 0 :(得分:0)

这几乎令人难以置信,但阻止表单发布的“微小”因素是 textarea 标记中的“必需”属性,因此将其取出解决了问题!