Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »



In this recipe we show how a Ruble command can output a snippet into the editor for further manipulation. Note that this sample already exists in the HTML bundle--we illustrate it here as it is a useful pattern.

The Code

In the snippet below, we manipulate the currently selected text to split it across lines, and then wrap each line in a template using mirrored variables (the $1s in the template)

Adding it to a Menu


If you do not choose a key binding, you should place the command in a menu, otherwise it will be difficult or impossible to access.


Once created and activated, you will get something similar to this:

  • No labels