Skip to content
This repository has been archived by the owner on Sep 24, 2022. It is now read-only.

zsluedem/django-rholang-editor

Repository files navigation

django_rholang_editor

Introduction

Rholang is a new language for writing smart contracts that run on the RChain virtual machine. You can find more in the Rholang tutorial

Usage

If you want to use the django form way and post the text in the rholang-editor. You may use as below.

from django.forms import Form
from django_rholang_editor.fields import RholangTextFormField

class EditorForm(Form):
    rho = RholangTextFormField()

There is multiple way to configure the attrs of the RholangTextFormField

RholangTextFormField(
    default_text="",
    height="100px",
    width="100%",
    js_variable='editor'
)

ARGS

  • default_text

implement the default text in the rholang text editor .

  • height

the rholang editor widget height

  • width

the rholang editor widget width

  • js_variable

the js variable name of the rholang editor . You can call the js_variable after the editor in the html to figure others implement or other interactions with other components.

Install

  1. install using pip
pip install django-rholang-editor
  1. Update INSTALLED_APPS:
INSTALLED_APPS = (
    # ...
    'django_rholang_editor',
)

About

rholang editor django app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages