trichview.com

trichview.support




Re: Text Styles & Save methods


Return to index


Author

Message

Sergey Tkachenko

Posted: 08/18/2002 23:55:51


1) HTML links are saved only if you provide target to some URL in event

OnURLNeeded. Otherwise they are saved as normal text.

2) If rvoClearTagOnStyleApp is in rve.EditorOptions, any change of text

style will clear tags (including OnStyleConversion).

3) Include rvoCtrlJumps in rve.EditorOptions. If this option is set,

hyperlinks in editor will be activated when you press and hold Ctrl key

(including hypertext cursor indication and raising OnJump event on

clicking), so you'll see if some text is a hypertext or not.


I do not remember that I fixed something related to hyperlinks and

styleconversion since v1.6.10


> 1. write in the RVE the letter 'a'

> 2. change its style to .jump = true and set its tag to some URL

> 3. use ApplyStyleChanges with the code I pasted.

> I am sure I do these steps correctly. But after executing this and export

> the RVE to html.... the text is not a link anymore.

>

> --Slavi

>

>

> "Sergey Tkachenko" <[email protected]> wrote in message

> news:[email protected]...

> > I copied your code in the editor demo and tried - this code works with

> > hyperlinks.

> > Hyperlinks are retained as hyperlinks.

> > (This code has only one problem - it does not use FindSuchStyle method,

so

> > it can add a vast number of new text styles).

> >

> > Which version of RichView do you use?

> >

> >

> > > Well, I tried but it didn't

> > > the code I use in this function is( for so short time I tried it to

work

> > > only with bold) :

> > >

> > > Var TF : TFontInfo;

> > > begin

> > >   try

> > >     TF:=TFontInfo.Create(nil);

> > >     TF.Assign(RVS.TextStyles[StyleNo]);

> > >     Case UserData of

> > >      UD_BOLD :

> > >        begin

> > >          if fsBold in TF.Style then

> > >          TF.Style:=TF.Style-[fsBold] else TF.Style:=Tf.Style+[fsBold];

> > >        end;

> > >      end;

> > >     RVStylesCount:=RVS.TextStyles.Count;

> > >     RVS.TextStyles.Add;

> > >     RVS.TextStyles[RVStylesCount]:=TF;

> > >     NewStyleNo:=RVStylesCount;

> > >     RVStylesCount:=RVS.TextStyles.Count;

> > >    finally

> > >      TF.Free;

> > >    end;

> > > end;

> > >

> > > After executing the

> > > procedure TRVForm.StyleBoldExecute(Sender: TObject);

> > > which contains :

> > >   RVE.ApplyStyleConversion(UD_BOLD);

> > > I see that all the hyperlinks are gone....

> > >

> > > --Slavi

> > >

> > > "Sergey Tkachenko" <[email protected]> wrote in message

> > > news:[email protected]...

> > > > Yes, it keeps them

> > > >

> > > > > Does this keep the hyperlinks? Because this is what particularly

> > > interests

> > > > > me....

> > > > >

> > > > > --Slavi

> > > > >

> > > > > "Sergey Tkachenko" <[email protected]> wrote in message

> > > > > news:[email protected]...

> > > > > > > I have two problems :

> > > > > > > First I want if I have a long text, containing many text

styles,

> > and

> > > > > > select

> > > > > > > the whole text, to apply Bold to the text. So, I cannot use

> > > > > > > ApplyTextStyle, because it will discard all the previous

> changes,

> > > i.e.

> > > > > if

> > > > > >

> > > > > > There is a special method for this: ApplyStyleConversion.

> > > > > > Example is here:

> > > > > > http://www.trichview.com/support/files/redit.zip

> > > > > > It requires some component that can be found in RichView

> > installation,

> > > > > > Demos\Delphi\Assorted\RichEdit\Components

> > > > > >

> > > > > > >

> > > > > > > And secondly, my program throws an exception ( i.e. crashes),

> when

> > I

> > > > > make

> > > > > > a

> > > > > > > large table ( for example 2*600) and try to save it to stream.

I

> > use

> > > > the

> > > > > > > following to save it to stream

> > > > > >

> > > > > > I think that either your computer has low memory or problem is

> > somewhe

> > > re

> > > > > in

> > > > > > another place.

> > > > > > I just tried to create and save table 2*6000, and it works.

> > > > > > Can you send me a small project reproducing this problem?

> > > > > >

> > > > > >

> > > > >

> > > > >

> > > >

> > > >

> > >

> > >

> >

> >

>

>





Powered by ABC Amber Outlook Express Converter