Integrated: JDK-8277420: Provide a way to copy the hyperlink to a doc element to the clipboard

Hannes Wallnöfer hannesw at openjdk.java.net
Fri May 27 09:11:28 UTC 2022


On Fri, 20 May 2022 17:20:19 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

> This is a CSS/JavaScript only change to implement copy-to-clipboard functionality for all headers (`h1` - `h6`) that have an `id` attribute associated with them. The following element-attribute patterns are supported (using `<h2>` as an example):
> 
>  - `<section id="..."><h2>` (generated by javadoc)
>  - `<h2 id="...">` (commonly used)
>  - `<h2><a id="...">` (legacy)
> 
> The change includes a consolidation of the CSS styles used to render copy-to-clipboard buttons, of which we have now three kinds: for snippets, for the link on the search page, and for headers. There is now a base CSS class called "copy" that defines the styles shared by all copy-to-clipboard buttons, and additional CSS properties for the concrete "subclasses". 
> 
> API docs generated with this change can be viewed here (top level files and java.base module):
> http://cr.openjdk.java.net/~hannesw/8277420/api.03/

This pull request has now been integrated.

Changeset: 37ecbb46
Author:    Hannes Wallnöfer <hannesw at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/37ecbb461cfe487e2cb4c9c9a6b0f2bba5b96fd0
Stats:     255 lines in 9 files changed: 151 ins; 96 del; 8 mod

8277420: Provide a way to copy the hyperlink to a doc element to the clipboard

Reviewed-by: prappo

-------------

PR: https://git.openjdk.java.net/jdk/pull/8817


More information about the javadoc-dev mailing list