Antrium A35D

Bir sonraki için en iyisini yap...

codemirror.js Html Online Editor

Çok Kullanışlı Html Online Editor. İşinizi çok kolaylaştıracak !

Öncelikle Dosyamızı İndiriyoruz ve projenize göre aşağıdaki adımları uguluyoruz : https://drive.google.com/file/d/1Lx_H2-ygmn10edUdF_NigJ9NwuBp2IDM/view?usp=drivesdk

Eklenecek CSS ve JS Dosyalarımız;

<link rel="stylesheet" href="/codemirror/codemirror.css">
 <link rel="stylesheet" href="/codemirror/addon/hint/show-hint.css">
 <script src="/codemirror/codemirror.js"></script>
 <script src="/codemirror/addon/hint/show-hint.js"></script>
 <script src="/codemirror/addon/hint/xml-hint.js"></script>
 <script src="/codemirror/addon/hint/html-hint.js"></script>
 <script src="/codemirror/mode/xml/xml.js"></script>
 <script src="/codemirror/mode/javascript/javascript.js"></script>
 <script src="/codemirror/mode/css/css.js"></script>
 <script src="/codemirror/mode/htmlmixed/htmlmixed.js"></script>

HTML İÇERİĞİ;

<textarea class="form-control" style="height:900px" rows="3" id="vcssKOD_ILAVE" name="vcssKOD_ILAVE">@ViewData["vcssKOD_ILAVE"]</textarea>

JS ve CSS İÇERİĞİ;

<script>

    $(document).ready(function () {
        var editor = CodeMirror.fromTextArea(document.getElementById("vcssKOD_ILAVE"), {
            lineNumbers: true,
            mode: "text/html",
            extraKeys: { "Ctrl-Space": "autocomplete" },
            value: document.documentElement.innerHTML
        });

        var editor2 = CodeMirror.fromTextArea(document.getElementById("tcsskodu"), {
            lineNumbers: true,
            mode: "text/html",
            extraKeys: { "Ctrl-Space": "autocomplete" },
            value: document.documentElement.innerHTML
        });


    });
</script>

<style>
    .CodeMirror {
        
        height: 100%;
    }
</style>

255 Okunma | 26.04.2023 16:27

YORUMLAR

Yorum Yaz
Hüseyin ÖZKAN Yazılım Uzmanı

C#,MVC,MSSQL,Windows Forms