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

Sim Tov smntov at gmail.com
Tue Aug 13 07:52:46 PDT 2024


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/20240813/0f16da85/attachment.htm>


More information about the webkit-gtk mailing list