@hpcc-js/codemirror
TypeScript icon, indicating that this package has built-in type declarations

2.61.2 • Public • Published

@hpcc-js/codemirror

This package is part of the mono repository "@hpcc-js" (aka Visualization Framework), for more information including Quick Start, Gallery and Tutorials, please visit the main page on GitHub: hpcc-systems/Visualization.

Exported Widgets

Stand-alone HTML Example

<html>
    <head>
        <title>Simple JSONEditor</title>
        <script src="https://unpkg.com/@hpcc-js/common"></script>
        <script src="https://unpkg.com/@hpcc-js/api"></script>
        <script src="https://unpkg.com/@hpcc-js/codemirror"></script>
    </head>
    <body>
        <div id="placeholder" style="width:400px;height:400px;"></div>
        <script>
            var code = {"fruit": "Apple","size": "Large","color": "Red"};

            new window["@hpcc-js/codemirror"].JSONEditor()
                .target("placeholder")
                .json(code)
                .render()
                ;
        </script>
    </body>
</html>
<script type="module"> import { ECLEditor } from "@hpcc-js/codemirror";
  const code = `\
MySample := SAMPLE(Person,10,1) // get every 10th record
SomeFile := DATASET([{'A'},{'B'},{'C'},{'D'},{'E'},
                    {'F'},{'G'},{'H'},{'I'},{'J'},
                    {'K'},{'L'},{'M'},{'N'},{'O'},
                    {'P'},{'Q'},{'R'},{'S'},{'T'},
                    {'U'},{'V'},{'W'},{'X'},{'Y'}],
                    {STRING1 Letter});
Set1 := SAMPLE(SomeFile,5,1); // returns A, F, K, P, U`;

  new ECLEditor()
      .ecl(code)
      .target("target")
      .render()
      ;
</script>

Readme

Keywords

none

Package Sidebar

Install

npm i @hpcc-js/codemirror

Weekly Downloads

2,225

Version

2.61.2

License

Apache-2.0

Unpacked Size

5.95 MB

Total Files

59

Last publish

Collaborators

  • hpcc-js