You can set a string to have a certain color with a function call.
How to use text edit code#
So unless you are using Godot to build a code editing tool, you are going to have to turn syntax highlighting off, accept that certain code highlighting is built-in, or dig into the C++ code to learn and modify the details. The majority of the features you asked about are specific to this purpose. The TextEdit control is clearly designed for in-editor code editing.
How to use text edit how to#
Does anyone knows how to work with Textedit and provide a basic guidance? Wanting to know what a thing does and the minimum of how it does it is always a broad question.
How to use breakpoints? What is automated and what must I code for these to work? If I have a keyword with a color, why do other words in my text get highlighted with other colors beside my defined keyword? Knowing the basics of the control allows for educated guessing and defining for what to (and not to) use. I would like to know how keywords work, how syntax highlight works, how code completion works, how selection, line folding and undo work. But there must be a minimum documentation to start with because, if I don't know what's possible, I don't know what I can/want to do. All this as been done thanks to "pushing all the buttons". For the last 6 months, I've been working with Godot everyday, fulltime and I've launched 2 games, make 3 prototypes and 2 tools. Just "pushing all the buttons" hardly teaches me something useful.ĭDoop, thank you for taking the time to answer my question. I've done some experiments with various options but so far I've only got some keywords to get some color, but other words also appear with colors I haven't set. I've already asked for help at Reddit and I've got only one answer pointing me to the docs page (which does not explain anything, since it's an API reference - ) and to the source code of the control (which it's not useful since I don't know the engine's inner working). I've found a video on Youtube ( ) about this but does not deal with any of the features that make it unique. Since Godot uses it's own controls, I can see that Textedit is very powerful (I'm assuming it's the control used for the code editor). Select link in typography menu to add a link.Textedit has lots of properties, methods, styles and signals, but I've found no tutorial or documentation on what does what and how to use this control.
Then click on it again open the toolbar options and paste your link in Link URL field. To add a link in text select the text to reveal its options toolbar then in Typography dropdown option select the link option. To add a heading add the text editor widget and click on it to reveal its options toolbar then in Typography dropdown option select the heading size. With these options you can change font family right scrollable menu, text color, text size, text line height, letter spacing & change type of text ie. Click on arrow button to reveal more options To change colors, font size, font family & other options for text click on the arrow button facing downwards to reveal more options. To edit any text simple click on it and start typing to add more text & use to toolbar for styles of text. The live text editing is available for Text Editor Widget, Heading Widget & Button widget and more of them are coming as we plan to integrate it completely to all widgets. With click to edit features of pluginops you can easily customize any text on a landing page easily.