Comments (17)
For me the generated ![scribble](media/341084995.png)
works just fine. All your points "Expected behaviour" work for me
but in the next line you are trying to replace "file://media" which (as far of my understanding) will never match.
It acts as fallback for the legacy method of linking media files (it was the main method until a few weeks ago).
question link gets inserted but looks like this , shouldn't there be a "file://"?
not any more (since a few weeks)
from scripts.
external editor gets opend with full image path as parameter
that didn't work, I just ctrl+clicked the image markdown in the editor
from scripts.
Line 64 in 8ee0dac
Are you up for the task, @bessw? 💪
from scripts.
I'm not shure what parts of the code you want to be switchable to lagacy version.
But I will try to fix it.
from scripts.
Sorry, I previously linked the wrong line in the script, this one is correct:
Line 64 in 8ee0dac
The current script works if you enable the "legacy way of inserting links" in the QON settings. In order to be able to open the external application with the correct file the path to the file needs to be generated in a different way.
from scripts.
You can do that by using currentNote().fullNoteFilePath
or playing with the current note folder and note sub-folder path, but I will add a new property fullNoteFileDirPath
for NoteApi
to get the absolute directory path of the a note file in the next release.
from scripts.
19.10.8
- there now is a new method
getFileURLFromFileName()
forNoteApi
to get the
absolute file url from a relative file name- for more information please take a look at
scripting documentation
- for more information please take a look at
- there now is a new property
fullNoteFileDirPath
forNoteApi
to get the
absolute directory path of the a note file- for more information please take a look at
scripting documentation
- for more information please take a look at
from scripts.
There now is a new release, you could use fullNoteFileDirPath
now.
from scripts.
And don't forget to bump the minAppVersion
in https://github.com/qownnotes/scripts/blob/master/scribble/info.json if use are using the new property. 😄
from scripts.
If updated the script now. 😄 Does it work for you?
from scripts.
I've still got problems with it.
First of all since I'm on Windows I needed to add script.toNativeDirSeparators(mediaFilePath)
.
But the weird thing is for some reason I needed to replace script.getApplicationSettingsVariable("legacyLinking")
with false
to test the new behaviour, but when I print script.getApplicationSettingsVariable("legacyLinking")
to the console it also returns false
😕
from scripts.
script.getApplicationSettingsVariable("legacyLinking")
seems to return false as string instead of boolean.
Comparing to "false"
would fix this here, or is this a bug of script.getApplicationSettingsVariable("legacyLinking")
and you want to fix it there?
from scripts.
First of all since I'm on Windows I needed to add script.toNativeDirSeparators(mediaFilePath).
great, just add that
script.getApplicationSettingsVariable("legacyLinking") seems to return false as string instead of boolean.
strange, it worked fine on Linux, getApplicationSettingsVariable
will return some kind of QVariant, maybe comparing it to a string would be more safe
do you want to create a pull request with the changes?
from scripts.
Yes, wait a sec.
from scripts.
I bumped the version for you. Can you please check if the script works for you in the script repository.
from scripts.
workes ✔️
from scripts.
Great! Thank you
from scripts.
Related Issues (20)
- [FEATURE] Color selector menu for text highlighter HOT 4
- [SUPPORT] Script to automatically format the Markdown each save HOT 3
- [SUPPORT] Stuck trying to get Backlinks script to work HOT 4
- [SUPPORT] Mermaid diagrams script: theme configuration for sequenceDiagram HOT 6
- [BUG] Latex Math v0.0.6 script doesn't update pictures when color style is changed HOT 7
- [BUG] Toggle checkbox - checkbox where added in wrong place when autocreated from list HOT 5
- [FEATURE] Add video display support HOT 3
- [BUG] The "YAML nested tags" script breaks formatting and causing text lost in preview HOT 4
- [BUG] "exportFolder is not defined" in export-notes-as-website HOT 7
- [BUG] A Wiki Link to a note under notes sub-folder gives pop up "Note was not found" even if it exists HOT 4
- [SUPPORT] HOT 11
- [SUPPORT] HOT 2
- [SUPPORT] LateX Math results in very aliased images HOT 8
- adding favorite note script results with error " Expected a qualified name id"[BUG] HOT 10
- [SUPPORT] HOT 7
- [BUG] can't follow [[wiki linked]] file links that have spaces HOT 2
- [BUG] Scripts "export note as website" not working properly on Windows HOT 7
- [BUG] export note using pandoc not working on windows HOT 2
- [BUG] Backlinks doesn't support setext headers for title HOT 6
- [BUG] LaTeX math script generates empty icons instead of images HOT 3
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 scripts.