Socket
Socket
Sign inDemoInstall

@mybricks/code-editor

Package Overview
Dependencies
Maintainers
11
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mybricks/code-editor

代码编辑器


Version published
Weekly downloads
10
decreased by-84.37%
Maintainers
11
Weekly downloads
 
Created
Source

code-editor

代码编辑器

安装

  npm i @mybricks/code-editor

接口定义


type numOrStr = number | string;

interface Props {
  width?: numOrStr;
  height?: numOrStr;
  value?: string;
  language?: string;
  fontSize: numOrStr;
  theme?: 'light' | 'vs-dark';
  readOnly?: boolean;
  tabSize?: number;
  onChange?: (v: string) => void;
}

使用

  import Editor from '@mybricks/code-editor'

  export default function App() {
    return (
      <Editor 
        width={500} 
        height={400}
        fontSize={16}
        language="javascript"
        theme="vs-dark"
      />
    )
  }

Keywords

FAQs

Package last updated on 16 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc