<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          monaco-editor基于瀏覽器的代碼編輯器

          聯(lián)合創(chuàng)作 · 2023-09-23 05:24

          Monaco Editor 是微軟開源的基于 VS Code 的代碼編輯器,運(yùn)行在瀏覽器環(huán)境中。編輯器提供代碼提示,智能建議等功能。供開發(fā)人員遠(yuǎn)程更方便的編寫代碼。描述代碼編輯器功能的頁(yè)面在這里

          image

          安裝:

          npm install monaco-editor

          你將會(huì)得到

          • inside dev: bundled, not minified

          • inside min: bundled, and minified

          • inside min-maps: source maps for min

          • monaco.d.ts: this specifies the API of the editor

          集成

          這里是嵌入編輯器最基本的HTML頁(yè)面,更多的示例可在monaco-editor-samples找到

          <!DOCTYPE html>
          <html>
          <head>
              <meta http-equiv="X-UA-Compatible" content="IE=edge" />
              <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
          </head>
          <body>
          
          <div id="container"  ="width:800px;height:600px;border:1px solid grey"></div>
          
          <script src="monaco-editor/min/vs/loader.js"></script><script>    require.config({ paths: { 'vs': 'monaco-editor/min/vs' }});    require(['vs/editor/editor.main'], function() {        var editor = monaco.editor.create(document.getElementById('container'), {            value: [                'function x() {',                '\tconsole.log("Hello world!");',                '}'            ].join('\n'),            language: 'javascript'        });    });</script></body>
          </html>
          瀏覽 36
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  狼友在线观看视频 | 久久久三级电影片 | 手机在线免费看黄色电影一级片 | 国产无码激情视频 | 天天夜夜操 |