Comments (5)
First of all, what makes you want to avoid just doing the copy-paste once again?
Also, could you elaborate on what the workflow in your mind looks like exactly?
As for the &selection=...
syntax, I have already succeeded in deciphering it! So it will not be a big problem.
update the quoted text with newly selected
Auto-updating not only the link itself but also the surrounding texts will be very difficult given the variety of custom copy formats.
So as you suggest, the only feasible solution would be using embeds and updating the link text.
Updating link texts will not be difficult, but as you say, opening too many PDF embeds might degrade the performance.
Opening PDF files is such a heavy job.
Can you kindly provide a reference for the Logseq feature you mentioned?
Thank you very much for considering to support me. It really means a lot to me.
I will seek other options for how you can sponsor me!
from obsidian-pdf-plus.
First of all, what makes you want to avoid just doing the copy-paste once again?
perfectionism
Also, could you elaborate on what the workflow in your mind looks like exactly?
It depends on the difficulty of implementing this feature, the workflow is already good enough, it's just another quality-of-life kind of enhancement
Can you kindly provide a reference for the Logseq feature you mentioned?
I just realized a more approachable way to achieve this
we need to keep sync between the link and quoted text (by a unique identifier), let us separate this into two problems
- save the identifier in the link
- save the identifier in quoted text, while adaptable to different template formats
the first one is pretty easy, we can use query params like below
#page=60&selection=100,8,102,65&identifier=123123
the second one is the same as zotlit and flashcards-obsidian, we put an explicit identifier just around the quoted text
meanwhile, we may need an HTML5 comment to wrap quoted text
<!-- customizable quote start --> <-- this will be hidden in `live preview` or `reading` mode
any template format
...
<!--customizable quote end -->
^123123 <-- explicit identifier in markdown file
as we have backlinks, we already have a mapping relationship between the identifier and file path, we could directly search(regex?) the identifier in that file, then replace the corresponding region
an example regex pattern
{customizable quote start}
.* <-- any text between
{customizable quote end}
\^(\d*)\n <--match the identifer
from obsidian-pdf-plus.
@SSmJaE I've just updated funding methods and added ko-fi, which supports PayPal!
I appreciate your support and suggestions!
I see, so even after the text selection (&selection=...
) changes, the identifier stays untouched, which allows us to locate the corresponding quote in the markdown file and update its content.
That's an interesting idea. But how should we handle the variety of copy template formats?
To make this happen, we will have to identify which template format was used for the quote.
To make matters even worse, the quote might have been added with some arbitrary comments after pasting. When updating the quote, we need to avoid overwriting such comments.
Also, we will have to take care of changes in copy template formats themselves.
from obsidian-pdf-plus.
we will have to take care of changes
It's really quite simple; we don't have to change the text with 100 percent certainty.
If it matches the pattern, we update it.
If it doesn't match, we notify the user that we didn't find the supposed pattern.
how should we handle the variety of copy template formats?
I found that the html5 comment tag will still be visible in live preview mode, while other html5 tag like div, will also be hidden in live preview mode, and it can be inserted into callout, like what the picture illustrates.
Then we can save data as tag's attribute, which could also be used by regex pattern to locate it.
No matter what template format the user is using, once they have corresponding tag, we can locate and update them.
by the way, happy lunar new year
from obsidian-pdf-plus.
hi, any ideas?🙃
from obsidian-pdf-plus.
Related Issues (20)
- [FR] OCR HOT 4
- [Bug] Options HOT 5
- [FR] Support for Relative Link HOT 1
- [FR] Rectangular selection embeds templates HOT 1
- [FR] Mark page as read HOT 5
- [FR] Auto-clear text selection after auto-pasting HOT 7
- [FR] Bounding rectangle indicator instead of a highlight indicator HOT 3
- [Bug] Automatically Zoom Out PDF in Embed section & hovering HOT 7
- [FR] Excalidraw - PDF++ deep linking support HOT 4
- [Bug] Auto-paste in sidebar note HOT 6
- [FR] Usage of Control & Mousewheel step settings HOT 2
- [Bug] Auto-pastings hidden when pasted in between HOT 2
- [FR] A paste template whose name can be empty HOT 2
- [Bug] Using PDF++ then Plug In Outliner doesn't work anymore (moving lines) HOT 1
- Performance degradation when a PDF has many backlink highlights HOT 10
- [Feature] Make backlink indicator options more fine-grained
- [FR] Open Links or Target markdown files in tab groups HOT 1
- [FR] Ribbon buttons to the pdf toolbar HOT 1
- [Feature] Listen to PDFs / Text-to-Speech HOT 2
- [Feature] User-defined commands with arbitrary JavaScript & provide a helper library HOT 4
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 obsidian-pdf-plus.