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

Bug 527136

Summary: codeEdit: Support single line options as we did for the simple version of the stand alone editor.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: EditorAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 16.0   
Target Milestone: 17.0   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description libing wang CLA 2017-11-10 14:28:45 EST

    
Comment 1 libing wang CLA 2017-11-13 08:43:31 EST
Users migrating from the simple stand alone editor solution to the codeEdit widgets want both one line editor and the editor with plugins in their applications.
Comment 3 libing wang CLA 2017-11-13 14:48:19 EST
The snippet to create a single line editorViewer instance is:
		codeEdit.create({parent: "yourDomID" or Dom node, singleMode: true, editorConfig: {lineNumberRuler: false, overviewRuler: false},
							   contentType: "yourContentType",
							   contents: yourContents}).then(function(editorViewer){
			var height = editorViewer.editor.getTextView().computeSize().height;
			var parent = document.getElementById("yourDomID")  or your Dom node;
			parent.style.height = height + "px"; //$NON-NLS-0$
		});