title: How to add, remove and change glyphs in Monaco Editor
body: <p>I am able to add glyph to the editor but I am not able to <strong>remove</strong> and <strong>edit</strong> the glyph. Can you please give me the right way of doing it.</p>
  <pre><code>&lt;h2&gt;Monaco Editor Sample&lt;/h2&gt;
  &lt;div id=&quot;container&quot; style=&quot;width:80%;height:600px;border:1px solid grey&quot;&gt;&lt;/div&gt;
  
  &lt;!-- OR ANY OTHER AMD LOADER HERE INSTEAD OF loader.js --&gt;
  &lt;script src=&quot;../node_modules/monaco-editor/min/vs/loader.js&quot;&gt;&lt;/script&gt;
  &lt;script&gt;
      var editor,decorations;
      require.config({ paths: { 'vs': '../node_modules/monaco-editor/min/vs' }});
      require(['vs/editor/editor.main'], function() {
           editor = monaco.editor.create(document.getElementById('container'), {
              value: [
                  'function x() {',
                  '\tconsole.log(&quot;Hello world!&quot;);',
                  '}',
              ].join('\n'),
              language: 'javascript',
              theme: &quot;myCustomTheme&quot;,
              automaticLayout: true,
              readOnly: false,
              mouseWheelZoom:true,
              glyphMargin:true,
              fontSize:'20px'
          });
     //below is the glyph I am calling
      var decorations = editor.deltaDecorations([], [     
      {
          range: new monaco.Range(3,1,3,1),
          options: {
              isWholeLine: true,
              className: 'myContentClass',
              glyphMarginClassName: 'glyph-error',
          }
      }
      ]);
      });
  &lt;/script&gt;
  </code></pre>
  <p>I am trying to delete or modify the range and style of the glyph using <strong>decorations</strong> variable but it is a string object.</p>
  <p>This is the how my editor looks with a squared glyph:</p>
  <p><a href="https://i.stack.imgur.com/IZJz8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IZJz8.png" alt="enter image description here" /></a></p>