Skip to content

Commit

Permalink
[FIXED #187] about dialog in wysiwyg mode
Browse files Browse the repository at this point in the history
  • Loading branch information
w8tcha committed Dec 10, 2021
1 parent a9b06d5 commit 66a074c
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ckeditor-codemirror-plugin",
"homepage": "http://w8tcha.github.io/CKEditor-CodeMirror-Plugin/",
"version": "1.18.1",
"version": "1.18.2",
"authors": [
"Ingo Herbote"
],
Expand Down
49 changes: 34 additions & 15 deletions codemirror/dialogs/codemirrorAbout.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,48 @@ CKEDITOR.dialog.add('codemirrorAboutDialog',
'<div class="cke_about_container">' +
'<div class="cke_about_logo"></div>' +
'<p>' +
'CodeMirror ' +
CodeMirror.version + ' (CKEditor Plugin Version ' + editor.plugins.codemirror.version + ')<br>' +
(typeof (CodeMirror) == "undefined" ? "" : 'CodeMirror ' + CodeMirror.version) +
' (CKEditor Plugin Version ' +
editor.plugins.codemirror.version +
')<br>' +
'<a target="_blank" rel="noopener noreferrer" href="https://codemirror.net">https://codemirror.net</a> - ' +
'<a target="_blank" rel="noopener noreferrer" href="https://github.com/w8tcha/CKEditor-CodeMirror-Plugin">https://github.com/w8tcha/CKEditor-CodeMirror-Plugin</a>' +
'</p>' +
'<h5>' + lang.moreInfoShortcuts + '</h5>' +
'<h5>' +
lang.moreInfoShortcuts +
'</h5>' +
'<p><ul>' +
'<li>' + lang.moreInfoShortcuts1 + '</li>' +
'<li>' + lang.moreInfoShortcuts2 + '</li>' +
'<li>' + lang.moreInfoShortcuts3 + '</li>' +
'<li>' + lang.moreInfoShortcuts4 + '</li>' +
'<li>' + lang.moreInfoShortcuts5 + '</li>' +
'<li>' + lang.moreInfoShortcuts6 + '</li>' +
'<li>' + lang.moreInfoShortcuts7 + '</li>' +
'<li>' + lang.moreInfoShortcuts8 + '</li>' +
'<li>' + lang.moreInfoShortcuts9 + '</li>' +

'<li>' +
lang.moreInfoShortcuts1 +
'</li>' +
'<li>' +
lang.moreInfoShortcuts2 +
'</li>' +
'<li>' +
lang.moreInfoShortcuts3 +
'</li>' +
'<li>' +
lang.moreInfoShortcuts4 +
'</li>' +
'<li>' +
lang.moreInfoShortcuts5 +
'</li>' +
'<li>' +
lang.moreInfoShortcuts6 +
'</li>' +
'<li>' +
lang.moreInfoShortcuts7 +
'</li>' +
'<li>' +
lang.moreInfoShortcuts8 +
'</li>' +
'<li>' +
lang.moreInfoShortcuts9 +
'</li>' +
'</ul></p>' +

'<p>' +
lang.copyright +
'</p>' +

'</div>'
}
]
Expand Down
14 changes: 7 additions & 7 deletions codemirror/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(function() {
CKEDITOR.plugins.add("codemirror", {
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.18.1",
version: "1.18.2",
init: function (editor) {
var command = editor.addCommand("codemirrorAbout", new CKEDITOR.dialogCommand("codemirrorAboutDialog"));
command.modes = { wysiwyg: 1, source: 1 };
Expand Down Expand Up @@ -1267,7 +1267,7 @@ CKEDITOR.plugins.sourcearea = {
},
editorFocus: false,
readOnly: 1,
exec: function(editor) {
exec: function (editor) {
if (editor.mode === "wysiwyg") {
editor.fire("saveSnapshot");
}
Expand All @@ -1284,7 +1284,7 @@ CKEDITOR.plugins.sourcearea = {
},
editorFocus: false,
readOnly: 1,
exec: function(editor) {
exec: function (editor) {
CodeMirror.commands.find(window["codemirror_" + editor.id]);
},
canUndo: true
Expand All @@ -1296,7 +1296,7 @@ CKEDITOR.plugins.sourcearea = {
},
editorFocus: false,
readOnly: 0,
exec: function(editor) {
exec: function (editor) {
var range = {
from: window["codemirror_" + editor.id].getCursor(true),
to: window["codemirror_" + editor.id].getCursor(false)
Expand All @@ -1312,7 +1312,7 @@ CKEDITOR.plugins.sourcearea = {
},
editorFocus: false,
readOnly: 0,
exec: function(editor) {
exec: function (editor) {
var range = {
from: window["codemirror_" + editor.id].getCursor(true),
to: window["codemirror_" + editor.id].getCursor(false)
Expand All @@ -1328,7 +1328,7 @@ CKEDITOR.plugins.sourcearea = {
},
editorFocus: false,
readOnly: 0,
exec: function(editor) {
exec: function (editor) {
var range = {
from: window["codemirror_" + editor.id].getCursor(true),
to: window["codemirror_" + editor.id].getCursor(false)
Expand All @@ -1349,7 +1349,7 @@ CKEDITOR.plugins.sourcearea = {
},
editorFocus: false,
readOnly: 1,
exec: function(editor) {
exec: function (editor) {
if (this.state == CKEDITOR.TRISTATE_ON) {
window["codemirror_" + editor.id].setOption("autoCloseTags", false);
} else if (this.state == CKEDITOR.TRISTATE_OFF) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ckeditor-codemirror-plugin",
"homepage": "http://w8tcha.github.io/CKEditor-CodeMirror-Plugin/",
"version": "1.18.1",
"version": "1.18.2",
"authors": [
"Ingo Herbote"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ckeditor-codemirror-plugin",
"version": "1.18.1",
"version": "1.18.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 66a074c

Please sign in to comment.