TRichEdit delete RTF code
Posted: Tue Oct 09, 2007 8:48 am
I've a little RTF file with the following code (created with a TRichEdit component):
when I load this file into an TRichEdit component the code for the hyperlink is missing and the RTF is:
There is a way to avoid this behavior?
Thanks,
Matteo
Code: Select all
{\rtf1\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil\fcharset1 Times New Roman;}{\f1\fnil\fcharset1 Arial;}{\f2\fnil\fcharset1 Verdana;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;
\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;
\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;
\red128\green128\blue128;\red192\green192\blue192;}
\uc1
\pard\fi0\li0\qj\ri0\sb0\sa0\itap0 \plain \f0\fs32
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\qc\ri0\sb0\sa0\itap0 \plain \f0\b\fs32\cf1 1
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0 {\*\bkmkstart p1}{\*\bkmkend p1}
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f2\fs20 First chapter, go to {\field{\*\fldinst HYPERLINK "" \\l "p2"}{\fldrslt \plain \f2\fs20 2}}\plain \f2\fs20 .
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0 \plain \f0\fs32
\par \pard\fi0\li0\qc\ri0\sb0\sa0\itap0 \plain \f0\b\fs32\cf1 2
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0 {\*\bkmkstart p2}{\*\bkmkend p2}
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f2\fs20 Second chapter, go back to {\field{\*\fldinst HYPERLINK "" \\l "p1"}{\fldrslt \plain \f2\fs20 1}}\plain \f2\fs20 .
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0 \plain \f0\fs32 }
Code: Select all
{\rtf1\ansi\ansicpg0\uc1\deff0\deflang0\deflangfe0{\fonttbl{\f0\fnil\fcharset1 Arial;}{\f1\fnil\fcharset1 Times New Roman;}{\f2\fnil\fcharset1 Verdana;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;
\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;
\red192\green192\blue192;}
\uc1
\pard\fi0\li0\qj\ri0\sb0\sa0\itap0 \plain \f1\fs32
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\qc\ri0\sb0\sa0\itap0 \plain \f1\b\fs32\cf1 1
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f2\fs20 First chapter, go to \plain \f2\fs20 2\plain \f2\fs20 .
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0 \plain \f1\fs32
\par \pard\fi0\li0\qc\ri0\sb0\sa0\itap0 \plain \f1\b\fs32\cf1 2
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0
\par \pard\fi0\li0\ql\ri0\sb0\sa0\itap0 \plain \f2\fs20 Second chapter, go back to \plain \f2\fs20 1\plain \f2\fs20 .
\par \pard\fi0\li0\qj\ri0\sb0\sa0\itap0 \plain \f1\fs32 }
Thanks,
Matteo