[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [StrongED] background colour for tags in text
- To: StrongEd@xxxxxxxxxxx
- Subject: Re: [StrongED] background colour for tags in text
- From: Fred Graute <fjgraute@xxxxxxxxx>
- Date: Tue, 30 Oct 2018 16:05:52 +0100
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=casema.nl; s=201809corplgsmtpnl; h=MIME-Version:Message-ID:Subject:To:From:Date; bh=hmE9z2syggzPgSdI882+uLGFXSssGa+EI6/N6v3+TVg=; b=egYGBDGn21aysDTB6sTay7XckX EOB8BdorThlGbcVLWcgqVZfzxfPfZV1zwhSm0rJx/wtudBO7JeA8O7JE1I/ypgS6dI6Hwnmd0zQRP CA1xAIFMtuorRYFvPyqdA0lrf7ZPOPVcgxE/E1k0oovFpvqafg0k0TfRY1bL/QGWN4QhMUyUGfMYl wh7ZcfILRKTMC5G6cdbPhWF9jzWODah+rD8skfv5CnH2QRn23HsIX3/AytVv8Us+b7tlpZ7/jeogn qjipuGLVYJY/38+uwMJCPyDd9K2vr0/ydF2XLeRwdFfyajmbeqHO+nCO4o4Ra/AuFjLFA/3UbpXkZ 9xlsD7Fg==;
- Envelope-to: StrongEd@xxxxxxxxxxx
- In-reply-to: <f942174f57.jim@6.abbeypress.net>
- List-id: RISC OS StrongED mailing list
- References: <f942174f57.jim@6.abbeypress.net>
- Reply-to: StrongED@xxxxxxxxxxx
- User-agent: Messenger-Pro/7.06 (MsgServe/7.06) (RISC-OS/5.24)
In message <f942174f57.jim@xxxxxxxxxxxxxxxx>
Jim Nagel <stred@xxxxxxxxxxxxxxxx> wrote:
> I'm tweaking a modefile for displaying Impression DDF files, and have
> managed to get style tags such as {"heading" on} and {"heading" off} to
> display with a grey background.
>
> That grey deploys the usual StrongEd one for the likes of comments in
> obeyfiles.
>
> How can I get my style tags -- which are not comments -- to take on my own
> choice of background colour? I want them to stand out more clearly than
> mere coloured text (which is already used for other purposes in my mode).
There are two parts to this; the ModeFile and the Colours section of the
Mode Choices.
The SyntaxWords groups in the ModeFile are used to specify which parts
of a text get coloured using the colours for that group.
In the Colours section of the Mode Choices the colours, and font style,
can be set for each of the groups defined in the ModeFile.
For example if the ModeFile contains:
SyntaxWords Group1 EndAlways NoCase
Hello Hi
End
SyntaxWords Group2 EndAlways NoCase
Planet World
End
then 'hello' and 'hi' will be coloured using the settings for group 1,
and for 'planet' and 'world' will use the colours set for group 2.
To get your own style tags highlighted you'll need to add a SyntaxWords
group to the ModeFile that captures them, listing them explicitly is
one option.
If this is based on my original DDF mode then you'll probably have to
list all styles tags explicitly otherwise there will be a clash with
SyntaxGroup 1 (which needs to be removed).
Once that's done then you can set the colours using the Mode Choices.
Cheers,
Fred.
--
StrongED Developer
http://www.stronged.iconbar.com/
--
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at
http://stronged.torrens.org/index.html