原文链接:js设置光标插入文字和HTML 在一个textarea的某个光标位置插入文字或者在某个编辑器中插入图片html内容,我最近经常和这些打交道,但总是一团模糊,今天整理一下关于如何插入文字,设置光标,移动光标等操作. 应用场景:新浪微博(网站留言本)中输入框某个位置插入表情.话题或者@ 某个人涉及到插入文本,重新设置光标位置. 代码一:在textarea某个位置插入文本 function insertAtCursor(myField, myValue) { //IE support if
由于NPOI暂时没找到书签内容替换功能,所以换用Apose.Word组件. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Aspose.Words; using As