Skip to content

Commit

Permalink
bump to 1.17.2
Browse files Browse the repository at this point in the history
  • Loading branch information
w8tcha committed Oct 13, 2017
1 parent cdd687f commit b3b2579
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "ckeditor-codemirror-plugin",
"homepage": "http://w8tcha.github.io/CKEditor-CodeMirror-Plugin/",
"version": "1.17",
"version": "1.17.2",
"authors": [
"Ingo Herbote"
],
Expand Down
18 changes: 17 additions & 1 deletion codemirror/plugin.js
Expand Up @@ -10,7 +10,7 @@
CKEDITOR.plugins.add('codemirror', {
icons: 'searchcode,autoformat,commentselectedrange,uncommentselectedrange,autocomplete', // %REMOVE_LINE_CORE%
lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,el,en-au,en-ca,en-gb,en,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,ug,uk,vi,zh-cn,zh', // %REMOVE_LINE_CORE%
version: '1.17.1',
version: '1.17.2',
init: function (editor) {
var rootPath = this.path,
defaultConfig = {
Expand Down Expand Up @@ -235,6 +235,22 @@
}*/
}
});

if (editor.plugins.textselection && textRange && !editor.config.fullPage) {

var start, end;

start = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.startOffset);

if (typeof (textRange.endOffset) == 'undefined') {
window["codemirror_" + editor.id].focus();
window["codemirror_" + editor.id].setCursor(start);
} else {
window["codemirror_" + editor.id].focus();
end = OffSetToLineChannel(window["codemirror_" + editor.id], textRange.endOffset);
window["codemirror_" + editor.id].setSelection(start, end);
}
}
}


Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "CKEditor-CodeMirror-Plugin",
"version": "1.17",
"version": "1.17.2",
"author": "w8tcha",
"description": "Syntax Highlighting for the CKEditor (Source View and Source Dialog) with the CodeMirror Plugin.",
"repository": {
Expand Down

0 comments on commit b3b2579

Please sign in to comment.