mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 17:19:06 +01:00
89 lines
2.9 KiB
HTML
Executable File
89 lines
2.9 KiB
HTML
Executable File
<html>
|
|
<head>
|
|
<title>Test of CSS plugin</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<script type="text/javascript">
|
|
_editor_url = "../";
|
|
_editor_lang = "en";
|
|
</script>
|
|
|
|
<!-- load the main HTMLArea files -->
|
|
<script type="text/javascript" src="../htmlarea.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
HTMLArea.loadPlugin("CSS");
|
|
|
|
function initDocument() {
|
|
var editor = new HTMLArea("editor");
|
|
editor.config.pageStyle = "@import url(custom.css);";
|
|
editor.registerPlugin(CSS, {
|
|
combos : [
|
|
{ label: "Syntax",
|
|
// menu text // CSS class
|
|
options: { "None" : "",
|
|
"Code" : "code",
|
|
"String" : "string",
|
|
"Comment" : "comment",
|
|
"Variable name" : "variable-name",
|
|
"Type" : "type",
|
|
"Reference" : "reference",
|
|
"Preprocessor" : "preprocessor",
|
|
"Keyword" : "keyword",
|
|
"Function name" : "function-name",
|
|
"Html tag" : "html-tag",
|
|
"Html italic" : "html-helper-italic",
|
|
"Warning" : "warning",
|
|
"Html bold" : "html-helper-bold"
|
|
},
|
|
context: "pre"
|
|
},
|
|
{ label: "Info",
|
|
options: { "None" : "",
|
|
"Quote" : "quote",
|
|
"Highlight" : "highlight",
|
|
"Deprecated" : "deprecated"
|
|
}
|
|
}
|
|
]
|
|
});
|
|
editor.generate();
|
|
}
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body onload="initDocument()">
|
|
<h1>Test of FullPage plugin</h1>
|
|
|
|
<textarea id="editor" style="height: 30em; width: 100%;"
|
|
><h1><tt>registerDropdown</tt></h1>
|
|
|
|
<p>Here's some sample code that adds a dropdown to the toolbar. Go on, do
|
|
syntax highlighting on it ;-)</p>
|
|
|
|
<pre>var the_options = {
|
|
"Keyword" : "keyword",
|
|
"Function name" : "function-name",
|
|
"String" : "string",
|
|
"Numeric" : "integer",
|
|
"Variable name" : "variable"
|
|
};
|
|
var css_class = {
|
|
id : "CSS-class",
|
|
tooltip : i18n["tooltip"],
|
|
options : the_options,
|
|
action : function(editor) { self.onSelect(editor, this); }
|
|
};
|
|
cfg.registerDropdown(css_class);
|
|
toolbar[0].unshift(["CSS-class"]);</pre>
|
|
|
|
<p>Easy, eh? ;-)</p></textarea>
|
|
|
|
<hr />
|
|
<address><a href="http://dynarch.com/mishoo/">Mihai Bazon</a></address>
|
|
<!-- Created: Wed Oct 1 19:55:37 EEST 2003 -->
|
|
<!-- hhmts start --> Last modified: Wed Jan 28 11:10:16 EET 2004 <!-- hhmts end -->
|
|
<!-- doc-lang: English -->
|
|
</body>
|
|
</html>
|