Implemented [line] tag

SVN revision: 1854
This commit is contained in:
Stefan Ritt 2007-04-26 15:13:07 +00:00
parent afaa9e5daf
commit 9c80b582dc
3 changed files with 12 additions and 0 deletions

View File

@ -101,6 +101,12 @@ The size of the text in pixels ranges from 1 to 29. Here are some examples:
<td bgcolor="#ffccff">CTRL+H</td>
<td bgcolor=#FFFFFF>will become a heading of <font size=6><b>level 1</b></font>, <font size=5><b>level 2</b></font> or <font size=4><b>level 3</b></font></tr>
<tr><td bgcolor=#D0D0FF width=200>
<b>[line]
<td bgcolor="#ffccff"></td>
<td bgcolor=#FFFFFF>will become a horizontal line such as <hr /></td></tr>
</table><p>
Tags can be nested, such as<p>

View File

@ -66,6 +66,8 @@ function elcode1(text, tag, value, selection)
str = '[LIST]\r\n[*] ' + selection + '\r\n[/LIST]';
else if (tag == 'TABLE')
str = '[TABLE border="1"]\r\nA|B\r\n|-\r\nC|D\r\n[/TABLE]';
else if (tag == 'LINE')
str = selection + '[LINE]';
else if (value == '')
str = '['+tag+']' + selection + '[/'+tag+']';
else

View File

@ -5767,6 +5767,9 @@ PATTERN_LIST pattern_list[] = {
{"|", "</td><td>"},
{"[/table]", "</td></tr></table>"},
/* horizontal line */
{"[line]", "<hr />"},
{"", ""}
};
@ -10014,6 +10017,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
ricon("list", loc("Insert list CTRL+L"), "elcode(document.form1.Text, 'LIST','')");
ricon("table", loc("Insert table"), "elcode(document.form1.Text, 'TABLE','')");
ricon("heading", loc("Insert heading CTRL+H"), "queryHeading(document.form1.Text)");
ricon("line", loc("Insert horizontal line"), "elcode(document.form1.Text, 'LINE','')");
rsprintf(" ");
ricon("code", loc("Insert code CTRL+O"), "elcode(document.form1.Text, 'CODE','')");