You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a potential JavaScript command that downloads a content of a webpage as markdown and creates a block (or note?) with the result.
This command needs website url as an argument.
We don't have a way to provide such argument.
Could implement by allowing the command to ask for argument by calling:
constargSchema=[["url","string","url of a webpage to download as markdown"], ...];constargs=awaitgetArgumentsFromUser(argSchema);if(args===null){// user cancelled the operationreturn;}consturl=args.url;// validate arguments// do the work
getArgumentsFromUser() is a function implemented by Edna which shows a generic form for entering the values.
It's async because this shows a dialog to the user and we must wait until the user enters the values or cancels dialog.
User can cancel the operation, in which case we return null
There could also be a way to call that function with argument from a block, not sure about the syntax. Maybe something like:
call_function: Slurp Webpage As Markdown
url: https://edna.arslexis.io/help
and then such block could be run with Ctrl + E. Slurp Webpage As Markdown is a name of the function as defined by the author. Would have to deal with duplicate name functions.
The text was updated successfully, but these errors were encountered:
Consider a potential JavaScript command that downloads a content of a webpage as markdown and creates a block (or note?) with the result.
This command needs website url as an argument.
We don't have a way to provide such argument.
Could implement by allowing the command to ask for argument by calling:
getArgumentsFromUser()
is a function implemented by Edna which shows a generic form for entering the values.It's
async
because this shows a dialog to the user and we must wait until the user enters the values or cancels dialog.User can cancel the operation, in which case we return
null
There could also be a way to call that function with argument from a block, not sure about the syntax. Maybe something like:
and then such block could be run with
Ctrl + E
.Slurp Webpage As Markdown
is a name of the function as defined by the author. Would have to deal with duplicate name functions.The text was updated successfully, but these errors were encountered: