-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Text / Inscruction panel #124
Comments
This is something I thought about myself too. What about starting with something simple where you just put a text? |
Cool. Will add something similar as next feature |
@Lennart-Lucas I'm working on this and I have doubts about certain details.
Here is the current implementation, where all I'm doing is rendering the returned string as is, letting the form label and form description just like the rest of the other blocks: The form definition will be something like this (the form builder will take care of everything except the body part) {
name: "document",
description: "Document block example",
input: {
type: "document_block",
body: "return `Hello ${form.name}!\n Your best friend is ${form.best_fried}`",
},
}, If you have any thoughts, let me know |
I've played around with this and it seems great! The label is optional, so if people want to use it then it's there if not then it's not a hassle. One string for the text itself should be sufficient if the formatting works. As it stands the newline ( |
I think I overlooked this, and I may need to change to a html formatted
text or something like that. While I explore this, can you try using <br>
instead of newlines? To see if It works.
El vie, 29 dic 2023, 15:48, Lennart Lucas ***@***.***>
escribió:
… I've played around with this and it seems great!
The label is optional, so if people want to use it then it's there if not
then it's not a hassle.
One string for the text itself should be sufficient if the formatting
works. As it stands the newline (\n) seems to be ignored by the form?
When I try the example form or implement it myself the newlines get
skipped. If the form correctly interprets the newline it's possible to
create paragraphs and format text.
—
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARKJWIANQO7RTPKKYLSUBLYL3J3HAVCNFSM6AAAAAA7BF3QDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGE2DGNJVGE>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
I have tried that, but HTML doens't seem to get parsed at all. HTML such as |
Ok. I will give it a go as pre-formatted block of text
El mar, 2 ene 2024, 11:35, Lennart Lucas ***@***.***>
escribió:
… I have tried that, but HTML doens't seem to get parsed at all.
HTML such as
or
* is treated like regular text and gets printed as such. For instance:
<b>Hello ${form.name <http://form.name>}!</b><br/>Your best friend is
${form.best_fried} Gets printed as: "Hello undefinedYour best friend is "*
—
Reply to this email directly, view it on GitHub
<#124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AARKJWK4ZWMXEIA7UU57SHLYMPPILAVCNFSM6AAAAAA7BF3QDGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTHA2TKOJYGE>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
@Lennart-Lucas I just added support for html in the returned string. |
Both the tags and new lines work, thanks again. |
It would be handy to have a way to display text of instructions without having an input field tied to it.
Something akin to QuickAdd's infoDialog where you pass in a string in the definition which the user gets to see.
with the full width of the form but without input field.
This would be especially helpfull with more complex workflows where you want to display previously selected or generated
information.
The text was updated successfully, but these errors were encountered: