I followed A somewhat of a documentation of hidden formulas [Added mechanics of nested buttons] - #2 by Filmos where only the last method can’t work now. Is there one alternative way to change background for text in formula?
I think the easiest way to change the background color programatically nowadays is using format()
with a helper table containing a template.
This approach is actually super flexible and can be used to apply almost any format imaginable.
Here you have a little example of how it works
Thanks. Is there one way to mark your reply as the solution which I saw in other posts?
Q1: is there some reference showing more details about template of Format
than Coda formulas, formula library, formula cheat sheet - Coda?
Q2: Is there one way to directly use template in formula without using one outside formatted {1} text just like how _Color
does?
- I have not found any detailed reference, but my main tips are:
- Use a canvas with whatever formatting you like (your template) instead of just a string
- Create a helper table with a Name and the template (a canvas column)
- Easily reference the template in any formula in your doc by typing
@
+ Name and then referencing the canvas column.
There’s not much more to it, play around and figure out the best way for your use-case.
- Not directly like in
_Color()
, but take a look at the pack that Paul mentions on his post: How to use Format( ) with multiple Canvas templates? - #2 by Paul_Danyliuk
Is there one way to mark your 1st reply as the solution which I saw in other posts as my 1st comment says?
No, only the most veteran posters can
I cannot set a reply to ‘Solution’ when the OP is in the ‘Start Here’ category.
It seems toonl be available in certain categories.
Max
What are “toonl be available” and “Max” meanings?
Sorry for my ambiguity of the 2nd question. I want the simple string reference like "kr-[color name]-[light/medium/dark]-fg"
instead of one richtext declared in other places which seems a bit inconvenient. But your reply has pointed out that this inconvenience is not that much at all. Thanks anyway.
Your link in the reply to the 2nd question seems to allow more placeholders beyond {1} to {99} etc. Anyway {1} to {99} is enough for my environment requirement.
toonl = to only
Max = @Agile_Dynamics 's name
“SOLUTION” is available when the question is in “ask the community”.
Thanks for recognition of @Pablo_DV answer @Jack_Brown