Git Product home page Git Product logo

Comments (9)

pbek avatar pbek commented on June 26, 2024 1

OOT: Oh, thank you for the sponsorship. 😁

from qownnotes.

pbek avatar pbek commented on June 26, 2024

Since the preview isn't a fully fledged browser, that integration would be clunky at best, if ever attempted. 😬
And it would be far away from the Markdown spec...

But lots could already be done with the scripting engine, e.g. like:

... or similar

from qownnotes.

patvdv avatar patvdv commented on June 26, 2024

Since the preview isn't a fully fledged browser, that integration would be clunky at best, if ever attempted. 😬 And it would be far away from the Markdown spec...

But lots could already be done with the scripting engine, e.g. like:

* https://github.com/qownnotes/scripts/tree/master/latex-math

* https://github.com/qownnotes/scripts/tree/master/paste-latex-image

* https://github.com/qownnotes/scripts/tree/master/mermaid

... or similar

On the markdown spec: I would advocate to extend it with a special notation, something like:

![plugin:drawio:param1:param2]
etc

I know that it would break compliancy with markdown standards but it wouldn't break functionality as the markdown would simply not resolve in other editors. It would also be a way to allow for future extensions still. Such an QON-only feature would also be an additional reason to use QON, and not another tool.

from qownnotes.

pbek avatar pbek commented on June 26, 2024

On the markdown spec: I would advocate to extend it with a special notation, something like

Can you please elaborate what "extending the spec" means for you?

There is no architecture for such plugins in QOwnNotes, no coloring either, and neither the highlighter nor md4c (for the preview) would support them. And the preview itself is also no browser.

But with https://www.qownnotes.org/scripting/hooks.html#prenotetomarkdownhtmlhook and https://www.qownnotes.org/scripting/hooks.html#notetomarkdownhtmlhook you can already parse that in a script and interpret it in whatever way...

from qownnotes.

pbek avatar pbek commented on June 26, 2024

And I almost forgot, there is https://www.qownnotes.org/scripting/methods-and-objects.html#adding-a-highlighting-rule-for-the-editor if you want to add a rule to the highlighter of the editor.

from qownnotes.

77nnit avatar 77nnit commented on June 26, 2024

But with https://www.qownnotes.org/scripting/hooks.html#prenotetomarkdownhtmlhook and https://www.qownnotes.org/scripting/hooks.html#notetomarkdownhtmlhook you can already parse that in a script and interpret it in whatever way...

OT: is there any way to leverage the HTML DOM API inside the QtQML scripts? I understand that there's no browser to support the API, but maybe some Qt library? I see that in the scripting examples HTML is parsed using regexes, and that is not really practical. It's a shame that you can't access the traversing methods and properties when you have an HTML at hand!

from qownnotes.

pbek avatar pbek commented on June 26, 2024

OT: is there any way to leverage the HTML DOM API inside the QtQML scripts?

You would need a real browser to interpret that, and you can't just pull in one that works on every platform in a script and show it somehow... But you can use JS libraries in a QML, I added a way to include JS files, and people did in the script repository.

from qownnotes.

github-actions avatar github-actions commented on June 26, 2024

This issue is stale because it has been open for 30 days with no activity.

from qownnotes.

github-actions avatar github-actions commented on June 26, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

from qownnotes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.