]>
git.immae.eu Git - perso/Immae/Projets/packagist/connexionswing-ckeditor-component.git/blob - sources/plugins/find/plugin.js
a87393b55be868392b838cbda20b7a53d3d81de3
2 * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
6 CKEDITOR
.plugins
.add( 'find', {
8 // jscs:disable maximumLineLength
9 lang: 'af,ar,bg,bn,bs,ca,cs,cy,da,de,de-ch,el,en,en-au,en-ca,en-gb,eo,es,et,eu,fa,fi,fo,fr,fr-ca,gl,gu,he,hi,hr,hu,id,is,it,ja,ka,km,ko,ku,lt,lv,mk,mn,ms,nb,nl,no,pl,pt,pt-br,ro,ru,si,sk,sl,sq,sr,sr-latn,sv,th,tr,tt,ug,uk,vi,zh,zh-cn', // %REMOVE_LINE_CORE%
10 // jscs:enable maximumLineLength
11 icons: 'find,find-rtl,replace', // %REMOVE_LINE_CORE%
12 hidpi: true, // %REMOVE_LINE_CORE%
13 init: function( editor
) {
14 var findCommand
= editor
.addCommand( 'find', new CKEDITOR
.dialogCommand( 'find' ) );
15 findCommand
.canUndo
= false;
16 findCommand
.readOnly
= 1;
18 var replaceCommand
= editor
.addCommand( 'replace', new CKEDITOR
.dialogCommand( 'replace' ) );
19 replaceCommand
.canUndo
= false;
21 if ( editor
.ui
.addButton
) {
22 editor
.ui
.addButton( 'Find', {
23 label: editor
.lang
.find
.find
,
28 editor
.ui
.addButton( 'Replace', {
29 label: editor
.lang
.find
.replace
,
35 CKEDITOR
.dialog
.add( 'find', this.path
+ 'dialogs/find.js' );
36 CKEDITOR
.dialog
.add( 'replace', this.path
+ 'dialogs/find.js' );
41 * Defines the style to be used to highlight results with the find dialog.
43 * // Highlight search results with blue on yellow.
44 * config.find_highlight = {
46 * styles: { 'background-color': '#ff0', color: '#00f' }
50 * @member CKEDITOR.config
52 CKEDITOR
.config
.find_highlight
= { element: 'span', styles: { 'background-color': '#004', color: '#fff' } };