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

General TRichView support forum. Please post your questions here
Post Reply
Jeweller

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

Post 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
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
lkessler
Posts: 112
Joined: Thu Sep 01, 2005 9:00 pm
Location: Winnipeg, Manitoba, Canada
Contact:

Post 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
Guest

Post 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
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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 :)
Jeweller

Post 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
Michel
Posts: 92
Joined: Fri Oct 14, 2005 2:56 pm
Contact:

Post 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
Jeweller

Post 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
Guest

Post 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.
Post Reply