0

How to change background color for PHP code in jEdit when mixed with HTML or Javascript or text? I mean how to do something like this screenshot: [dreamweaver example] or suggest any other free editor that does that trick.

dreamweaver example

superstar
  • 33
  • 9

1 Answers1

0

Jedit modes are specified in XML files at your <jedit installation folder>/modes/*xml. Inside of a mode, it may DELEGATE from one mode to another. I.e. the php mode can delegate sections of code to be highlighted by the html mode like:

<IMPORT DELEGATE="html::TAGS" />

If you could somehow tweak the html mode definition to have a different background, then perhaps you could accomplish this. See Writing Edit Modes.

The Highlight Plugin almost gives you what you want but it appears to be only a match on a single line with this regex:

<\?(.|\n)*?\?>

If you tweaked the source code for that plugin to allow multi-line regex matches, then that would get you what you want.

Ross Rogers
  • 23,523
  • 27
  • 108
  • 164