Reputation: 15889
Is it possible to apply HTML code on highlighted text like in Zend Studio 5?
For example:
Upvotes: 4
Views: 1691
Reputation: 128
On the MacOSX version (8.0.2), the Macros editor is still in the 6.9.1 location (Preferences->Editor->Macros).
The above works well, although I had to use Ctrl-Alt- as my meta key sequence, since MacOSX assigns some of the other more convenient ones.
Upvotes: 0
Reputation: 20892
Open preferences -> Editor -> Macros (in version 6.9.1)
Open Tools > Options > Editor > Macros (in version 8.0.1)
Add a new macro called something like "html-bold", then hightlight it. Paste this in the Macro Code section:
cut-to-clipboard "<b>" paste-from-clipboard "</b>"
Set a shortcut if you want. I tried it with CTRL+B and it worked fine.
Note that it will replace the current contents of your clipboard with the text you selected.
To learn more about Netbeans macros, see What useful macros have you created in Netbeans?
Upvotes: 8