https://bugs.kde.org/show_bug.cgi?id=456846

--- Comment #2 from Thomas Friedrichsmeier <thomas.friedrichsme...@kdemail.net> 
---
In RKWard we use the following in the snippet tab (example):

  ${rangeCommand("**%%1**", "Bold")}

where rangeCommand is defined as (in the scripts tab):

function rangeCommand(command, def) {
    if (view.selectedText().length > 0) {
        return command.replace("%%1", view.selectedText());
    } else {
        return command.replace("%%1", def);
    }
}

This puts the selected text inside "**" markup, or inserts "**Bold**", in case
nothing is selected. That took quite some experimenting to figure out,
indeed....

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to