Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

Start-RichText Editor

An asset by wy
The page banner background of a mountain and forest
Start-RichText Editor thumbnail image
Start-RichText Editor thumbnail image
Start-RichText Editor hero image

Quick Information

0 ratings
Start-RichText Editor icon image
wy
Start-RichText Editor

Rich text editor for Godot

Supported Engine Version
4.3
Version String
1.1
License Version
MIT
Support Level
community
Modified Date
10 months ago
Git URL
Issue URL

StartRichTextEditor

Rich text editor for Godot

README

README

img

using TextLine to draw text and Control to draw other(such as Image, Button, even a scene!!)

However, there are still many bugs (not recommended for use in serious projects), so it’s better to learn from it, and then fix or extend it.

No finished:

  • delete selection
  • good copy&paste
  • perfect caret move
  • enough config
  • save&load content
  • undo&redo
  • start text parser
  • scroll(follow caret)

Finished:

  • set&move caret
  • make selection
  • simple copy&paste
  • ime input support
  • parse text

Usage

Start

  • Add Node RichTextEditor (Dont't add other node to this node!!!) to your tree and run

  • there is a example scene you can run:

    res://addons/start_rich_text_editor/example/MultiLineEditor.tscn

  • Add Node RichTextEditorand extend the script

Basic

lines->line->{text,control}

control is a rect to place Control Node

README

Add init text

Use Array[Dictionary], if you want to add pure text, you can parse text to Array[Dictionary]

the dict is:

Text Block:

{
    "text":String
    "font_color":Color
    "bg_color":Color
    "font_size":int
}

Control Block:

{
    "key":String
    "size":Vector2
    "c":Control
}

A code example is in res://addons/start_rich_text_editor/example/rich_text_editor_1.gd

Add Control

You can use add_control or set 'c' in dict, and then add_child

Add parser

Each time when text change, a signal will be emitted to call parse

You can use Callable(line:PowerLineEdit) to set default_parser in MultilineEditor.

Application

  • command line
  • code edit
  • chat box
  • doc

中文

用于Godot4的富文本编辑器

用TextLine渲染文字和Control进行渲染控件(之后在控件里塞什么都行,图片,场景)

现在很多bugs,属于demo一类的完成度,所以最好从中学习和修改

Rich text editor for Godot

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Start-RichText Editor icon image
wy
Start-RichText Editor

Rich text editor for Godot

Supported Engine Version
4.3
Version String
1.1
License Version
MIT
Support Level
community
Modified Date
10 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers