Page 1 of 1

How to create/modify RTF text inside a browser (web based)

Posted: Wed Oct 26, 2005 3:06 pm
by Jeweller
Hi,

I use RichView inside my win32 application to fill document in a database. So I have a lot of fields in RTF format. Now I must develop a web based interface for this application than can display and of course update these fields...

No problem for displaying RTF text, the TrichView is so great that I can easyly convert RTF into HTLM. But How can I update them ? I can convert RTF into plain text and then Text to RTF but Im going to lose all the styles, pictures, ...!

Do someone knows a way or a component that can update RTF text inside a browser (ActiveX version of TRichView, full javascript, Flash..., java, OLE ??) like a web based RTF editor ?

Michael

Posted: Wed Oct 26, 2005 3:30 pm
by Sergey Tkachenko
You can create ActiveX editor based on TRichView.
Create an ActiveX project in Delphi, add ActiveForm, place RichViewEdit and RVStyle on this form, toolbar, etc.

Posted: Wed Oct 26, 2005 10:54 pm
by lkessler
Sergey Tkachenko wrote:You can create ActiveX editor based on TRichView.
Create an ActiveX project in Delphi, add ActiveForm, place RichViewEdit and RVStyle on this form, toolbar, etc.

Sergey:

Could you add this this explanation of how to use RichView inside a browser to the Examples/Demos forum, so that it will be easy to find again. Thanks.

Louis

Posted: Thu Oct 27, 2005 9:04 am
by Guest
Ok Thank You!

This seems to work great, but I do not know how to load text from the database inside of the ActiveX and of course how to retreive the updated text when the user post de html form ? Do you know where I can get some tips about that, or do you have a more precise idea/example ?

Thanks a lot!
Michael

Posted: Sat Oct 29, 2005 4:22 pm
by Sergey Tkachenko
I am afraid that you need to implement downloading data in your ActiveX yourself (using Indy, ICS or other components allowing to download data via http).

lkessler, I think that explanation does not explain too much :)

Posted: Wed Nov 02, 2005 8:12 am
by Jeweller
Hello,
FYI, Im getting started with that... Ive just done what you say with the ActiveX application. I add it in a web page like this:

Code: Select all

<OBJECT type="application/x-oleobject" id="XMEMOObj" name="XMEMOObj" width="100%" height="100%" classID="CLSID:F35D9239-62C6-4BE1-AB55-15980ED1840A" codebase="http://test/rte/MOSMemo.ocx#1,0,0,0">
    <param name="LPKPath" value="/rte/memo.lpk"/>
    <param name="RTF" value="blabla"/>
</OBJECT>
I can, with the param RTF, initialize the RichEdit component... and then when I submit the html form, I take the rtf text from the activeX to an input field with a javascript code like this one:

Code: Select all

 aHiddenInputField.value = XMEMOObj.RTF;
 document.MainForm.submit(); return false;
For now, the ActiveX is working fine on my computer but I cannot yet make it working outside mine... I dont know yet why, maybe security problems... or registering problems...

Thank you for your help! :wink:

Michael

Posted: Wed Nov 02, 2005 1:05 pm
by Michel
I don't know if this is at all relevant to your situation, but: did you by any chance build with packages?
Michel

Posted: Wed Nov 02, 2005 2:46 pm
by Jeweller
No I do not build with packages. It seems like this is only Delphi that was able to register it and I dont know what it is doing different from IE or even a regsvr32! Do someone know how to make working an OCX outside of the development computer ?

Michael

Posted: Thu Nov 03, 2005 11:57 am
by Guest
As far as I remember, when I tested my ActiveX created by Delphi, I was able to register/unregister it successfully using regsvr32.
So I believe the problem is in some other place.