question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rich text formatting commands

See original GitHub issue

There are a few different rich text formatting commands scattered around the place.

For example, our Slack support defines several of its own formatting commands:

https://github.com/knausj85/knausj_talon/blob/000015ed1bd4cb1109d7d6ddaaa4146821821d70/apps/slack/slack_mac.talon#L31-L39

If we search for justify, we can find some Figma and PowerPoint .talon files that, among other things, define commands for text alignment and common text styles.

https://github.com/knausj85/knausj_talon/blob/273b7c9a62de6c12fe9baae175843eb6f0caab2b/apps/platforms/mac/powerpoint/powerpoint.talon#L15-L22

https://github.com/knausj85/knausj_talon/blob/f44077d19aafb8aca35be6d152c73a1252dfb837/apps/figma/figma.talon#L41-L56

(above are in forks, links edited to unfurl)

Searching for strike nets us the rest of the Microsoft Office suite, Evernote, and some Markdown and org-mode. Searching for bold and italic also finds some LaTeX support.

We should probably come up with a consistent grammar for basic rich text formatting. We probably want at least:

  • bold
  • italics
  • underline
  • strikethrough (#528)
  • text alignment (left, centre, right, justify)
  • font size (up/down)?
  • lists (bullet and number)

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rntzcommented, Jul 24, 2022

See previously #159

1reaction
lab-docommented, Jul 24, 2022

I think we need a rich text formatting tag for it, something like this:

tag: user.rich_text
-

text left: user.text_align_left() 
text right: user.text_align_right() 
text center: user.text_align_center() 
text justify: user.text_align_justify()

text bold: user.text_font_bold()
text italic: user.text_font_italic()
text underline: user.text_font_underline()
text strikethrough: user.text_font_strikethrough()

text (big | bigger): user.text_font_size_up()
text (small | smaller): user.text_font_size_down()
text thicker: user.text_font_weight_up() 
text thinner: user.text_font_weight_down() 

text high: user.text_line_height_up()
text low: user.text_line_height_down()
Read more comments on GitHub >

github_iconTop Results From Across the Web

The_RTF_Cookbook - RTF overview and quick reference
An RTF command consists of a backslash, then some characters a-z, and then an optional positive or negative integer argument. The command is...
Read more >
Rich Text Format (RTF) Version 1.5 Specification - Biblioscape
The Rich Text Format (RTF) Specification is a method of encoding formatted text and graphics for easy transfer between applications. Currently, users depend...
Read more >
Basics of Rich Text Format (RTF) - OpenGenus IQ
An RTF file consists of unformatted text, control words, control symbols, and groups. 1. Control Words: A control word is a specially formatted...
Read more >
Formatting Text With RTF Codes - Meridian
You can format the text shown by the WinInputBox and WinMsgBox functions using a limited set of Rich Text Format (RTF) codes within...
Read more >
Rich Text Format RTF Syntax
A "control word" is a specially formatted command that RTF uses to mark printer control codes and information that applications use to manage...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found