walya-editor
v0.1.3
Published
Code editor components and bindings for working with Walya in React apps.
Maintainers
Readme
Walya Editor
walya-editor provides React components and CodeMirror bindings for editing Walya expressions inside web applications.
Install
npm install walya-editor @tewelde/walya react react-domUsage
import React from 'react';
import { createRoot } from 'react-dom/client';
import { WalyaEditor } from 'walya-editor';
function App() {
return (
<WalyaEditor
value="{ rate:0.1; return income * (1 - rate); }"
onChange={console.log}
/>
);
}
const root = createRoot(document.getElementById('root')!);
root.render(<App />);The package ships TypeScript definitions and compiles down to plain JavaScript under dist/ via the included prepare script.
Scripts
npm run build- emit the TypeScript declaration and JavaScript bundle.npm run clean- remove thedist/output.
License
Released under the MIT License.
