Confirmed users
764
edits
m (→Example Usage) |
m (→Example Usage) |
||
Line 83: | Line 83: | ||
<pre class="brush:js;toolbar:false;"> | <pre class="brush:js;toolbar:false;"> | ||
var contextMenu = require("context-menu"); | |||
// Add "Edit Image" on images. | // Add "Edit Image" on images. | ||
Line 95: | Line 95: | ||
// Replace the "Search" menuitem with a menu that searches Google or Wikipedia | // Replace the "Search" menuitem with a menu that searches Google or Wikipedia | ||
// when there is selected text. | // when there is selected text. | ||
var selection = require("selection"); | |||
contextMenu.replace( | contextMenu.replace( | ||
function () { | function () { |