Espanso: Add Rich Text matches

Created on 26 Mar 2020  路  5Comments  路  Source: federico-terzi/espanso

Many users requested this feature, which would make espanso capable of expanding rich text (text with formatting, such as bold, center, italic, images).

A typical use case would be in email signatures.

Feature RFNR

Most helpful comment

This has been fixed in the new release! See: https://github.com/federico-terzi/espanso/releases

All 5 comments

I don't know if you're interested in ideas around this, but if you are... I was thinking a "markdown" type might be a way to do this with plaintext YAML. Essentially, strings of type "markdown" could be processed before being inserted. Making markdown a type prevents every string from being needlessly processed too.

Mocked up example:

espanso-markdown

I second a request for Markdown processing support for rich text!

@lyonsinbeta @pseudomichael I was thinking about HTML, but indeed markdown would be better for the user. We'll probably end up supporting both, as we need to copy HTML content in the clipboard, so we need a markdown to HTML compiler for Rust (which luckily, seems to exist: https://github.com/johannhof/markdown.rs)

Given the interest, I'll move this issue up in priority, so that hopefully we get a POC in the next release :)

Experimental support coming in the next release!

richtext2

You'll be able to specify the rich text both as markdown and HTML as you suggested:

  - trigger: ":rich"
    markdown: "This *text* is **very rich**!"

  - trigger: ":ric2"
    html: '<p>But <span style="color: #ce181e;"><span style="font-size: x-large;">this</span></span> one is <span style="color: #81d41a;"><span style="font-family: Arial, sans-serif;">even richer</span></span>!</p>'

Cheers :)

This has been fixed in the new release! See: https://github.com/federico-terzi/espanso/releases

Was this page helpful?
0 / 5 - 0 ratings

Related issues

owzim picture owzim  路  6Comments

online picture online  路  6Comments

jrop picture jrop  路  6Comments

not-AMM picture not-AMM  路  4Comments

crispinb picture crispinb  路  5Comments