Help forum
- „Protected Components“?
Pascal
1 2 months ago
„Sharing authentication or user data with protected components “ Context chapter I just read this in the new docs - what is meant by that ? Is there an advanced thing I might not know of ? - set focus to a certain position in the input
ssssadsadasd
0 2 months ago
so I have this [input ] ( https://toddle.dev/projects/moccasin_palpatine_chief_rook/branches/start/components/test13?canvas-height=800&canvas-width=455.2&selection=nodes.EL_PzKJDA3Dg9z5gaRPRm.events.click.actions.0.data&rightpanel=events ) , and , when clicking the button , in the current cursor position , I want to : 1 . add a certain text 2 . refocus the cursor at the end of this added textthe I manage to complete 1 , but with point 2 I am finding some difficulties as I think it needs some code . it should be sth like the below but not sure how to implement it in toddle as I am not sure how can I refer to the input function insertTextAtCursor (input , text ) { const start = input .selectionStart ; const end = input .selectionEnd ; input .value = input .value .slice (0 , start ) + text + input .value .slice (end ) ; const newPosition = start + text .length ; input .setSelectionRange (newPosition , newPosition ) ; input .focus ( ) ; } - Contexted workflows and formulas does not work.
Iwooo
9 2 months ago
I got a question . Maybe a newbie one . The Child component can see (and use in formulas - but it does not work ) contexts from components which are not in relationship with context provider . I studied the new NC documentations (and soem community NC projects ) but it does not answers this question for me . As far as I read thru docs , for context to work , the context -provider component should be connected with context -subscriber component thru parent -child relationship . But ability to subscribe to and work with non -related component 's context is very confusing . My project structure is described in attached image . I 'm able to subscribe to context and work with context inside of formulas editor (create new formulas using data from contexts and seeing data getting thru ) and workflow editors (same as with formulas - everything works inside of toddle /NC ) but once I want to trigger workflows which should use contexted data and workflows it simply does not work . There is no error on logic , because I tried the same workflows without context and it works flawlessly . - why this wrapping behavior?
ssssadsadasd
28 2 months ago
[here ] ( https://toddle.dev/projects/moccasin_palpatine_chief_rook/branches/start/components/test12?canvas-height=800&canvas-width=213.9&rightpanel=style ) I have a list of spans and I want to wrap them , i .e . when the width is low I want the text to go to the next line . and I achieve this . but what makes me wonder is that if I changes the flex of the main div of the page from column to row the wrapping behavior is broken even though I do not know why this should influence the wrapping . anyone has any idea ? thanks - tagging functionality ux
ssssadsadasd
12 2 months ago
think of sth like twitter , where in a post the user can tag some other users . the tags have a certain color and are clickable . I believe I have completed the backend logic now I want to render the post content in the UI . so supposethe posts will be sth like this (where obviously the tags and text are dynamic ) : " @elonmusk is the ceo of x " how can I make @elonmusk blue and clickable and possible triggering an action in my nordcraft app ? thanks - Resusing components in nordcraft
Bankydoo
1 2 months ago
Hi there Do we have any videos demonstrating how to reuse components Newbie question - track cursor position in a multiline input
ssssadsadasd
15 2 months ago
I want to click a button and add a text in the position where the cursor is in the multiline input . how can I do this ? thanks - Is there any way to sanitize the input using formula?
fss21
11 2 months ago
Hi , looking for a way to sanitize the input so that we can call the api in more secure way . Currently it is not possible to do this ? - close other dropdowns when I open a new one
needtheanswers
9 2 months ago
Hi there , so I have this table cell component that opens a dropdown . When I click on the 3 dots I want it to open the dropdown of this table row but also to close the other open dropdowns . So there should only be one open dropdown How do I achieve that ? I was thinking of using the repeat item index for that and create a variable with the active index but that wouldn ´t be very elegant since I have multiple tables that use this component . Using the pointerleave event is also not solving the problem . Thanks - How to make a link always open in a new tab?
mohameddk_
3 2 months ago
Basically the title . It would be very useful if the link opens in a new tab in mu use case . The user will click on the link and would have to inevitably go back to the web app . The api for my app is slow so navigating back would not be ideal as the page would have to fetch data from the api again - HI everyone
Bankydoo
6 2 months ago
Still waiting for an idiots guide to setting up supabase auth in toddle . tried and failed severally . - Json-ld structued data issue
fss21
12 2 months ago
I am trying to set up json -ld strtucted data and insert <script > tag as attached image . I pulled out json to be inserted as string format from external api and tyring to add it to "content " . but when i do that , it becomes null in preview page . Does anybody know why ? I have passed value as string format and tried Json parsing formula but same results ( it returns null ) - How to prevent redirect loop
fss21
18 2 months ago
Hi , i creatd API redirect rule . basically if the url does not end with slash , then I want to redirect the same url with slash at the end . The logic to judge whether slash is at the end is working fine . but when i implement this logic , the redirect loop happens in preview page . anyone knows why is this happening ? - application/pdf api reponse
Kittiphum
1 2 months ago
I am using APIstax invoice pdf api to create an invoice . It response is the raw data of the pdf how do i display it and make it downloadable ? Looking forward to your answers . - Supabase
Bankydoo
5 2 months ago
Anyone recently set up custom endpoints in supabase and got it working ? Followed an old video testing out a component and got stuck connecting supabase with toddle . something to do with the swagger documentation which was showing a lot of things i dont understand . I still dont understand a lot of things but pretty good at following and getting it as i go . so if theres any recent custom set up i can follow - please hit me