View on GitHub

Snippet : Code Snippet Editor Plugin for Orion

An Orion Plugin to generate a blog post or HTML insert from a selected code snippet in the Orion Editor

Snippet : Code Snippet Editor Plugin for Orion

This is a plugin for Eclipse Orion or any Orion based product.

Please ensure you're viewing this page via https Code Snippet Editor Plugin

If you want, Click Here to automatically clone and edit this plugin at OrionHub

The plugin adds a command to the Orion Editor for creating an HTML fragment to show your code snippet in an HTML page. After installing the plugin there will be a new item in the Tools menu labelled "Snippet". Select some text in the editor and press it. A new section of text will be inserted into the editor containing an entire HTML Snippet that when inserted into your blog should display the selected text in a read-only version of the Orion Editor. Copy or Cut the text into the clipboard and paste into your raw HTML blog post. Then Undo to get your old text back in the Editor.

Install into OrionHub, Install into JazzHub or another Orion instance

Here's an example Snippet generated from the Snippet plugin

    var serviceProperties = {
        name: 'Snippet',
        tooltip: 'Create a JavaScript Orion Editor Snippet for a Web Page',
        key: ['S', true, true] // Ctrl+Shift+S
    provider.registerServiceProvider('orion.edit.command', serviceImpl, serviceProperties);