mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Added heading to ELCode tags
SVN revision: 1637
This commit is contained in:
parent
66d96e870d
commit
42d35efc3c
@ -75,6 +75,12 @@ The size of the text in pixels ranges from 1 to 29. Here are some examples:
|
|||||||
|
|
||||||
<tr><td bgcolor=#D0D0FF width=200><b>[center]</b>Hello<b>[/center]</b><td bgcolor=#FFFFFF><center>will put the text in the center</center></tr>
|
<tr><td bgcolor=#D0D0FF width=200><b>[center]</b>Hello<b>[/center]</b><td bgcolor=#FFFFFF><center>will put the text in the center</center></tr>
|
||||||
|
|
||||||
|
<tr><td bgcolor=#D0D0FF width=200>
|
||||||
|
<b>[h1]</b>Hello<b>[/h1]</b><br>
|
||||||
|
<b>[h2]</b>Hello<b>[/h2]</b><br>
|
||||||
|
<b>[h3]</b>Hello<b>[/h3]</b>
|
||||||
|
<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>
|
||||||
|
|
||||||
</table><p>
|
</table><p>
|
||||||
|
|
||||||
Tags can be nested, such as<p>
|
Tags can be nested, such as<p>
|
||||||
|
|||||||
@ -90,3 +90,11 @@ function queryURL(text)
|
|||||||
linkURL = prompt(linkURL_prompt, 'http://');
|
linkURL = prompt(linkURL_prompt, 'http://');
|
||||||
elcode1(text, 'URL', linkURL, linkText);
|
elcode1(text, 'URL', linkURL, linkText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function queryHeading(text)
|
||||||
|
{
|
||||||
|
selection = getSelection(text);
|
||||||
|
heading = prompt(linkHeading_prompt, '');
|
||||||
|
tag = 'H' + heading;
|
||||||
|
elcode1(text, tag, '', selection);
|
||||||
|
}
|
||||||
|
|||||||
10
src/elogd.c
10
src/elogd.c
@ -5532,6 +5532,14 @@ PATTERN_LIST pattern_list[] = {
|
|||||||
{"[/list]", "</ul>"},
|
{"[/list]", "</ul>"},
|
||||||
{"[list=", "<ol type=\"%s\">"},
|
{"[list=", "<ol type=\"%s\">"},
|
||||||
|
|
||||||
|
/* headings */
|
||||||
|
{"[h1]", "<h1>"},
|
||||||
|
{"[/h1]", "</h1>"},
|
||||||
|
{"[h2]", "<h2>"},
|
||||||
|
{"[/h2]", "</h2>"},
|
||||||
|
{"[h3]", "<h3>"},
|
||||||
|
{"[/h3]", "</h3>"},
|
||||||
|
|
||||||
/* URLs */
|
/* URLs */
|
||||||
{"[url=", "<a href=\"%#\">%s</a>"},
|
{"[url=", "<a href=\"%#\">%s</a>"},
|
||||||
{"[url]", "<a href=\"%#\">%s</a>"},
|
{"[url]", "<a href=\"%#\">%s</a>"},
|
||||||
@ -8740,6 +8748,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
/* strings for elcode.js */
|
/* strings for elcode.js */
|
||||||
rsprintf("linkText_prompt = '%s';\n", loc("Enter name of hyperlink"));
|
rsprintf("linkText_prompt = '%s';\n", loc("Enter name of hyperlink"));
|
||||||
rsprintf("linkURL_prompt = '%s';\n", loc("Enter URL of hyperlink"));
|
rsprintf("linkURL_prompt = '%s';\n", loc("Enter URL of hyperlink"));
|
||||||
|
rsprintf("linkHeading_prompt = '%s';\n", loc("Enter heading level (1, 2 or 3)"));
|
||||||
if (stristr(browser, "MSIE") && !stristr(browser, "opera"))
|
if (stristr(browser, "MSIE") && !stristr(browser, "opera"))
|
||||||
rsprintf("browser = 'MSIE';\n");
|
rsprintf("browser = 'MSIE';\n");
|
||||||
else if (stristr(browser, "Mozilla") && !stristr(browser, "opera") && !stristr(browser, "konqueror"))
|
else if (stristr(browser, "Mozilla") && !stristr(browser, "opera") && !stristr(browser, "konqueror"))
|
||||||
@ -9308,6 +9317,7 @@ void show_edit_form(LOGBOOK * lbs, int message_id, BOOL breply, BOOL bedit, BOOL
|
|||||||
rsprintf(" ");
|
rsprintf(" ");
|
||||||
ricon("quote", loc("insert quote"), "elcode(document.form1.Text, 'QUOTE','')");
|
ricon("quote", loc("insert quote"), "elcode(document.form1.Text, 'QUOTE','')");
|
||||||
ricon("list", loc("insert list"), "elcode(document.form1.Text, 'LIST','')");
|
ricon("list", loc("insert list"), "elcode(document.form1.Text, 'LIST','')");
|
||||||
|
ricon("heading", loc("insert heading"), "queryHeading(document.form1.Text)");
|
||||||
|
|
||||||
rsprintf(" ");
|
rsprintf(" ");
|
||||||
ricon("code", loc("insert code"), "elcode(document.form1.Text, 'CODE','')");
|
ricon("code", loc("insert code"), "elcode(document.form1.Text, 'CODE','')");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user