无法提交Textarea Tinymce

时间:2017-11-22 04:19:54

标签: php html tinymce

我无法提交表单textarea TinyMCE。我需要能够使用许多TinyMCE,但我的代码只有在我没有的情况下才有效。

请帮帮我.. 这是代码:

<form action="action/insert.php?table=<?= $page ?>" method="post" enctype="multipart/form-data">
<div class="form-group">
    <label class="control-label" for="item">Languange</label><br/>
    <label for="en"><input type="radio" name="newlang" id="en" value="en"/> English</label>
    <label for="id"><input type="radio" name="newlang" id="id" value="id"/> Indonesia</label>
</div>
<div class="form-group">
    <label class="control-label" for="item">Item</label>
    <input type="text" name="item" id="item" value="" class="form-control" required/>
</div>
<div class="form-group">
    <label class="control-label" for="code">Code</label>
    <input type="text" name="code" id="code" value="" class="form-control" required/>
</div>
<div class="form-group">
    <label class="control-label" for="ingred">Ingredient</label>
    <textarea name="ingred" id="ingred" required></textarea>
</div>
<div class="form-group">
    <label class="control-label" for="spec">Spec</label>
    <textarea name="spec" id="spec" required></textarea>
</div>
<div class="form-group">
    <label class="control-label" for="package">Package</label>
    <textarea name="package" id="package" required></textarea>
</div>
<div class="form-group">
    <label class="control-label" for="price">Price</label>
    <input type="number" name="price" id="price" value="" min="0" class="form-control" required/>
</div>
<div class="form-group">
    <label class="control-label" for="file">Image</label>
    <input type="file" name="file" id="file" class="form-control"/>
</div>
<hr>
<div class="form-group">
    <button type="submit" name="submit" class="btn btn-success"><i class="fa fa-check-circle"></i> Add</button>
    <button type="reset" name="reset" class="btn btn-default"><i class="fa fa-refresh"></i> Reset</button>
    <button type="button" name="back" class="btn btn-default" onclick="location.assign('?page=<?= $page ?>/')"><i class="fa fa-reply"></i> Back</button>
</div>

2 个答案:

答案 0 :(得分:0)

您是如何实际提交编辑器内容的?你的第一步是在某处调用editor.getcontent()

https://www.tinymce.com/docs/api/tinymce/tinymce.editor/#getcontent

答案 1 :(得分:0)

我必须在文本区域之间添加一个空格