hi,
can you post link to that javascript highlighter code? (if public
domain of course),
here is how you can use highligher used in YUI library:
HTML CODE:
<html>
<head>
<title>Wrapper HTML for SHExample</title>
<meta name='gwt:module'
content='com.mycompany.project.SHExample'/>
<link type="text/css" rel='stylesheet' href='http://
developer.yahoo.com/yui/assets/dpSyntaxHighlighter.css'/>
</head>
<body>
<script language="javascript" src="
http://developer.yahoo.com/
yui/assets/dpSyntaxHighlighter.js">
</script>
<script language="javascript"
src="com.mycompany.project.SHExample.nocache.js">
</script>
</body>
</html>
JAVA CODE:
package com.mycompany.project.client;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextArea;
/**
* Entry point classes define <code>onModuleLoad()</code>.
*/
public class SHExample implements EntryPoint {
private Button clickMeButton;
public void onModuleLoad() {
RootPanel rootPanel = RootPanel.get();
final TextArea jscriptCode = new TextArea();
rootPanel.add(jscriptCode);
jscriptCode.setText("var oPushButton7 = new
YAHOO.widget.Button({ \n" +
" label:\"Add\", \n" +
" id:\"pushbutton7\", \n" +
" container:\"pushbuttonsfromjavascript
\" });");
jscriptCode.setVisibleLines(1);
jscriptCode.setCharacterWidth(60);
jscriptCode.setName("code");
jscriptCode.setStyleName("JScript");
//
highlight();
}
native void highlight()
/*-{
$wnd.dp.SyntaxHighlighter.HighlightAll('code');
}-*/;
}
to have example highligh as on that page:
http://developer.yahoo.com/yui/examples/button/btn_example01.html
regards,
Peter