Editor problem with FF10.0.2 [message #805067] |
Thu, 23 February 2012 09:49  |
Christanto Leonardo Messages: 2 Registered: July 2009 |
Junior Member |
|
|
Hi,
I am trying to embed orion editor. Somehow it works in other browsers except FF10.0.2. Haven't try with other version of FF. No error in firebug console.
Any ideas?
Here is my html:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Welcome to Orion</title>
<style>
#editor {
height: 20em;
width: 90%;
border: 1px solid #000;
}
</style>
<script data-main="scripts/main" src="scripts/require.js"></script>
</head>
<body>
<div id="editor"></div>
<div id="status"></div>
</body>
</html>
Here is main.js:
require(['require', 'orion/editor/editor', 'orion/editor/editorFeatures', 'orion/editor/contentAssist', 'orion/textview/textView'],
function (require, mEditor, mEditorFeatures, mContentAssist, mTextView) {
var editorEl = document.getElementById('editor');
var textViewFactory = function() {
return new mTextView.TextView({
parent: editorEl,
stylesheet: [
require.toUrl('orion/textview/textview.css'),
require.toUrl('orion/textview/rulers.css'),
require.toUrl('orion/textview/annotations.css')
],
tabSize: 4
});
};
var statusReporter = function(message, isError) {
if (isError) {
status = 'ERROR: ' + message;
} else {
status = message;
}
document.getElementById('status').innerHTML = status;
};
var editor = new mEditor.Editor({
domNode: editorEl,
lineNumberRulerFactory: new mEditorFeatures.LineNumberRulerFactory(),
undoStackFactory: new mEditorFeatures.UndoFactory(),
statusReporter: statusReporter,
textViewFactory: textViewFactory
});
editor.installTextView();
});
Thanks.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02101 seconds