This widget was written with the intention of making it easy to copy-and-paste text from within a drop-down menu. It was written to implement the "Quick Share" menu in the Document Library where a user is able to quickly access the link to the shared document from within the menu.
It is intended to be placed inside a cascading menu so that when a user expands the cascade using the keyboard the text is immediately highlighted so that they can simply use CTRL-C to capture it.
Sample configuration:
{ name: "alfresco/menus/AlfCascadingMenu", config: { id: "MyCascade", label: "Copy some text...", widgets: [ { name: "alfresco/menus/AlfMenuTextForClipboard", config: { id: "MyTextToCopy", label: "Copy me: ", textForClipboard: "Some sample text" } } ] } }
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
- external:dojo/_TemplatedMixin
- module:alfresco/core/Core
Members
-
cssRequirements :object[]
-
An array of the CSS files to use with this widget.
Type:
- object[]
- Default Value:
- [{cssFile:"./css/AlfMenuTextForClipboard.css"}]
- Source:
-
label :string
-
A label for the text to be copied. This can be a i18n key for translation or a specific label. It can be left as null or the empty string if a label is not required.
Type:
- string
- Default Value:
- null
- Source:
-
templateString :string
-
The HTML template to use for the widget.
Type:
- string
- Source:
-
textForClipboard :string
-
The text to be made available for copying.
Type:
- string
- Default Value:
- null
- Source:
Methods
-
focus()
-
When the widget gains focus the input element should be selected so that it's contents can be easily copied to the keyboard
- Source:
-
postMixInProperties()
-
This ensures that the label
- Source: