Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Orion (Archived) » Editor problem with FF10.0.2
Editor problem with FF10.0.2 [message #805067] Thu, 23 February 2012 09:49 Go to next message
Christanto Leonardo is currently offline Christanto LeonardoFriend
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.
Re: Editor problem with FF10.0.2 [message #805373 is a reply to message #805067] Thu, 23 February 2012 17:32 Go to previous messageGo to next message
Felipe Heidrich is currently offline Felipe HeidrichFriend
Messages: 29
Registered: July 2009
Junior Member
Try setting the width and height for the editor to pixel value.
<style>
#editor {
height: 400px;
width: 400px;
border: 1px solid #000;
}
</style>

Alternatively you can debug the creation of the textview (breakpoint in createFrame() and createContents() in textView.js).

Other idea is to use firebug to inspect the page and check if the elements under #editor were created properly, make sure the metrics of each element is set to something good.

I hope this help,
Felipe
Re: Editor problem with FF10.0.2 [message #809731 is a reply to message #805373] Wed, 29 February 2012 07:31 Go to previous message
Christanto Leonardo is currently offline Christanto LeonardoFriend
Messages: 2
Registered: July 2009
Junior Member
Just an update.
It actually works fine. There is a conflict with a FF extension.
Previous Topic:Bind to a specific IP address
Next Topic:Editor Font Size
Goto Forum:
  


Current Time: Mon May 06 20:29:44 GMT 2024

Powered by FUDForum. Page generated in 0.03866 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top