You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

476 lines
25 KiB

  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or http://ckeditor.com/license
  4. */
  5. CKEDITOR.editorConfig = function( config ) {
  6. config.keystrokes = [
  7. // [ CKEDITOR.CTRL + 76, null ], // CTRL + L
  8. [ CKEDITOR.ALT + CKEDITOR.SHIFT + 56, 'bulletedlist' ], // ALT + *
  9. [ CKEDITOR.ALT + 56, 'bulletedlist' ], // ALT + 8
  10. [ CKEDITOR.ALT + 173, 'numberedlist' ], // ALT + -
  11. [ CKEDITOR.CTRL + 48, 'ckgundoheader' ], // ALT + 0
  12. [ CKEDITOR.CTRL + 49, 'ckginsheaderone' ], // ALT + 1
  13. [ CKEDITOR.CTRL + 50, 'ckginsheadertwo' ], // ALT + 2
  14. [ CKEDITOR.CTRL + 51, 'ckginsheaderthree' ], // ALT + 4
  15. [ CKEDITOR.CTRL + 52, 'ckginsheaderfour' ], // ALT +4
  16. [ CKEDITOR.CTRL + 53, 'ckginsheaderfive' ], // ALT + 5
  17. [ CKEDITOR.ALT + 77, 'ckginscode' ], //ALT +m
  18. /* turn off ALT to avoid conflict with AltGr */
  19. [ CKEDITOR.ALT + 48, null ],
  20. [ CKEDITOR.ALT + 49, null ],
  21. [ CKEDITOR.ALT + 50, null ],
  22. [ CKEDITOR.ALT + 51, null ],
  23. [ CKEDITOR.ALT + 52, null ],
  24. [ CKEDITOR.ALT + 53, null ],
  25. ];
  26. config.colors = new Array(
  27. '000000','000033','000066','000099','0000CC','0000CE','0000FF','003300','003333','003366','003399','0033CC','0033FF','006600','006633',
  28. '006666','006699','0066CC','0066FF','009900','009933','009966','009999','0099CC','0099FF','00CC00','00CC33','00CC66','00CC99','00CCCC','00CCFF',
  29. '00FF00','00FF33','00FF66','00FF99','00FFCC','00FFFF','01F33E','01FCEF','03EBA6','03F3AB','06DCFB','0AFE47','111111','1F88A7','1FCB4A','1FFEF3',
  30. '222222','23819C','24E0FB','25A0C5','27DE55','2897B7','2966B8','29AFD6','2DC800','2F74D0','2FAACE','32DF00','330000','330033','330066','330099',
  31. '3300CC','3300FF','333300','333333','333333','333366','333399','3333CC','3333FF','336600','336633','336666','336699','3366CC','3366FF','339900',
  32. '339933','339966','339999','3399CC','3399FF','33CC00','33CC33','33CC66','33CC99','33CCCC','33CCFF','33FDC0','33FF00','33FF33','33FF66','33FF99',
  33. '33FFCC','33FFFF','36F200','3923D6','3DE4FC','444444','44B4D5','48FB0D','4985D6','4A9586','4AE371','4BFE78','4FBDDD','52FF20','555555','5757FF',
  34. '57BCD9','59955C','59DF00','5B5BFF','5EAE9E','5FFEF7','6094DB','61F200','62A9FF','62D0FF','62FDCE','63E9FC','660000','660033','660066','660099',
  35. '6600CC','6600FF','663300','663333','663366','663399','6633CC','6633FF','666600','666633','666666','666666','666699','6666CC','6666FF','669900',
  36. '669933','669966','669999','6699CC','6699FF','66CC00','66CC33','66CC66','66CC99','66CCCC','66CCFF','66FF00','66FF00','66FF33','66FF66','66FF99',
  37. '66FFCC','66FFFF','6755E3','67C7E2','6A6AFF','6CA870','6FFF44','72FE95','7373FF','74138C','74BAAC','74FEF8','75B4FF','75D6FF','75ECFD','777777',
  38. '7979FF','79FC4E','7BA7E1','7BCAE1','7CEB98','7DFDD7','800080','80B584','8282FF','8678E9','86BCFF','872187','888888','892EE4','89FC63','8ADCFF',
  39. '8BFEA8','8C8CFF','8CD1E6','8CEFFD','8D18AB','8DC7BB','8EB4E6','8ED6EA','8FFEDD','8FFF6F','9191FF','92FEF9','93BF96','93EEAA','9588EC','95FF4F',
  40. '9669FE','990000','990033','990066','990099','990099','9900CC','9900FF','993300','993333','993366','993399','9933CC','9933FF','996600','996633',
  41. '996666','996699','9966CC','9966FF','999900','999933','999966','999999','999999','9999CC','9999FF','9999FF','99C7FF','99C7FF','99CC00','99CC33',
  42. '99CC66','99CC99','99CCCC','99CCFF','99E0FF','99FD77','99FF00','99FF33','99FF66','99FF99','99FFCC','99FFFF','9A03FE','9B4EE9','9D9D00','A095EE',
  43. 'A27AFE','A3FEBA','A41CC6','A4F0B7','A55FEB','A5D3CA','A5DBEB','A5FEE3','A5FEFA','A5FF8A','A6CAA9','A6DEEE','A827FE','A8A8FF','A8CFFF','A8E4FF',
  44. 'A9C5EB','AAAAAA','AAAAFF','AAFD8E','ABFF73','ACF3FD','AD8BFE','AE70ED','AE70ED','B05F3C','B0A7F1','B300B3','B3FF99','B445FE','B4D1B6','B5FFC8',
  45. 'B5FFFC','B6BA18','B7B7FF','B89AFE','B8E2EF','B9264F','B96F6F','BA21E0','BABA21','BAD0EF','BAFEA3','BBBBBB','BBBBFF','BBDAFF','BBEBFF','BC2EBC',
  46. 'BCB4F3','BD5CFE','BDF4CB','BDFFEA','BEFEEB','BF00BF','C06A45','C0A545','C0E0DA','C0E7F3','C0F7FE','C0F7FE','C0FF97','C17753','C269FE','C27E3A',
  47. 'C47557','C48484','C4ABFE','C6C6FF','C79BF2','C87C5B','C88E8E','C8B400','C8C800','C98767','C98A4B','C9DECB','C9EAF3','CA00CA','CACAFF','CAFEB8',
  48. 'CAFFD8','CB59E8','CB59E8','CB876D','CBC5F5','CC0000','CC0033','CC0066','CC0099','CC00CC','CC00FF','CC3300','CC3333','CC3366','CC3399','CC33CC',
  49. 'CC33FF','CC6600','CC6633','CC6666','CC6699','CC66CC','CC66FF','CC9900','CC9933','CC9966','CC9999','CC99CC','CC99FF','CCCC00','CCCC33','CCCC66',
  50. 'CCCC99','CCCCCC','CCCCCC','CCCCFF','CCFF00','CCFF33','CCFF66','CCFF99','CCFFCC','CCFFFF','CD85FE','CDD11B','CEA8F4','CEB86C','CEDEF4','CEF0FF',
  51. 'CEFFFD','CF8D72','CFE7E2','CFFEF0','D0977B','D0BCFE','D0E6FF','D19C67','D1A0A0','D1D17A','D1FFB3','D29680','D2FFC4','D54FD5','D568FD','D698FE',
  52. 'D69E87','D6C485','D6F8DE','D73E68','D7ACAC','D7D1F8','D7D78A','D881ED','D8F0F8','D900D9','D97BFD','D9C400','D9F3FF','DAA794','DAAC96','DAAF85',
  53. 'DB00DB','DB9900','DBBFF7','DBDB97','DBDBFF','DBEADC','DBEBFF','DBF0F7','DCEDEA','DD597D','DD75DD','DD75DD','DD88FD','DDB791','DDB9B9','DDCEFF',
  54. 'DDDDDD','DDFED1','DEB19E','DECF9C','DFA800','DFB0FF','DFB4A4','DFDF00','DFE32D','DFFFCA','E0BBA9','E0E04E','E0EAF8','E1CAF9','E1E1A8','E1E1FF',
  55. 'E1FFFE','E29BFD','E37795','E3D6AA','E3E0FA','E3FBE9','E3FBE9','E469FE','E4C0B1','E4C6A7','E697E6','E6C5B9','E6CCCC','E6CE00','E6DBFF','E6E671',
  56. 'E6FCFF','E77AFE','E7A9FE','E7F3F1','E7FFDF','E8C6FF','E8CCBF','E8FFD9','E994AB','E9D0B6','E9E9BE','E9E9C0','E9F1EA','EA8DFE','EAA400','EAA6EA',
  57. 'EACDC1','EADFBF','EAEA8A','EAF1FB','EAF7FB','EAFEE2','EAFFEF','EAFFEF','EBD0C7','ECD5CA','ECD9D9','ECF4FF','ECFAFF','ED9EFE','EDA9BC','EDBEFE',
  58. 'EDDFFB','EDE4C9','EDEF85','EEBBEE','EEDCC8','EEEEA2','EEEECE','EEEECE','EEEEEE','EEEEFF','EEEEFF','EEF093','EFA9FE','EFCDF8','EFCDF8','EFD7FF',
  59. 'EFE7CF','EFEDFC','EFF9FC','F0B9C8','F0C4F0','F0CBFE','F0DCD5','F0DDD5','F0DDD5','F1ECFF','F1F1B1','F1F1D6','F1FEED','F206FF','F2BCFE','F2E4D5',
  60. 'F2F4B3','F2F9F8','F2FFEA','F2FFFE','F3E7E7','F3F8F4','F4CAD6','F4D2F4','F4D2F4','F4DCFE','F4F4BF','F5CAFF','F5E7E2','F5E8E2','F5E8E2','F5EEFD',
  61. 'F5EFE0','F5F5E2','F5F7C4','F5FFF2','F70000','F7DE00','F7F5FE','F7F7CE','F7F9D0','F7FBFA','F7FFFD','F8DAE2','F8E9FC','F8F1F1','F8FBFE','F900F9',
  62. 'F9BB00','F9D9FF','F9EEFF','F9EFEC','F9F3EC','F9F5EC','F9F9DD','F9F9FF','F9FCFF','F9FDFF','F9FEFF','F9FFFB','FAE7EC','FAECFF','FAF2EF','FAFBDF',
  63. 'FAFDFE','FAFEFB','FAFFF7','FBF9FF','FBFBE8','FBFDFB','FCF7F5','FCF9F5','FCFCE9','FDF2FF','FDF9FD','FDF9FF','FDFAF9','FDFAF9','FDFBFB','FDFCF9',
  64. 'FDFDF0','FDFDF9','FDFDFF','FDFEFF','FDFFFD','FDFFFF','FE67EB','FE67EB','FE8BF0','FE98F1','FEA9F3','FEFAFB','FEFDFF','FEFDFF','FEFEFA','FF0000',
  65. 'FF0033','FF0066','FF0099','FF00CC','FF00FF','FF2626','FF2DFF','FF3300','FF3333','FF3366','FF3399','FF33CC','FF33FF','FF4848','FF4AFF','FF5353',
  66. 'FF62B0','FF6600','FF6633','FF6666','FF6699','FF66CC','FF66FF','FF68DD','FF7373','FF73B9','FF7575','FF79E1','FF7DFF','FF800D','FF86C2','FF86E3',
  67. 'FF86FF','FF8A8A','FF8E8E','FF9331','FF9797','FF97CB','FF97E8','FF9900','FF9933','FF9966','FF9999','FF99CC','FF99FF','FF9C42','FFA04A','FFA4A4',
  68. 'FFA4FF','FFA8A8','FFA8D3','FFA8FF','FFAB60','FFAC62','FFACEC','FFACEC','FFB428','FFB5B5','FFB60B','FFBB7D','FFBBBB','FFBBDD','FFBBF7','FFBBFF',
  69. 'FFBD82','FFBE28','FFBF48','FFC48E','FFC4FF','FFC65B','FFC848','FFC895','FFC8C8','FFC8E3','FFC8F2','FFCAF9','FFCB2F','FFCC00','FFCC33','FFCC66',
  70. 'FFCC99','FFCCCC','FFCCFF','FFCE73','FFCEA2','FFCECE','FFCEFF','FFCFA4','FFD062','FFD34F','FFD586','FFD7B3','FFD9B7','FFDBFB','FFDD75','FFDEA2',
  71. 'FFDFDF','FFDFEF','FFDFF8','FFDFFF','FFE099','FFE1C6','FFE2C8','FFE3FF','FFE699','FFE6B5','FFE6D0','FFE920','FFEAB7','FFEAC4','FFEAEA','FFEAEA',
  72. 'FFEBD9','FFECB0','FFECEC','FFECF5','FFECFF','FFEEFB','FFEEFD','FFF06A','FFF1C6','FFF1E6','FFF284','FFF2D2','FFF2D9','FFF2F2','FFF4EA','FFF5D7',
  73. 'FFF7B7','FFF7E6','FFF9CE','FFF9EA','FFF9F4','FFF9FC','FFF9FE','FFF9FF','FFFAEA','FFFBDF','FFFDF7','FFFDF9','FFFDF9','FFFDFD','FFFDFF','FFFDFF',
  74. 'FFFEF7','FFFEFB','FFFEFD','FFFF00','FFFF33','FFFF66','FFFF84','FFFF99','FFFF99','FFFFAA','FFFFB5','FFFFC8','FFFFCC','FFFFD7','FFFFE3','FFFFFD',
  75. 'FFFFFF','FFFFFF','FFFFFF'
  76. );
  77. var browser_level;
  78. if (window.top != window.self) {
  79. browser_level = window.self;
  80. }
  81. else browser_level = window.top;
  82. //alert(window.self == browser_level);
  83. var ckedit_path;
  84. if(browser_level.JSINFO['ckg_canonical']) {
  85. ckedit_path = browser_level.DOKU_BASE + 'lib/plugins/ckgedit/ckeditor/';
  86. config.doku_url = browser_level.DOKU_BASE;
  87. config.ckedit_path = browser_level.DOKU_BASE + 'lib/plugins/ckgedit/ckeditor/';
  88. }
  89. else {
  90. ckedit_path = window.location.protocol +'//' + browser_level.dokuBase + 'lib/plugins/ckgedit/ckeditor/';
  91. config.doku_url = window.location.protocol+ '//' + browser_level.dokuBase;
  92. config.ckedit_path = window.location.protocol +'//' + browser_level.dokuBase + 'lib/plugins/ckgedit/ckeditor/';
  93. }
  94. config.jquery = browser_level.jQuery;
  95. // config.format_code = { element : 'code', attributes : { 'class' : 'dwcode' } };
  96. // Define changes to default configuration here.
  97. // For the complete reference:
  98. // http://docs.ckeditor.com/#!/api/CKEDITOR.config
  99. config.scayt__disable = false;
  100. browser_level.ckgedit_language_chk(config); //resets language if $conf['other_lang'] != 'default' and resets auto scayt to true of false
  101. // config.scayt_autoStartup = true;
  102. config.format_tags = 'p;h1;h2;h3;h4;h5';
  103. config.extraSpecialChars = ['↔'];
  104. config.extraPlugins = 'signature,footnote,shortcuts,fontAssist,tags,timestamp,headerbuttons,geshi,wrap,truetype'; //,pastebase64',devtools';
  105. config.contentsLangDirection = '';
  106. if( browser_level.ckgedit_isRTL()) config.contentsLangDirection = 'rtl';
  107. config.pasteFromWordRemoveFontStyles = false; // preserve font style when "paste from word"
  108. config.pasteFromWordRemoveStyles = false; // preserve style (color) when "paste from word"
  109. config.allowedContent=true; // preserve highlight when "paste from word"
  110. config.removeButtons = browser_level.remove_styling();
  111. var font_assist = 'FontAssist';
  112. //config.removeButtons = 'TextColor,BGColor, FontAssist,Font,FontSize';
  113. if(config.removeButtons.match(/FontAssist/)) font_assist = "";
  114. config.addPaste = function () {
  115. config.extraPlugins +=',pastebase64';
  116. }
  117. config.skin = browser_level.getCKEditorGUI() ? browser_level.getCKEditorGUI() : 'moono';
  118. //alert(browser_level.getCKEditorGUI());
  119. config.wrapSyntaxDiv = browser_level.JSINFO['wrapDiv'] ;
  120. config.wrapSyntaxSpan = browser_level.JSINFO['wrapSpan'] ;
  121. config.ToolBarItemsAlt = {
  122. 'Signature':'Signature' ,'Footnotes':'Footnotes','Scayt':'Scayt'
  123. };
  124. if(browser_level.JSINFO['wrapDiv']) {
  125. config.wrapSyntaxDiv = browser_level.JSINFO['wrapDiv'];
  126. }
  127. else config.wrapSyntaxDiv = "";
  128. if(browser_level.JSINFO['wrapSpan']) {
  129. config.wrapSyntaxSpan = browser_level.JSINFO['wrapSpan'];
  130. }
  131. else config.wrapSyntaxSpan = "";
  132. if(config.scayt__disable) {
  133. config.ToolBarItemsAlt['Scayt'] = "";
  134. config.disableNativeSpellChecker = false;
  135. }
  136. var xtra = browser_level.extra_plugins(config);
  137. if(!xtra) {
  138. xtra = 'Msword,Geshi';
  139. }
  140. else {
  141. var xtras = xtra.split(',');
  142. if(xtras.indexOf('Msword') == -1) {
  143. xtra += ',Msword';
  144. }
  145. if(xtras.indexOf('Geshi') == -1) {
  146. xtra += ',Geshi';
  147. }
  148. }
  149. if (browser_level.JSINFO['has_tags']) {
  150. xtra+=',Tags';
  151. }
  152. if(browser_level.JSINFO['has_wrap']) {
  153. xtra+=',Wrap';
  154. }
  155. config.ToolBarItemsExtra = "";
  156. if(xtra) {
  157. config.ToolBarItemsExtra = xtra.split(',');
  158. if(xtra) {
  159. config.extraPlugins += ',' + xtra.toLowerCase();
  160. }
  161. }
  162. config.toolbar_Dokuwiki =
  163. [
  164. {name: 'header_buttons', items: ['same_header', 'lower_header', 'higher_header', 'none_header']},
  165. { name: 'basicstyles', items : [ 'Bold','Italic','Underline', 'TrueType', 'Strike','Subscript','Superscript','-','RemoveFormat' ] },
  166. { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-'] },
  167. { name: 'insert', items : [ 'Image','Table','HorizontalRule','Smiley','SpecialChar', config.ToolBarItemsAlt['Signature'] ,config.ToolBarItemsAlt['Footnotes'] ]},
  168. { name: 'links', items : [ 'Link','Unlink' ] },
  169. { name: 'styles', items : [ 'Format', 'Styles' ,'Font','FontSize'] },
  170. { name: 'colors', items : [ 'TextColor','BGColor', font_assist ] },
  171. { name: 'paragraph', items : [ 'NumberedList','BulletedList','Indent','Outdent','Blockquote'] },
  172. { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
  173. { name: 'basicstyles', items: [ 'basicstyles', 'cleanup',config.ToolBarItemsAlt['Scayt'] ] },
  174. { name: 'tools', items : ['Source', 'Maximize','-','About'] },
  175. {name: 'extras', items: config.ToolBarItemsExtra }
  176. ];
  177. config.toolbar_DokuwikiNoGuest =
  178. [
  179. { name: 'styles', items : [ 'Source'] },
  180. { name: 'tools', items : [ 'About' ] }
  181. ];
  182. config.toolbar_DokuwikiGuest =
  183. [
  184. { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
  185. { name: 'editing', items : [ 'Find','Replace','-','SelectAll'] },
  186. { name: 'insert', items : [ 'Table','HorizontalRule','Smiley','SpecialChar', 'Footnotes'] },
  187. { name: 'styles', items : [ 'Format', 'Styles' ] },
  188. { name: 'paragraph', items : [ 'NumberedList','BulletedList','Indent','Outdent'] },
  189. { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','-','Undo','Redo' ] },
  190. { name: 'basicstyles', items: [ 'basicstyles', 'cleanup' ] },
  191. { name: 'tools', items : [ 'Maximize','-','About' ] },
  192. ];
  193. config.wrap_lang;
  194. var params = 'call=wrap_lang&lang=' + CKEDITOR.lang.detect( 'en' ) ;
  195. var get_wrap_lang = function() {
  196. config.jquery.post(
  197. config.doku_url + 'lib/exe/ajax.php',
  198. params ,
  199. function (data,status) {
  200. if(status == "success") {
  201. config.wrap_lang = JSON.parse(data);
  202. }
  203. else alert('lang failed');
  204. },
  205. 'html'
  206. );
  207. }
  208. get_wrap_lang();
  209. config.dokuSmileyPath = config.doku_url + 'lib/images/smileys/';
  210. config.dokuSmileyImages =
  211. [['8-)','icon_cool.gif'],
  212. ['8-O','icon_eek.gif'],
  213. [':-(','icon_sad.gif'],
  214. [':-)','icon_smile.gif'],
  215. ['=)','icon_smile2.gif'],
  216. [':-/','icon_doubt.gif'],
  217. [':-?','icon_confused.gif'],
  218. [':-D','icon_biggrin.gif'],
  219. [':-P','icon_razz.gif'],
  220. [':-O','icon_surprised.gif'],
  221. [':-X','icon_silenced.gif'],
  222. [':-|','icon_neutral.gif'],
  223. [';-)','icon_wink.gif'],
  224. ['^_^','icon_fun.gif'],
  225. [':?:','icon_question.gif'],
  226. [':!:','icon_exclaim.gif'],
  227. ['LOL','icon_lol.gif']];
  228. function do_smileys() {
  229. config.jquery.post(
  230. ckedit_path + "dwsmileys.php",
  231. function(data,status) {
  232. if(status == "success") {
  233. config.dokuSmileyConfImages = new Array();
  234. smileys = data.replace(/#.*?\n/g,"");
  235. smileys = smileys.replace(/^[\s\n]+$/mg,"");
  236. smileys=smileys.split(/\n/);
  237. if(!smileys[0]) smileys.shift();
  238. if(!smileys[smileys.length-1]) smileys.pop();
  239. for(var i=0; i < smileys.length; i++) {
  240. var a = smileys[i].split(/\s+/);
  241. if(a[0].match(/DELETEME/) || a[0].match(/FIXME/)) {
  242. config.dokuFixmeSmiley.push( a);
  243. continue;
  244. }
  245. else if(a[0].match(/^([A-Z])+$/) && (!a[0].match(/^LOL$/))) {
  246. config.dokuLargeSmiley.push(a);
  247. config.dokuSmileyConfImages[i] =" ";
  248. continue;
  249. }
  250. else config.dokuSmileyConfImages[i] = a;
  251. }
  252. }
  253. },
  254. 'html'
  255. );
  256. }
  257. config.removePlugins = 'liststyle';
  258. config.dokuFixmeSmiley = new Array();
  259. config.dokuLargeSmiley = new Array();
  260. config.dokuSmileyConfImages;
  261. try {
  262. do_smileys();
  263. }catch(ex){
  264. }
  265. config.ckgProtocols = "";
  266. var get_dw_protocols = function() {
  267. config.jquery.post(
  268. ckedit_path + "schemes.php",
  269. function (data,status) {
  270. if(status == "success") {
  271. config.ckgProtocols=data;
  272. } else config.ckgProtocols = 'no data';
  273. },
  274. 'html'
  275. );
  276. }
  277. get_dw_protocols();
  278. config.ckgEditorVer;
  279. var get_ckgeditor_version = function() {
  280. config.jquery.post(
  281. ckedit_path + "get_version.php",
  282. function (data,status) {
  283. if(status == "success") {
  284. config.ckgEditorVer=data;
  285. }
  286. else config.ckgEditorVer = "Dokuwiki plugin: ckgedit";
  287. },
  288. 'html'
  289. );
  290. }
  291. var getIwikiData = function() {
  292. config.jquery.ajax({
  293. method: "POST",
  294. url: config.doku_url + 'lib/exe/ajax.php',
  295. data: { call: 'iwiki_list'},
  296. async: true,
  297. dataType: "json",
  298. })
  299. .done(function(data)
  300. {
  301. retv = data;
  302. config.ckgeditIwikiData = retv;
  303. })
  304. .fail(function(jqXHR, textStatus, errorThrown )
  305. {
  306. alert(textStatus);
  307. alert(errorThrown);
  308. });
  309. };
  310. getIwikiData();
  311. var SelectOptions = function() {
  312. var retv;
  313. config.jquery.ajax(
  314. config.doku_url + 'lib/exe/ajax.php',
  315. {
  316. data:
  317. {
  318. call: 'geshi_sel'
  319. },
  320. type: "GET",
  321. dataType: "html",
  322. success: function(data, textStatus, jqXHR)
  323. {
  324. config.geshi_opts = data;
  325. },
  326. error: function(jqXHR, textStatus, errorThrown )
  327. {
  328. alert(textStatus);
  329. alert(errorThrown);
  330. }
  331. }
  332. );
  333. // return retv;
  334. };
  335. SelectOptions();
  336. config.filebrowserWindowWidth='60%';
  337. config.filebrowserWindowHeight = '60%';
  338. //config.filebrowserWindowFeatures = 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes,left=20';
  339. get_ckgeditor_version();
  340. CKEDITOR.lang['default'] = {};
  341. CKEDITOR.lang['default']['fbrowser'] = {
  342. FileBrowserError_101: 'Folder already exists.',
  343. FileBrowserError_102: 'Invalid folder name',
  344. FileBrowserError_103: 'You have no permissions to create the folder.',
  345. FileBrowserError_110: 'Unknown error creating folder',
  346. FileBrowserError_201: 'A file with the same name is already available. The uploaded file has been renamed to: ',
  347. FileBrowserError_202: 'Invalid file',
  348. FileBrowserError_203: 'You do not have permission to upload files to this folder. If you think this is incorrect please notify your administrator.',
  349. FileBrowserError_204: 'Unable to delete the selected file',
  350. FileBrowserError_205: 'Unable to rename the selected file; check your directory/write permisssions',
  351. FileBrowserError_206: ' already exists; you must either delete or rename it. ',
  352. FileBrowserError_default: 'Error on your request. Error number: ',
  353. FileBrowserError_Ajax: 'Your browser does not support AJAX.',
  354. FileBrowserError_XML: 'The server didn\'t reply with a proper XML data. Please check your configuration.' ,
  355. FileBrowserError_Folder_Submit: 'Please type the folder name.',
  356. FileBrowserError_File_Submit: 'Please select a file from your computer',
  357. FileBrowserError_Upload: 'Error on upload. Error number: ',
  358. FileBrowserError_Connector: 'The connector is disabled. Check editor/filemanager/connectors/php/config.php',
  359. FileBrowserError_Command: 'Unsupported command: ',
  360. FileBrowserError_Type: 'Invalid type specified: ',
  361. FolderMoveWarning: 'You can only move files to a folder one level below the current directory',
  362. FileBrowserError_301: "The uploaded file exceeds the upload_max_filesize directive in php.ini.",
  363. FileBrowserError_302: "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.",
  364. FileBrowserError_303: "The uploaded file was only partially uploaded.",
  365. FileBrowserError_304: "No file was uploaded.",
  366. FileBrowserError_306: "Missing a temporary folder.",
  367. FileBrowserError_307: "Failed to write file to disk.",
  368. FileBrowserError_308: "PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help.",
  369. DlgFileBrowserUpMsg: "Upload a new file in this folder",
  370. DlgFileBrowserRead : "read-only",
  371. DlgFileBrowserWrite : "uploadable",
  372. DlgFileBrowserNewFolder: "Create Folder",
  373. DlgFileBrowserResourceType: "Resource Type",
  374. DlgLnkUpload : "Upload",
  375. DlgFileBrowserMove: "Move",
  376. InternalLink: "internal link",
  377. InternalMedia: "internal media",
  378. MediaFileLink: "link to media file",
  379. SMBLabel: "Samba Share",
  380. GetHeadingsLabel: 'Get Headings' ,
  381. QStringLabel: 'Query String (For example: value_1=1&value_2=2) ',
  382. ResetQS: 'Reset Query String',
  383. NotSetOption: 'Not Set',
  384. AdvancedInfo: "To create anchors from Dokuwiki headers, click on the Get Headings button, select the header, click OK. You can go back, select a new page and get new headers.",
  385. AdvancedTabPrompt: 'Use the advanced tab to create page anchors and query strings',
  386. SMBExample: "Enter your share as: \\\\Server\\directory\\file",
  387. InterWikiLink: "Interwiki Link",
  388. DlgFileBrowserWaitingMsg: 'Loading files, please wait.',
  389. };
  390. CKEDITOR.lang['default']['footnote'] = {
  391. FootNoteInfo: '<div style="padding: 18px;font-size:125%;line-height:125%;">'+
  392. '<ul style="list-style-type:disc;"><li>To create a footnote enter the footnote text into the editing box and click OK</li>'+
  393. '<li>To edit a footnote enter the footnote id into the id box and click the Load button. <br /> The footnote will '+
  394. 'appear in the editing box, where you can then edit it.<br /> When you are finished editing, click OK to save.</li>'+
  395. '<li> A footnote id has this form: <b>fckgL_&lt;n&gt;</b>, where n is the number of the note.</li></ul></div>',
  396. ToolTip: 'Insert a footnote',
  397. Settings: 'Settings',
  398. Header: 'This dialog window lets you create and edit footnotes.',
  399. Label_1 :'Footnote Text (required)',
  400. Label_2: 'Footnote Id: ',
  401. LoadButtonLabel : 'Load Note In Editor',
  402. Title : 'Footnote Dialog',
  403. Validate: 'The footnote text field cannot be empty.',
  404. };
  405. CKEDITOR.lang['default']['fontassist'] = {
  406. Title: 'Font Plugin Editor',
  407. ToolTip: 'Check and Revise Font Styling',
  408. MainHeader: 'View and optionally alter text styled with the font plugin .',
  409. SelectColor : ' Select Color',
  410. SelectedTextColor : 'Selected Text Color',
  411. SelectedBGColor : 'Selected Background Color',
  412. BGColors : 'Background Colors',
  413. InfoText : '<div style="max-width:400px; font-size: 12pt; white-space: pre-wrap;border:1px solid #cccccc; margin:auto; height: 350px; overflow:auto;">' +
  414. 'This tool works with the font plugin and is used to update the font plugin\'s syntax and/or view its enclosed text. ' +
  415. 'Clicking anywhere on the plugin syntax or its text will enable you to check the appearance of the font, its colors, and its size.'+
  416. '<br /><br />You can also update the plugin syntax in place. To do this you must select both the font syntax itself and the enclosed text:' +
  417. '<p style="text-indent: 50px; font-size: 12pt;"> &lt;font. . . &gt;text&lt;/font&gt;</p>' +
  418. 'Then whatever changes you make with this tool can be inserted into the editor window, by clicking OK, and will replace the current font syntax. ' +
  419. '<br /><br />The font syntax will appear in the textbox below the display window and is updated with each change. '+
  420. 'Clicking on the text will select the text for copying.</div>',
  421. Main: 'Main',
  422. Text : 'Text',
  423. IfChecked : ' If checked, uncheck to activate OK button',
  424. Fonts : 'Fonts',
  425. FontSizes : 'Font Sizes (px)',
  426. ResetFont : 'Reset font',
  427. ResetAll : 'Reset all',
  428. TextColors : 'Text Colors',
  429. Accept :'Accept',
  430. Reset : 'Reset',
  431. none : 'none',
  432. };
  433. CKEDITOR.lang['default']['signature'] = {
  434. ToolTip: 'Insert signature'
  435. };
  436. config.allowedContent = true;
  437. }; //end config.js