Goto bookmark #2105

Closed
opened 2026-02-05 02:55:19 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @ThorsenRune on GitHub (Feb 17, 2021).

Describe the feature you'd like
How do we jump to the source?

Describe the benefits this feature would bring to BookStack users
Linking to a text works fine. I need to remember where the text came from to edit the source. How can I go to bookmark (the source text)

Additional context
Add any other context or screenshots about the feature request here.

Originally created by @ThorsenRune on GitHub (Feb 17, 2021). **Describe the feature you'd like** How do we jump to the source? **Describe the benefits this feature would bring to BookStack users** Linking to a text works fine. I need to remember where the text came from to edit the source. How can I go to bookmark (the source text) **Additional context** Add any other context or screenshots about the feature request here.
Author
Owner

@ssddanbrown commented on GitHub (Feb 18, 2021):

Hi @ThorsenRune,
Can you provide any more details on what you require here? I don't really understand what source you are referring to here and the scenario.

@ssddanbrown commented on GitHub (Feb 18, 2021): Hi @ThorsenRune, Can you provide any more details on what you require here? I don't really understand what source you are referring to here and the scenario.
Author
Owner

@ThorsenRune commented on GitHub (Feb 18, 2021):

Hi @ssddanbrown
First of all, great piece of work. Compliments to the creators
I refer to the bookmark described in:
https://www.bookstackapp.com/docs/user/reusing-page-content/

{{@10#bkmrk-copyright-year}} - Includes the content within the element of id bkmrk-copyright-year in the page with an id of ‘10’.

When you have a page with the text inserted via the bookmark I can't find a way to jump to to source page. It would be good to doubleclick or something like that which would bring you to the 'master' document. Eg. doubleclick the automatically inserted text would bring you to page 10 so you could update the copyright year.
Right now I have to remember where the referenced text is residing. Is there anyway to find page 10?
Hope it's clear

@ThorsenRune commented on GitHub (Feb 18, 2021): Hi @ssddanbrown First of all, great piece of work. Compliments to the creators I refer to the bookmark described in: https://www.bookstackapp.com/docs/user/reusing-page-content/ {{@10#bkmrk-copyright-year}} - Includes the content within the element of id bkmrk-copyright-year in the page with an id of ‘10’. When you have a page with the text inserted via the bookmark I can't find a way to jump to to source page. It would be good to doubleclick or something like that which would bring you to the 'master' document. Eg. doubleclick the automatically inserted text would bring you to page 10 so you could update the copyright year. Right now I have to remember where the referenced text is residing. Is there anyway to find page 10? Hope it's clear
Author
Owner

@ssddanbrown commented on GitHub (Feb 20, 2021):

Thanks for confirming @ThorsenRune.

Yeah, There's no provided interface to jump to the source, Includes are intended to be somewhat transparent and they're not an area of the app I want to expand much further.

Is there anyway to find page 10?

Yes, You can find that page by going to <BOOKSTACK_URL>/link/10.
You could setup a bookmarklet with code like the below (Would need to edit the URL) to quickly take you to the right page:

const id = prompt('Please enter the page ID:');
if(id){ window.location = `https://demo.bookstackapp.com/link/${id}`}
@ssddanbrown commented on GitHub (Feb 20, 2021): Thanks for confirming @ThorsenRune. Yeah, There's no provided interface to jump to the source, Includes are intended to be somewhat transparent and they're not an area of the app I want to expand much further. > Is there anyway to find page 10? Yes, You can find that page by going to `<BOOKSTACK_URL>/link/10`. You could setup a bookmarklet with code like the below (Would need to edit the URL) to quickly take you to the right page: ```js const id = prompt('Please enter the page ID:'); if(id){ window.location = `https://demo.bookstackapp.com/link/${id}`} ```
Author
Owner

@ThorsenRune commented on GitHub (Feb 22, 2021):

Thanks, that is good to know. If I was to give it a go implementing this would it be possible without learning the framework? Say, can I find the unminified js code somewhere ?

@ThorsenRune commented on GitHub (Feb 22, 2021): Thanks, that is good to know. If I was to give it a go implementing this would it be possible without learning the framework? Say, can I find the unminified js code somewhere ?
Author
Owner

@ssddanbrown commented on GitHub (Feb 26, 2021):

@ThorsenRune The unminified code can be found here but changes will require re-building the assets to become active on your instance.

Alternatively, You can add something like this to the "Custom HTML Head" setting option on your instance:

<script>
window.addEventListener('keydown', function(e) {
    if (e.altKey && e.key === 'g') {
        const id = prompt('Please enter the page ID:');
        if (id) { window.location = `/link/${id}`}
    }
});
</script>

This will allow you to use the Alt+G shortcut to show a prompt for the page id, and then take you to that page ID.

@ssddanbrown commented on GitHub (Feb 26, 2021): @ThorsenRune The unminified code [can be found here](https://github.com/BookStackApp/BookStack/tree/master/resources/js) but changes will require re-building the assets to become active on your instance. Alternatively, You can add something like this to the "Custom HTML Head" setting option on your instance: ```html <script> window.addEventListener('keydown', function(e) { if (e.altKey && e.key === 'g') { const id = prompt('Please enter the page ID:'); if (id) { window.location = `/link/${id}`} } }); </script> ``` This will allow you to use the `Alt+G` shortcut to show a prompt for the page id, and then take you to that page ID.
Author
Owner

@ssddanbrown commented on GitHub (Oct 31, 2021):

Since there's been no further activity on this I'll close this off.

@ssddanbrown commented on GitHub (Oct 31, 2021): Since there's been no further activity on this I'll close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2105