Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 472625

Summary: Code Edit Widget: The AMD build needs to export the "orion/codeEdit" module.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 10.0   
Target Milestone: 10.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2015-07-14 10:53:31 EDT
The AMD build needs to export the "orion/codeEdit" module for users to better consume it with AMD loader.
Comment 2 libing wang CLA 2015-07-14 12:11:01 EDT
Here is a snippet how to consume the AMD build
***********************************************

require.config({
    bundles: {
        "editorBuild/code_edit/built-codeEdit-amd": ["orion/codeEdit", "orion/Deferred"]
    }	    
});
require(["orion/codeEdit", "orion/Deferred"], function(mCodeEdit, Deferred) {
	var codeEdit = new mCodeEdit();
	var contents = 'var foo = "bar";'; 
	codeEdit.create({parent: "embeddedEditor"/*editor parent node id*/}).then(function(editorViewer) {
		editorViewer.setContents(contents, "application/javascript");
	});
});