mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
feat: prettier
This commit is contained in:
parent
4d3ed6fe28
commit
1431f4561f
3 changed files with 30 additions and 36 deletions
|
|
@ -15,8 +15,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
|
||||||
language: "javascript",
|
language: "javascript",
|
||||||
});
|
});
|
||||||
|
|
||||||
var decorations = editor.createDecorationsCollection(
|
var decorations = editor.createDecorationsCollection([
|
||||||
[
|
|
||||||
{
|
{
|
||||||
range: new monaco.Range(3, 1, 5, 1),
|
range: new monaco.Range(3, 1, 5, 1),
|
||||||
options: {
|
options: {
|
||||||
|
|
@ -28,5 +27,4 @@ var decorations = editor.createDecorationsCollection(
|
||||||
range: new monaco.Range(7, 1, 7, 24),
|
range: new monaco.Range(7, 1, 7, 24),
|
||||||
options: { inlineClassName: "myInlineDecoration" },
|
options: { inlineClassName: "myInlineDecoration" },
|
||||||
},
|
},
|
||||||
]
|
]);
|
||||||
);
|
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
|
||||||
contextmenu: false,
|
contextmenu: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
var decorations = editor.createDecorationsCollection(
|
var decorations = editor.createDecorationsCollection([
|
||||||
[
|
|
||||||
{
|
{
|
||||||
range: new monaco.Range(3, 1, 3, 1),
|
range: new monaco.Range(3, 1, 3, 1),
|
||||||
options: {
|
options: {
|
||||||
|
|
@ -27,8 +26,7 @@ var decorations = editor.createDecorationsCollection(
|
||||||
glyphMarginClassName: "myGlyphMarginClass",
|
glyphMarginClassName: "myGlyphMarginClass",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]);
|
||||||
);
|
|
||||||
|
|
||||||
// Add a zone to make hit testing more interesting
|
// Add a zone to make hit testing more interesting
|
||||||
var viewZoneId = null;
|
var viewZoneId = null;
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@ var editor = monaco.editor.create(document.getElementById("container"), {
|
||||||
glyphMargin: true,
|
glyphMargin: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
var decorations = editor.createDecorationsCollection(
|
var decorations = editor.createDecorationsCollection([
|
||||||
[
|
|
||||||
{
|
{
|
||||||
range: new monaco.Range(3, 1, 3, 1),
|
range: new monaco.Range(3, 1, 3, 1),
|
||||||
options: {
|
options: {
|
||||||
|
|
@ -26,7 +25,6 @@ var decorations = editor.createDecorationsCollection(
|
||||||
glyphMarginClassName: "myGlyphMarginClass",
|
glyphMarginClassName: "myGlyphMarginClass",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]);
|
||||||
);
|
|
||||||
|
|
||||||
// You can now use `decorations` to change or remove the decoration
|
// You can now use `decorations` to change or remove the decoration
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue