You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google Docs works this way: one can send a link to a header. When the recipient browses to the link, the document will get scrolled to the header in the link. We should do the same. Note we do support giving headers for the preview and the edit views.
Browser extension integration: the extension adds a link to gdocwiki. That link could include the header in the current Google Doc if a header has been clicked in the current doc.
I think the way to do this is to wait for the anchor to be displayed in the page and then change the location hash to something else and back.
var hash = location.hash
// wait for hash anchor to exist
location.hash = '#';
location.hash = hash;
In #67 there are now some MutationObservers waiting for document changes but we can probably trigger this from DocPage directly.
The text was updated successfully, but these errors were encountered:
gregwebs
changed the title
proper support for links to headers
support external links to headers
Jul 20, 2021
Google Docs works this way: one can send a link to a header. When the recipient browses to the link, the document will get scrolled to the header in the link. We should do the same. Note we do support giving headers for the preview and the edit views.
Browser extension integration: the extension adds a link to gdocwiki. That link could include the header in the current Google Doc if a header has been clicked in the current doc.
I think the way to do this is to wait for the anchor to be displayed in the page and then change the location hash to something else and back.
In #67 there are now some MutationObservers waiting for document changes but we can probably trigger this from DocPage directly.
The text was updated successfully, but these errors were encountered: