| 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: | Editor | Assignee: | 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
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. 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$
});
|