JQuery file support in Mulit-page Editor plugin [message #1125207] |
Fri, 04 October 2013 09:13 |
rs rs Messages: 1 Registered: October 2013 |
Junior Member |
|
|
Hi,
I am facing the issue on Multi-page editor plugin development. I want this plugin to support jquery. It is supporting Javascript functions using import "sun.org.mozilla.javascrip". But it is not supporting Jquery functions.
I am calling Jquery file for some text convertion using jquery code when opening perview mode in Multi-page editor. But the following error throws.
Code:
BufferedReader script = new BufferedReader(new FileReader("mapBuilder.js"));
Context context = Context.enter();
ScriptableObject scope = context.initStandardObjects();
context.evaluateReader(scope, script, "script", 1, null);
Function fct = (Function)scope.get("buildMap", scope);
String editorText =
editor.getDocumentProvider().getDocument(editor.getEditorInput()).get();
Object result = fct.call(context, scope, scope, new Object[] {editorText});
//System.out.println(Context.jsToJava(result, int.class));
text.setText(result.toString());
Error i got:
sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "$" is not defined. (script#18)
Please help me solve this problem.
Thanks in Advance
|
|
|
Powered by
FUDForum. Page generated in 0.05280 seconds