User Tools

Site Tools


ru:how_to:editor_configuration_more_options

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ru:how_to:editor_configuration_more_options [2013/10/18 07:35]
Arkady [More Colors for Text and Background]
ru:how_to:editor_configuration_more_options [2013/10/18 07:54]
Arkady [Necessary modifications:]
Line 122: Line 122:
   ");   ");
 </​code>​ </​code>​
-===== Entities and Special Characters ​=====+===== Специальные символы и сущности ​=====
  
-By defaultthe editor converts special characters like umlauts ​(üäö ​...to their HTML-equivalents.\\ This is not needed anymore if you encode your pages in UTF-8. So you can set this option to //false//.+По умолчанию редактор конвертирует специальные символынапример,​ умлауты ​(üäö ​в их HTML-эквиваленты (сущности).\\ Эта опция не требуется,​ если ваши страницы кодируются в UTF-8, поэтому можно ее выключить,​ установив параметр //​entities//​ в //false//.
  
 +<​code>​
   # WYSIWYG Editor Options   # WYSIWYG Editor Options
   define('​GSEDITOROPTIONS',"​skin : '​v2', ​   define('​GSEDITOROPTIONS',"​skin : '​v2', ​
Line 137: Line 138:
   entities : false   entities : false
   ");   ");
-===== Language Direction ​=====+</​code>​ 
 +===== Направление чтения или письма ​===== 
 +Во многих языках чтение и письмо осуществляются слева направо. Примером могут служить немецкий,​ английский,​ русский языки.\\ 
 +В некоторых других языках,​ например,​ в арабском,​ фарси, иврите чтение выполняется справа налево.\\  
 +Существуют языки с направлением чтения и письма сверху вниз и снизу вверх.\\ 
 +По умолчанию редактор применяет настройку пользовательского интерфейса (например,​ настройку браузера). 
 +Поведение редактора можно поменять,​ явным образом указав направление чтения и письма в параметре //​contentsLangDirection//​
  
-In many languages the //​reading-//​ or //​write-direction//​ is from left to right. In German, English, French or whatever. \\ In other languages the reading-direction goes from right to left: in Arabic, Farsi, Hebrew and many others.\\ Other languages go from Top to Down or from Down to Top.  
- 
-The editor follows per default the settings of the //user interface language direction// (f.e. your browser-settings).\\ If this does not work correctly or you want to force the direction, set the option //​contentsLangDirection//​ 
 {{:​how_to:​ckeditor-rtl.jpg|}} {{:​how_to:​ckeditor-rtl.jpg|}}
 +<​code>​
   # WYSIWYG Editor Options   # WYSIWYG Editor Options
   define('​GSEDITOROPTIONS',"​skin : '​v2', ​   define('​GSEDITOROPTIONS',"​skin : '​v2', ​
Line 155: Line 160:
   contentsLangDirection : '​rtl'​   contentsLangDirection : '​rtl'​
   ");   ");
-  ​ +</​code>​ 
-The editor allows 3 options:  + 
-  - ''​ui''​ = as defined by the user interaction interface ​(default+Опция contentsLangDirection принимает три значения
-  - ''​ltr''​ = left to right  ​ +  - ''​ui''​ = применяется настройка интерфейса пользователя ​(по умолчанию
-  - ''​rtl''​ = right to left+  - ''​ltr''​ = слева направо ​ 
 +  - ''​rtl''​ = справа налево
  
-There is not top-down until now ;=) +Пока направление сверху вниз и снизу вверх не реализовано. ​;=) 
-===== Email Protection =====+
  
-sometimes it is necessary to add some email-adresses into a website. \\ And it is always necessary to protect these adresses from spam-harvesters.+===== Защита Email  ===== 
 +Иногда возникает необходимость размещения на странице сайта ​email-адреса. В этом случае их всегда необходимо защищать от обнаружения спамерскими грабберами и пауками.\\ 
 +Для защиты адреса электронной почты возможна активация внутреннего модуля CKEditor, используя параметр //​emailProtection : '​encode'//​.
  
-You can enable some kind of email protection in the editor options (''​emailProtection : '​encode'''​).\\ See more info here: [[http://​docs.cksource.com/​ckeditor_api/​symbols/​CKEDITOR.config.html#​.emailProtection]]+Дополнительную информацию можно почерпнуть ​[[http://​docs.cksource.com/​ckeditor_api/​symbols/​CKEDITOR.config.html#​.emailProtection|здесь]].
  
-Add to gsconfig.php-editor-options:+Добавьте в файл ''​gsconfig.php''​ в параметр GSEDITOROPTIONS настройку //​emailProtection ​'​encode'//​.  
 + 
 +<​code>​
   # WYSIWYG Editor Options   # WYSIWYG Editor Options
   define('​GSEDITOROPTIONS',"​skin : '​v2', ​   define('​GSEDITOROPTIONS',"​skin : '​v2', ​
Line 182: Line 191:
   emailProtection : '​encode'​   emailProtection : '​encode'​
   ");   ");
-now, whenever you create a mail-link in the editor, that mail-adress will be protected in the source-code+</code>
-{{:​how_to:​ckeditor_mail_protection.jpg|}} +
-===== SpellCheck ===== +
-CKEditor comes with built-in spellchecking feature, which is deactivated by default.  +
-When activated, errors will be marked by a red line below the error.  +
-When you position the cursor over that marked error, the context menu will pop up and show a list of suggestions+
  
-The Spellchecker-feature ​ is named **SCAYT**which means**S**pell**C**heck**A**s**Y**ou**T**ype+Теперьпри размещении на странице email-адреса он будет защищен на странице:
  
-As there are a lot of options for the spell-checker,​ we will describe the basic configuration here.  +{{:how_to:​ckeditor_mail_protection.jpg|}}
-If you want to use more of the options, find out in the  documentation at ckeditor.net,​http://​docs.cksource.com/​ckeditor_api/​symbols/​CKEDITOR.config.html#​.scayt_autoStartup+
  
 +===== Проверка орфографии ​ =====
 +CKEditor поставляется со встроенным модулем проверки орфографии,​ который активирован по умолчанию. При активном модуле орфографические ошибки подчеркиваются красной линией. Если расположить курсор над подчеркнутой ошибкой – появится всплывающее контекстное меню со списком возможных исправлений.
  
-==== Necessary modifications:​ ====+Эта функциональность редактора сокращенно называется **SCAYT**, что означает **S**pell**C**heck**A**s**Y**ou**T**ype (проверка орфографии при вводе).
  
-  - Enable the feature (''​scayt_autoStartup:​true''​) +Для модуля проверки орфографии существует большое количество настроекв этой статье будут описаны только основныеПолный список настроек можно найти в документации [[http://docs.cksource.com/ckeditor_api/symbols/​CKEDITOR.config.html#​.scayt_autoStartup|CKEditor]]
-  - Define the language for the spellchecker (''​scayt_sLang:'​de_DE'''​)\\ The default language is en_USso you should define the language when you need another language\\ Possible values for the languages are: //en_US, en_GB, pt_BR, da_DK, nl_NL, en_CA, fi_FI, fr_FR, fr_CA, de_DE, el_GR, it_IT, nb_NO, pt_PT, es_ES, sv_SE//.  +==== Необходимые изменения====
-  - add the spellchecker-symbols to the toolbar\\ There are 2 symbolsthe symbol ''​Spellchecker''​ opens the text in a dialogue window, allows to choose the language to check with and to correct the text, the second symbol, ''​Scayt''​ opens a pop-up-dialogue to activate / deactivate the spellchecker and to set some options.+
  
-So add //SCAYT-options// to editor-options and //'​Scayt'/​/ to the toolbar in gsconfig.php+  - Включаем проверку орфографии (''​scayt_autoStartup:​true''​) 
 +  - Определяем проверяемый язык ​ (''​scayt_sLang:'​de_DE'''​) \\Язык по умолчанию - //en_US//. \\Возможные значения: ​//en_US, en_GB, pt_BR, da_DK, nl_NL, en_CA, fi_FI, fr_FR, fr_CA, de_DE, el_GR, it_IT, nb_NO, pt_PT, es_ES, sv_SE//.  
 +  - Добавляем кнопки-ссылки модуля проверки орфографии на панель инструментов редактора.\\  
 +Их всего две: ''​Spellchecker''​ загружает текст в диалогове окно, позволяет выбирать язык для проверки и проводить корректировку текста. ''​Scayt'​' открывает диалоговое окно для включения/отключения проверки орфографии и установки некоторых опций.
  
 +Добавляем //​SCAYT-опции//​ к настройкам редактора и строку '''​Scayt'''​ к панели инструментов в файле ''​gsconfig.php''​
 +<​code>​
   # WYSIWYG Editor Options   # WYSIWYG Editor Options
   define('​GSEDITOROPTIONS',"​scayt_autoStartup:​true,​ scayt_sLang:'​de_DE'"​);​   define('​GSEDITOROPTIONS',"​scayt_autoStartup:​true,​ scayt_sLang:'​de_DE'"​);​
Line 211: Line 220:
   '​Redo','​Find','​Replace','​-','​SelectAll','​RemoveFormat','​SpellChecker','​Scayt'​],'/',​   '​Redo','​Find','​Replace','​-','​SelectAll','​RemoveFormat','​SpellChecker','​Scayt'​],'/',​
   ");   ");
-   +</​code>  ​
-**Attention:​** ​+
  
-There is a bug in CKEditor SpellChecker'​s plugin which you should be aware of:+**Внимание:** 
  
-if spellchecker is enabled and **the cursor is placed in a list** (whether unordered or ordered list), do not switch to SourceCode mode+В  плагине CKEditor SpellChecker есть ошибка,​ о существовании которой надо знать.\\ 
-When switching back your list will be "​destroyed"​ because the spellchecker plugin adds superfluous list-elements to the source code+Если проверка орфографии включена и **курсор находится в списке** (неупорядоченном или нумерованном – не имеет значения), не переключайтесь в режим //Source//При переключении назад в режим WYSIWYG ваш список будет поврежден,​ так как модуль проверки орфографии добавит к нему лишние элементы.\\ 
 +Существование этой ошибки проверено для последней на момент написания статьи версии CKEditor (3.6.2), в этой версии она так же присутствует. Это – не ошибка GetSimple, поэтому придется ждать, пока разработчики CK Editor ее исправят.
  
-It's tested with the newest CKEditor version (3.6.2), the bug is still there 
-this is no GetSimple bug, so we have to wait until that bug is fixed in CKEditor 
----- 
ru/how_to/editor_configuration_more_options.txt · Last modified: 2013/10/18 07:54 by Arkady