Scan your whole stack
From OX Research Newsroom
Are you using @editora/light-code-editor?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.2.1
@editora/light-code-editor was last scanned on 29 Nov 2026 at version 1.2.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.2.1 LATEST | 29 Nov 2026 | No rules fired |
| 1.2.0 | 25 Nov 2026 | No rules fired |
| 1.1.0 | 22 Oct 2026 | No rules fired |
| 1.0.18 | 13 Oct 2026 | Not shown |
| 1.0.17 | 8 Oct 2026 | Not shown |
Findings for v1.2.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.2.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
aria-activedescendant, a live status line); find, go to line and the menus are named and keyboard
operable; text keeps 4.5:1 in both themes. Checked with axe in Chromium, Firefox and WebKit.npm install @editora/light-code-editor
import {
ActiveLineAndIndentGuidesExtension,
BracketMatchingExtension,
CodeFoldingExtension,
CompletionExtension,
ContextMenuExtension,
DiagnosticsExtension,
EditingCommandsExtension,
FormattingExtension,
LineNumbersExtension,
SearchExtension,
SyntaxHighlightingExtension,
createEditor,
} from '@editora/light-code-editor';
import '@editora/light-code-editor/light-code-editor.css';
const container = document.getElementById('editor');
if (!container) {
throw new Error('Missing #editor container');
}
const editor = createEditor(container, {
value: `interface User {
id: number;
name: string;
}
function greet(user: User): string {
if (!user.name) {
return 'Hello, stranger';
}
return \`Hello, \${user.name}\`;
}
console.log(greet({ id: 1, name: 'Ada' }));
`,
theme: 'dark',
tabSize: 2,
lineNumbers: true,
extensions: [
new LineNumbersExtension(),
new SyntaxHighlightingExtension(),
new SearchExtension(),
new DiagnosticsExtension(),
new CompletionExtension(),
new FormattingExtension(),
new ContextMenuExtension(),
new EditingCommandsExtension(),
new ActiveLineAndIndentGuidesExtension(),
new BracketMatchingExtension(),
new CodeFoldingExtension(),
],
});
editor.executeCommand('setSyntaxLanguage', 'typescript');
editor.on('change', (changes) => {
console.log('Content changed:', changes);
});
The editor is at least 400 px tall; give the container a height, as in the React example below, to size it, and the
editor scrolls inside it. Import the stylesheet once; it styles the gutter, the
popups, the panels and the decorations. Call editor.destroy() when you are done with the editor.
There is no React wrapper to learn: create the editor in an effect and destroy it in the cleanup.
import { useEffect, useRef, useState } from 'react';
import {
LineNumbersExtension,
SearchExtension,
SyntaxHighlightingExtension,
createEditor,
type EditorAPI,
} from '@editora/light-code-editor';
import '@editora/light-code-editor/light-code-editor.css';
type CodeEditorProps = { value: string; onChange: (value: string) => void; language?: string };
export function CodeEditor({ value, onChange, language = 'json' }: CodeEditorProps) {
const container = useRef<HTMLDivElement>(null);
const editor = useRef<EditorAPI | null>(null);
const latestOnChange = useRef(onChange);
latestOnChange.current = onChange;
// Create the editor once, and destroy it when the component goes away.
useEffect(() => {
const instance = createEditor(container.current as HTMLElement, {
value,
lineNumbers: true,
extensions: [new LineNumbersExtension(), new SyntaxHighlightingExtension(), new SearchExtension()],
});
instance.executeCommand('setSyntaxLanguage', language);
instance.on('change', () => latestOnChange.current(instance.getValue()));
editor.current = instance;
return () => instance.destroy();
}, []);
// Copy a value that changed outside the editor into it, but not the editor's own edits.
useEffect(() => {
if (editor.current && editor.current.getValue() !== value) editor.current.setValue(value);
}, [value]);
return <div ref={container} style={{ height: 180 }} />;
}
export default function App() {
const [config, setConfig] = useState('{\n "name": "my-app",\n "private": true\n}\n');
return (
<>
<CodeEditor value={config} onChange={setConfig} />
<p>{config.length} characters</p>
<button onClick={() => setConfig('{}\n')}>Reset</button>
</>
);
}
This works in React's StrictMode, which runs effects twice in development.
Set the language with editor.executeCommand('setSyntaxLanguage', id), or syntax.registerMode(id, mode) to add your
own. The default is html.
| Language | Ids |
|---|---|
| HTML, CSS, XML | html, css, xml, svg |
| JavaScript, TypeScript | javascript js, jsx, typescript ts, tsx |
| JSON, YAML, Markdown | json, yaml yml, markdown md |
| Shell | bash shell sh zsh |
| Python, Ruby, PHP | python py, ruby rb, php |
| Go, Rust, C, C++ | go golang, rust rs, c, cpp c++ cc cxx |
| Java, C# | java, csharp cs |
| SQL, Dockerfile | sql, dockerfile docker |
| Templates | vue, ejs |
createEditor(container, {
value: '', // the starting text
ariaLabel: 'Code editor', // what a screen reader calls the editing surface; name it for what it edits
theme: 'light', // 'light' or 'dark'; change it later with setTheme()
readOnly: false,
tabSize: 2, // how wide a tab is drawn
lineWrapping: false, // wrap long lines instead of scrolling sideways
lineNumbers: true, // the gutter; toggle it later with the toggleLineNumbers command
autoIndent: true, // Enter keeps the line's indentation (one level more after {, [ or ( )
extensions: [], // see Extensions below
keymap: {}, // your own shortcuts, for the default keymap
});
createEditor returns an editor with these methods:
| Method | |
|---|---|
getValue() / setValue(text) |
Read or replace the text. setValue is one undo step. |
getCursor() / setCursor(position) |
The caret; a position is { line, column }, both starting at 0. |
getSelection() / setSelection(range) |
The selected range, { start, end }, or undefined. |
setTheme(name) / setReadOnly(boolean) |
Change the theme or the read-only mode. |
executeCommand(name, ...args) |
Run a command (see Extensions). |
registerCommand(name, handler) |
Add a command. |
addExtension(ext) / removeExtension(name) |
Add or remove an extension later. |
search(query, options?) / replace(range, text) / replaceAll(query, text, options?) |
Search and edit by code. |
fold(range) / unfold(range) / getFolds() |
Folding. |
setDecorations(layer, list) / clearDecorations(layer?) / getDecorations(layer?) |
Decorations. |
focus() / blur() / destroy() |
Focus, blur, and tear the editor down. |
on(event, handler) / off(event, handler) |
Events. |
| Event | Handler receives |
|---|---|
change |
The list of text changes. |
cursor |
The cursor. |
selection |
The selected range, or undefined. |
focus, blur |
Nothing. |
keydown, mousedown, contextmenu |
The DOM event. |
save |
Nothing: Cmd/Ctrl+S was pressed. |
Pass extensions in extensions. Each one adds commands, which you run with editor.executeCommand(name). The common
ones are also bound to keys.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.