Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@covalent/code-editor

Package Overview
Dependencies
Maintainers
4
Versions
283
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@covalent/code-editor

Teradata UI Platform Code Editor Module

  • 3.0.0-beta.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
999
increased by26.62%
Maintainers
4
Weekly downloads
 
Created
Source

TdCodeEditorComponent: td-code-editor

<td-code-editor> is component for code editing based on Covalent and Monaco Editor. The component can run in both Electron and Web Browsers.

API Summary

Inputs
  • value?: string
    • value of the code editor instance
  • language?: string
    • language used for syntax in the editor instance
  • registerLanguage?: function()
    • registers a custom Language within the editor
  • editorStyle?: string
    • Additional Styling applied to Editor Container
  • theme?: string
    • Theme used to style the Editor
  • editorOptions?: object
    • Editor Options Object of valid Configurations listed here: https://microsoft.github.io/monaco-editor/api/interfaces/monaco.editor.ieditoroptions.html
  • layout?: function()
    • Instructs the editor to remeasure its container
Properties
Events
  • editorInitialized?: function($event)
    • Emitted when Editor is finished initializing. Event passes a reference to the actual editor instance that can be used to call additional operations outside of the Angular component.
  • editorConfigurationChanged?: function($event)
    • Emitted when configuration of the Editor changes
  • editorLanguageChanged?: function($event)
    • Emitted when the language of the Editor changes

Installation

This component can be installed as npm package.

npm install @covalent/code-editor

Setup

Add the glob to assets in angular.json (to make monaco-editor javascript available to the app)

{
  "apps": [
    {
      "assets": [
        {
          "glob": "**/*",
          "input": "node_modules/monaco-editor/min",
          "output": "/assets/monaco"
        }
      ],

Then, import the CovalentCodeEditorModule in your NgModule:

import { CovalentCodeEditorModule } from '@covalent/code-editor';
@NgModule({
  imports: [
    CovalentCodeEditorModule,
    ...
  ],
  ...
})
export class MyModule {}

Example

<td-code-editor
        [style.height.px]="200"
        editorStyle="border:0;"
        flex
        theme="vs"
        language="sql"
        [editorOptions]="{readOnly:true, fontSize:20}"
        [(ngModel)]="model"
        (ngModelChange)="callBackFunc()">
</td-code-editor>

Keywords

FAQs

Package last updated on 10 Feb 2020

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