0
在SharePoint博客网站上,用户通过在设置为true的contenteditable中键入div来插入新帖子。这在iPad上不起作用,因为iPad上的Safari不支持它。在div上删除contenteditable =“true”,并使用jQuery创建文本框
我可以找到div并删除属性,但是,我将如何能够插入文本?我可以使用多行文本框替换整个div吗(不知道SharePoint在考虑保存时会怎么想)?
的HTML看起来像:
<tr>
<td nowrap="true" valign="top" width="190px" class="ms-formlabel">
<h3 class="ms-standardheader">
<nobr>Body</nobr>
</h3>
</td>
<td valign="top" class="ms-formbody">
<!-- FieldName="Body"
FieldInternalName="Body"
FieldType="SPFieldNote"
-->
<span dir="none"><div class='ms-rtestate-field ms-rtefield' style=''><div id='ctl00_m_g_cc0fae80_c5f8_428c_9d00_793718f1d202_ctl00_ctl04_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_inplacerte_label' style='display:none'>Rich text editor</div><div class=' ms-rtestate-write ms-rteflags-0' id='ctl00_m_g_cc0fae80_c5f8_428c_9d00_793718f1d202_ctl00_ctl04_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_inplacerte' style='min-height:210px' aria-labelledby='ctl00_m_g_cc0fae80_c5f8_428c_9d00_793718f1d202_ctl00_ctl04_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_inplacerte_label' contentEditable='true' ></div><div style="clear:both;"></div></div>
<span dir="ltr">
<input name="ctl00$m$g_cc0fae80_c5f8_428c_9d00_793718f1d202$ctl00$ctl04$ctl01$ctl00$ctl00$ctl04$ctl00$ctl00$TextField_spSave" type="HIDDEN" id="ctl00_m_g_cc0fae80_c5f8_428c_9d00_793718f1d202_ctl00_ctl04_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_TextField_spSave" />
</span>
</span>
</td>
</tr>