Skip to main content

A package wrapping Monaco Editor for Reflex

Project description

ReflexMonaco

A package wrapping Monaco Editor for Reflex.

Installation

pip install reflex-monaco

Monaco Editor Component

Overview

The Monaco Editor component is a versatile and powerful code editor that can be embedded in your application. This README provides an overview of its properties and triggers, allowing you to configure and interact with the editor effectively.

Properties

default_language

  • Description: The default language to use for the editor.
  • Type: str

default_path

  • Description: The path to the default file to load in the editor.
  • Type: str

default_value

  • Description: The default value to display in the editor.
  • Type: str

language

  • Description: The language to use for the editor.
  • Type: str

line

  • Description: The line to jump to in the editor.
  • Type: int

theme

  • Description: The theme to use for the editor.
  • Type: str

value

  • Description: The value to display in the editor.
  • Type: str

width

  • Description: The width of the editor.
  • Type: str

height

  • Description: The height of the editor.
  • Type: str

Triggers

on_change

  • Description: Triggered when the editor value changes.
  • Signature: lambda e: [e]

on_validate

  • Description: Triggered when the content is validated. (limited to some languages)
  • Signature: lambda e: [e]

Usage Example

Here is a basic example of how to use the Monaco Editor component:

import reflex as rx
from reflex_monaco import monaco

@rx.page()
def index():
    return monaco(
        default_language='javascript',
        default_value='console.log("Hello, world!");',
        height='500px',
        width='100%'
    )

See the code of the demo for a case using State.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reflex_monaco-0.0.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reflex_monaco-0.0.3-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file reflex_monaco-0.0.3.tar.gz.

File metadata

  • Download URL: reflex_monaco-0.0.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for reflex_monaco-0.0.3.tar.gz
Algorithm Hash digest
SHA256 aa278396778ee55277fe7a42a44f31e3119c9d22bc44988c9e1ec2dbbf6100c1
MD5 3b10a2077296642cb979f6508d820fa4
BLAKE2b-256 96ffb038bda7378df1f11950d2161c7e5fd9e554a3152229a651b2e62bd41682

See more details on using hashes here.

File details

Details for the file reflex_monaco-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: reflex_monaco-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for reflex_monaco-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8fcc562f41271e9195cc1980ac5ca7ecbf319791fbd59209aecbc14b542dbb5f
MD5 180b5f87954b382493484066628b3349
BLAKE2b-256 daa39dbfbe70bdc62956029686428a30a7d4d2dc501b11a41af2738fb74c75b3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page