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
This is to check the feasibility of adding a custom bookmark and referring/linking it.
In docx, we can create a bookmark for places that we want to refer from somewhere else. Upon clicking the referred link, it will direct us to the bookmark. Following are few technical details.
Bookmark creation
Bookmark starts with <w:bookmarkStart w:id="0" w:name="name of the bookmark"/>
Bookmarks ends with <w:bookmarkEnd w:id="0"/>
The required bookmark item, the <w:r></w:r> section, should be in-between <w:bookmarkStart /> and <w:bookmarkEnd />
<w:p>
<w:bookmarkStart w:id="id-number" w:name="bookmark name" />
<w:r>
<w:t>Text of the bookmark</w:t>
</w:r>
<w:bookmarkEnd w:id="id-number" />
</w:p>
Referring bookmark
Bookmark can be linked by <w:hyperlink /> as follows
<w:p>
<w:hyperlink w:anchor="name of the bookmark">
<w:r>
<w:t>Referred link name</w:t>
</w:r>
</w:hyperlink>
</w:p>
At the moment, the existing LINK feature in the library is only for external urls. We can extend this to Link bookmarks.
Expected Feature
New command/attributes to add bookmarks.
+++BOOKMARK ({ name: $name_of_bookmark, label: $label_of_bookmak }) +++ . This can be used to add bookmarks to texts/formatted texts.
To add a bookmark to an image, +++IMAGE getImageData($image_url, $width, $height, $bookmark_name) +++. The function should return an additional parameter, bookmarkName. Then we have to place the generated image in-between <w:bookmarkStart /> and <w:bookmarkEnd />
To add a bookmark to a link, +++LINK ({url: $link_url, label: $label_of_link, bookmarkName: $name_of_bookmark}) +++
Extend Link to refer bookmarks
eg: +++LINK ({label: $label_of_link, bookmarkLink: $name_of_bookmark}) +++
Description
This is to check the feasibility of adding a custom bookmark and referring/linking it.
In docx, we can create a bookmark for places that we want to refer from somewhere else. Upon clicking the referred link, it will direct us to the bookmark. Following are few technical details.
Bookmark creation
<w:bookmarkStart w:id="0" w:name="name of the bookmark"/>
<w:bookmarkEnd w:id="0"/>
<w:r></w:r>
section, should be in-between<w:bookmarkStart /> and <w:bookmarkEnd />
Referring bookmark
Bookmark can be linked by <w:hyperlink /> as follows
At the moment, the existing
LINK
feature in the library is only for external urls. We can extend this to Link bookmarks.Expected Feature
New command/attributes to add bookmarks.
+++BOOKMARK ({ name: $name_of_bookmark, label: $label_of_bookmak }) +++
. This can be used to add bookmarks to texts/formatted texts.+++IMAGE getImageData($image_url, $width, $height, $bookmark_name) +++
. The function should return an additional parameter,bookmarkName
. Then we have to place the generated image in-between <w:bookmarkStart /> and <w:bookmarkEnd />To add a bookmark to a link,+++LINK ({url: $link_url, label: $label_of_link, bookmarkName: $name_of_bookmark}) +++
Extend Link to refer bookmarks
eg:
+++LINK ({label: $label_of_link, bookmarkLink: $name_of_bookmark}) +++
The text was updated successfully, but these errors were encountered: