foreword
In the last article, we explained the editor-api module in Node-RED. It is mainly used to provide front-end interface.
In this article, let's take a look at the editor-client module in Node-RED.
This module is the front-end code that determines the interface we see.
If you're going to modify Node-RED's interface, then you need to study it carefully.
Let's take a look together.
editor-client
in the packages/node_models/editor-client directory.
Mainly four core directories
- The international translation on the locales interface, if you want to modify a certain text, you should find it here.
- public This directory stores files generated by compilation. Generally not modified.
- src The core file of the flow editor, which stores all the business codes, components, and resources of the editor.
- templates program entry, a mst file.
The first-level directory under editor-client looks like this.
In the locales directory, the translations of each language version are stored.
zh-CN for Simplified Chinese
zh-TW for Traditional Chinese
en-US English
First, let's focus on the src directory
src directory
From bottom to bottom, the directories are
- ace stores the resources of the ace code editor
- images All image resources
- js editor code is crucial
- sass editor style file
- tours preset stream, demo for display, or version features