[webkit-gtk] Interface between embedded Javascript and the main GTK app

Sim Tov smntov at gmail.com
Sun Aug 18 01:27:43 PDT 2024


Anybody?... Is it possible to pass a string from a JavaScript running
inside WebKitGTK to the main GTK app to be used inside another widget?

On Tue, Aug 13, 2024 at 5:52 PM Sim Tov <smntov at gmail.com> wrote:

> I have a GtkTextView that contains a Markdown-like document. I also have a
> WebKitGTK that contains a JavaScript that can parse and convert Markdown to
> HTML. I want to pass the Markdown document to JavaScript to be rendered and
> displayed in the WebKitGTK. While parsing, JavaScript produces json that
> contains all recognized markup. I want to pass that json as a string back
> to GtkTextView somehow so it can highlight the Markdown document with
> different colors/styles etc. there. This way one can implement Markdown
> Live Preview (in WebKitGTK) while also having its source highlighted (in
> GtkTextView) - both by the same code. All this while user types...
>
> Is this possible? If yes - how?
>
> Thank you!
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20240818/2408c971/attachment.htm>


More information about the webkit-gtk mailing list