Documentation

Installation

Get qlik-script-editor installed and ready to use in your project in just a few steps.

v1.0.5TypeScriptReact 16+

Prerequisites

Make sure you have the following installed before proceeding:

Node.js
Version 16.0.0 or higher
RequiredDownload
Package Manager
npm, yarn, or pnpm
RequiredIncluded with Node.js

Quick Start

Choose your preferred package manager to install qlik-script-editor:

NPM (Recommended)
Most popular package manager for Node.js
Popular
NPM Installation
npm install qlik-script-editor
Yarn
Fast, reliable, and secure dependency management
yarn add qlik-script-editor
PNPM
Efficient package manager with disk space optimization
pnpm add qlik-script-editor

Basic Setup

After installation, you can import and use qlik-script-editor in your React application. Here's a simple example to get you started:

Basic React Component
1import React from 'react';
2import QlikEditor from 'qlik-script-editor';
3
4function App() {
5 const [script, setScript] = React.useState('LOAD * FROM DataSource;');
6
7 return (
8 <div className="p-4">
9 <h1>My Qlik Script Editor</h1>
10 <QlikEditor
11 value={script}
12 onChange={setScript}
13 height="400px"
14 theme="auto"
15 />
16 </div>
17 );
18}
19
20export default App;

TypeScript Support

qlik-script-editor includes built-in TypeScript declarations for full type safety. No additional @types packages are needed.

TypeScriptComplete Type Safety
Full TypeScript support with comprehensive type definitions
TypeScript Example
1import QlikEditor, { EditorProps, QlikEditorRef } from 'qlik-script-editor';
2
3interface MyEditorProps {
4 initialValue?: string;
5 onScriptChange: (value: string) => void;
6}
7
8const MyEditor: React.FC<MyEditorProps> = ({ initialValue, onScriptChange }) => {
9 const editorRef = React.useRef<QlikEditorRef>(null);
10
11 const handleFormat = () => {
12 editorRef.current?.format();
13 };
14
15 return (
16 <div>
17 <button onClick={handleFormat}>Format Code</button>
18 <QlikEditor
19 ref={editorRef}
20 defaultValue={initialValue}
21 onChange={onScriptChange}
22 height="400px"
23 />
24 </div>
25 );
26};

Installation Complete!

You're all set! qlik-script-editor is now installed and ready to use in your project.

Troubleshooting

Having issues with installation? Here are some common solutions:

Need More Help?

If you're still experiencing issues, here are some resources: