Skip to content
Permalink
Browse files

Merge branch 't/11781' into major

  • Loading branch information...
mlewand committed Apr 23, 2014
2 parents 51eb727 + 5388dfb commit ab2f93f049ff0e72f0f1dfa40123e12ab9c98842
Showing with 18 additions and 52 deletions.
  1. +13 −12 plugins/codesnippet/plugin.js
  2. +2 −40 plugins/codesnippetgeshi/README.md
  3. +3 −0 plugins/codesnippetgeshi/plugin.js
@@ -122,6 +122,8 @@
/**
* Global helpers and classes of the Code Snippet plugin.
*
* For more information see the [Code Snippet Guide](#!/guide/dev_codesnippet).
*
* @class
* @singleton
*/
@@ -229,6 +231,9 @@
* cs: 'C#',
* css: 'CSS'
* }
*
* More information on how to change the list of languages is available
* in the [Code Snippet documentation](#!/guide/dev_codesnippet-section-changing-languages-list).
*
* @property {Object} languages
*/
@@ -370,7 +375,7 @@
}
} );

// Returns **array** of children elements, with whitespace-only text nodes
// Returns an **array** of child elements, with whitespace-only text nodes
// filtered out.
// @param {CKEDITOR.htmlParser.element} parentElement
// @return Array - array of CKEDITOR.htmlParser.node
@@ -398,7 +403,7 @@
* A CSS class of the `<code>` element used internally for styling
* (by default [highlight.js](http://highlightjs.org) themes, see
* {@link CKEDITOR.config#codeSnippet_theme config.codeSnippet_theme}),
* which means that it is **not present** it the editor output data.
* which means that it is **not present** in the editor output data.
*
* // Changes the class to "myCustomClass".
* config.codeSnippet_codeClass = 'myCustomClass';
@@ -425,6 +430,9 @@ CKEDITOR.config.codeSnippet_codeClass = 'hljs';
* php: 'PHP'
* };
*
* More information on how to change the list of languages list is available
* in the [Code Snippet documentation](#!/guide/dev_codesnippet-section-changing-languages-list).
*
* @since 4.4
* @cfg {Object} [codeSnippet_languages=null]
* @member CKEDITOR.config
@@ -436,18 +444,11 @@ CKEDITOR.config.codeSnippet_codeClass = 'hljs';
* **Note**: This will only work with the default highlighter
* ([highlight.js](http://highlightjs.org/static/test.html)).
*
* // Changes the "pojoaque" theme.
* // Changes the theme to "pojoaque".
* config.codeSnippet_theme = 'pojoaque';
*
* **Note**: [Themes](http://highlightjs.org/static/test.html)
* must be loaded manually to be applied inside the [inline editor instance](#!/guide/dev_inline), as
* `codeSnippet_theme` will not work in such case. You need to include the stylesheet in the `<head>`
* section of the page instead, for example:
*
* <head>
* ...
* <link href="path/to/highlight.js/styles/theme_stylesheet.css" rel="stylesheet">
* </head>
* More information on how to change the highlighter theme is available
* in the [Code Snippet documentation](#!/guide/dev_codesnippet-section-changing-highlighter-theme).
*
* @since 4.4
* @cfg {String} [codeSnippet_theme='default']
@@ -1,42 +1,4 @@
Code Snippet GeSHi plugin
Code Snippet GeSHi Plugin
==================================================

The **Code Snippet GeSHi** plugin is an extension of the [Code Snippet](http://ckeditor.com/addon/codesnippet) plugin
that uses the [GeSHi](http://qbnz.com/highlighter/) server-side syntax highlighting engine instead
of the default, client-side [highlight.js](http://highlightjs.org).

## Requirements

* CKEditor 4.4+
* The [Code Snippet](http://ckeditor.com/addon/codesnippet) plugin.
* A modern web browser or **IE9+**.

## Installation

See the official [Plugin Installation Guide](http://docs.ckeditor.com/#!/guide/dev_plugins).

## Sample Configuration

The following configuration assumes that [GeSHi](http://qbnz.com/highlighter/) is located
in the `plugins/codesnippetgeshi/lib` directory:

CKEDITOR.replace( 'editor1', {
extraPlugins: 'codesnippet,codesnippetgeshi',
codeSnippetGeshi_url: 'lib/geshi/colorize.php'
} );

It is possible to specify an absolute path in the [`codeSnippetGeshi_url`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-codeSnippetGeshi_url) configuration setting.

**Note**: The [`codeSnippet_languages`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-codeSnippet_languages) configuration setting can be used to reduce the list of available languages.

CKEDITOR.replace( 'editor1', {
extraPlugins: 'codesnippet,codesnippetgeshi',
codeSnippet_languages: {
html4strict: 'HTML',
html5: 'HTML5',
javascript: 'JavaScript',
php: 'PHP',
sql: 'SQL'
},
codeSnippetGeshi_url: 'http://example.com/geshi/colorize.php'
} );
For installation and configuration instructions go to the [Code Snippet GeSHi documentation](http://docs.ckeditor.com/#!/guide/dev_codesnippetgeshi) in the [CKEditor Developer's Guide](http://docs.ckeditor.com/#!/guide).
@@ -183,6 +183,9 @@
*
* config.codeSnippetGeshi_url = 'http:\/\/example.com\/geshi\/colorize.php';
*
* Check the [Code Snippet GeSHi documentation](#!/guide/dev_codesnippetgeshi) for
* more information.
*
* @cfg {String} [codeSnippetGeshi_url=null]
* @member CKEDITOR.config
*/

0 comments on commit ab2f93f

Please sign in to comment.
You can’t perform that action at this time.