| Summary: | [client][editor] Support links in the editor | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Felipe Heidrich <eclipse.felipe> |
| Component: | Editor | Assignee: | Silenio Quarti <Silenio_Quarti> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse.felipe, jarthana, john.arthorne, Silenio_Quarti |
| Version: | unspecified | ||
| Target Milestone: | 0.3 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Felipe Heidrich
I released support for embedded links in text view by implementing idea a) mentioned above.
Links are provide as styling information (onLineStyle() event). The Style object has been extended allowing stylers to identify the type of DOM element to create for a range. Supported types at the moment are: "A" (for links) and "SPAN" (the default). Another addition is the "attributes" property which let stylers set generic DOM attributes for the range element. Link elements should specify the "href attribute as it is done in usual HTML.
Style
{String} styleClass A CSS class name.
{Object} style An object with CSS properties.
{String} tagName A DOM tag name. (NEW)
{Object} attributes An object with DOM attributes. (NEW)
Links are displayed when the mouse moves with the Ctrl modifier pressed (Cmd on Mac) and without any buttons pressed. Links are followed using usual user agent behaviour (Ctrl down -> opens new tab not selected) and (Ctrl+Shift down -> opens new tab and selects it). If Ctrl is not down when the link is clicked, nothing happens.
The example styler (examples/textview/styler.js) has been modified to identify two types of links in comments: URLs and bugzilla numbers (bug#XXXXX).
Fixed
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=f959913b7721cf70e0e9042566754cd4546ec889
I understand this bug doesn't cover the links for the resources used in HTML files. But I feel it would be nice to be able to open the javascript, CSS and even other HTML files that are referenced from an HTML file, i.e. the ones that are referenced using relative path. I don't see a bug for this. Or is there already one? (In reply to comment #2) > I understand this bug doesn't cover the links for the resources used in HTML > files. But I feel it would be nice to be able to open the javascript, CSS and > even other HTML files that are referenced from an HTML file, i.e. the ones that > are referenced using relative path. > I don't see a bug for this. Or is there already one? This is something that the html styler would need to handle. Please open a new bug, this would be a nice feature to have. |