Skip to main content

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.

Release files for reflex-monaco 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reflex-monaco 0.0.3
File Size Uploaded
reflex_monaco-0.0.3.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reflex-monaco 0.0.3
File Interpreter ABI Platform
reflex_monaco-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 6.1 kB

Release files / reflex_monaco-0.0.3.tar.gz

Download URL reflex_monaco-0.0.3.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aa278396778ee55277fe7a42a44f31e3119c9d22bc44988c9e1ec2dbbf6100c1
BLAKE2b-256 checksum
How to use checksums
96ffb038bda7378df1f11950d2161c7e5fd9e554a3152229a651b2e62bd41682
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / reflex_monaco-0.0.3-py3-none-any.whl

Download URL reflex_monaco-0.0.3-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fcc562f41271e9195cc1980ac5ca7ecbf319791fbd59209aecbc14b542dbb5f
BLAKE2b-256 checksum
How to use checksums
daa39dbfbe70bdc62956029686428a30a7d4d2dc501b11a41af2738fb74c75b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page