Comments (9)
OOT: Oh, thank you for the sponsorship. 😁
from qownnotes.
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
from qownnotes.
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.
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.
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.
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.
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.
This issue is stale because it has been open for 30 days with no activity.
from qownnotes.
This issue was closed because it has been inactive for 14 days since being marked as stale.
from qownnotes.
Related Issues (20)
- [BUG] Line count font size does not resize with text HOT 9
- [BUG] Slow accessing settings after Nextcloud connection is defined HOT 7
- [FEATURE] Make text highlighting themeable too HOT 9
- [FEATURE] Option to show full file path in statusbar HOT 16
- [BUG] Freezes and "Not responding" when reloading script engine on Windows HOT 17
- [BUG] List Dot on the left side when in RTL mode in the preview window HOT 5
- [FEATURE] Add "AI" support HOT 20
- [BUG] Windows - Opening settings is slow -> Some registry keys are read 72 times HOT 12
- [I] "Move notes to subfolder..." does not stay in folder but jumps to root folder HOT 2
- [BUG] macdeoloyqt not found with jurplel/install-qt-action@v4 HOT 2
- [BUG] xml formatting in markdown HOT 4
- [FEATURE] Shortcut for switching from ltr to trl and dynamic one HOT 2
- [FEATURE][USABILITY] Switching between INS/OVR mode in QOwnNotes HOT 8
- [BUG] Cannot disable dark mode HOT 2
- [FEATURE] provide the option to use a self hosted AI (e.g. ollama) HOT 28
- [ Ctrl + insert ] does not copy selected text HOT 5
- [I] The notes were encrypted by me a few days ago with a password . Today i tried to decrypt them back and they are decrypting into some kind of other encryption HOT 1
- [FEATURE] the inserted images should be visible in the editor as well ( not only int the preview ) HOT 1
- [FEATURE] the preview should reload at changes HOT 3
- [SUPPORT] Newbie's questions HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qownnotes.