From 9c80b582dc7b10e04547f9c219a33ed34531e226 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Thu, 26 Apr 2007 15:13:07 +0000 Subject: [PATCH] Implemented [line] tag SVN revision: 1854 --- resources/elcode_english.html | 6 ++++++ scripts/elcode.js | 2 ++ src/elogd.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/resources/elcode_english.html b/resources/elcode_english.html index c1d025c3..cee6a6ff 100755 --- a/resources/elcode_english.html +++ b/resources/elcode_english.html @@ -101,6 +101,12 @@ The size of the text in pixels ranges from 1 to 29. Here are some examples: CTRL+H will become a heading of level 1, level 2 or level 3 + +[line] + +will become a horizontal line such as
+ +

Tags can be nested, such as

diff --git a/scripts/elcode.js b/scripts/elcode.js index 7ae03bd9..2ddcf6b9 100755 --- a/scripts/elcode.js +++ b/scripts/elcode.js @@ -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 diff --git a/src/elogd.c b/src/elogd.c index 9c050e96..4c6ab688 100755 --- a/src/elogd.c +++ b/src/elogd.c @@ -5767,6 +5767,9 @@ PATTERN_LIST pattern_list[] = { {"|", ""}, {"[/table]", ""}, + /* horizontal line */ + {"[line]", "


"}, + {"", ""} }; @@ -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','')");