我有一个表单来创建我的文章,我的模板有一个这样的编辑器:
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<h2>Text areas<small>Sessions</small></h2>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div id="alerts"></div>
<div class="btn-toolbar editor" data-role="editor-toolbar" data-target="#editor">
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" title="Font Size"><i class="fa fa-text-height"></i> <b class="caret"></b></a>
</div>
<div id="editor">
HERE MY EDITOR CREATE THE CODE HTML bold,color,font-size.
I WOULD LIKE INSERT A INPUT HERE
</div>
<textarea name="descr" id="descr" style="display:none;"></textarea>
<br />
<div class="ln_solid"></div>
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12">Resizable Text area</label>
<div class="col-md-9 col-sm-9 col-xs-12">
<textarea class="resizable_textarea form-control" placeholder="This text area automatically resizes its height as you fill in more text courtesy of autosize-master it out..."></textarea>
</div>
</div>
</div>
</div>
</div>
我的编辑器创建了一个代码HTML,如下所示:
<div id="editor">
<b>
<font face="Comic Sans MS">THIS IS A TEXT CREATED BY MY EDITOR</font>
</b>
</div>
我想在这里输入一个输入,我该怎么做?
我试过这样:
<div id="editor">
<input>
<b>
<font face="Comic Sans MS">THIS IS A TEXT CREATED BY MY EDITOR</font>
</b>
</input>
</div>
但它不能很好地工作,它会在文本区域之外创建一个输入。
答案 0 :(得分:-1)
这是一个简单的兄弟,就像这样做
<input placeholder="THIS IS A TEXT CREATED BY MY EDITOR">
</input>
或者您也可以使用值
<input value="THIS IS A TEXT CREATED BY MY EDITOR">
</input>