1.0.26 • Published 3 years ago

open-cb-editor v1.0.26

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

open-cb-editor

Planned upcoming features can be found in editor-feature-plan.md!

Installation

npm i open-cb-editor

Usage

This package creates a monaco editor instance on a div element.

The package exports a class which can be used to construct and interact with the editor.

To create the editor:

import { createEditor } from 'open-cb-editor';

htmlDiv = document.querySelector('target-div');

let editor = new createEditor(htmlDiv);

To merge code fragments from two or more editors into a single one:

import { createEditor, mergeCode} from 'open-cb-editor';

let subEditorOne = new createEditor(divOne);
let subEditorTwo = new createEditor(divTwo);
let mainEditor = new createEditor(divThree);

let codeFragmentOne = subEditorOne.getCode();
let codeFragmentTwo = subEditorTwo.getCode();

let combinedCode = mergeCode(codeFragmentOne, codeFragmentTwo);

mainEditor.setCode(combinedCode);
1.0.19

3 years ago

1.0.18

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.22

3 years ago

1.0.21

3 years ago

1.0.20

3 years ago

1.0.26

3 years ago

1.0.25

3 years ago

1.0.24

3 years ago

1.0.23

3 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.2

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2-0

3 years ago

1.0.1-0

3 years ago

1.0.0

3 years ago