Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Monaco & ReactDevtools SDK

NotificationsYou must be signed in to change notification settings

Saber2pr/monaco

Repository files navigation

monaco

yarn add @saber2pr/monaco

Usage

editor:

import{createEditor}from'@saber2pr/monaco'// 1. create editorconsteditor=awaitcreateEditor(dom,{// file: file-content'input.jsx':"const a = 'hello';",'input.css':'#root { color: red; }',},{theme:'vs-dark'})// get current modal valueeditor.getValue()// set value to current modaleditor.setValue('code')// change current modaleditor.changeModel('input.css')// get modaleditor.getModel('input.jsx').onDidChangeContent

diffEditor:

import{createDiffEditor}from'@saber2pr/monaco'// container, oldText, newText, languagecreateDiffEditor(dom,'{"name": "app"}','{"name": "subApp"}','json')

About

Monaco & ReactDevtools SDK

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp