Returns the selected text from the editors.
        
        :return     <str>
345718
def selectedText(self):
        
        texts = []
        for editor in self.editors():
            text = editor.selectedText()
            if text:
                texts.append(nativestring(text))
        
        return ' '.join(texts)
807354
def editors(self):
        
        lay = self.layout()
        return [lay.itemAt(i).widget() for i in range(lay.count())]
1282717
def cut(self):
        
        text = self.selectedText()
        for editor in self.editors():
            editor.cut()
        
        QtGui.QApplication.clipboard().setText(text)
240564
function() {
			var cache = this._.cache;
			if ( cache.selectedText !== undefined )
				return cache.selectedText;

			var nativeSel = this.getNative(),
				text = isMSSelection ? nativeSel.type == 'Control' ? '' : nativeSel.createRange().text : nativeSel.toString();

			return ( cache.selectedText = text );
		}
910453
def get_selected_text_metrics(self):
        

        selected_text = self.get_selected_text()
        if not selected_text:
            return tuple()

        return (selected_text, self.get_cursor_line(), self.get_cursor_column() - len(selected_text))
520165
def perform_extended_selection(self, event=None):
        
        TextHelper(self.editor).select_extended_word(
            continuation_chars=self.continuation_characters)
        if event:
            event.accept()
1041226
def get_text(self):
        
        if self._multiline: return str(self._widget.toPlainText())
        else:               return str(self._widget.text())
368605
function selectedHTML(editor) {
    restoreRange(editor);
    var range = getRange(editor);
    if (ie)
      return range.htmlText;
    var layer = $("<layer>")[0];
    layer.appendChild(range.cloneContents());
    var html = layer.innerHTML;
    layer = null;
    return html;
  }
1326515
def ugettext(self):
        
        # pylint: disable=no-member
        if six.PY2:
            return self._translations.ugettext
        else:
            return self._translations.gettext
80384
function(options, select) {
                if (options.length === 0) {
                    return this.nonSelectedText;
                }
                else {
                    var selected = '';
                    options.each(function () {
                        selected += $(this).text() + ', ';
                    });
                    return selected.substr(0, selected.length - 2);
                }
            }
859735
def get_clipboard(self):
        
        Gdk.threads_enter()
        text = self.clipBoard.wait_for_text()
        Gdk.threads_leave()
        if text is not None:
            return text
        else:
            raise Exception("No text found on clipboard")
518744
private String getDocumentText()
    {
        try
        {
            Document document = textComponent.getDocument();
            String text = document.getText(0, document.getLength());
            return text;
        }
        catch (BadLocationException e)
        {
            logger.warning(e.toString());
            return textComponent.getText();
        }
    }
1114399
def selection(self):
        
        selection = self.listbox.curselection()
        if len(selection) is 0:
            return None
        return self.font_indexes[self.listbox.curselection()[0]]
589795
def text(self):
        
        if self.out:
            self.out.close()  # pragma: nocover
        return self.fp.getvalue()
574148
def currentText(self):
        
        lineEdit = self.lineEdit()
        if lineEdit:
            return lineEdit.currentText()
        text = nativestring(super(XComboBox, self).currentText())
        if not text:
            return self._hint
        return text
762039
public String getSelectedEditorUri() {

        // get the handler class from the OpenCms runtime property
        I_CmsEditorHandler editorClass = OpenCms.getWorkplaceManager().getEditorHandler();

        // the resourcenameparameter could be encoded, so decode it
        String resource = getParamResource();
        resource = CmsEncoder.unescape(resource, CmsEncoder.ENCODING_UTF_8);
        if (editorClass == null) {
            // error getting the dialog class, return to file list
            return CmsWorkplace.FILE_EXPLORER_FILELIST;
        }
        // get the dialog URI from the class defined in the configuration
        String editorUri = null;
        try {
            editorUri = editorClass.getEditorUri(resource, getJsp());
            if (editorUri == null) {
                // no valid editor was found, show the error dialog
                throw new CmsWorkplaceException(Messages.get().container(Messages.ERR_NO_EDITOR_FOUND_0));
            }
        } catch (CmsException e) {
            showErrorDialog(getJsp(), e);
        }
        return editorUri;
    }
1082983
def perform_matched_selection(self, event):
        
        selected = TextHelper(self.editor).match_select()
        if selected and event:
            event.accept()