Style Text Node
Style_text provides something we normally take for granted but which until now has been all-but-impossible in Nodebox: paragraphs of styled text with some words in bold, some in italics, and even some in a different color than the rest.
The style_text node uses a "mini markdown" notation to produce a list of word paths that can be styled bold or italic or both and/or set to a special color. By feeding these word paths into my arrange node (http://support.nodebox.net/discussions/show-your-work/364-arrange-node) you can easily create labels or paragraphs with mixed styles.
Feed in your text as a string using the following notations:
-
Italics: surround a word or phrase with a single asterisk
-
Bold: surround a word or phrase with a pair of asterisks
-
Bold Italics: surround a word or phrase with triplets of asterisks (or a word inside single asterisks within a phase inside double asterisks or vice versa)
-
Color: surround a word of phrase with tildes (~) to colorize it using a special color
This is a subset of standard Markdown notation except that here tildes are used to specify color instead of strike-though. You can combine tildes and asterisks to render color changes and text stylings at the same time.
The node settings allow you to specify the font size and the fonts used for plain text, italic text, bold text, and bold italic text. If desired, you could use these font selections to achieve other styles like condensed text, semi-bold, etc. You can also specify the regular text color and the special color for specially marked words and phrases. The special color could be a bright color like red (useful for warnings) or a slightly darker or lighter variation of the regular color to achieve more subtle forms of emphasis.
See attached screenshot for an example. Both the text_style and arrange nodes are included in the zipped demo file. Both nodes will be included in the next release of my node library.
Comments welcome! Enjoy!
John
-
style_text_screenshot.png 506 KB
- style_text_demo.zip 9.22 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac