HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
insert html by code
Posted by: someone (---.adsl.xs4all.nl)
Date: Monday, 27-Aug-2007, 08:04:26

I've downloaded the latest version from subversion, but I can't find a way to insert html at the current position.

I used:
private void InsertHtml(string sHTML)
{
mshtml.IHTMLTxtRange objSel = (mshtml.IHTMLTxtRange)heHTMLEditor.Document.selection.createRange();
objSel.pasteHTML(sHTML);
}

Re: insert html by code
Posted by: someone (---.adsl.xs4all.nl)
Date: Monday, 27-Aug-2007, 08:43:24

I fixed it:
private void InsertHtml(string sHTML)
{
mshtml.IHTMLTxtRange objSel = (mshtml.IHTMLTxtRange)heHTMLEditor.HtmlDocument2.GetSelection().createRange();
objSel.pasteHTML(sHTML);
}

Re: insert html by code
Posted by: Sylvain Lautrey (---.d4.club-internet.fr)
Date: Saturday, 29-Sep-2007, 13:03:21

Can you paste HTML such as <script></script> ?
It doesn't work for me using the ActiveX Document (and not using mshtml).No error code returned, and if you watch through the DOM the script element is not there...



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
YXJwT
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.