Socket
Socket
Sign inDemoInstall

glsl-editor

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glsl-editor

codemirror-powered GLSL editor component


Version published
Maintainers
1
Created
Source

glsl-editor experimental

CodeMirror-powered GLSL editor component.

Usage

NPM

editor = Editor(options)

Creates a new editor, where options is passed directly onto CodeMirror. You can find a full list here.

Additionally, the container option determines which DOM element to attach the editor to. By default, this will be document.body.

editor.resize()

Automatically resize the editor to fill its parent element. This on creating the editor but you'll want to call it again when the window is resized.

editor.getValue()

Gets the text content of the editor.

editor.setValue(value)

Sets the text content of the editor to value.

editor.editor

The CodeMirror editor instance.

require('glsl-editor/css')

require('glsl-editor/theme')

Inlines the base CodeMirror CSS and a default theme respectively. Useful for just getting started quickly, but entirely optional.

License

MIT. See LICENSE.md for details.

Keywords

FAQs

Package last updated on 06 Sep 2014

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