From: Hatem B. <ref...@ya...> - 2002-12-26 22:11:00
|
well, i've written manually code to highlight PHP and i think it's the = only solution for me. What is not working in SynAnySyn highlighter is = the the PHP highlight, not the code itself ! for example use it with = this code=20 <code> <?php $name =3D "a name"; echo "Hello World\n"; echo "$name\n"; ?> <code> <highlighted code old> <?PHP $name =3D "a name"; echo "\"Hello world\n\""; echo "\$name =3D $name"; ?> </highlighted code old> <highlighted code new> <?PHP $name =3D "a name"; echo "\"Hello world\n\""; echo "\$name =3D $name"; ?> </highlighted code new> The last code result is what i'm looking for; but I dunno how this could = be discribed with ini=20 Regards, Hatem ----- Original Message -----=20 From: lb...@va...=20 To: Hatem Ben=20 Sent: Monday, December 23, 2002 2:55 PM Subject: Re: [Synedit-user] questions about a highlighter for PHP = (highlighting vars and <? ?> keywords ) there is a PHP highlighter already. Jans SynAnySyn highlighter did = work, I have implemented it in one of my editors. With it you would use = an INI file to define the language keywords and load that.=20 In the example below synJWalk is a TSynAnySyn higlighter and = sIniSyntax is a string.=20 procedure TJWPAD.FormCreate(Sender: TObject);=20 begin=20 sIniSyntax :=3D sAppPath + 'jw9pad.ini'; // Only for J Walk Script=20 // Load synJWalk Highlighter=20 if FileExists(sIniSyntax) then=20 synJWalk.LoadHighLighter(sIniSyntax)=20 else=20 MessageDlg(rsMissingINI, mtError, [mbOk], 0);=20 end;=20 Leon Brown |