Repository navigation
Description
I'm amazed to see all of these new extensions being created for raycast. So I decided to give it a crack. The biggest limiter I've encountered so far is the inability to leverage existing web technologies with the current set of components:
I would like to have a <Webview /> component that just embeds an instance of safari directly into the view area. It would also be great if it could have a few simple functionalities like:
- Reading from the console
- Taking a screenshot of the page
- Calling functions defined on the global scope
window - Receiving downloaded files
I'm not sure if this is an insane thing to ask for, but it would be very useful. Extensions could be developed much more quickly, whilst also being more functional if all I need to do is to load a webpage, or an index.html file with some javascript that bundles all of my required functionality.
Why I Think this Would Be useful
I was trying to make a cool little extension that could typeset mathematics with a live preview. It would:
- Load mathjax
- Render an equation that a user types in either Latex or Asciimath.
- Then I'd like command + k to give them the option to save the image, copy the image, convert asciimath to latex or perform other useful quick actions
Unfortunately, I've been at it for hours and loading mathjax into raycast's interface seems almost impossible without forcing users to brew install a few modules. Feel free to try loading mathjax yourself, loading it directly would obviously be best.
With the current interface, all I can think of is to spawn my own server that can serve an image that I can embed into a markdown document. I don't think I can make this public because running a full time server to serve mathematics would be quite costly.
So my only other option would be to bundle the extension with a server that runs in the background, and that sets up mathjax on its first invocation. That doesn't feel like a good design to me.
What This enables
Obviously this would enable a lot of new kinds of extensions
- Safari has Webgl, so we can render 3d into raycast
- We could play videos on the internet
- Load previews of webpage bookmarks
- ... And so many other things
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Severity

Activity
mathieudutour commentedon Oct 6, 2022
We are deeply committed into providing user interfaces that are consistent and easy to use so that you don't have to worry about it looks. This is one of the guiding principle of the api: "No-brainer to build UI: You concentrate on the logic, we push the pixels. Use our built-in UI components to be consistent with all our extensions.".
So it is very unlikely that we will provide a webview.
Regarding your specific issue, wouldn't you be able to use https://github.com/mathjax/MathJax-node to output an SVG and render it?
saivan commentedon Oct 7, 2022
I used mathJax as an illustrative example, and yes I could definitely render to an image, but I don't believe your engine displays svgs if I remember correctly (and mathjax can't render to an image natively).
I'd be more interested in further abilities that are similar to your confetti extension. It would be cool for example to have a custom animated canvas to display a 3d model or to watch a youtube video inline.
I respect your guiding principle, I just feel like it would be a very useful addition. Thanks for your time either way :)
mathieudutour commentedon Oct 7, 2022
It does!
Update copilot-workspace extension
Update pixtuoid extension (#33514)