Skip to content

Add a <Webview /> User Interface Option #2236

@saivan

Description

@saivan

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:

image

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:

  1. Load mathjax
  2. Render an equation that a user types in either Latex or Asciimath.
  3. 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

  1. Safari has Webgl, so we can render 3d into raycast
  2. We could play videos on the internet
  3. Load previews of webpage bookmarks
  4. ... And so many other things

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssues related to APIfeature requestNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions