home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 3
/
AUCD3.iso
/
airport
/
utils
/
stronghtml
/
!HTML
/
Modefile
< prev
next >
Wrap
Text File
|
1996-11-24
|
7KB
|
332 lines
# HTML mode for StrongED
# Orginal by Andrew Black mailto:andrew@bach.demon.co.uk
# Changes by David McCormack mailto:davemac@rylands.demon.co.uk
#
# Contact me with comments, gribes, praise , suggestions .......
#
#----------------------------------------------------------------------
SyntaxOptions
SingleQuote No
DoubleQuote Yes
QuoteQuote Yes
SplitString No
End
SyntaxComment
Type Multiline
StartWith <!--
EndWith -->
End
# Id's are used to try and pick up all tags that don't have their
# own colouring. It also picks out start of tags such as
# <A ( as part of <A HREF=""></A> )
# Of course it will also pick out non-tags such as <ANDREW>
ID_FirstChar <
ID_Middle /A-Za-z_0-9
ID_LastChar A-Za-z_0-9>
SyntaxWords Group1 EndAlways nocase
<address> </address> <address
<html> </html> <html
<head> </head> <head
<title> </title> <title
<body> </body> <body
<h1> </h1> <h1
<h2> </h2> <h2
<h3> </h3> <h3
<h4> </h4> <h4
<h5> </h5> <h5
<h6> </h6> <h6
End
SyntaxWords Group2 EndAlways nocase
<ul> </ul> <dl> </dl> <ol> </ol>
<form> </form>
<table> </table>
<blockquote> </blockquote>
End
SyntaxWords Group3 EndAlways nocase
<li> <dt> <dd>
<input
End
SyntaxWords Group4 EndAlways nocase
<img
<a </a>
End
SyntaxWords Group5 EndAlways nocase
<i <i> </i>
<b <b> </b>
<u <u> </u>
<sub> </sup>
<sub> </sub>
<font </font>
End
#----------------------------------------------------------------------
Search
heading1 "<h" AlphaNum ">" @0 * "</" @9
heading "<h" AlphaNum ">" @0 * @9 "</"
tag "<" ["\\"] { AlphaNum | "/" }+ ">"
_MarkWord tag | {AlphaNum}+ | {Punct}+
quote "\""
anchor "<a" {iswhite}+ * "href" {iswhite} "=" {iswhite} quote @0 ** quote ">" @9
anchor1 "<a" {iswhite}+ * "href" {iswhite} "=" {iswhite} quote @0
selected_line {any}+
# match everything sensible but not ,
# textstr { AlphaNum | '\' _\-' }+
url {AlphaNum}+ ":/" { ["~"] alphanum | '/_.' }+
url_text @1 url @2 {iswhite} @3 {.} @4
text @1 @2 @3 {.} @4
# hotlist url_text | text
hotlist url_text
# removing tag
anch_st "<a" {iswhite}+ * quote
anch_end quote {iswhite} ">"
remove_tag anch_st | anch_end | tag
End
Replace
h1 "<H1>" @@ "</H1>"
h2 "<H2>" @@ "</H2>"
h3 "<H3>" @@ "</H3>"
#misc
ital "<I>" @@ "</I>"
bold "<B>" @@ "</B>"
under "<u>" @@ "</u>"
strong "<STRONG>" @@ "</STRONG>"
emphasis "<EM>" @@ "</EM>"
comment "<!-- " @@ " -->"
hotlist_r "<A href=\"" @12 "\">" @34 "</A>" nl
# anch "<A href=\"" @@ "\"> </A>"
End
Functions
Icon lof
Select ListOfFound (heading1,All,Align,noLine,NoCase)
Menu List of headings
Help Select - list of headings|MAdjust - list of Anchors
Adjust ListOfFound (anchor,All,align,noLine,NoCase)
Key ⇧F3
Menu Save & Render ⇧F3
Icon run
Select SetTmp() SaveDClick ("<tmp$path>.<tmp$leaf>")
Help Click to save text and launch viewer (⇧F3)
Menu Escape brackets
Key ⇧^F4
Select Replace ("<","<", block ) Replace (">",">", block )
Help replaces < with escape |M to embed an HTML example in HTML file
Menu Load selected file
Help Click to load the HTML file under cursor.
Select SetTmp() LoadOne ("<tmp$path>.<tmp$word>","<tmp$word>")
Help Goes to selected file|MFor now must be in same directory as current file
# Key
Menu Create <H1>
Icon ab_h1
Select Replace( selected_line,h1 , block , noline,nocase)
Help Makes selected text into H1
Menu Create <H2>
Icon ab_h2
Select Replace( selected_line,h2 , block , noline,nocase)
Help Makes selected text into H2
Menu Create <H3>
Icon ab_h3
Select Replace( selected_line,h3 , block , noline,nocase)
Help Makes selected text into H3
# !stronged sounds like a good icon for this. hope Guttorm doesn't mind :-)
# Menu Add strong
# Icon sm!stronged
# Select Replace( selected_line,strong , block , noline,nocase)
# Help Makes selected text strong
# Menu Add emphasis
# Icon ab_emph
# Select Replace( selected_line,emphasis , block , noline,nocase)
# Help Makes selected text emphasis
Menu Add italic
Icon ab_italic
Select Replace( selected_line,ital , block , noline,nocase)
Help Makes selected text italic
Menu Add bold
Icon ab_bold
Select Replace( selected_line,bold , block , noline,nocase)
Help Makes selected text bold
Menu Add underline
Icon ab_under
Select Replace( selected_line,under, block , noline,nocase)
Help Makes selected text bold
Menu Remove tags
Select Replace( remove_tag,"" , block , noline,nocase)
Help Removes all tags from selected text |M (URL of anchors remain)
Menu Comment section
Select Replace( selected_line, comment , block , noline,nocase)
Help Removes all tags from selected text |M (URL of anchors remain)
# Menu Insert Anchor
Icon ab_anchor
Select InsertStr("<A href=\"\"> </A>")
Help Select inserts anchor|M Adjust Convert url + text to anchor
Key f9
Adjust Replace (hotlist,hotlist_r, block )
End
Shortcuts
# overall HTML file (to create a new file)
# add your name etc into here
''f <HTML>\N<HEAD>\N <TITLE>\@</TITLE>\N</HEAD>\N\N<BODY>\N<H1>\@</H1>\N<HR>\N<ADDRESS>My name </ADDRESS>\N</BODY></HTML>
#lists
''ul <UL>\N\I <LI>\@\N\I</UL>
''ol <OL>\N\I <LI>\@\N\I</OL>
<LI>+ <LI>\@\N\I<LI>
#anchors
''ai <A href="\@">\@</A>
''ae <A href="http://\@/\@">\@</A>
''ha <H1><a name="\@">\@</a></H1>
# heads
''1 <H1>\@</H1>\N
''2 <H2>\@</H2>\N
''3 <H3>\@</H3>\N
#misc
''i <I>\@</I>
''b <B>\@</B>
''m <IMG SRC="\@" ALT="[\@]">
# comment :
''! <!-- \@ -->
End
Shortcuts
Æ Æ
Á Á
 Â
À À
Å Å
à Ã
Ä Ä
Ç Ç
¸ ¸
Ð Ð
É É
Ê Ê
È È
Ë Ë
Í Í
Î Î
Ì Ì
Ï Ï
Ñ Ñ
Ó Ó
Ô Ô
Ò Ò
Ø Ø
Õ Õ
Ö Ö
Þ Þ
Ú Ú
Û Û
Ù Ù
Ü Ü
Ý Ý
á á
´ ´
â â
æ æ
à à
å å
ã ã
ä ä
¦ ¦
ç ç
¢ ¢
© ©
¤ ¤
° °ree;
¨ ¨
÷ ÷
é é
ê ê
è è
ð ð
ë ë
<>< &fish;
¼ ¼
½ ½
¾ ¾
í í
î î
¡ ¡
ì ì
¿ ¿
ï ï
« «
¯ ¯on;
— —
− –
µ µ
· ·
¬ ¬
ñ ñ
ó ó
ô ô
ò ò
ª ª
º º
ø ø
õ õ
ö ö
¶ ¶
± ±
£ £
» »
® ®
§ §
¹ ¹
² ²
³ ³
ß ß
þ þ
× ×
™ ™
ú ú
û û
ù ù
ü ü
ý ý
¥ ¥
ÿ ÿ
End