www.国产视频,一级看片免费视频囗交动图,波多野结衣高清无码中文456,中国一级特黄特级毛片,69mmWWW路cOm,天天摸夜夜摸黄片,aaaaaaaaa在线观看

codemirror插件下載 最新軟件|熱門排行|軟件分類|軟件專題|廠商大全

您的位置: 首頁編程開發(fā)編程工具 → codemirror中文api v2.23 官方最新版

codemirror中文api

v2.23 官方最新版 codemirror中文api 網(wǎng)友評(píng)分:8
  • 軟件大?。?span>339KB
  • 軟件語言:中文
  • 軟件類型:國(guó)產(chǎn)軟件
  • 軟件類別:免費(fèi)軟件 / 編程工具
  • 更新時(shí)間:2017-08-17 16:12
  • 運(yùn)行環(huán)境:WinAll, WinXP, Win7, Win8, Win10
  • 軟件等級(jí):4級(jí)
  • 軟件廠商:
  • 官方網(wǎng)站:暫無
好評(píng):50%頂一個(gè)
壞評(píng):50踩一個(gè)

同類相關(guān)軟件

軟件介紹

軟件標(biāo)簽: codemirror 編程插件

codemirror是一款非常好用的代碼編程插件,可以在線進(jìn)行代碼的編輯,支持語言廣泛,可以很方便的在頁面中嵌入所需要的代碼編輯區(qū),非常的好用,歡迎有需要的碰喲到綠色資源網(wǎng)下載使用!

官方介紹

codeMirror是一款十分強(qiáng)大的代碼編輯插件,提供了十分豐富的API。CodeMirror是一個(gè)運(yùn)行在瀏覽器中的代碼編輯器,支持100多種語言,高度可定制。

codemirror插件特色

1.CodeMirror為各種編程語言實(shí)現(xiàn)關(guān)鍵字、函數(shù)、變量等代碼高亮顯示,豐富的API和可擴(kuò)展功能以及多個(gè)主題樣式。

2.支持語言有C、C++、C#、Java、Perl、HTML、CSS、phpjavascript、Python、Lua、Go、Groovy、Ruby等。

3.以及diff、LaTeX、SQL、wiki、Markdown等文件格式。

odeMirror調(diào)用方法

href="/static/codemirror/lib/codemirror.css" rel="stylesheet" >

<script src="/static/codemirror/lib/codemirror.js"></script>

同時(shí)加載你所需要使用的腳本JS及風(fēng)格樣式CSS文件,如下舉例:

<link href="/static/codemirror/theme/3024-night.css" rel="stylesheet"> <link href="/static/codemirror/theme/erlang-dark.css" rel="stylesheet">

<script src="/static/codemirror/mode/shell/shell.js"></script> <script src="/static/codemirror/mode/perl/perl.js"></script> <script src="/static/codemirror/mode/python/python.js"></script>

注意文件的放置位置

下一步在html頁面中編寫好代碼:

 1 <!--選擇腳本編碼代碼--> 2 <div> 3     <input type="radio" name="script_once_type" id="script_once_type1" checked> shell 4      <input type="radio" name="script_once_type" id="script_once_type2"> bat 5      <input type="radio" name="script_once_type" id="script_once_type3"> python 6 </div> 7  8 <!--選擇腳本風(fēng)格代碼--> 9 <div>10     <select id='select'>11          <option>default</option>12          <option>3024-night</option>13          <option selected>erlang-dark</option>14     </select>15 </div>16 17 <!--textarea-->18 <textarea id="script_once_code">19     #!/bin/sh20 </textarea>21 <textarea id="code2">22     #!/usr/bin/env python23     # -*- coding: utf8 -*-24 </textarea>

調(diào)用關(guān)鍵代碼如下:

1 var editor = CodeMirror.fromTextArea($("#script_once_code")[0], { //script_once_code為你的textarea的ID號(hào)2           lineNumbers: true,//是否顯示行號(hào)3           mode:"shell", //默認(rèn)腳本編碼4          lineWrapping:true, //是否強(qiáng)制換行5 });

JS配置代碼如下:

 1 //選擇界面風(fēng)格JS 2 $('#select').change(function(){ 3      var theme = $('#select').val(); 4          editor.setOption("theme", theme); //editor.setOption()為codeMirror提供的設(shè)置風(fēng)格的方法 5  });  6  7 //選擇腳本類型JS 8 var txt1=$("#script_once_code").val(); 9 var txt2='';10 var txt3=$("#code2").val();11 $(".ck-code").click(function(){12        var txt=editor.getValue(); //editor.getValue()獲取textarea中的值13        var lang=$(this).PRop("id");14        if(lang=="script_once_type1") {15                editor.setOption("mode","shell");//editor.setOption()設(shè)置腳本類型16                    editor.setValue(txt1);// editor.setValue()設(shè)置textarea中的值17        }18        else if(lang=="script_once_type2") {19                editor.setOption("mode","perl");20                editor.setValue(txt2);21        }22        else {23                editor.setOption("mode","python");24                editor.setValue(txt3);25     26        }27 });

軟件截圖

下載地址 電腦版

用戶評(píng)論

熱門評(píng)論

最新評(píng)論

發(fā)表評(píng)論 查看所有評(píng)論(0)

昵稱:
請(qǐng)不要評(píng)論無意義或臟話,我們所有評(píng)論會(huì)有人工審核.
字?jǐn)?shù): 0/500 (您的評(píng)論需要經(jīng)過審核才能顯示)