用剩下的所有分所一个用C#操作DHTML EDITING的例子!

VFanYan 2002-08-29 10:54:40
用剩下的所有分所一个用C#操作DHTML EDITING的例子!
如果分不够我还可以申请新用户加分
...全文
69 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
yarshray 2002-08-31
  • 打赏
  • 举报
回复
The DHTML Editing Component
The DHTML Editing Component and ActiveX control are still available. They provide similar features to the MSHTML Editor, though they are not customizable. The DHTML Editing Component includes the following features:

Table operations (insert row, insert column, merge cells, and so on).
Absolute drop mode.
Source code white space and formatting preservation.
Active Server Page script preservation.
The DHTML Editing Component ActiveX control provides the functionality of the DHTML Editing Component implemented in an easy-to-use control. The control also adds:

Loading and saving files.
Context menu support.
Keyboard accelerators.
Properties, methods, and events that expose editing functionality.
lkal4587 2002-08-31
  • 打赏
  • 举报
回复
还是用 asp.net
Hogwarts 2002-08-29
  • 打赏
  • 举报
回复
下面是DHTML EDIT的一个简单的例子。在这个例子中,窗体上有一个DHTML EDIT的控件以及三个按钮:Open,Save以及Insert Image。点击Insert Image按钮以后会在已经打开的HTML文档中鼠标所在的地方插入一幅图片:

object path="c:\\test.html";
object nothing=System.Reflection.Missing.Value;

private void buttonInsertImage_Click(object sender, System.EventArgs e){
this.axDHTMLEdit1.DOM.execCommand("InsertImage",false,@"http://www.google.com/images/hp0.gif");
}

private void buttonOpen_Click(object sender, System.EventArgs e){
this.axDHTMLEdit1.LoadDocument(ref path,ref nothing);
this.axDHTMLEdit1.BrowseMode=false;
}

private void buttonSave_Click(object sender, System.EventArgs e){
this.axDHTMLEdit1.SaveDocument(ref path,ref nothing);
}

希望以上例子对你能有所帮助。更具体的使用方法请参考http://msdn.microsoft.com/workshop/browser/mshtml/mshtml_editing_node_entry.asp


Hogwarts - S(u)ddenly dis@ppeared...
-
本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。

110,618

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧