Lines Matching defs:selection
23 /** @var {Object} selection A DokuWiki selection object holding text positions in the editor */
24 selection = null;
209 * replacing the current selection or at the cursor position.
210 * When no selection is available the given title will be used
217 let selection;
223 // use the current selection, if not available use the one that was stored when the wizard was opened
224 selection = DWgetSelection(this.textArea);
225 if (selection.start === 0 && selection.end === 0) {
226 selection = this.selection;
229 // if the selection has any text, use it as the link title
230 linkTitle = selection.getText();
232 // don't include trailing space in selection
233 selection.end--;
234 linkTitle = selection.getText();
237 // if there is no selection, and useheading is enabled, use the heading text as the link title
244 pasteText(selection, syntax.link, syntax);
331 this.selection = DWgetSelection(this.textArea);