插入文本的CKEditor透过程式设计 [英] Insert text to CKEditor programtically

查看:135
本文介绍了插入文本的CKEditor透过程式设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 CKEditor的在asp.net Web应用程序项目。我需要插入一些文本CKEditor的光标位置,当用户点击一个服务器端的按钮

I'm using CKEditor in a asp.net Web Application Project. I need to insert some text into CKEditor cursor location, when user clicks a server side Button.

我试过:

 CKEditor1.Text = CKEditor1.Text.Insert(0, "Sample text"); 

开始索引,需要设置位置插入数据。但无法得到的CKEditor的光标位置。

Which needs StartIndex to set location to insert data. But could not get the cursor location of the CKEditor.

如何完成这件事?

在此先感谢....

推荐答案

我会强烈建议使用CKE 4.更多的功能。我只是实现了这个版本的ASP.NET成。看看这个堆栈线程有关在光标插入文本:

I would highly suggest using CKE 4. More functionality. I just implemented this version into ASP.NET. Take a look at this stack thread about inserting text at the cursor:

<一个href=\"http://stackoverflow.com/questions/10224075/insert-text-at-the-cursor-position-to-a-ckeditor-using-jquery\">Insert在文字使用jQuery 光标位置到CKEditor的

Insert text at the cursor position to a CKEditor using jQuery

这篇关于插入文本的CKEditor透过程式设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆