optic-editor-sdk

0.3.8 • Public • Published

Optic Editor SDK

A nice utility for building Optic IDE plugins

Usage

npm install optic-editor-sdk

Editor Actions:

  • Search -> detect and push an inline search to Optic
import {EditorConnection} from 'optic-editor-sdk'
 
EditorConnection.actions.search(file, start, end, 'query string')

To detect if an inline search has been input use the following utility:

import {checkForSearch} from 'optic-editor-sdk'
checkForSearch('line contents', startInLine, endInline)
  • Push Context -> push the current state of your editor to Optic
import {EditorConnection} from 'optic-editor-sdk'
 
EditorConnection.actions.context(file, start, end, 'file contents')

Readme

Keywords

none

Package Sidebar

Install

npm i optic-editor-sdk

Weekly Downloads

5

Version

0.3.8

License

MIT

Unpacked Size

46.8 kB

Total Files

18

Last publish

Collaborators

  • opticdev