User Tools

Site Tools


ru:how_to:editor_configuration_syntaxhighlight

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
ru:how_to:editor_configuration_syntaxhighlight [2013/10/21 08:59]
Arkady [Загрузите плагин на сервер]
ru:how_to:editor_configuration_syntaxhighlight [2013/10/21 09:04]
Arkady [Интеграция подсветки с GetSimple]
Line 12: Line 12:
 Разархивируйте его в папку на локальной машине и загрузите эту папку в директорию плагинов редактора //​admin/​template/​js/​ckeditor/​plugins//​. Разархивируйте его в папку на локальной машине и загрузите эту папку в директорию плагинов редактора //​admin/​template/​js/​ckeditor/​plugins//​.
 ===== Интеграция подсветки с GetSimple ===== ===== Интеграция подсветки с GetSimple =====
-You will need a separate ​[[ru:​how_to:​editor_configuration_custom_files|CKEditor-configuration file]] if you don't have one alreadyAdd the following 2 lines to the custom config-file: \\+Для активации подсветки синтаксиса понадобится отдельный ​[[ru:​how_to:​editor_configuration_custom_files|пользовательский файл конфигурации]] редактора,​ если вы еще такой файл не создали ранееДобавьте в этот файл две строки:\\
 <​code>​ <​code>​
 CKEDITOR.editorConfig = function( config ){ CKEDITOR.editorConfig = function( config ){
Line 22: Line 22:
 </​code>​ </​code>​
  
-If you have defined ​extraPlugins ​alreadyadd '//​syntaxhighlight//' ​to that comma-separated list,for example:\\+Если вы уже указывали параметр ​extraPlugins, ​добавьте к значению ​'//​syntaxhighlight//' ​через запятуюнапример:\\ 
 <​code>​ <​code>​
 config.extraPlugins = '​fileicon,​video,​syntaxhighlight','​templates',​ config.extraPlugins = '​fileicon,​video,​syntaxhighlight','​templates',​
 </​code>​ </​code>​
  
-If you haven'​t done already, define the custom-config-file in the [[ru:​how_to:​editor_configuration_custom_files|GetSimple-Configuration file gsconfig.php]]+Если это пока не было сделано – укажите свой ​[[ru:​how_to:​editor_configuration_custom_files|файл пользовательской конфигурации]] редактора в файле ​gsconfig.php
 + 
 +Для вывода кнопки подсветки синтаксиса на панель инструментов необходимо прописать эту опцию в параметре GSEDITORTOOL в файле gsconfig.php,​ например,​ вместо стандартной строки ​
  
-To show the button for the Syntax-Highlighter,​ you have to define that in the section "​Editortoolbar"​ in gsconfig.php:​ 
-an example: instead the standard-entry  ​ 
 <​code>#​ WYSIWYG toolbars (advanced, basic or [custom config]) <​code>#​ WYSIWYG toolbars (advanced, basic or [custom config])
 define('​GSEDITORTOOL',​ '​advanced'​);</​code>​ define('​GSEDITORTOOL',​ '​advanced'​);</​code>​
  
-define the buttons+определите следующие кнопки панелей инструментов 
 <​code>​ <​code>​
 define('​GSEDITORTOOL',"​['​Source','​Cut','​Copy','​Paste','​PasteText','​PasteFromWord','​Undo','​Redo','​Find','​Replace','​SelectAll','​RemoveFormat'​],​ define('​GSEDITORTOOL',"​['​Source','​Cut','​Copy','​Paste','​PasteText','​PasteFromWord','​Undo','​Redo','​Find','​Replace','​SelectAll','​RemoveFormat'​],​
Line 47: Line 48:
  "​);</​code>​  "​);</​code>​
  
-you see the option ​<​code>​['​Code'​]</​code>​? This places the Syntax-Highlighter-Button in your toolbar.+Опция ​<​code>​['​Code'​]</​code> ​размещает кнопку подсветки синтаксиса на панели инструментов редактора
  
 ===== Отредактируйте файл template.php вашей темы ​ ===== ===== Отредактируйте файл template.php вашей темы ​ =====
ru/how_to/editor_configuration_syntaxhighlight.txt · Last modified: 2013/10/21 09:04 by Arkady