open-index/open-npm huggingface dataset:
npm package: @srcnexus/create-extension
Description: CLI to scaffold SrcNexus Code Editor extension projects
Author: SrcNexus
Latest version: 0.0.6

# @srcnexus/create-extension

Scaffold a new [SrcNexus](https://srcnexus.com) Code Editor extension project.

## Usage

```bash
npm create @srcnexus/extension
```

The CLI will prompt you for a name, ID, description, and language (TypeScript or JavaScript), then generate a ready-to-build extension project.

### Non-Interactive Mode

```bash
npm create @srcnexus/extension -- --name "My Extension" --lang typescript -y
```

| Option | Description |
|---|---|
| `--name <name>` | Extension display name |
| `--id <id>` | Extension ID (auto-derived from name if omitted) |
| `--description <desc>` | Extension description |
| `--lang <lang>` | `typescript` or `javascript` |
| `--dir <path>` | Output directory (default: `./<id>`) |
| `-y, --yes` | Skip prompts, use defaults |
| `-h, --help` | Show help |

## What Gets Generated

```
my-extension/
  manifest.json       # Extension metadata and contributions
  package.json        # Dependencies (@srcnexus/ext-sdk, esbuild)
  build.js            # esbuild bundler (with optional CodeMirror support)
  src/main.ts         # Entry point with a sample "Hello World" command
  tsconfig.json       # TypeScript config (if TypeScript selected)
  .gitignore
```

## Next Steps

```bash
cd my-extension
npm install
npm run build
```

Open the project in SrcNexus to test, or publish with the [SrcNexus CLI](https://www.npmjs.com/package/srcnexus):

```bash
srcnexus deploy --extension
```

## License

MIT
npm package: @srcroot/editor
Description: A comprehensive, batteries-included Rich Text Editor for React based on Slate.js
Author: SourceWell
Latest version: 0.0.6

# Srcroot Editor

A comprehensive, "batteries-included" Rich Text Editor for React based on Slate.js.

## Features
- **Core**: Stable Slate-based editing environment.
- **Formatting**: Bold, Italic, Underline, Strikethrough, Code.
- **Blocks**: Headings (H1-H3), Lists (Bulleted, Numbered), Blockquotes.
- **Media**: Images (URL based) and Links.
- **Serialization**: 
    - Full HTML Import/Export.
    - Markdown Import/Export.
    - Docx Import (via Mammoth) and Export (via docx).
- **Plugins**: Modular architecture.

## Installation

```bash
npm install @srcroot/editor
# Optional for serialization
npm install mammoth docx marked escape-html slate-hyperscript
```

## Usage

```tsx
import React, { useState } from 'react';
import { SrcrootEditor, FormatPlugin, HeadingPlugin, ListPlugin, LinkPlugin, ImagePlugin } from '@srcroot/editor';

const MyEditor = () => {
  const [value, setValue] = useState([]);
  
  const plugins = [
    FormatPlugin, 
    HeadingPlugin, 
    ListPlugin, 
    LinkPlugin, 
    ImagePlugin
  ];

  return (
    <SrcrootEditor 
      plugins={plugins}
      value={value}
      onChange={setValue}
      placeholder="Start typing..."
    />
  );
};
```

## Serialization

```tsx
import { serializeHTML, serializeMarkdown, exportDocx, importDocx } from 'srcroot-editor';

// HTML
const html = value.map(n => serializeHTML(n)).join('');

// Markdown
const md = value.map(n => serializeMarkdown(n)).join('');

// Docx Export
exportDocx(value).then(blob => {
  // save blob
});

// Docx Import
const buffer = await file.arrayBuffer();
const nodes = await importDocx(buffer);
setValue(nodes);
```

## License
MIT