code stringlengths 1 2.08M | language stringclasses 1 value |
|---|---|
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Galician language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['gl'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Editor toolbars', // MISSING
editor : 'Rich Text Editor', // MISSING
// Toolbar buttons without dialogs.
source : 'Código Fonte',
newPage : 'Nova Páxina',
save : 'Gardar',
preview : 'Vista Previa',
cut : 'Cortar',
copy : 'Copiar',
paste : 'Pegar',
print : 'Imprimir',
underline : 'Sub-raiado',
bold : 'Negrita',
italic : 'Cursiva',
selectAll : 'Seleccionar todo',
removeFormat : 'Eliminar Formato',
strike : 'Tachado',
subscript : 'Subíndice',
superscript : 'Superíndice',
horizontalrule : 'Inserir Liña Horizontal',
pagebreak : 'Inserir Salto de Páxina',
pagebreakAlt : 'Page Break', // MISSING
unlink : 'Eliminar Ligazón',
undo : 'Desfacer',
redo : 'Refacer',
// Common messages and labels.
common :
{
browseServer : 'Navegar no Servidor',
url : 'URL',
protocol : 'Protocolo',
upload : 'Carregar',
uploadSubmit : 'Enviar ó Servidor',
image : 'Imaxe',
flash : 'Flash',
form : 'Formulario',
checkbox : 'Cadro de Verificación',
radio : 'Botón de Radio',
textField : 'Campo de Texto',
textarea : 'Área de Texto',
hiddenField : 'Campo Oculto',
button : 'Botón',
select : 'Campo de Selección',
imageButton : 'Botón de Imaxe',
notSet : '<non definido>',
id : 'Id',
name : 'Nome',
langDir : 'Orientación do Idioma',
langDirLtr : 'Esquerda a Dereita (LTR)',
langDirRtl : 'Dereita a Esquerda (RTL)',
langCode : 'Código do Idioma',
longDescr : 'Descrición Completa da URL',
cssClass : 'Clases da Folla de Estilos',
advisoryTitle : 'Título',
cssStyle : 'Estilo',
ok : 'OK',
cancel : 'Cancelar',
close : 'Close', // MISSING
preview : 'Preview', // MISSING
generalTab : 'General', // MISSING
advancedTab : 'Advanzado',
validateNumberFailed : 'This value is not a number.', // MISSING
confirmNewPage : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?', // MISSING
confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING
options : 'Options', // MISSING
target : 'Target', // MISSING
targetNew : 'New Window (_blank)', // MISSING
targetTop : 'Topmost Window (_top)', // MISSING
targetSelf : 'Same Window (_self)', // MISSING
targetParent : 'Parent Window (_parent)', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Right to Left (RTL)', // MISSING
styles : 'Style', // MISSING
cssClasses : 'Stylesheet Classes', // MISSING
width : 'Largura',
height : 'Altura',
align : 'Aliñamento',
alignLeft : 'Esquerda',
alignRight : 'Dereita',
alignCenter : 'Centro',
alignTop : 'Tope',
alignMiddle : 'Centro',
alignBottom : 'Pé',
invalidHeight : 'Height must be a number.', // MISSING
invalidWidth : 'Width must be a number.', // MISSING
invalidCssLength : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip : 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, unavailable</span>' // MISSING
},
contextmenu :
{
options : 'Context Menu Options' // MISSING
},
// Special char dialog.
specialChar :
{
toolbar : 'Inserir Carácter Especial',
title : 'Seleccione Caracter Especial',
options : 'Special Character Options' // MISSING
},
// Link dialog.
link :
{
toolbar : 'Inserir/Editar Ligazón',
other : '<outro>',
menu : 'Editar Ligazón',
title : 'Ligazón',
info : 'Información da Ligazón',
target : 'Destino',
upload : 'Carregar',
advanced : 'Advanzado',
type : 'Tipo de Ligazón',
toUrl : 'URL', // MISSING
toAnchor : 'Referencia nesta páxina',
toEmail : 'E-Mail',
targetFrame : '<frame>',
targetPopup : '<Xanela Emerxente>',
targetFrameName : 'Nome do Marco Destino',
targetPopupName : 'Nome da Xanela Emerxente',
popupFeatures : 'Características da Xanela Emerxente',
popupResizable : 'Resizable', // MISSING
popupStatusBar : 'Barra de Estado',
popupLocationBar: 'Barra de Localización',
popupToolbar : 'Barra de Ferramentas',
popupMenuBar : 'Barra de Menú',
popupFullScreen : 'A Toda Pantalla (IE)',
popupScrollBars : 'Barras de Desplazamento',
popupDependent : 'Dependente (Netscape)',
popupLeft : 'Posición Esquerda',
popupTop : 'Posición dende Arriba',
id : 'Id', // MISSING
langDir : 'Orientación do Idioma',
langDirLTR : 'Esquerda a Dereita (LTR)',
langDirRTL : 'Dereita a Esquerda (RTL)',
acccessKey : 'Chave de Acceso',
name : 'Nome',
langCode : 'Orientación do Idioma',
tabIndex : 'Índice de Tabulación',
advisoryTitle : 'Título',
advisoryContentType : 'Tipo de Contido',
cssClasses : 'Clases da Folla de Estilos',
charset : 'Fonte de Caracteres Vinculado',
styles : 'Estilo',
rel : 'Relationship', // MISSING
selectAnchor : 'Seleccionar unha Referencia',
anchorName : 'Por Nome de Referencia',
anchorId : 'Por Element Id',
emailAddress : 'Enderezo de E-Mail',
emailSubject : 'Asunto do Mensaxe',
emailBody : 'Corpo do Mensaxe',
noAnchors : '(Non hai referencias disponibles no documento)',
noUrl : 'Por favor, escriba a ligazón URL',
noEmail : 'Por favor, escriba o enderezo de e-mail'
},
// Anchor dialog
anchor :
{
toolbar : 'Inserir/Editar Referencia',
menu : 'Propriedades da Referencia',
title : 'Propriedades da Referencia',
name : 'Nome da Referencia',
errorName : 'Por favor, escriba o nome da referencia',
remove : 'Remove Anchor' // MISSING
},
// List style dialog
list:
{
numberedTitle : 'Numbered List Properties', // MISSING
bulletedTitle : 'Bulleted List Properties', // MISSING
type : 'Type', // MISSING
start : 'Start', // MISSING
validateStartNumber :'List start number must be a whole number.', // MISSING
circle : 'Circle', // MISSING
disc : 'Disc', // MISSING
square : 'Square', // MISSING
none : 'None', // MISSING
notset : '<not set>', // MISSING
armenian : 'Armenian numbering', // MISSING
georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING
lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING
upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING
lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING
upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING
lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING
decimal : 'Decimal (1, 2, 3, etc.)', // MISSING
decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Find and Replace', // MISSING
find : 'Procurar',
replace : 'Substituir',
findWhat : 'Texto a procurar:',
replaceWith : 'Substituir con:',
notFoundMsg : 'Non te atopou o texto indicado.',
findOptions : 'Find Options', // MISSING
matchCase : 'Coincidir Mai./min.',
matchWord : 'Coincidir con toda a palabra',
matchCyclic : 'Match cyclic', // MISSING
replaceAll : 'Substitiur Todo',
replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING
},
// Table Dialog
table :
{
toolbar : 'Tabla',
title : 'Propiedades da Táboa',
menu : 'Propiedades da Táboa',
deleteTable : 'Borrar Táboa',
rows : 'Filas',
columns : 'Columnas',
border : 'Tamaño do Borde',
widthPx : 'pixels',
widthPc : 'percent',
widthUnit : 'width unit', // MISSING
cellSpace : 'Marxe entre Celas',
cellPad : 'Marxe interior',
caption : 'Título',
summary : 'Sumario',
headers : 'Headers', // MISSING
headersNone : 'None', // MISSING
headersColumn : 'First column', // MISSING
headersRow : 'First Row', // MISSING
headersBoth : 'Both', // MISSING
invalidRows : 'Number of rows must be a number greater than 0.', // MISSING
invalidCols : 'Number of columns must be a number greater than 0.', // MISSING
invalidBorder : 'Border size must be a number.', // MISSING
invalidWidth : 'Table width must be a number.', // MISSING
invalidHeight : 'Table height must be a number.', // MISSING
invalidCellSpacing : 'Cell spacing must be a positive number.', // MISSING
invalidCellPadding : 'Cell padding must be a positive number.', // MISSING
cell :
{
menu : 'Cela',
insertBefore : 'Insert Cell Before', // MISSING
insertAfter : 'Insert Cell After', // MISSING
deleteCell : 'Borrar Cela',
merge : 'Unir Celas',
mergeRight : 'Merge Right', // MISSING
mergeDown : 'Merge Down', // MISSING
splitHorizontal : 'Split Cell Horizontally', // MISSING
splitVertical : 'Split Cell Vertically', // MISSING
title : 'Cell Properties', // MISSING
cellType : 'Cell Type', // MISSING
rowSpan : 'Rows Span', // MISSING
colSpan : 'Columns Span', // MISSING
wordWrap : 'Word Wrap', // MISSING
hAlign : 'Horizontal Alignment', // MISSING
vAlign : 'Vertical Alignment', // MISSING
alignBaseline : 'Baseline', // MISSING
bgColor : 'Background Color', // MISSING
borderColor : 'Border Color', // MISSING
data : 'Data', // MISSING
header : 'Header', // MISSING
yes : 'Yes', // MISSING
no : 'No', // MISSING
invalidWidth : 'Cell width must be a number.', // MISSING
invalidHeight : 'Cell height must be a number.', // MISSING
invalidRowSpan : 'Rows span must be a whole number.', // MISSING
invalidColSpan : 'Columns span must be a whole number.', // MISSING
chooseColor : 'Choose' // MISSING
},
row :
{
menu : 'Fila',
insertBefore : 'Insert Row Before', // MISSING
insertAfter : 'Insert Row After', // MISSING
deleteRow : 'Borrar Filas'
},
column :
{
menu : 'Columna',
insertBefore : 'Insert Column Before', // MISSING
insertAfter : 'Insert Column After', // MISSING
deleteColumn : 'Borrar Columnas'
}
},
// Button Dialog.
button :
{
title : 'Propriedades do Botón',
text : 'Texto (Valor)',
type : 'Tipo',
typeBtn : 'Button', // MISSING
typeSbm : 'Submit', // MISSING
typeRst : 'Reset' // MISSING
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'Propriedades do Cadro de Verificación',
radioTitle : 'Propriedades do Botón de Radio',
value : 'Valor',
selected : 'Seleccionado'
},
// Form Dialog.
form :
{
title : 'Propriedades do Formulario',
menu : 'Propriedades do Formulario',
action : 'Acción',
method : 'Método',
encoding : 'Encoding' // MISSING
},
// Select Field Dialog.
select :
{
title : 'Propriedades do Campo de Selección',
selectInfo : 'Info',
opAvail : 'Opcións Disponibles',
value : 'Valor',
size : 'Tamaño',
lines : 'liñas',
chkMulti : 'Permitir múltiples seleccións',
opText : 'Texto',
opValue : 'Valor',
btnAdd : 'Engadir',
btnModify : 'Modificar',
btnUp : 'Subir',
btnDown : 'Baixar',
btnSetValue : 'Definir como valor por defecto',
btnDelete : 'Borrar'
},
// Textarea Dialog.
textarea :
{
title : 'Propriedades da Área de Texto',
cols : 'Columnas',
rows : 'Filas'
},
// Text Field Dialog.
textfield :
{
title : 'Propriedades do Campo de Texto',
name : 'Nome',
value : 'Valor',
charWidth : 'Tamaño do Caracter',
maxChars : 'Máximo de Caracteres',
type : 'Tipo',
typeText : 'Texto',
typePass : 'Chave'
},
// Hidden Field Dialog.
hidden :
{
title : 'Propriedades do Campo Oculto',
name : 'Nome',
value : 'Valor'
},
// Image Dialog.
image :
{
title : 'Propriedades da Imaxe',
titleButton : 'Propriedades do Botón de Imaxe',
menu : 'Propriedades da Imaxe',
infoTab : 'Información da Imaxe',
btnUpload : 'Enviar ó Servidor',
upload : 'Carregar',
alt : 'Texto Alternativo',
lockRatio : 'Proporcional',
resetSize : 'Tamaño Orixinal',
border : 'Límite',
hSpace : 'Esp. Horiz.',
vSpace : 'Esp. Vert.',
alertUrl : 'Por favor, escriba a URL da imaxe',
linkTab : 'Ligazón',
button2Img : 'Do you want to transform the selected image button on a simple image?', // MISSING
img2Button : 'Do you want to transform the selected image on a image button?', // MISSING
urlMissing : 'Image source URL is missing.', // MISSING
validateBorder : 'Border must be a whole number.', // MISSING
validateHSpace : 'HSpace must be a whole number.', // MISSING
validateVSpace : 'VSpace must be a whole number.' // MISSING
},
// Flash Dialog
flash :
{
properties : 'Propriedades Flash',
propertiesTab : 'Properties', // MISSING
title : 'Propriedades Flash',
chkPlay : 'Auto Execución',
chkLoop : 'Bucle',
chkMenu : 'Activar Menú Flash',
chkFull : 'Allow Fullscreen', // MISSING
scale : 'Escalar',
scaleAll : 'Amosar Todo',
scaleNoBorder : 'Sen Borde',
scaleFit : 'Encaixar axustando',
access : 'Script Access', // MISSING
accessAlways : 'Always', // MISSING
accessSameDomain: 'Same domain', // MISSING
accessNever : 'Never', // MISSING
alignAbsBottom : 'Abs Inferior',
alignAbsMiddle : 'Abs Centro',
alignBaseline : 'Liña Base',
alignTextTop : 'Tope do Texto',
quality : 'Quality', // MISSING
qualityBest : 'Best', // MISSING
qualityHigh : 'High', // MISSING
qualityAutoHigh : 'Auto High', // MISSING
qualityMedium : 'Medium', // MISSING
qualityAutoLow : 'Auto Low', // MISSING
qualityLow : 'Low', // MISSING
windowModeWindow: 'Window', // MISSING
windowModeOpaque: 'Opaque', // MISSING
windowModeTransparent : 'Transparent', // MISSING
windowMode : 'Window mode', // MISSING
flashvars : 'Variables for Flash', // MISSING
bgcolor : 'Cor do Fondo',
hSpace : 'Esp. Horiz.',
vSpace : 'Esp. Vert.',
validateSrc : 'Por favor, escriba a ligazón URL',
validateHSpace : 'HSpace must be a number.', // MISSING
validateVSpace : 'VSpace must be a number.' // MISSING
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'Corrección Ortográfica',
title : 'Spell Check', // MISSING
notAvailable : 'Sorry, but service is unavailable now.', // MISSING
errorLoading : 'Error loading application service host: %s.', // MISSING
notInDic : 'Non está no diccionario',
changeTo : 'Cambiar a',
btnIgnore : 'Ignorar',
btnIgnoreAll : 'Ignorar Todas',
btnReplace : 'Substituir',
btnReplaceAll : 'Substituir Todas',
btnUndo : 'Desfacer',
noSuggestions : '- Sen candidatos -',
progress : 'Corrección ortográfica en progreso...',
noMispell : 'Corrección ortográfica rematada: Non se atoparon erros',
noChanges : 'Corrección ortográfica rematada: Non se substituiu nengunha verba',
oneChange : 'Corrección ortográfica rematada: Unha verba substituida',
manyChanges : 'Corrección ortográfica rematada: %1 verbas substituidas',
ieSpellDownload : 'O corrector ortográfico non está instalado. ¿Quere descargalo agora?'
},
smiley :
{
toolbar : 'Smiley',
title : 'Inserte un Smiley',
options : 'Smiley Options' // MISSING
},
elementsPath :
{
eleLabel : 'Elements path', // MISSING
eleTitle : '%1 element' // MISSING
},
numberedlist : 'Lista Numerada',
bulletedlist : 'Marcas',
indent : 'Aumentar Sangría',
outdent : 'Disminuir Sangría',
justify :
{
left : 'Aliñar á Esquerda',
center : 'Centrado',
right : 'Aliñar á Dereita',
block : 'Xustificado'
},
blockquote : 'Block Quote', // MISSING
clipboard :
{
title : 'Pegar',
cutError : 'Os axustes de seguridade do seu navegador non permiten que o editor realice automáticamente as tarefas de corte. Por favor, use o teclado para iso (Ctrl/Cmd+X).',
copyError : 'Os axustes de seguridade do seu navegador non permiten que o editor realice automáticamente as tarefas de copia. Por favor, use o teclado para iso (Ctrl/Cmd+C).',
pasteMsg : 'Por favor, pegue dentro do seguinte cadro usando o teclado (<STRONG>Ctrl/Cmd+V</STRONG>) e pulse <STRONG>OK</STRONG>.',
securityMsg : 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
pasteArea : 'Paste Area' // MISSING
},
pastefromword :
{
confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING
toolbar : 'Pegar dende Word',
title : 'Pegar dende Word',
error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING
},
pasteText :
{
button : 'Pegar como texto plano',
title : 'Pegar como texto plano'
},
templates :
{
button : 'Plantillas',
title : 'Plantillas de Contido',
options : 'Template Options', // MISSING
insertOption : 'Replace actual contents', // MISSING
selectPromptMsg : 'Por favor, seleccione a plantilla a abrir no editor<br>(o contido actual perderase):',
emptyListMsg : '(Non hai plantillas definidas)'
},
showBlocks : 'Show Blocks', // MISSING
stylesCombo :
{
label : 'Estilo',
panelTitle : 'Formatting Styles', // MISSING
panelTitle1 : 'Block Styles', // MISSING
panelTitle2 : 'Inline Styles', // MISSING
panelTitle3 : 'Object Styles' // MISSING
},
format :
{
label : 'Formato',
panelTitle : 'Formato',
tag_p : 'Normal',
tag_pre : 'Formateado',
tag_address : 'Enderezo',
tag_h1 : 'Enacabezado 1',
tag_h2 : 'Encabezado 2',
tag_h3 : 'Encabezado 3',
tag_h4 : 'Encabezado 4',
tag_h5 : 'Encabezado 5',
tag_h6 : 'Encabezado 6',
tag_div : 'Paragraph (DIV)'
},
div :
{
title : 'Create Div Container', // MISSING
toolbar : 'Create Div Container', // MISSING
cssClassInputLabel : 'Stylesheet Classes', // MISSING
styleSelectLabel : 'Style', // MISSING
IdInputLabel : 'Id', // MISSING
languageCodeInputLabel : ' Language Code', // MISSING
inlineStyleInputLabel : 'Inline Style', // MISSING
advisoryTitleInputLabel : 'Advisory Title', // MISSING
langDirLabel : 'Language Direction', // MISSING
langDirLTRLabel : 'Left to Right (LTR)', // MISSING
langDirRTLLabel : 'Right to Left (RTL)', // MISSING
edit : 'Edit Div', // MISSING
remove : 'Remove Div' // MISSING
},
iframe :
{
title : 'IFrame Properties', // MISSING
toolbar : 'IFrame', // MISSING
noUrl : 'Please type the iframe URL', // MISSING
scrolling : 'Enable scrollbars', // MISSING
border : 'Show frame border' // MISSING
},
font :
{
label : 'Tipo',
voiceLabel : 'Font', // MISSING
panelTitle : 'Tipo'
},
fontSize :
{
label : 'Tamaño',
voiceLabel : 'Font Size', // MISSING
panelTitle : 'Tamaño'
},
colorButton :
{
textColorTitle : 'Cor do Texto',
bgColorTitle : 'Cor do Fondo',
panelTitle : 'Colors', // MISSING
auto : 'Automático',
more : 'Máis Cores...'
},
colors :
{
'000' : 'Black', // MISSING
'800000' : 'Maroon', // MISSING
'8B4513' : 'Saddle Brown', // MISSING
'2F4F4F' : 'Dark Slate Gray', // MISSING
'008080' : 'Teal', // MISSING
'000080' : 'Navy', // MISSING
'4B0082' : 'Indigo', // MISSING
'696969' : 'Dark Gray', // MISSING
'B22222' : 'Fire Brick', // MISSING
'A52A2A' : 'Brown', // MISSING
'DAA520' : 'Golden Rod', // MISSING
'006400' : 'Dark Green', // MISSING
'40E0D0' : 'Turquoise', // MISSING
'0000CD' : 'Medium Blue', // MISSING
'800080' : 'Purple', // MISSING
'808080' : 'Gray', // MISSING
'F00' : 'Red', // MISSING
'FF8C00' : 'Dark Orange', // MISSING
'FFD700' : 'Gold', // MISSING
'008000' : 'Green', // MISSING
'0FF' : 'Cyan', // MISSING
'00F' : 'Blue', // MISSING
'EE82EE' : 'Violet', // MISSING
'A9A9A9' : 'Dim Gray', // MISSING
'FFA07A' : 'Light Salmon', // MISSING
'FFA500' : 'Orange', // MISSING
'FFFF00' : 'Yellow', // MISSING
'00FF00' : 'Lime', // MISSING
'AFEEEE' : 'Pale Turquoise', // MISSING
'ADD8E6' : 'Light Blue', // MISSING
'DDA0DD' : 'Plum', // MISSING
'D3D3D3' : 'Light Grey', // MISSING
'FFF0F5' : 'Lavender Blush', // MISSING
'FAEBD7' : 'Antique White', // MISSING
'FFFFE0' : 'Light Yellow', // MISSING
'F0FFF0' : 'Honeydew', // MISSING
'F0FFFF' : 'Azure', // MISSING
'F0F8FF' : 'Alice Blue', // MISSING
'E6E6FA' : 'Lavender', // MISSING
'FFF' : 'White' // MISSING
},
scayt :
{
title : 'Spell Check As You Type', // MISSING
opera_title : 'Not supported by Opera', // MISSING
enable : 'Enable SCAYT', // MISSING
disable : 'Disable SCAYT', // MISSING
about : 'About SCAYT', // MISSING
toggle : 'Toggle SCAYT', // MISSING
options : 'Options', // MISSING
langs : 'Languages', // MISSING
moreSuggestions : 'More suggestions', // MISSING
ignore : 'Ignore', // MISSING
ignoreAll : 'Ignore All', // MISSING
addWord : 'Add Word', // MISSING
emptyDic : 'Dictionary name should not be empty.', // MISSING
optionsTab : 'Options', // MISSING
allCaps : 'Ignore All-Caps Words', // MISSING
ignoreDomainNames : 'Ignore Domain Names', // MISSING
mixedCase : 'Ignore Words with Mixed Case', // MISSING
mixedWithDigits : 'Ignore Words with Numbers', // MISSING
languagesTab : 'Languages', // MISSING
dictionariesTab : 'Dictionaries', // MISSING
dic_field_name : 'Dictionary name', // MISSING
dic_create : 'Create', // MISSING
dic_restore : 'Restore', // MISSING
dic_delete : 'Delete', // MISSING
dic_rename : 'Rename', // MISSING
dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING
aboutTab : 'About' // MISSING
},
about :
{
title : 'About CKEditor', // MISSING
dlgTitle : 'About CKEditor', // MISSING
help : 'Check $1 for help.', // MISSING
userGuide : 'CKEditor User\'s Guide', // MISSING
moreInfo : 'For licensing information please visit our web site:', // MISSING
copy : 'Copyright © $1. All rights reserved.' // MISSING
},
maximize : 'Maximize', // MISSING
minimize : 'Minimize', // MISSING
fakeobjects :
{
anchor : 'Anchor', // MISSING
flash : 'Flash Animation', // MISSING
iframe : 'IFrame', // MISSING
hiddenfield : 'Hidden Field', // MISSING
unknown : 'Unknown Object' // MISSING
},
resize : 'Drag to resize', // MISSING
colordialog :
{
title : 'Select color', // MISSING
options : 'Color Options', // MISSING
highlight : 'Highlight', // MISSING
selected : 'Selected Color', // MISSING
clear : 'Clear' // MISSING
},
toolbarCollapse : 'Collapse Toolbar', // MISSING
toolbarExpand : 'Expand Toolbar', // MISSING
toolbarGroups :
{
document : 'Document', // MISSING
clipboard : 'Clipboard/Undo', // MISSING
editing : 'Editing', // MISSING
forms : 'Forms', // MISSING
basicstyles : 'Basic Styles', // MISSING
paragraph : 'Paragraph', // MISSING
links : 'Links', // MISSING
insert : 'Insert', // MISSING
styles : 'Styles', // MISSING
colors : 'Colors', // MISSING
tools : 'Tools' // MISSING
},
bidi :
{
ltr : 'Text direction from left to right', // MISSING
rtl : 'Text direction from right to left' // MISSING
},
docprops :
{
label : 'Propriedades do Documento',
title : 'Propriedades do Documento',
design : 'Design', // MISSING
meta : 'Meta Tags', // MISSING
chooseColor : 'Choose', // MISSING
other : '<outro>',
docTitle : 'Título da Páxina',
charset : 'Codificación do Xogo de Caracteres',
charsetOther : 'Outra Codificación do Xogo de Caracteres',
charsetASCII : 'ASCII', // MISSING
charsetCE : 'Central European', // MISSING
charsetCT : 'Chinese Traditional (Big5)', // MISSING
charsetCR : 'Cyrillic', // MISSING
charsetGR : 'Greek', // MISSING
charsetJP : 'Japanese', // MISSING
charsetKR : 'Korean', // MISSING
charsetTR : 'Turkish', // MISSING
charsetUN : 'Unicode (UTF-8)', // MISSING
charsetWE : 'Western European', // MISSING
docType : 'Encabezado do Tipo de Documento',
docTypeOther : 'Outro Encabezado do Tipo de Documento',
xhtmlDec : 'Incluir Declaracións XHTML',
bgColor : 'Cor de Fondo',
bgImage : 'URL da Imaxe de Fondo',
bgFixed : 'Fondo Fixo',
txtColor : 'Cor do Texto',
margin : 'Marxes da Páxina',
marginTop : 'Arriba',
marginLeft : 'Esquerda',
marginRight : 'Dereita',
marginBottom : 'Abaixo',
metaKeywords : 'Palabras Chave de Indexación do Documento (separadas por comas)',
metaDescription : 'Descripción do Documento',
metaAuthor : 'Autor',
metaCopyright : 'Copyright', // MISSING
previewHtml : '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>' // MISSING
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Khmer language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['km'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Editor toolbars', // MISSING
editor : 'Rich Text Editor', // MISSING
// Toolbar buttons without dialogs.
source : 'កូត',
newPage : 'ទំព័រថ្មី',
save : 'រក្សាទុក',
preview : 'មើលសាកល្បង',
cut : 'កាត់យក',
copy : 'ចំលងយក',
paste : 'ចំលងដាក់',
print : 'បោះពុម្ភ',
underline : 'ដិតបន្ទាត់ពីក្រោមអក្សរ',
bold : 'អក្សរដិតធំ',
italic : 'អក្សរផ្តេក',
selectAll : 'ជ្រើសរើសទាំងអស់',
removeFormat : 'លប់ចោល ការរចនា',
strike : 'ដិតបន្ទាត់ពាក់កណ្តាលអក្សរ',
subscript : 'អក្សរតូចក្រោម',
superscript : 'អក្សរតូចលើ',
horizontalrule : 'បន្ថែមបន្ទាត់ផ្តេក',
pagebreak : 'បន្ថែម ការផ្តាច់ទំព័រ',
pagebreakAlt : 'Page Break', // MISSING
unlink : 'លប់ឈ្នាប់',
undo : 'សារឡើងវិញ',
redo : 'ធ្វើឡើងវិញ',
// Common messages and labels.
common :
{
browseServer : 'មើល',
url : 'URL',
protocol : 'ប្រូតូកូល',
upload : 'ទាញយក',
uploadSubmit : 'បញ្ជូនទៅកាន់ម៉ាស៊ីនផ្តល់សេវា',
image : 'រូបភាព',
flash : 'Flash',
form : 'បែបបទ',
checkbox : 'ប្រអប់ជ្រើសរើស',
radio : 'ប៉ូតុនរង្វង់មូល',
textField : 'ជួរសរសេរអត្ថបទ',
textarea : 'តំបន់សរសេរអត្ថបទ',
hiddenField : 'ជួរលាក់',
button : 'ប៉ូតុន',
select : 'ជួរជ្រើសរើស',
imageButton : 'ប៉ូតុនរូបភាព',
notSet : '<មិនមែន>',
id : 'Id',
name : 'ឈ្មោះ',
langDir : 'ទិសដៅភាសា',
langDirLtr : 'ពីឆ្វេងទៅស្តាំ(LTR)',
langDirRtl : 'ពីស្តាំទៅឆ្វេង(RTL)',
langCode : 'លេខកូតភាសា',
longDescr : 'អធិប្បាយ URL វែង',
cssClass : 'Stylesheet Classes',
advisoryTitle : 'ចំណងជើង ប្រឹក្សា',
cssStyle : 'ម៉ូត',
ok : 'យល់ព្រម',
cancel : 'មិនយល់ព្រម',
close : 'Close', // MISSING
preview : 'Preview', // MISSING
generalTab : 'General', // MISSING
advancedTab : 'កំរិតខ្ពស់',
validateNumberFailed : 'This value is not a number.', // MISSING
confirmNewPage : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?', // MISSING
confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING
options : 'Options', // MISSING
target : 'Target', // MISSING
targetNew : 'New Window (_blank)', // MISSING
targetTop : 'Topmost Window (_top)', // MISSING
targetSelf : 'Same Window (_self)', // MISSING
targetParent : 'Parent Window (_parent)', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Right to Left (RTL)', // MISSING
styles : 'Style', // MISSING
cssClasses : 'Stylesheet Classes', // MISSING
width : 'ទទឹង',
height : 'កំពស់',
align : 'កំណត់ទីតាំង',
alignLeft : 'ខាងឆ្វង',
alignRight : 'ខាងស្តាំ',
alignCenter : 'កណ្តាល',
alignTop : 'ខាងលើ',
alignMiddle : 'កណ្តាល',
alignBottom : 'ខាងក្រោម',
invalidHeight : 'Height must be a number.', // MISSING
invalidWidth : 'Width must be a number.', // MISSING
invalidCssLength : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip : 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, unavailable</span>' // MISSING
},
contextmenu :
{
options : 'Context Menu Options' // MISSING
},
// Special char dialog.
specialChar :
{
toolbar : 'បន្ថែមអក្សរពិសេស',
title : 'តូអក្សរពិសេស',
options : 'Special Character Options' // MISSING
},
// Link dialog.
link :
{
toolbar : 'បន្ថែម/កែប្រែ ឈ្នាប់',
other : '<other>', // MISSING
menu : 'កែប្រែឈ្នាប់',
title : 'ឈ្នាប់',
info : 'ពត៌មានអំពីឈ្នាប់',
target : 'គោលដៅ',
upload : 'ទាញយក',
advanced : 'កំរិតខ្ពស់',
type : 'ប្រភេទឈ្នាប់',
toUrl : 'URL', // MISSING
toAnchor : 'យុថ្កានៅក្នុងទំព័រនេះ',
toEmail : 'អ៊ីមែល',
targetFrame : '<ហ្វ្រេម>',
targetPopup : '<វីនដូវ លោត>',
targetFrameName : 'ឈ្មោះហ្រ្វេមដែលជាគោលដៅ',
targetPopupName : 'ឈ្មោះវីនដូវលោត',
popupFeatures : 'លក្ខណះរបស់វីនដូលលោត',
popupResizable : 'Resizable', // MISSING
popupStatusBar : 'របា ពត៌មាន',
popupLocationBar: 'របា ទីតាំង',
popupToolbar : 'របា ឩបករណ៍',
popupMenuBar : 'របា មឺនុយ',
popupFullScreen : 'អេក្រុងពេញ(IE)',
popupScrollBars : 'របា ទាញ',
popupDependent : 'អាស្រ័យលើ (Netscape)',
popupLeft : 'ទីតាំងខាងឆ្វេង',
popupTop : 'ទីតាំងខាងលើ',
id : 'Id', // MISSING
langDir : 'ទិសដៅភាសា',
langDirLTR : 'ពីឆ្វេងទៅស្តាំ(LTR)',
langDirRTL : 'ពីស្តាំទៅឆ្វេង(RTL)',
acccessKey : 'ឃី សំរាប់ចូល',
name : 'ឈ្មោះ',
langCode : 'ទិសដៅភាសា',
tabIndex : 'លេខ Tab',
advisoryTitle : 'ចំណងជើង ប្រឹក្សា',
advisoryContentType : 'ប្រភេទអត្ថបទ ប្រឹក្សា',
cssClasses : 'Stylesheet Classes',
charset : 'លេខកូតអក្សររបស់ឈ្នាប់',
styles : 'ម៉ូត',
rel : 'Relationship', // MISSING
selectAnchor : 'ជ្រើសរើសយុថ្កា',
anchorName : 'តាមឈ្មោះរបស់យុថ្កា',
anchorId : 'តាម Id',
emailAddress : 'អ៊ីមែល',
emailSubject : 'ចំណងជើងអត្ថបទ',
emailBody : 'អត្ថបទ',
noAnchors : '(No anchors available in the document)', // MISSING
noUrl : 'សូមសរសេរ អាស័យដ្ឋាន URL',
noEmail : 'សូមសរសេរ អាស័យដ្ឋាន អ៊ីមែល'
},
// Anchor dialog
anchor :
{
toolbar : 'បន្ថែម/កែប្រែ យុថ្កា',
menu : 'ការកំណត់យុថ្កា',
title : 'ការកំណត់យុថ្កា',
name : 'ឈ្មោះយុទ្ធថ្កា',
errorName : 'សូមសរសេរ ឈ្មោះយុទ្ធថ្កា',
remove : 'Remove Anchor' // MISSING
},
// List style dialog
list:
{
numberedTitle : 'Numbered List Properties', // MISSING
bulletedTitle : 'Bulleted List Properties', // MISSING
type : 'Type', // MISSING
start : 'Start', // MISSING
validateStartNumber :'List start number must be a whole number.', // MISSING
circle : 'Circle', // MISSING
disc : 'Disc', // MISSING
square : 'Square', // MISSING
none : 'None', // MISSING
notset : '<not set>', // MISSING
armenian : 'Armenian numbering', // MISSING
georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING
lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING
upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING
lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING
upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING
lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING
decimal : 'Decimal (1, 2, 3, etc.)', // MISSING
decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Find and Replace', // MISSING
find : 'ស្វែងរក',
replace : 'ជំនួស',
findWhat : 'ស្វែងរកអ្វី:',
replaceWith : 'ជំនួសជាមួយ:',
notFoundMsg : 'ពាក្យនេះ រកមិនឃើញទេ ។',
findOptions : 'Find Options', // MISSING
matchCase : 'ករណ៉ត្រូវរក',
matchWord : 'ត្រូវពាក្យទាំងអស់',
matchCyclic : 'Match cyclic', // MISSING
replaceAll : 'ជំនួសទាំងអស់',
replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING
},
// Table Dialog
table :
{
toolbar : 'តារាង',
title : 'ការកំណត់ តារាង',
menu : 'ការកំណត់ តារាង',
deleteTable : 'លប់តារាង',
rows : 'ជួរផ្តេក',
columns : 'ជួរឈរ',
border : 'ទំហំស៊ុម',
widthPx : 'ភីកសែល',
widthPc : 'ភាគរយ',
widthUnit : 'width unit', // MISSING
cellSpace : 'គំលាតសែល',
cellPad : 'គែមសែល',
caption : 'ចំណងជើង',
summary : 'សេចក្តីសង្ខេប',
headers : 'Headers', // MISSING
headersNone : 'None', // MISSING
headersColumn : 'First column', // MISSING
headersRow : 'First Row', // MISSING
headersBoth : 'Both', // MISSING
invalidRows : 'Number of rows must be a number greater than 0.', // MISSING
invalidCols : 'Number of columns must be a number greater than 0.', // MISSING
invalidBorder : 'Border size must be a number.', // MISSING
invalidWidth : 'Table width must be a number.', // MISSING
invalidHeight : 'Table height must be a number.', // MISSING
invalidCellSpacing : 'Cell spacing must be a positive number.', // MISSING
invalidCellPadding : 'Cell padding must be a positive number.', // MISSING
cell :
{
menu : 'Cell', // MISSING
insertBefore : 'Insert Cell Before', // MISSING
insertAfter : 'Insert Cell After', // MISSING
deleteCell : 'លប់សែល',
merge : 'បញ្ជូលសែល',
mergeRight : 'Merge Right', // MISSING
mergeDown : 'Merge Down', // MISSING
splitHorizontal : 'Split Cell Horizontally', // MISSING
splitVertical : 'Split Cell Vertically', // MISSING
title : 'Cell Properties', // MISSING
cellType : 'Cell Type', // MISSING
rowSpan : 'Rows Span', // MISSING
colSpan : 'Columns Span', // MISSING
wordWrap : 'Word Wrap', // MISSING
hAlign : 'Horizontal Alignment', // MISSING
vAlign : 'Vertical Alignment', // MISSING
alignBaseline : 'Baseline', // MISSING
bgColor : 'Background Color', // MISSING
borderColor : 'Border Color', // MISSING
data : 'Data', // MISSING
header : 'Header', // MISSING
yes : 'Yes', // MISSING
no : 'No', // MISSING
invalidWidth : 'Cell width must be a number.', // MISSING
invalidHeight : 'Cell height must be a number.', // MISSING
invalidRowSpan : 'Rows span must be a whole number.', // MISSING
invalidColSpan : 'Columns span must be a whole number.', // MISSING
chooseColor : 'Choose' // MISSING
},
row :
{
menu : 'Row', // MISSING
insertBefore : 'Insert Row Before', // MISSING
insertAfter : 'Insert Row After', // MISSING
deleteRow : 'លប់ជួរផ្តេក'
},
column :
{
menu : 'Column', // MISSING
insertBefore : 'Insert Column Before', // MISSING
insertAfter : 'Insert Column After', // MISSING
deleteColumn : 'លប់ជួរឈរ'
}
},
// Button Dialog.
button :
{
title : 'ការកំណត់ ប៉ូតុន',
text : 'អត្ថបទ(តំលៃ)',
type : 'ប្រភេទ',
typeBtn : 'Button', // MISSING
typeSbm : 'Submit', // MISSING
typeRst : 'Reset' // MISSING
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'ការកំណត់ប្រអប់ជ្រើសរើស',
radioTitle : 'ការកំណត់ប៉ូតុនរង្វង់',
value : 'តំលៃ',
selected : 'បានជ្រើសរើស'
},
// Form Dialog.
form :
{
title : 'ការកំណត់បែបបទ',
menu : 'ការកំណត់បែបបទ',
action : 'សកម្មភាព',
method : 'វិធី',
encoding : 'Encoding' // MISSING
},
// Select Field Dialog.
select :
{
title : 'ការកំណត់ជួរជ្រើសរើស',
selectInfo : 'ពត៌មាន',
opAvail : 'ការកំណត់ជ្រើសរើស ដែលអាចកំណត់បាន',
value : 'តំលៃ',
size : 'ទំហំ',
lines : 'បន្ទាត់',
chkMulti : 'អនុញ្ញាតអោយជ្រើសរើសច្រើន',
opText : 'ពាក្យ',
opValue : 'តំលៃ',
btnAdd : 'បន្ថែម',
btnModify : 'ផ្លាស់ប្តូរ',
btnUp : 'លើ',
btnDown : 'ក្រោម',
btnSetValue : 'Set as selected value', // MISSING
btnDelete : 'លប់'
},
// Textarea Dialog.
textarea :
{
title : 'ការកំណត់កន្លែងសរសេរអត្ថបទ',
cols : 'ជូរឈរ',
rows : 'ជូរផ្តេក'
},
// Text Field Dialog.
textfield :
{
title : 'ការកំណត់ជួរអត្ថបទ',
name : 'ឈ្មោះ',
value : 'តំលៃ',
charWidth : 'ទទឹង អក្សរ',
maxChars : 'អក្សរអតិបរិមា',
type : 'ប្រភេទ',
typeText : 'ពាក្យ',
typePass : 'ពាក្យសំងាត់'
},
// Hidden Field Dialog.
hidden :
{
title : 'ការកំណត់ជួរលាក់',
name : 'ឈ្មោះ',
value : 'តំលៃ'
},
// Image Dialog.
image :
{
title : 'ការកំណត់រូបភាព',
titleButton : 'ការកំណត់ប៉ូតុនរូបភាព',
menu : 'ការកំណត់រូបភាព',
infoTab : 'ពត៌មានអំពីរូបភាព',
btnUpload : 'បញ្ជូនទៅកាន់ម៉ាស៊ីនផ្តល់សេវា',
upload : 'ទាញយក',
alt : 'អត្ថបទជំនួស',
lockRatio : 'អត្រាឡុក',
resetSize : 'កំណត់ទំហំឡើងវិញ',
border : 'ស៊ុម',
hSpace : 'គំលាតទទឹង',
vSpace : 'គំលាតបណ្តោយ',
alertUrl : 'សូមសរសេរងាស័យដ្ឋានរបស់រូបភាព',
linkTab : 'ឈ្នាប់',
button2Img : 'Do you want to transform the selected image button on a simple image?', // MISSING
img2Button : 'Do you want to transform the selected image on a image button?', // MISSING
urlMissing : 'Image source URL is missing.', // MISSING
validateBorder : 'Border must be a whole number.', // MISSING
validateHSpace : 'HSpace must be a whole number.', // MISSING
validateVSpace : 'VSpace must be a whole number.' // MISSING
},
// Flash Dialog
flash :
{
properties : 'ការកំណត់ Flash',
propertiesTab : 'Properties', // MISSING
title : 'ការកំណត់ Flash',
chkPlay : 'លេងដោយស្វ័យប្រវត្ត',
chkLoop : 'ចំនួនដង',
chkMenu : 'បង្ហាញ មឺនុយរបស់ Flash',
chkFull : 'Allow Fullscreen', // MISSING
scale : 'ទំហំ',
scaleAll : 'បង្ហាញទាំងអស់',
scaleNoBorder : 'មិនបង្ហាញស៊ុម',
scaleFit : 'ត្រូវល្មម',
access : 'Script Access', // MISSING
accessAlways : 'Always', // MISSING
accessSameDomain: 'Same domain', // MISSING
accessNever : 'Never', // MISSING
alignAbsBottom : 'Abs Bottom', // MISSING
alignAbsMiddle : 'Abs Middle', // MISSING
alignBaseline : 'បន្ទាត់ជាមូលដ្ឋាន',
alignTextTop : 'លើអត្ថបទ',
quality : 'Quality', // MISSING
qualityBest : 'Best', // MISSING
qualityHigh : 'High', // MISSING
qualityAutoHigh : 'Auto High', // MISSING
qualityMedium : 'Medium', // MISSING
qualityAutoLow : 'Auto Low', // MISSING
qualityLow : 'Low', // MISSING
windowModeWindow: 'Window', // MISSING
windowModeOpaque: 'Opaque', // MISSING
windowModeTransparent : 'Transparent', // MISSING
windowMode : 'Window mode', // MISSING
flashvars : 'Variables for Flash', // MISSING
bgcolor : 'ពណ៌ផ្ទៃខាងក្រោយ',
hSpace : 'គំលាតទទឹង',
vSpace : 'គំលាតបណ្តោយ',
validateSrc : 'សូមសរសេរ អាស័យដ្ឋាន URL',
validateHSpace : 'HSpace must be a number.', // MISSING
validateVSpace : 'VSpace must be a number.' // MISSING
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'ពិនិត្យអក្ខរាវិរុទ្ធ',
title : 'Spell Check', // MISSING
notAvailable : 'Sorry, but service is unavailable now.', // MISSING
errorLoading : 'Error loading application service host: %s.', // MISSING
notInDic : 'គ្មានក្នុងវចនានុក្រម',
changeTo : 'ផ្លាស់ប្តូរទៅ',
btnIgnore : 'មិនផ្លាស់ប្តូរ',
btnIgnoreAll : 'មិនផ្លាស់ប្តូរ ទាំងអស់',
btnReplace : 'ជំនួស',
btnReplaceAll : 'ជំនួសទាំងអស់',
btnUndo : 'សារឡើងវិញ',
noSuggestions : '- គ្មានសំណើរ -',
progress : 'កំពុងពិនិត្យអក្ខរាវិរុទ្ធ...',
noMispell : 'ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: គ្មានកំហុស',
noChanges : 'ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: ពុំមានផ្លាស់ប្តូរ',
oneChange : 'ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: ពាក្យមួយត្រូចបានផ្លាស់ប្តូរ',
manyChanges : 'ការពិនិត្យអក្ខរាវិរុទ្ធបានចប់: %1 ពាក្យបានផ្លាស់ប្តូរ',
ieSpellDownload : 'ពុំមានកម្មវិធីពិនិត្យអក្ខរាវិរុទ្ធ ។ តើចង់ទាញយកពីណា?'
},
smiley :
{
toolbar : 'រូបភាព',
title : 'បញ្ជូលរូបភាព',
options : 'Smiley Options' // MISSING
},
elementsPath :
{
eleLabel : 'Elements path', // MISSING
eleTitle : '%1 element' // MISSING
},
numberedlist : 'បញ្ជីជាអក្សរ',
bulletedlist : 'បញ្ជីជារង្វង់មូល',
indent : 'បន្ថែមការចូលបន្ទាត់',
outdent : 'បន្ថយការចូលបន្ទាត់',
justify :
{
left : 'តំរឹមឆ្វេង',
center : 'តំរឹមកណ្តាល',
right : 'តំរឹមស្តាំ',
block : 'តំរឹមសងខាង'
},
blockquote : 'Block Quote', // MISSING
clipboard :
{
title : 'ចំលងដាក់',
cutError : 'ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះ\u200bមិនអាចធ្វើកម្មវិធីតាក់តែងអត្ថបទ កាត់អត្ថបទយកដោយស្វ័យប្រវត្តបានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនេះ (Ctrl/Cmd+X) ។',
copyError : 'ការកំណត់សុវត្ថភាពរបស់កម្មវិធីរុករករបស់លោកអ្នក នេះ\u200bមិនអាចធ្វើកម្មវិធីតាក់តែងអត្ថបទ ចំលងអត្ថបទយកដោយស្វ័យប្រវត្តបានឡើយ ។ សូមប្រើប្រាស់បន្សំ ឃីដូចនេះ (Ctrl/Cmd+C)។',
pasteMsg : 'សូមចំលងអត្ថបទទៅដាក់ក្នុងប្រអប់ដូចខាងក្រោមដោយប្រើប្រាស់ ឃី \u200b(<STRONG>Ctrl/Cmd+V</STRONG>) ហើយចុច <STRONG>OK</STRONG> ។',
securityMsg : 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
pasteArea : 'Paste Area' // MISSING
},
pastefromword :
{
confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING
toolbar : 'ចំលងដាក់ពី Word',
title : 'ចំលងដាក់ពី Word',
error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING
},
pasteText :
{
button : 'ចំលងដាក់អត្ថបទធម្មតា',
title : 'ចំលងដាក់អត្ថបទធម្មតា'
},
templates :
{
button : 'ឯកសារគំរូ',
title : 'ឯកសារគំរូ របស់អត្ថន័យ',
options : 'Template Options', // MISSING
insertOption : 'Replace actual contents', // MISSING
selectPromptMsg : 'សូមជ្រើសរើសឯកសារគំរូ ដើម្បីបើកនៅក្នុងកម្មវិធីតាក់តែងអត្ថបទ<br>(អត្ថបទនឹងបាត់បង់):',
emptyListMsg : '(ពុំមានឯកសារគំរូត្រូវបានកំណត់)'
},
showBlocks : 'Show Blocks', // MISSING
stylesCombo :
{
label : 'ម៉ូត',
panelTitle : 'Formatting Styles', // MISSING
panelTitle1 : 'Block Styles', // MISSING
panelTitle2 : 'Inline Styles', // MISSING
panelTitle3 : 'Object Styles' // MISSING
},
format :
{
label : 'រចនា',
panelTitle : 'រចនា',
tag_p : 'Normal',
tag_pre : 'Formatted',
tag_address : 'Address',
tag_h1 : 'Heading 1',
tag_h2 : 'Heading 2',
tag_h3 : 'Heading 3',
tag_h4 : 'Heading 4',
tag_h5 : 'Heading 5',
tag_h6 : 'Heading 6',
tag_div : 'Normal (DIV)'
},
div :
{
title : 'Create Div Container', // MISSING
toolbar : 'Create Div Container', // MISSING
cssClassInputLabel : 'Stylesheet Classes', // MISSING
styleSelectLabel : 'Style', // MISSING
IdInputLabel : 'Id', // MISSING
languageCodeInputLabel : ' Language Code', // MISSING
inlineStyleInputLabel : 'Inline Style', // MISSING
advisoryTitleInputLabel : 'Advisory Title', // MISSING
langDirLabel : 'Language Direction', // MISSING
langDirLTRLabel : 'Left to Right (LTR)', // MISSING
langDirRTLLabel : 'Right to Left (RTL)', // MISSING
edit : 'Edit Div', // MISSING
remove : 'Remove Div' // MISSING
},
iframe :
{
title : 'IFrame Properties', // MISSING
toolbar : 'IFrame', // MISSING
noUrl : 'Please type the iframe URL', // MISSING
scrolling : 'Enable scrollbars', // MISSING
border : 'Show frame border' // MISSING
},
font :
{
label : 'ហ្វុង',
voiceLabel : 'Font', // MISSING
panelTitle : 'ហ្វុង'
},
fontSize :
{
label : 'ទំហំ',
voiceLabel : 'Font Size', // MISSING
panelTitle : 'ទំហំ'
},
colorButton :
{
textColorTitle : 'ពណ៌អក្សរ',
bgColorTitle : 'ពណ៌ផ្ទៃខាងក្រោយ',
panelTitle : 'Colors', // MISSING
auto : 'ស្វ័យប្រវត្ត',
more : 'ពណ៌ផ្សេងទៀត..'
},
colors :
{
'000' : 'Black', // MISSING
'800000' : 'Maroon', // MISSING
'8B4513' : 'Saddle Brown', // MISSING
'2F4F4F' : 'Dark Slate Gray', // MISSING
'008080' : 'Teal', // MISSING
'000080' : 'Navy', // MISSING
'4B0082' : 'Indigo', // MISSING
'696969' : 'Dark Gray', // MISSING
'B22222' : 'Fire Brick', // MISSING
'A52A2A' : 'Brown', // MISSING
'DAA520' : 'Golden Rod', // MISSING
'006400' : 'Dark Green', // MISSING
'40E0D0' : 'Turquoise', // MISSING
'0000CD' : 'Medium Blue', // MISSING
'800080' : 'Purple', // MISSING
'808080' : 'Gray', // MISSING
'F00' : 'Red', // MISSING
'FF8C00' : 'Dark Orange', // MISSING
'FFD700' : 'Gold', // MISSING
'008000' : 'Green', // MISSING
'0FF' : 'Cyan', // MISSING
'00F' : 'Blue', // MISSING
'EE82EE' : 'Violet', // MISSING
'A9A9A9' : 'Dim Gray', // MISSING
'FFA07A' : 'Light Salmon', // MISSING
'FFA500' : 'Orange', // MISSING
'FFFF00' : 'Yellow', // MISSING
'00FF00' : 'Lime', // MISSING
'AFEEEE' : 'Pale Turquoise', // MISSING
'ADD8E6' : 'Light Blue', // MISSING
'DDA0DD' : 'Plum', // MISSING
'D3D3D3' : 'Light Grey', // MISSING
'FFF0F5' : 'Lavender Blush', // MISSING
'FAEBD7' : 'Antique White', // MISSING
'FFFFE0' : 'Light Yellow', // MISSING
'F0FFF0' : 'Honeydew', // MISSING
'F0FFFF' : 'Azure', // MISSING
'F0F8FF' : 'Alice Blue', // MISSING
'E6E6FA' : 'Lavender', // MISSING
'FFF' : 'White' // MISSING
},
scayt :
{
title : 'Spell Check As You Type', // MISSING
opera_title : 'Not supported by Opera', // MISSING
enable : 'Enable SCAYT', // MISSING
disable : 'Disable SCAYT', // MISSING
about : 'About SCAYT', // MISSING
toggle : 'Toggle SCAYT', // MISSING
options : 'Options', // MISSING
langs : 'Languages', // MISSING
moreSuggestions : 'More suggestions', // MISSING
ignore : 'Ignore', // MISSING
ignoreAll : 'Ignore All', // MISSING
addWord : 'Add Word', // MISSING
emptyDic : 'Dictionary name should not be empty.', // MISSING
optionsTab : 'Options', // MISSING
allCaps : 'Ignore All-Caps Words', // MISSING
ignoreDomainNames : 'Ignore Domain Names', // MISSING
mixedCase : 'Ignore Words with Mixed Case', // MISSING
mixedWithDigits : 'Ignore Words with Numbers', // MISSING
languagesTab : 'Languages', // MISSING
dictionariesTab : 'Dictionaries', // MISSING
dic_field_name : 'Dictionary name', // MISSING
dic_create : 'Create', // MISSING
dic_restore : 'Restore', // MISSING
dic_delete : 'Delete', // MISSING
dic_rename : 'Rename', // MISSING
dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING
aboutTab : 'About' // MISSING
},
about :
{
title : 'About CKEditor', // MISSING
dlgTitle : 'About CKEditor', // MISSING
help : 'Check $1 for help.', // MISSING
userGuide : 'CKEditor User\'s Guide', // MISSING
moreInfo : 'For licensing information please visit our web site:', // MISSING
copy : 'Copyright © $1. All rights reserved.' // MISSING
},
maximize : 'Maximize', // MISSING
minimize : 'Minimize', // MISSING
fakeobjects :
{
anchor : 'Anchor', // MISSING
flash : 'Flash Animation', // MISSING
iframe : 'IFrame', // MISSING
hiddenfield : 'Hidden Field', // MISSING
unknown : 'Unknown Object' // MISSING
},
resize : 'Drag to resize', // MISSING
colordialog :
{
title : 'Select color', // MISSING
options : 'Color Options', // MISSING
highlight : 'Highlight', // MISSING
selected : 'Selected Color', // MISSING
clear : 'Clear' // MISSING
},
toolbarCollapse : 'Collapse Toolbar', // MISSING
toolbarExpand : 'Expand Toolbar', // MISSING
toolbarGroups :
{
document : 'Document', // MISSING
clipboard : 'Clipboard/Undo', // MISSING
editing : 'Editing', // MISSING
forms : 'Forms', // MISSING
basicstyles : 'Basic Styles', // MISSING
paragraph : 'Paragraph', // MISSING
links : 'Links', // MISSING
insert : 'Insert', // MISSING
styles : 'Styles', // MISSING
colors : 'Colors', // MISSING
tools : 'Tools' // MISSING
},
bidi :
{
ltr : 'Text direction from left to right', // MISSING
rtl : 'Text direction from right to left' // MISSING
},
docprops :
{
label : 'ការកំណត់ ឯកសារ',
title : 'ការកំណត់ ឯកសារ',
design : 'Design', // MISSING
meta : 'ទិន្នន័យមេ',
chooseColor : 'Choose', // MISSING
other : '<other>',
docTitle : 'ចំណងជើងទំព័រ',
charset : 'កំណត់លេខកូតភាសា',
charsetOther : 'កំណត់លេខកូតភាសាផ្សេងទៀត',
charsetASCII : 'ASCII', // MISSING
charsetCE : 'Central European', // MISSING
charsetCT : 'Chinese Traditional (Big5)', // MISSING
charsetCR : 'Cyrillic', // MISSING
charsetGR : 'Greek', // MISSING
charsetJP : 'Japanese', // MISSING
charsetKR : 'Korean', // MISSING
charsetTR : 'Turkish', // MISSING
charsetUN : 'Unicode (UTF-8)', // MISSING
charsetWE : 'Western European', // MISSING
docType : 'ប្រភេទក្បាលទំព័រ',
docTypeOther : 'ប្រភេទក្បាលទំព័រផ្សេងទៀត',
xhtmlDec : 'បញ្ជូល XHTML',
bgColor : 'ពណ៌ខាងក្រោម',
bgImage : 'URL របស់រូបភាពខាងក្រោម',
bgFixed : 'ទំព័រក្រោមមិនប្តូរ',
txtColor : 'ពណ៌អក្សរ',
margin : 'ស៊ុមទំព័រ',
marginTop : 'លើ',
marginLeft : 'ឆ្វេង',
marginRight : 'ស្ដាំ',
marginBottom : 'ក្រោម',
metaKeywords : 'ពាក្យនៅក្នុងឯកសារ (ផ្តាច់ពីគ្នាដោយក្បៀស)',
metaDescription : 'សេចក្តីអត្ថាធិប្បាយអំពីឯកសារ',
metaAuthor : 'អ្នកនិពន្ធ',
metaCopyright : 'រក្សាសិទ្ធិ៏',
previewHtml : '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>' // MISSING
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Arabic language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['ar'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'rtl',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Editor toolbars', // MISSING
editor : 'Rich Text Editor', // MISSING
// Toolbar buttons without dialogs.
source : 'المصدر',
newPage : 'صفحة جديدة',
save : 'حفظ',
preview : 'معاينة الصفحة',
cut : 'قص',
copy : 'نسخ',
paste : 'لصق',
print : 'طباعة',
underline : 'تسطير',
bold : 'غامق',
italic : 'مائل',
selectAll : 'تحديد الكل',
removeFormat : 'إزالة التنسيقات',
strike : 'يتوسطه خط',
subscript : 'منخفض',
superscript : 'مرتفع',
horizontalrule : 'خط فاصل',
pagebreak : 'إدخال صفحة جديدة',
pagebreakAlt : 'Page Break', // MISSING
unlink : 'إزالة رابط',
undo : 'تراجع',
redo : 'إعادة',
// Common messages and labels.
common :
{
browseServer : 'تصفح',
url : 'الرابط',
protocol : 'البروتوكول',
upload : 'رفع',
uploadSubmit : 'أرسل',
image : 'صورة',
flash : 'فلاش',
form : 'نموذج',
checkbox : 'خانة إختيار',
radio : 'زر اختيار',
textField : 'مربع نص',
textarea : 'مساحة نصية',
hiddenField : 'إدراج حقل خفي',
button : 'زر ضغط',
select : 'اختار',
imageButton : 'زر صورة',
notSet : '<بدون تحديد>',
id : 'الرقم',
name : 'الاسم',
langDir : 'إتجاه النص',
langDirLtr : 'اليسار لليمين (LTR)',
langDirRtl : 'اليمين لليسار (RTL)',
langCode : 'رمز اللغة',
longDescr : 'الوصف التفصيلى',
cssClass : 'فئات التنسيق',
advisoryTitle : 'عنوان التقرير',
cssStyle : 'نمط',
ok : 'موافق',
cancel : 'إلغاء الأمر',
close : 'أغلق',
preview : 'استعراض',
generalTab : 'عام',
advancedTab : 'متقدم',
validateNumberFailed : 'لايوجد نتيجة',
confirmNewPage : 'ستفقد أي متغييرات اذا لم تقم بحفظها اولا. هل أنت متأكد أنك تريد صفحة جديدة؟',
confirmCancel : 'بعض الخيارات قد تغيرت. هل أنت متأكد من إغلاق مربع النص؟',
options : 'خيارات',
target : 'Target', // MISSING
targetNew : 'New Window (_blank)', // MISSING
targetTop : 'Topmost Window (_top)', // MISSING
targetSelf : 'Same Window (_self)', // MISSING
targetParent : 'Parent Window (_parent)', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Right to Left (RTL)', // MISSING
styles : 'Style', // MISSING
cssClasses : 'Stylesheet Classes', // MISSING
width : 'العرض',
height : 'الإرتفاع',
align : 'محاذاة',
alignLeft : 'يسار',
alignRight : 'يمين',
alignCenter : 'وسط',
alignTop : 'أعلى',
alignMiddle : 'وسط',
alignBottom : 'أسفل',
invalidHeight : 'الارتفاع يجب أن يكون عدداً.',
invalidWidth : 'العرض يجب أن يكون عدداً.',
invalidCssLength : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip : 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, غير متاح</span>'
},
contextmenu :
{
options : 'Context Menu Options' // MISSING
},
// Special char dialog.
specialChar :
{
toolbar : 'إدراج خاص.ِ',
title : 'اختر الخواص',
options : 'Special Character Options' // MISSING
},
// Link dialog.
link :
{
toolbar : 'رابط',
other : '<أخرى>',
menu : 'تحرير رابط',
title : 'إرتباط تشعبي',
info : 'معلومات الرابط',
target : 'هدف الرابط',
upload : 'رفع',
advanced : 'متقدم',
type : 'نوع الربط',
toUrl : 'URL', // MISSING
toAnchor : 'مكان في هذا المستند',
toEmail : 'بريد إلكتروني',
targetFrame : '<إطار>',
targetPopup : '<نافذة منبثقة>',
targetFrameName : 'اسم الإطار المستهدف',
targetPopupName : 'اسم النافذة المنبثقة',
popupFeatures : 'خصائص النافذة المنبثقة',
popupResizable : 'قابلة التشكيل',
popupStatusBar : 'شريط الحالة',
popupLocationBar: 'شريط العنوان',
popupToolbar : 'شريط الأدوات',
popupMenuBar : 'القوائم الرئيسية',
popupFullScreen : 'ملئ الشاشة (IE)',
popupScrollBars : 'أشرطة التمرير',
popupDependent : 'تابع (Netscape)',
popupLeft : 'التمركز لليسار',
popupTop : 'التمركز للأعلى',
id : 'هوية',
langDir : 'إتجاه النص',
langDirLTR : 'اليسار لليمين (LTR)',
langDirRTL : 'اليمين لليسار (RTL)',
acccessKey : 'مفاتيح الإختصار',
name : 'الاسم',
langCode : 'كود النص',
tabIndex : 'الترتيب',
advisoryTitle : 'عنوان التقرير',
advisoryContentType : 'نوع التقرير',
cssClasses : 'فئات التنسيق',
charset : 'ترميز المادة المطلوبة',
styles : 'نمط',
rel : 'Relationship', // MISSING
selectAnchor : 'اختر علامة مرجعية',
anchorName : 'حسب الاسم',
anchorId : 'حسب رقم العنصر',
emailAddress : 'عنوان البريد إلكتروني',
emailSubject : 'موضوع الرسالة',
emailBody : 'محتوى الرسالة',
noAnchors : '(لا توجد علامات مرجعية في هذا المستند)',
noUrl : 'من فضلك أدخل عنوان الموقع الذي يشير إليه الرابط',
noEmail : 'من فضلك أدخل عنوان البريد الإلكتروني'
},
// Anchor dialog
anchor :
{
toolbar : 'إشارة مرجعية',
menu : 'تحرير الإشارة المرجعية',
title : 'خصائص الإشارة المرجعية',
name : 'اسم الإشارة المرجعية',
errorName : 'الرجاء كتابة اسم الإشارة المرجعية',
remove : 'Remove Anchor' // MISSING
},
// List style dialog
list:
{
numberedTitle : 'Numbered List Properties', // MISSING
bulletedTitle : 'Bulleted List Properties', // MISSING
type : 'Type', // MISSING
start : 'Start', // MISSING
validateStartNumber :'List start number must be a whole number.', // MISSING
circle : 'Circle', // MISSING
disc : 'Disc', // MISSING
square : 'Square', // MISSING
none : 'None', // MISSING
notset : '<not set>', // MISSING
armenian : 'Armenian numbering', // MISSING
georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING
lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING
upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING
lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING
upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING
lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING
decimal : 'Decimal (1, 2, 3, etc.)', // MISSING
decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING
},
// Find And Replace Dialog
findAndReplace :
{
title : 'بحث واستبدال',
find : 'بحث',
replace : 'إستبدال',
findWhat : 'البحث بـ:',
replaceWith : 'إستبدال بـ:',
notFoundMsg : 'لم يتم العثور على النص المحدد.',
findOptions : 'Find Options', // MISSING
matchCase : 'مطابقة حالة الأحرف',
matchWord : 'مطابقة بالكامل',
matchCyclic : 'مطابقة دورية',
replaceAll : 'إستبدال الكل',
replaceSuccessMsg : 'تم استبدال 1% من الحالات '
},
// Table Dialog
table :
{
toolbar : 'جدول',
title : 'خصائص الجدول',
menu : 'خصائص الجدول',
deleteTable : 'حذف الجدول',
rows : 'صفوف',
columns : 'أعمدة',
border : 'الحدود',
widthPx : 'بكسل',
widthPc : 'بالمئة',
widthUnit : 'width unit', // MISSING
cellSpace : 'تباعد الخلايا',
cellPad : 'المسافة البادئة',
caption : 'الوصف',
summary : 'الخلاصة',
headers : 'العناوين',
headersNone : 'بدون',
headersColumn : 'العمود الأول',
headersRow : 'الصف الأول',
headersBoth : 'كلاهما',
invalidRows : 'عدد الصفوف يجب أن يكون عدداً أكبر من صفر.',
invalidCols : 'عدد الأعمدة يجب أن يكون عدداً أكبر من صفر.',
invalidBorder : 'حجم الحد يجب أن يكون عدداً.',
invalidWidth : 'عرض الجدول يجب أن يكون عدداً.',
invalidHeight : 'ارتفاع الجدول يجب أن يكون عدداً.',
invalidCellSpacing : 'المسافة بين الخلايا يجب أن تكون عدداً.',
invalidCellPadding : 'المسافة البادئة يجب أن تكون عدداً',
cell :
{
menu : 'خلية',
insertBefore : 'إدراج خلية قبل',
insertAfter : 'إدراج خلية بعد',
deleteCell : 'حذف خلية',
merge : 'دمج خلايا',
mergeRight : 'دمج لليمين',
mergeDown : 'دمج للأسفل',
splitHorizontal : 'تقسيم الخلية أفقياً',
splitVertical : 'تقسيم الخلية عمودياً',
title : 'خصائص الخلية',
cellType : 'نوع الخلية',
rowSpan : 'امتداد الصفوف',
colSpan : 'امتداد الأعمدة',
wordWrap : 'التفاف النص',
hAlign : 'محاذاة أفقية',
vAlign : 'محاذاة رأسية',
alignBaseline : 'خط القاعدة',
bgColor : 'لون الخلفية',
borderColor : 'لون الحدود',
data : 'بيانات',
header : 'عنوان',
yes : 'نعم',
no : 'لا',
invalidWidth : 'عرض الخلية يجب أن يكون عدداً.',
invalidHeight : 'ارتفاع الخلية يجب أن يكون عدداً.',
invalidRowSpan : 'امتداد الصفوف يجب أن يكون عدداً صحيحاً.',
invalidColSpan : 'امتداد الأعمدة يجب أن يكون عدداً صحيحاً.',
chooseColor : 'اختر'
},
row :
{
menu : 'صف',
insertBefore : 'إدراج صف قبل',
insertAfter : 'إدراج صف بعد',
deleteRow : 'حذف صفوف'
},
column :
{
menu : 'عمود',
insertBefore : 'إدراج عمود قبل',
insertAfter : 'إدراج عمود بعد',
deleteColumn : 'حذف أعمدة'
}
},
// Button Dialog.
button :
{
title : 'خصائص زر الضغط',
text : 'القيمة/التسمية',
type : 'نوع الزر',
typeBtn : 'زر',
typeSbm : 'إرسال',
typeRst : 'إعادة تعيين'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'خصائص خانة الإختيار',
radioTitle : 'خصائص زر الخيار',
value : 'القيمة',
selected : 'محدد'
},
// Form Dialog.
form :
{
title : 'خصائص النموذج',
menu : 'خصائص النموذج',
action : 'اسم الملف',
method : 'الأسلوب',
encoding : 'تشفير'
},
// Select Field Dialog.
select :
{
title : 'خصائص اختيار الحقل',
selectInfo : 'اختار معلومات',
opAvail : 'الخيارات المتاحة',
value : 'القيمة',
size : 'الحجم',
lines : 'الأسطر',
chkMulti : 'السماح بتحديدات متعددة',
opText : 'النص',
opValue : 'القيمة',
btnAdd : 'إضافة',
btnModify : 'تعديل',
btnUp : 'أعلى',
btnDown : 'أسفل',
btnSetValue : 'إجعلها محددة',
btnDelete : 'إزالة'
},
// Textarea Dialog.
textarea :
{
title : 'خصائص مساحة النص',
cols : 'الأعمدة',
rows : 'الصفوف'
},
// Text Field Dialog.
textfield :
{
title : 'خصائص مربع النص',
name : 'الاسم',
value : 'القيمة',
charWidth : 'عرض السمات',
maxChars : 'اقصى عدد للسمات',
type : 'نوع المحتوى',
typeText : 'نص',
typePass : 'كلمة مرور'
},
// Hidden Field Dialog.
hidden :
{
title : 'خصائص الحقل المخفي',
name : 'الاسم',
value : 'القيمة'
},
// Image Dialog.
image :
{
title : 'خصائص الصورة',
titleButton : 'خصائص زر الصورة',
menu : 'خصائص الصورة',
infoTab : 'معلومات الصورة',
btnUpload : 'أرسلها للخادم',
upload : 'رفع',
alt : 'عنوان الصورة',
lockRatio : 'تناسق الحجم',
resetSize : 'إستعادة الحجم الأصلي',
border : 'سمك الحدود',
hSpace : 'تباعد أفقي',
vSpace : 'تباعد عمودي',
alertUrl : 'فضلاً أكتب الموقع الذي توجد عليه هذه الصورة.',
linkTab : 'الرابط',
button2Img : 'هل تريد تحويل زر الصورة المختار إلى صورة بسيطة؟',
img2Button : 'هل تريد تحويل الصورة المختارة إلى زر صورة؟',
urlMissing : 'عنوان مصدر الصورة مفقود',
validateBorder : 'Border must be a whole number.', // MISSING
validateHSpace : 'HSpace must be a whole number.', // MISSING
validateVSpace : 'VSpace must be a whole number.' // MISSING
},
// Flash Dialog
flash :
{
properties : 'خصائص الفلاش',
propertiesTab : 'الخصائص',
title : 'خصائص فيلم الفلاش',
chkPlay : 'تشغيل تلقائي',
chkLoop : 'تكرار',
chkMenu : 'تمكين قائمة فيلم الفلاش',
chkFull : 'ملء الشاشة',
scale : 'الحجم',
scaleAll : 'إظهار الكل',
scaleNoBorder : 'بلا حدود',
scaleFit : 'ضبط تام',
access : 'دخول النص البرمجي',
accessAlways : 'دائماً',
accessSameDomain: 'نفس النطاق',
accessNever : 'مطلقاً',
alignAbsBottom : 'أسفل النص',
alignAbsMiddle : 'وسط السطر',
alignBaseline : 'على السطر',
alignTextTop : 'أعلى النص',
quality : 'جودة',
qualityBest : 'أفضل',
qualityHigh : 'عالية',
qualityAutoHigh : 'عالية تلقائياً',
qualityMedium : 'متوسطة',
qualityAutoLow : 'منخفضة تلقائياً',
qualityLow : 'منخفضة',
windowModeWindow: 'نافذة',
windowModeOpaque: 'غير شفاف',
windowModeTransparent : 'شفاف',
windowMode : 'وضع النافذة',
flashvars : 'متغيرات الفلاش',
bgcolor : 'لون الخلفية',
hSpace : 'تباعد أفقي',
vSpace : 'تباعد عمودي',
validateSrc : 'فضلاً أدخل عنوان الموقع الذي يشير إليه الرابط',
validateHSpace : 'HSpace يجب أن يكون عدداً.',
validateVSpace : 'VSpace يجب أن يكون عدداً.'
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'تدقيق إملائي',
title : 'التدقيق الإملائي',
notAvailable : 'عفواً، ولكن هذه الخدمة غير متاحة الان',
errorLoading : 'خطأ في تحميل تطبيق خدمة الاستضافة: %s.',
notInDic : 'ليست في القاموس',
changeTo : 'التغيير إلى',
btnIgnore : 'تجاهل',
btnIgnoreAll : 'تجاهل الكل',
btnReplace : 'تغيير',
btnReplaceAll : 'تغيير الكل',
btnUndo : 'تراجع',
noSuggestions : '- لا توجد إقتراحات -',
progress : 'جاري التدقيق الاملائى',
noMispell : 'تم التدقيق الإملائي: لم يتم العثور على أي أخطاء إملائية',
noChanges : 'تم التدقيق الإملائي: لم يتم تغيير أي كلمة',
oneChange : 'تم التدقيق الإملائي: تم تغيير كلمة واحدة فقط',
manyChanges : 'تم إكمال التدقيق الإملائي: تم تغيير %1 من كلمات',
ieSpellDownload : 'المدقق الإملائي (الإنجليزي) غير مثبّت. هل تود تحميله الآن؟'
},
smiley :
{
toolbar : 'ابتسامات',
title : 'إدراج ابتسامات',
options : 'Smiley Options' // MISSING
},
elementsPath :
{
eleLabel : 'Elements path', // MISSING
eleTitle : 'عنصر 1%'
},
numberedlist : 'ادخال/حذف تعداد رقمي',
bulletedlist : 'ادخال/حذف تعداد نقطي',
indent : 'زيادة المسافة البادئة',
outdent : 'إنقاص المسافة البادئة',
justify :
{
left : 'محاذاة إلى اليسار',
center : 'توسيط',
right : 'محاذاة إلى اليمين',
block : 'ضبط'
},
blockquote : 'اقتباس',
clipboard :
{
title : 'لصق',
cutError : 'الإعدادات الأمنية للمتصفح الذي تستخدمه تمنع القص التلقائي. فضلاً إستخدم لوحة المفاتيح لفعل ذلك (Ctrl/Cmd+X).',
copyError : 'الإعدادات الأمنية للمتصفح الذي تستخدمه تمنع النسخ التلقائي. فضلاً إستخدم لوحة المفاتيح لفعل ذلك (Ctrl/Cmd+C).',
pasteMsg : 'الصق داخل الصندوق بإستخدام زرائر (<STRONG>Ctrl/Cmd+V</STRONG>) في لوحة المفاتيح، ثم اضغط زر <STRONG>موافق</STRONG>.',
securityMsg : 'نظراً لإعدادات الأمان الخاصة بمتصفحك، لن يتمكن هذا المحرر من الوصول لمحتوى حافظتك، لذلك يجب عليك لصق المحتوى مرة أخرى في هذه النافذة.',
pasteArea : 'Paste Area' // MISSING
},
pastefromword :
{
confirmCleanup : 'يبدو أن النص المراد لصقه منسوخ من برنامج وورد. هل تود تنظيفه قبل الشروع في عملية اللصق؟',
toolbar : 'لصق من وورد',
title : 'لصق من وورد',
error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING
},
pasteText :
{
button : 'لصق كنص بسيط',
title : 'لصق كنص بسيط'
},
templates :
{
button : 'القوالب',
title : 'قوالب المحتوى',
options : 'Template Options', // MISSING
insertOption : 'استبدال المحتوى',
selectPromptMsg : 'اختر القالب الذي تود وضعه في المحرر',
emptyListMsg : '(لم يتم تعريف أي قالب)'
},
showBlocks : 'مخطط تفصيلي',
stylesCombo :
{
label : 'أنماط',
panelTitle : 'Formatting Styles', // MISSING
panelTitle1 : 'أنماط الفقرة',
panelTitle2 : 'أنماط مضمنة',
panelTitle3 : 'أنماط الكائن'
},
format :
{
label : 'تنسيق',
panelTitle : 'تنسيق الفقرة',
tag_p : 'عادي',
tag_pre : 'منسّق',
tag_address : 'عنوان',
tag_h1 : 'العنوان 1',
tag_h2 : 'العنوان 2',
tag_h3 : 'العنوان 3',
tag_h4 : 'العنوان 4',
tag_h5 : 'العنوان 5',
tag_h6 : 'العنوان 6',
tag_div : 'عادي (DIV)'
},
div :
{
title : 'Create Div Container', // MISSING
toolbar : 'Create Div Container', // MISSING
cssClassInputLabel : 'Stylesheet Classes', // MISSING
styleSelectLabel : 'Style', // MISSING
IdInputLabel : 'Id', // MISSING
languageCodeInputLabel : ' Language Code', // MISSING
inlineStyleInputLabel : 'Inline Style', // MISSING
advisoryTitleInputLabel : 'Advisory Title', // MISSING
langDirLabel : 'Language Direction', // MISSING
langDirLTRLabel : 'Left to Right (LTR)', // MISSING
langDirRTLLabel : 'Right to Left (RTL)', // MISSING
edit : 'Edit Div', // MISSING
remove : 'Remove Div' // MISSING
},
iframe :
{
title : 'IFrame Properties', // MISSING
toolbar : 'IFrame', // MISSING
noUrl : 'Please type the iframe URL', // MISSING
scrolling : 'Enable scrollbars', // MISSING
border : 'Show frame border' // MISSING
},
font :
{
label : 'خط',
voiceLabel : 'حجم الخط',
panelTitle : 'حجم الخط'
},
fontSize :
{
label : 'حجم الخط',
voiceLabel : 'حجم الخط',
panelTitle : 'حجم الخط'
},
colorButton :
{
textColorTitle : 'لون النص',
bgColorTitle : 'لون الخلفية',
panelTitle : 'Colors', // MISSING
auto : 'تلقائي',
more : 'ألوان إضافية...'
},
colors :
{
'000' : 'أسود',
'800000' : 'كستنائي',
'8B4513' : 'بني فاتح',
'2F4F4F' : 'رمادي أردوازي غامق',
'008080' : 'أزرق مخضر',
'000080' : 'أزرق داكن',
'4B0082' : 'كحلي',
'696969' : 'رمادي داكن',
'B22222' : 'طوبي',
'A52A2A' : 'بني',
'DAA520' : 'ذهبي داكن',
'006400' : 'أخضر داكن',
'40E0D0' : 'فيروزي',
'0000CD' : 'أزرق متوسط',
'800080' : 'بنفسجي غامق',
'808080' : 'رمادي',
'F00' : 'أحمر',
'FF8C00' : 'برتقالي داكن',
'FFD700' : 'ذهبي',
'008000' : 'أخضر',
'0FF' : 'تركواز',
'00F' : 'أزرق',
'EE82EE' : 'بنفسجي',
'A9A9A9' : 'رمادي شاحب',
'FFA07A' : 'برتقالي وردي',
'FFA500' : 'برتقالي',
'FFFF00' : 'أصفر',
'00FF00' : 'ليموني',
'AFEEEE' : 'فيروزي شاحب',
'ADD8E6' : 'أزرق فاتح',
'DDA0DD' : 'بنفسجي فاتح',
'D3D3D3' : 'رمادي فاتح',
'FFF0F5' : 'وردي فاتح',
'FAEBD7' : 'أبيض عتيق',
'FFFFE0' : 'أصفر فاتح',
'F0FFF0' : 'أبيض مائل للأخضر',
'F0FFFF' : 'سماوي',
'F0F8FF' : 'لبني',
'E6E6FA' : 'أرجواني',
'FFF' : 'أبيض'
},
scayt :
{
title : 'تدقيق إملائي أثناء الكتابة',
opera_title : 'Not supported by Opera', // MISSING
enable : 'تفعيل SCAYT',
disable : 'تعطيل SCAYT',
about : 'عن SCAYT',
toggle : 'تثبيت SCAYT',
options : 'خيارات',
langs : 'لغات',
moreSuggestions : 'المزيد من المقترحات',
ignore : 'تجاهل',
ignoreAll : 'تجاهل الكل',
addWord : 'إضافة كلمة',
emptyDic : 'اسم القاموس يجب ألا يكون فارغاً.',
optionsTab : 'خيارات',
allCaps : 'Ignore All-Caps Words', // MISSING
ignoreDomainNames : 'Ignore Domain Names', // MISSING
mixedCase : 'Ignore Words with Mixed Case', // MISSING
mixedWithDigits : 'Ignore Words with Numbers', // MISSING
languagesTab : 'لغات',
dictionariesTab : 'قواميس',
dic_field_name : 'Dictionary name', // MISSING
dic_create : 'Create', // MISSING
dic_restore : 'Restore', // MISSING
dic_delete : 'Delete', // MISSING
dic_rename : 'Rename', // MISSING
dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING
aboutTab : 'عن'
},
about :
{
title : 'عن CKEditor',
dlgTitle : 'عن CKEditor',
help : 'Check $1 for help.', // MISSING
userGuide : 'CKEditor User\'s Guide', // MISSING
moreInfo : 'للحصول على معلومات الترخيص ، يرجى زيارة موقعنا على شبكة الانترنت:',
copy : 'حقوق النشر © $1. جميع الحقوق محفوظة.'
},
maximize : 'تكبير',
minimize : 'تصغير',
fakeobjects :
{
anchor : 'إرساء',
flash : 'رسم متحرك بالفلاش',
iframe : 'IFrame', // MISSING
hiddenfield : 'Hidden Field', // MISSING
unknown : 'كائن غير معروف'
},
resize : 'اسحب لتغيير الحجم',
colordialog :
{
title : 'اختر لون',
options : 'Color Options', // MISSING
highlight : 'إلقاء الضوء',
selected : 'مُختار',
clear : 'مسح'
},
toolbarCollapse : 'Collapse Toolbar', // MISSING
toolbarExpand : 'Expand Toolbar', // MISSING
toolbarGroups :
{
document : 'Document', // MISSING
clipboard : 'Clipboard/Undo', // MISSING
editing : 'Editing', // MISSING
forms : 'Forms', // MISSING
basicstyles : 'Basic Styles', // MISSING
paragraph : 'Paragraph', // MISSING
links : 'Links', // MISSING
insert : 'Insert', // MISSING
styles : 'Styles', // MISSING
colors : 'Colors', // MISSING
tools : 'Tools' // MISSING
},
bidi :
{
ltr : 'Text direction from left to right', // MISSING
rtl : 'Text direction from right to left' // MISSING
},
docprops :
{
label : 'خصائص الصفحة',
title : 'خصائص الصفحة',
design : 'Design', // MISSING
meta : 'المعرّفات الرأسية',
chooseColor : 'اختر',
other : '<أخرى>',
docTitle : 'عنوان الصفحة',
charset : 'ترميز الحروف',
charsetOther : 'ترميز آخر',
charsetASCII : 'ASCII', // MISSING
charsetCE : 'أوروبا الوسطى',
charsetCT : 'الصينية التقليدية (Big5)',
charsetCR : 'السيريلية',
charsetGR : 'اليونانية',
charsetJP : 'اليابانية',
charsetKR : 'الكورية',
charsetTR : 'التركية',
charsetUN : 'Unicode (UTF-8)', // MISSING
charsetWE : 'أوروبا الغربية',
docType : 'ترويسة نوع الصفحة',
docTypeOther : 'ترويسة نوع صفحة أخرى',
xhtmlDec : 'تضمين إعلانات لغة XHTMLَ',
bgColor : 'لون الخلفية',
bgImage : 'رابط الصورة الخلفية',
bgFixed : 'جعلها علامة مائية',
txtColor : 'لون النص',
margin : 'هوامش الصفحة',
marginTop : 'علوي',
marginLeft : 'أيسر',
marginRight : 'أيمن',
marginBottom : 'سفلي',
metaKeywords : 'الكلمات الأساسية (مفصولة بفواصل)َ',
metaDescription : 'وصف الصفحة',
metaAuthor : 'الكاتب',
metaCopyright : 'المالك',
previewHtml : '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>' // MISSING
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Ukrainian language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['uk'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Панель інструментів редактора',
editor : 'Текстовий редактор',
// Toolbar buttons without dialogs.
source : 'Джерело',
newPage : 'Нова сторінка',
save : 'Зберегти',
preview : 'Попередній перегляд',
cut : 'Вирізати',
copy : 'Копіювати',
paste : 'Вставити',
print : 'Друк',
underline : 'Підкреслений',
bold : 'Жирний',
italic : 'Курсив',
selectAll : 'Виділити все',
removeFormat : 'Очистити форматування',
strike : 'Закреслений',
subscript : 'Нижній індекс',
superscript : 'Верхній індекс',
horizontalrule : 'Горизонтальна лінія',
pagebreak : 'Вставити розрив сторінки',
pagebreakAlt : 'Розрив Сторінки',
unlink : 'Видалити посилання',
undo : 'Повернути',
redo : 'Повторити',
// Common messages and labels.
common :
{
browseServer : 'Огляд',
url : 'URL',
protocol : 'Протокол',
upload : 'Надіслати',
uploadSubmit : 'Надіслати на сервер',
image : 'Зображення',
flash : 'Flash',
form : 'Форма',
checkbox : 'Галочка',
radio : 'Кнопка вибору',
textField : 'Текстове поле',
textarea : 'Текстова область',
hiddenField : 'Приховане поле',
button : 'Кнопка',
select : 'Список',
imageButton : 'Кнопка із зображенням',
notSet : '<не визначено>',
id : 'Ідентифікатор',
name : 'Ім\'я',
langDir : 'Напрямок мови',
langDirLtr : 'Зліва направо (LTR)',
langDirRtl : 'Справа наліво (RTL)',
langCode : 'Код мови',
longDescr : 'Довгий опис URL',
cssClass : 'Клас CSS',
advisoryTitle : 'Заголовок',
cssStyle : 'Стиль CSS',
ok : 'ОК',
cancel : 'Скасувати',
close : 'Закрити',
preview : 'Попередній перегляд',
generalTab : 'Основне',
advancedTab : 'Додаткове',
validateNumberFailed : 'Значення не є цілим числом.',
confirmNewPage : 'Всі незбережені зміни будуть втрачені. Ви впевнені, що хочете завантажити нову сторінку?',
confirmCancel : 'Деякі опції змінено. Закрити вікно без збереження змін?',
options : 'Опції',
target : 'Ціль',
targetNew : 'Нове вікно (_blank)',
targetTop : 'Поточне вікно (_top)',
targetSelf : 'Поточний фрейм/вікно (_self)',
targetParent : 'Батьківський фрейм/вікно (_parent)',
langDirLTR : 'Зліва направо (LTR)',
langDirRTL : 'Справа наліво (RTL)',
styles : 'Стиль CSS',
cssClasses : 'Клас CSS',
width : 'Ширина',
height : 'Висота',
align : 'Вирівнювання',
alignLeft : 'По лівому краю',
alignRight : 'По правому краю',
alignCenter : 'По центру',
alignTop : 'По верхньому краю',
alignMiddle : 'По середині',
alignBottom : 'По нижньому краю',
invalidHeight : 'Висота повинна бути цілим числом.',
invalidWidth : 'Ширина повинна бути цілим числом.',
invalidCssLength : 'Значення, вказане для "%1" в полі повинно бути позитивним числом або без дійсного виміру CSS блоку (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength : 'Значення, вказане для "%1" в полі повинно бути позитивним числом або без дійсного виміру HTML блоку (px or %).',
invalidInlineStyle : 'Значення, вказане для вбудованого стилю повинне складатися з одного чи кількох кортежів у форматі "ім\'я : значення", розділених крапкою з комою.',
cssLengthTooltip : 'Введіть номер значення в пікселях або число з дійсною одиниці CSS (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, не доступне</span>'
},
contextmenu :
{
options : 'Опції контекстного меню'
},
// Special char dialog.
specialChar :
{
toolbar : 'Спеціальний символ',
title : 'Оберіть спеціальний символ',
options : 'Опції'
},
// Link dialog.
link :
{
toolbar : 'Вставити/Редагувати посилання',
other : '<інший>',
menu : 'Вставити посилання',
title : 'Посилання',
info : 'Інформація посилання',
target : 'Ціль',
upload : 'Надіслати',
advanced : 'Додаткове',
type : 'Тип посилання',
toUrl : 'URL',
toAnchor : 'Якір на цю сторінку',
toEmail : 'Ел. пошта',
targetFrame : '<фрейм>',
targetPopup : '<випливаюче вікно>',
targetFrameName : 'Ім\'я цільового фрейму',
targetPopupName : 'Ім\'я випливаючого вікна',
popupFeatures : 'Властивості випливаючого вікна',
popupResizable : 'Масштабоване',
popupStatusBar : 'Рядок статусу',
popupLocationBar: 'Панель локації',
popupToolbar : 'Панель інструментів',
popupMenuBar : 'Панель меню',
popupFullScreen : 'Повний екран (IE)',
popupScrollBars : 'Стрічки прокрутки',
popupDependent : 'Залежний (Netscape)',
popupLeft : 'Позиція зліва',
popupTop : 'Позиція зверху',
id : 'Ідентифікатор',
langDir : 'Напрямок мови',
langDirLTR : 'Зліва направо (LTR)',
langDirRTL : 'Справа наліво (RTL)',
acccessKey : 'Гаряча клавіша',
name : 'Ім\'я',
langCode : 'Код мови',
tabIndex : 'Послідовність переходу',
advisoryTitle : 'Заголовок',
advisoryContentType : 'Тип вмісту',
cssClasses : 'Клас CSS',
charset : 'Кодування',
styles : 'Стиль CSS',
rel : 'Зв\'язок',
selectAnchor : 'Оберіть якір',
anchorName : 'За ім\'ям елементу',
anchorId : 'За ідентифікатором елементу',
emailAddress : 'Адреса ел. пошти',
emailSubject : 'Тема листа',
emailBody : 'Тіло повідомлення',
noAnchors : '(В цьому документі немає якорів)',
noUrl : 'Будь ласка, вкажіть URL посилання',
noEmail : 'Будь ласка, вкажіть адрес ел. пошти'
},
// Anchor dialog
anchor :
{
toolbar : 'Вставити/Редагувати якір',
menu : 'Властивості якоря',
title : 'Властивості якоря',
name : 'Ім\'я якоря',
errorName : 'Будь ласка, вкажіть ім\'я якоря',
remove : 'Прибрати якір'
},
// List style dialog
list:
{
numberedTitle : 'Опції нумерованого списку',
bulletedTitle : 'Опції маркованого списку',
type : 'Тип',
start : 'Почати з...',
validateStartNumber :'Початковий номер списку повинен бути цілим числом.',
circle : 'Кільце',
disc : 'Кружечок',
square : 'Квадратик',
none : 'Нема',
notset : '<не вказано>',
armenian : 'Вірменська нумерація',
georgian : 'Грузинська нумерація (an, ban, gan і т.д.)',
lowerRoman : 'Малі римські (i, ii, iii, iv, v і т.д.)',
upperRoman : 'Великі римські (I, II, III, IV, V і т.д.)',
lowerAlpha : 'Малі лат. букви (a, b, c, d, e і т.д.)',
upperAlpha : 'Великі лат. букви (A, B, C, D, E і т.д.)',
lowerGreek : 'Малі гр. букви (альфа, бета, гамма і т.д.)',
decimal : 'Десяткові (1, 2, 3 і т.д.)',
decimalLeadingZero : 'Десяткові з нулем (01, 02, 03 і т.д.)'
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Знайти і замінити',
find : 'Пошук',
replace : 'Заміна',
findWhat : 'Шукати:',
replaceWith : 'Замінити на:',
notFoundMsg : 'Вказаний текст не знайдено.',
findOptions : 'Параметри Пошуку',
matchCase : 'Враховувати регістр',
matchWord : 'Збіг цілих слів',
matchCyclic : 'Циклічна заміна',
replaceAll : 'Замінити все',
replaceSuccessMsg : '%1 співпадінь(ня) замінено.'
},
// Table Dialog
table :
{
toolbar : 'Таблиця',
title : 'Властивості таблиці',
menu : 'Властивості таблиці',
deleteTable : 'Видалити таблицю',
rows : 'Рядки',
columns : 'Стовбці',
border : 'Розмір рамки',
widthPx : 'пікселів',
widthPc : 'відсотків',
widthUnit : 'Одиниці вимір.',
cellSpace : 'Проміжок',
cellPad : 'Внутр. відступ',
caption : 'Заголовок таблиці',
summary : 'Детальний опис заголовку таблиці',
headers : 'Заголовки стовбців/рядків',
headersNone : 'Без заголовків',
headersColumn : 'Стовбці',
headersRow : 'Рядки',
headersBoth : 'Стовбці і рядки',
invalidRows : 'Кількість рядків повинна бути більшою 0.',
invalidCols : 'Кількість стовбців повинна бути більшою 0.',
invalidBorder : 'Розмір рамки повинен бути цілим числом.',
invalidWidth : 'Ширина таблиці повинна бути цілим числом.',
invalidHeight : 'Висота таблиці повинна бути цілим числом.',
invalidCellSpacing : 'Проміжок між комірками повинен бути цілим числом.',
invalidCellPadding : 'Внутр. відступ комірки повинен бути цілим числом.',
cell :
{
menu : 'Комірки',
insertBefore : 'Вставити комірку перед',
insertAfter : 'Вставити комірку після',
deleteCell : 'Видалити комірки',
merge : 'Об\'єднати комірки',
mergeRight : 'Об\'єднати справа',
mergeDown : 'Об\'єднати донизу',
splitHorizontal : 'Розділити комірку по горизонталі',
splitVertical : 'Розділити комірку по вертикалі',
title : 'Властивості комірки',
cellType : 'Тип комірки',
rowSpan : 'Об\'єднання рядків',
colSpan : 'Об\'єднання стовпців',
wordWrap : 'Автоперенесення тексту',
hAlign : 'Гориз. вирівнювання',
vAlign : 'Верт. вирівнювання',
alignBaseline : 'По базовій лінії',
bgColor : 'Колір фону',
borderColor : 'Колір рамки',
data : 'Дані',
header : 'Заголовок',
yes : 'Так',
no : 'Ні',
invalidWidth : 'Ширина комірки повинна бути цілим числом.',
invalidHeight : 'Висота комірки повинна бути цілим числом.',
invalidRowSpan : 'Кількість об\'єднуваних рядків повинна бути цілим числом.',
invalidColSpan : 'Кількість об\'єднуваних стовбців повинна бути цілим числом.',
chooseColor : 'Обрати'
},
row :
{
menu : 'Рядки',
insertBefore : 'Вставити рядок перед',
insertAfter : 'Вставити рядок після',
deleteRow : 'Видалити рядки'
},
column :
{
menu : 'Стовбці',
insertBefore : 'Вставити стовбець перед',
insertAfter : 'Вставити стовбець після',
deleteColumn : 'Видалити стовбці'
}
},
// Button Dialog.
button :
{
title : 'Властивості кнопки',
text : 'Значення',
type : 'Тип',
typeBtn : 'Кнопка (button)',
typeSbm : 'Надіслати (submit)',
typeRst : 'Очистити (reset)'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'Властивості галочки',
radioTitle : 'Властивості кнопки вибору',
value : 'Значення',
selected : 'Обрана'
},
// Form Dialog.
form :
{
title : 'Властивості форми',
menu : 'Властивості форми',
action : 'Дія',
method : 'Метод',
encoding : 'Кодування'
},
// Select Field Dialog.
select :
{
title : 'Властивості списку',
selectInfo : 'Інфо',
opAvail : 'Доступні варіанти',
value : 'Значення',
size : 'Кількість',
lines : 'видимих позицій у списку',
chkMulti : 'Список з мультивибором',
opText : 'Текст',
opValue : 'Значення',
btnAdd : 'Добавити',
btnModify : 'Змінити',
btnUp : 'Вгору',
btnDown : 'Вниз',
btnSetValue : 'Встановити як обране значення',
btnDelete : 'Видалити'
},
// Textarea Dialog.
textarea :
{
title : 'Властивості текстової області',
cols : 'Стовбці',
rows : 'Рядки'
},
// Text Field Dialog.
textfield :
{
title : 'Властивості текстового поля',
name : 'Ім\'я',
value : 'Значення',
charWidth : 'Ширина',
maxChars : 'Макс. к-ть символів',
type : 'Тип',
typeText : 'Текст',
typePass : 'Пароль'
},
// Hidden Field Dialog.
hidden :
{
title : 'Властивості прихованого поля',
name : 'Ім\'я',
value : 'Значення'
},
// Image Dialog.
image :
{
title : 'Властивості зображення',
titleButton : 'Властивості кнопки із зображенням',
menu : 'Властивості зображення',
infoTab : 'Інформація про зображення',
btnUpload : 'Надіслати на сервер',
upload : 'Надіслати',
alt : 'Альтернативний текст',
lockRatio : 'Зберегти пропорції',
resetSize : 'Очистити поля розмірів',
border : 'Рамка',
hSpace : 'Гориз. відступ',
vSpace : 'Верт. відступ',
alertUrl : 'Будь ласка, вкажіть URL зображення',
linkTab : 'Посилання',
button2Img : 'Бажаєте перетворити обрану кнопку-зображення на просте зображення?',
img2Button : 'Бажаєте перетворити обране зображення на кнопку-зображення?',
urlMissing : 'Вкажіть URL зображення.',
validateBorder : 'Ширина рамки повинна бути цілим числом.',
validateHSpace : 'Гориз. відступ повинен бути цілим числом.',
validateVSpace : 'Верт. відступ повинен бути цілим числом.'
},
// Flash Dialog
flash :
{
properties : 'Властивості Flash',
propertiesTab : 'Властивості',
title : 'Властивості Flash',
chkPlay : 'Автопрогравання',
chkLoop : 'Циклічно',
chkMenu : 'Дозволити меню Flash',
chkFull : 'Дозволити повноекранний перегляд',
scale : 'Масштаб',
scaleAll : 'Показати все',
scaleNoBorder : 'Без рамки',
scaleFit : 'Поч. розмір',
access : 'Доступ до скрипта',
accessAlways : 'Завжди',
accessSameDomain: 'З того ж домена',
accessNever : 'Ніколи',
alignAbsBottom : 'По нижньому краю (abs)',
alignAbsMiddle : 'По середині (abs)',
alignBaseline : 'По базовій лінії',
alignTextTop : 'Текст по верхньому краю',
quality : 'Якість',
qualityBest : 'Відмінна',
qualityHigh : 'Висока',
qualityAutoHigh : 'Автом. відмінна',
qualityMedium : 'Середня',
qualityAutoLow : 'Автом. низька',
qualityLow : 'Низька',
windowModeWindow: 'Вікно',
windowModeOpaque: 'Непрозорість',
windowModeTransparent : 'Прозорість',
windowMode : 'Віконний режим',
flashvars : 'Змінні Flash',
bgcolor : 'Колір фону',
hSpace : 'Гориз. відступ',
vSpace : 'Верт. відступ',
validateSrc : 'Будь ласка, вкажіть URL посилання',
validateHSpace : 'Гориз. відступ повинен бути цілим числом.',
validateVSpace : 'Верт. відступ повинен бути цілим числом.'
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'Перевірити орфографію',
title : 'Перевірка орфографії',
notAvailable : 'Вибачте, але сервіс наразі недоступний.',
errorLoading : 'Помилка завантаження : %s.',
notInDic : 'Немає в словнику',
changeTo : 'Замінити на',
btnIgnore : 'Пропустити',
btnIgnoreAll : 'Пропустити все',
btnReplace : 'Замінити',
btnReplaceAll : 'Замінити все',
btnUndo : 'Назад',
noSuggestions : '- немає варіантів -',
progress : 'Виконується перевірка орфографії...',
noMispell : 'Перевірку орфографії завершено: помилок не знайдено',
noChanges : 'Перевірку орфографії завершено: жодне слово не змінено',
oneChange : 'Перевірку орфографії завершено: змінено одне слово',
manyChanges : 'Перевірку орфографії завершено: 1% слів(ова) змінено',
ieSpellDownload : 'Модуль перевірки орфографії не встановлено. Бажаєте завантажити його зараз?'
},
smiley :
{
toolbar : 'Смайлик',
title : 'Вставити смайлик',
options : 'Опції смайликів'
},
elementsPath :
{
eleLabel : 'Шлях',
eleTitle : '%1 елемент'
},
numberedlist : 'Нумерований список',
bulletedlist : 'Маркірований список',
indent : 'Збільшити відступ',
outdent : 'Зменшити відступ',
justify :
{
left : 'По лівому краю',
center : 'По центру',
right : 'По правому краю',
block : 'По ширині'
},
blockquote : 'Цитата',
clipboard :
{
title : 'Вставити',
cutError : 'Налаштування безпеки Вашого браузера не дозволяють редактору автоматично виконувати операції вирізування. Будь ласка, використовуйте клавіатуру для цього (Ctrl/Cmd+X)',
copyError : 'Налаштування безпеки Вашого браузера не дозволяють редактору автоматично виконувати операції копіювання. Будь ласка, використовуйте клавіатуру для цього (Ctrl/Cmd+C).',
pasteMsg : 'Будь ласка, вставте інформацію з буфера обміну в цю область, користуючись комбінацією клавіш (<STRONG>Ctrl/Cmd+V</STRONG>), та натисніть <STRONG>OK</STRONG>.',
securityMsg : 'Редактор не може отримати прямий доступ до буферу обміну у зв\'язку з налаштуваннями Вашого браузера. Вам потрібно вставити інформацію в це вікно.',
pasteArea : 'Область вставки'
},
pastefromword :
{
confirmCleanup : 'Текст, що Ви намагаєтесь вставити, схожий на скопійований з Word. Бажаєте очистити його форматування перед вставлянням?',
toolbar : 'Вставити з Word',
title : 'Вставити з Word',
error : 'Неможливо очистити форматування через внутрішню помилку.'
},
pasteText :
{
button : 'Вставити тільки текст',
title : 'Вставити тільки текст'
},
templates :
{
button : 'Шаблони',
title : 'Шаблони змісту',
options : 'Опції шаблону',
insertOption : 'Замінити поточний вміст',
selectPromptMsg : 'Оберіть, будь ласка, шаблон для відкриття в редакторі<br>(поточний зміст буде втрачено):',
emptyListMsg : '(Не знайдено жодного шаблону)'
},
showBlocks : 'Показувати блоки',
stylesCombo :
{
label : 'Стиль',
panelTitle : 'Стилі форматування',
panelTitle1 : 'Блочні стилі',
panelTitle2 : 'Рядкові стилі',
panelTitle3 : 'Об\'єктні стилі'
},
format :
{
label : 'Форматування',
panelTitle : 'Форматування параграфа',
tag_p : 'Нормальний',
tag_pre : 'Форматований',
tag_address : 'Адреса',
tag_h1 : 'Заголовок 1',
tag_h2 : 'Заголовок 2',
tag_h3 : 'Заголовок 3',
tag_h4 : 'Заголовок 4',
tag_h5 : 'Заголовок 5',
tag_h6 : 'Заголовок 6',
tag_div : 'Нормальний (div)'
},
div :
{
title : 'Створити блок-контейнер',
toolbar : 'Створити блок-контейнер',
cssClassInputLabel : 'Клас CSS',
styleSelectLabel : 'Стиль CSS',
IdInputLabel : 'Ідентифікатор',
languageCodeInputLabel : 'Код мови',
inlineStyleInputLabel : 'Вписаний стиль',
advisoryTitleInputLabel : 'Зміст випливаючої підказки',
langDirLabel : 'Напрямок мови',
langDirLTRLabel : 'Зліва направо (LTR)',
langDirRTLLabel : 'Справа наліво (RTL)',
edit : 'Редагувати блок',
remove : 'Видалити блок'
},
iframe :
{
title : 'Налаштування для IFrame',
toolbar : 'IFrame',
noUrl : 'Будь ласка введіть посилання для IFrame',
scrolling : 'Увімкнути прокрутку',
border : 'Показати рамки фрейму'
},
font :
{
label : 'Шрифт',
voiceLabel : 'Шрифт',
panelTitle : 'Шрифт'
},
fontSize :
{
label : 'Розмір',
voiceLabel : 'Розмір шрифту',
panelTitle : 'Розмір'
},
colorButton :
{
textColorTitle : 'Колір тексту',
bgColorTitle : 'Колір фону',
panelTitle : 'Кольори',
auto : 'Авто',
more : 'Кольори...'
},
colors :
{
'000' : 'Чорний',
'800000' : 'Бордовий',
'8B4513' : 'Коричневий',
'2F4F4F' : 'Темний сіро-зелений',
'008080' : 'Морської хвилі',
'000080' : 'Сливовий',
'4B0082' : 'Індиго',
'696969' : 'Темносірий',
'B22222' : 'Темночервоний',
'A52A2A' : 'Каштановий',
'DAA520' : 'Бежевий',
'006400' : 'Темнозелений',
'40E0D0' : 'Бірюзовий',
'0000CD' : 'Темносиній',
'800080' : 'Пурпурний',
'808080' : 'Сірий',
'F00' : 'Червоний',
'FF8C00' : 'Темнооранжевий',
'FFD700' : 'Жовтий',
'008000' : 'Зелений',
'0FF' : 'Синьо-зелений',
'00F' : 'Синій',
'EE82EE' : 'Фіолетовий',
'A9A9A9' : 'Світлосірий',
'FFA07A' : 'Рожевий',
'FFA500' : 'Оранжевий',
'FFFF00' : 'Яскравожовтий',
'00FF00' : 'Салатовий',
'AFEEEE' : 'Світлобірюзовий',
'ADD8E6' : 'Блакитний',
'DDA0DD' : 'Світлофіолетовий',
'D3D3D3' : 'Сріблястий',
'FFF0F5' : 'Світлорожевий',
'FAEBD7' : 'Світлооранжевий',
'FFFFE0' : 'Світложовтий',
'F0FFF0' : 'Світлозелений',
'F0FFFF' : 'Світлий синьо-зелений',
'F0F8FF' : 'Світлоблакитний',
'E6E6FA' : 'Лавандовий',
'FFF' : 'Білий'
},
scayt :
{
title : 'Перефірка орфографії по мірі набору',
opera_title : 'Не підтримується в Opera',
enable : 'Ввімкнути SCAYT',
disable : 'Вимкнути SCAYT',
about : 'Про SCAYT',
toggle : 'Перемкнути SCAYT',
options : 'Опції',
langs : 'Мови',
moreSuggestions : 'Більше варіантів',
ignore : 'Пропустити',
ignoreAll : 'Пропустити всі',
addWord : 'Додати слово',
emptyDic : 'Назва словника повинна бути вказана.',
optionsTab : 'Опції',
allCaps : 'Пропустити прописні слова',
ignoreDomainNames : 'Пропустити доменні назви',
mixedCase : 'Пропустити слова зі змішаним регістром',
mixedWithDigits : 'Пропустити слова, що містять цифри',
languagesTab : 'Мови',
dictionariesTab : 'Словники',
dic_field_name : 'Назва словника',
dic_create : 'Створити',
dic_restore : 'Відновити',
dic_delete : 'Видалити',
dic_rename : 'Перейменувати',
dic_info : 'Як правило, користувацькі словники зберігаються у cookie-файлах. Однак, cookie-файли мають обмеження на розмір. Якщо користувацький словник зростає в обсязі настільки, що вже не може бути збережений у cookie-файлі, тоді його можна зберегти на нашому сервері. Щоб зберегти Ваш персональний словник на нашому сервері необхідно вказати назву словника. Якщо Ви вже зберігали словник на сервері, будь ласка, вкажіть назву збереженого словника і натисніть кнопку Відновити.',
aboutTab : 'Про SCAYT'
},
about :
{
title : 'Про CKEditor',
dlgTitle : 'Про CKEditor',
help : 'Перевірте $1 для допомоги.',
userGuide : 'Інструкція Користувача для CKEditor',
moreInfo : 'Щодо інформації з ліцензування завітайте на наш сайт:',
copy : 'Copyright © $1. Всі права застережено.'
},
maximize : 'Максимізувати',
minimize : 'Мінімізувати',
fakeobjects :
{
anchor : 'Якір',
flash : 'Flash-анімація',
iframe : 'IFrame',
hiddenfield : 'Приховані Поля',
unknown : 'Невідомий об\'єкт'
},
resize : 'Потягніть для зміни розмірів',
colordialog :
{
title : 'Обрати колір',
options : 'Опції кольорів',
highlight : 'Колір, на який вказує курсор',
selected : 'Обраний колір',
clear : 'Очистити'
},
toolbarCollapse : 'Згорнути панель інструментів',
toolbarExpand : 'Розгорнути панель інструментів',
toolbarGroups :
{
document : 'Документ',
clipboard : 'Буфер обміну / Скасувати',
editing : 'Редагування',
forms : 'Форми',
basicstyles : 'Основний Стиль',
paragraph : 'Параграф',
links : 'Посилання',
insert : 'Вставити',
styles : 'Стилі',
colors : 'Кольори',
tools : 'Інструменти'
},
bidi :
{
ltr : 'Напрямок тексту зліва направо',
rtl : 'Напрямок тексту справа наліво'
},
docprops :
{
label : 'Властивості документа',
title : 'Властивості документа',
design : 'Дизайн',
meta : 'Мета дані',
chooseColor : 'Обрати',
other : '<інший>',
docTitle : 'Заголовок сторінки',
charset : 'Кодування набору символів',
charsetOther : 'Інше кодування набору символів',
charsetASCII : 'ASCII',
charsetCE : 'Центрально-європейська',
charsetCT : 'Китайська традиційна (Big5)',
charsetCR : 'Кирилиця',
charsetGR : 'Грецька',
charsetJP : 'Японська',
charsetKR : 'Корейська',
charsetTR : 'Турецька',
charsetUN : 'Юнікод (UTF-8)',
charsetWE : 'Західно-европейская',
docType : 'Заголовок типу документу',
docTypeOther : 'Інший заголовок типу документу',
xhtmlDec : 'Ввімкнути XHTML оголошення',
bgColor : 'Колір тла',
bgImage : 'URL зображення тла',
bgFixed : 'Тло без прокрутки',
txtColor : 'Колір тексту',
margin : 'Відступи сторінки',
marginTop : 'Верхній',
marginLeft : 'Лівий',
marginRight : 'Правий',
marginBottom : 'Нижній',
metaKeywords : 'Ключові слова документа (розділені комами)',
metaDescription : 'Опис документа',
metaAuthor : 'Автор',
metaCopyright : 'Авторські права',
previewHtml : '<p>Це приклад<strong>тексту</strong>. Ви використовуєте<a href="javascript:void(0)"> CKEditor </a>.</p>'
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Czech language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['cs'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Textový editor, %1',
editorHelp : 'Stiskněte ALT 0 pro nápovědu',
// ARIA descriptions.
toolbars : 'Panely nástrojů editoru',
editor : 'Textový editor',
// Toolbar buttons without dialogs.
source : 'Zdroj',
newPage : 'Nová stránka',
save : 'Uložit',
preview : 'Náhled',
cut : 'Vyjmout',
copy : 'Kopírovat',
paste : 'Vložit',
print : 'Tisk',
underline : 'Podtržené',
bold : 'Tučné',
italic : 'Kurzíva',
selectAll : 'Vybrat vše',
removeFormat : 'Odstranit formátování',
strike : 'Přeškrtnuté',
subscript : 'Dolní index',
superscript : 'Horní index',
horizontalrule : 'Vložit vodorovnou linku',
pagebreak : 'Vložit konec stránky',
pagebreakAlt : 'Konec stránky',
unlink : 'Odstranit odkaz',
undo : 'Zpět',
redo : 'Znovu',
// Common messages and labels.
common :
{
browseServer : 'Vybrat na serveru',
url : 'URL',
protocol : 'Protokol',
upload : 'Odeslat',
uploadSubmit : 'Odeslat na server',
image : 'Obrázek',
flash : 'Flash',
form : 'Formulář',
checkbox : 'Zaškrtávací políčko',
radio : 'Přepínač',
textField : 'Textové pole',
textarea : 'Textová oblast',
hiddenField : 'Skryté pole',
button : 'Tlačítko',
select : 'Seznam',
imageButton : 'Obrázkové tlačítko',
notSet : '<nenastaveno>',
id : 'Id',
name : 'Jméno',
langDir : 'Směr jazyka',
langDirLtr : 'Zleva doprava (LTR)',
langDirRtl : 'Zprava doleva (RTL)',
langCode : 'Kód jazyka',
longDescr : 'Dlouhý popis URL',
cssClass : 'Třída stylu',
advisoryTitle : 'Pomocný titulek',
cssStyle : 'Styl',
ok : 'OK',
cancel : 'Zrušit',
close : 'Zavřít',
preview : 'Náhled',
generalTab : 'Obecné',
advancedTab : 'Rozšířené',
validateNumberFailed : 'Zadaná hodnota není číselná.',
confirmNewPage : 'Jakékoliv neuložené změny obsahu budou ztraceny. Skutečně chcete otevřít novou stránku?',
confirmCancel : 'Některá z nastavení byla změněna. Skutečně chcete zavřít dialogové okno?',
options : 'Nastavení',
target : 'Cíl',
targetNew : 'Nové okno (_blank)',
targetTop : 'Okno nejvyšší úrovně (_top)',
targetSelf : 'Stejné okno (_self)',
targetParent : 'Rodičovské okno (_parent)',
langDirLTR : 'Zleva doprava (LTR)',
langDirRTL : 'Zprava doleva (RTL)',
styles : 'Styly',
cssClasses : 'Třídy stylů',
width : 'Šířka',
height : 'Výška',
align : 'Zarovnání',
alignLeft : 'Vlevo',
alignRight : 'Vpravo',
alignCenter : 'Na střed',
alignTop : 'Nahoru',
alignMiddle : 'Na střed',
alignBottom : 'Dolů',
invalidHeight : 'Zadaná výška musí být číslo.',
invalidWidth : 'Šířka musí být číslo.',
invalidCssLength : 'Hodnota určená pro pole "%1" musí být kladné číslo bez nebo s platnou jednotkou míry CSS (px, %, in, cm, mm, em, ex, pt, nebo pc).',
invalidHtmlLength : 'Hodnota určená pro pole "%1" musí být kladné číslo bez nebo s platnou jednotkou míry HTML (px nebo %).',
invalidInlineStyle : 'Hodnota určená pro řádkový styl se musí skládat z jedné nebo více n-tic ve formátu "název : hodnota", oddělené středníky',
cssLengthTooltip : 'Zadejte číslo jako hodnotu v pixelech nebo číslo s platnou jednotkou CSS (px, %, v cm, mm, em, ex, pt, nebo pc).',
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, nedostupné</span>'
},
contextmenu :
{
options : 'Nastavení kontextové nabídky'
},
// Special char dialog.
specialChar :
{
toolbar : 'Vložit speciální znaky',
title : 'Výběr speciálního znaku',
options : 'Nastavení speciálních znaků'
},
// Link dialog.
link :
{
toolbar : 'Odkaz',
other : '<jiný>',
menu : 'Změnit odkaz',
title : 'Odkaz',
info : 'Informace o odkazu',
target : 'Cíl',
upload : 'Odeslat',
advanced : 'Rozšířené',
type : 'Typ odkazu',
toUrl : 'URL',
toAnchor : 'Kotva v této stránce',
toEmail : 'E-mail',
targetFrame : '<rámec>',
targetPopup : '<vyskakovací okno>',
targetFrameName : 'Název cílového rámu',
targetPopupName : 'Název vyskakovacího okna',
popupFeatures : 'Vlastnosti vyskakovacího okna',
popupResizable : 'Umožňující měnit velikost',
popupStatusBar : 'Stavový řádek',
popupLocationBar: 'Panel umístění',
popupToolbar : 'Panel nástrojů',
popupMenuBar : 'Panel nabídky',
popupFullScreen : 'Celá obrazovka (IE)',
popupScrollBars : 'Posuvníky',
popupDependent : 'Závislost (Netscape)',
popupLeft : 'Levý okraj',
popupTop : 'Horní okraj',
id : 'Id',
langDir : 'Směr jazyka',
langDirLTR : 'Zleva doprava (LTR)',
langDirRTL : 'Zprava doleva (RTL)',
acccessKey : 'Přístupový klíč',
name : 'Jméno',
langCode : 'Kód jazyka',
tabIndex : 'Pořadí prvku',
advisoryTitle : 'Pomocný titulek',
advisoryContentType : 'Pomocný typ obsahu',
cssClasses : 'Třída stylu',
charset : 'Přiřazená znaková sada',
styles : 'Styl',
rel : 'Vztah',
selectAnchor : 'Vybrat kotvu',
anchorName : 'Podle jména kotvy',
anchorId : 'Podle Id objektu',
emailAddress : 'E-mailová adresa',
emailSubject : 'Předmět zprávy',
emailBody : 'Tělo zprávy',
noAnchors : '(Ve stránce není definována žádná kotva!)',
noUrl : 'Zadejte prosím URL odkazu',
noEmail : 'Zadejte prosím e-mailovou adresu'
},
// Anchor dialog
anchor :
{
toolbar : 'Záložka',
menu : 'Vlastnosti záložky',
title : 'Vlastnosti záložky',
name : 'Název záložky',
errorName : 'Zadejte prosím název záložky',
remove : 'Odstranit záložku'
},
// List style dialog
list:
{
numberedTitle : 'Vlastnosti číslování',
bulletedTitle : 'Vlastnosti odrážek',
type : 'Typ',
start : 'Počátek',
validateStartNumber :'Číslování musí začínat celým číslem.',
circle : 'Kroužky',
disc : 'Kolečka',
square : 'Čtverce',
none : 'Nic',
notset : '<nenastaveno>',
armenian : 'Arménské',
georgian : 'Gruzínské (an, ban, gan, atd.)',
lowerRoman : 'Malé římské (i, ii, iii, iv, v, atd.)',
upperRoman : 'Velké římské (I, II, III, IV, V, atd.)',
lowerAlpha : 'Malá latinka (a, b, c, d, e, atd.)',
upperAlpha : 'Velká latinka (A, B, C, D, E, atd.)',
lowerGreek : 'Malé řecké (alpha, beta, gamma, atd.)',
decimal : 'Arabská čísla (1, 2, 3, atd.)',
decimalLeadingZero : 'Arabská čísla uvozená nulou (01, 02, 03, atd.)'
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Najít a nahradit',
find : 'Hledat',
replace : 'Nahradit',
findWhat : 'Co hledat:',
replaceWith : 'Čím nahradit:',
notFoundMsg : 'Hledaný text nebyl nalezen.',
findOptions : 'Možnosti hledání',
matchCase : 'Rozlišovat velikost písma',
matchWord : 'Pouze celá slova',
matchCyclic : 'Procházet opakovaně',
replaceAll : 'Nahradit vše',
replaceSuccessMsg : '%1 nahrazení.'
},
// Table Dialog
table :
{
toolbar : 'Tabulka',
title : 'Vlastnosti tabulky',
menu : 'Vlastnosti tabulky',
deleteTable : 'Smazat tabulku',
rows : 'Řádky',
columns : 'Sloupce',
border : 'Ohraničení',
widthPx : 'bodů',
widthPc : 'procent',
widthUnit : 'jednotka šířky',
cellSpace : 'Vzdálenost buněk',
cellPad : 'Odsazení obsahu v buňce',
caption : 'Popis',
summary : 'Souhrn',
headers : 'Záhlaví',
headersNone : 'Žádné',
headersColumn : 'První sloupec',
headersRow : 'První řádek',
headersBoth : 'Obojí',
invalidRows : 'Počet řádků musí být číslo větší než 0.',
invalidCols : 'Počet sloupců musí být číslo větší než 0.',
invalidBorder : 'Zdaná velikost okraje musí být číselná.',
invalidWidth : 'Šířka tabulky musí být číslo.',
invalidHeight : 'Zadaná výška tabulky musí být číselná.',
invalidCellSpacing : 'Zadaná vzdálenost buněk musí být číselná.',
invalidCellPadding : 'Zadané odsazení obsahu v buňce musí být číselné.',
cell :
{
menu : 'Buňka',
insertBefore : 'Vložit buňku před',
insertAfter : 'Vložit buňku za',
deleteCell : 'Smazat buňky',
merge : 'Sloučit buňky',
mergeRight : 'Sloučit doprava',
mergeDown : 'Sloučit dolů',
splitHorizontal : 'Rozdělit buňky vodorovně',
splitVertical : 'Rozdělit buňky svisle',
title : 'Vlastnosti buňky',
cellType : 'Typ buňky',
rowSpan : 'Spojit řádky',
colSpan : 'Spojit sloupce',
wordWrap : 'Zalamování',
hAlign : 'Vodorovné zarovnání',
vAlign : 'Svislé zarovnání',
alignBaseline : 'Na účaří',
bgColor : 'Barva pozadí',
borderColor : 'Barva okraje',
data : 'Data',
header : 'Hlavička',
yes : 'Ano',
no : 'Ne',
invalidWidth : 'Šířka buňky musí být číslo.',
invalidHeight : 'Zadaná výška buňky musí být číslená.',
invalidRowSpan : 'Zadaný počet sloučených řádků musí být celé číslo.',
invalidColSpan : 'Zadaný počet sloučených sloupců musí být celé číslo.',
chooseColor : 'Výběr'
},
row :
{
menu : 'Řádek',
insertBefore : 'Vložit řádek před',
insertAfter : 'Vložit řádek za',
deleteRow : 'Smazat řádky'
},
column :
{
menu : 'Sloupec',
insertBefore : 'Vložit sloupec před',
insertAfter : 'Vložit sloupec za',
deleteColumn : 'Smazat sloupec'
}
},
// Button Dialog.
button :
{
title : 'Vlastnosti tlačítka',
text : 'Popisek',
type : 'Typ',
typeBtn : 'Tlačítko',
typeSbm : 'Odeslat',
typeRst : 'Obnovit'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'Vlastnosti zaškrtávacího políčka',
radioTitle : 'Vlastnosti přepínače',
value : 'Hodnota',
selected : 'Zaškrtnuto'
},
// Form Dialog.
form :
{
title : 'Vlastnosti formuláře',
menu : 'Vlastnosti formuláře',
action : 'Akce',
method : 'Metoda',
encoding : 'Kódování'
},
// Select Field Dialog.
select :
{
title : 'Vlastnosti seznamu',
selectInfo : 'Info',
opAvail : 'Dostupná nastavení',
value : 'Hodnota',
size : 'Velikost',
lines : 'Řádků',
chkMulti : 'Povolit mnohonásobné výběry',
opText : 'Text',
opValue : 'Hodnota',
btnAdd : 'Přidat',
btnModify : 'Změnit',
btnUp : 'Nahoru',
btnDown : 'Dolů',
btnSetValue : 'Nastavit jako vybranou hodnotu',
btnDelete : 'Smazat'
},
// Textarea Dialog.
textarea :
{
title : 'Vlastnosti textové oblasti',
cols : 'Sloupců',
rows : 'Řádků'
},
// Text Field Dialog.
textfield :
{
title : 'Vlastnosti textového pole',
name : 'Název',
value : 'Hodnota',
charWidth : 'Šířka ve znacích',
maxChars : 'Maximální počet znaků',
type : 'Typ',
typeText : 'Text',
typePass : 'Heslo'
},
// Hidden Field Dialog.
hidden :
{
title : 'Vlastnosti skrytého pole',
name : 'Název',
value : 'Hodnota'
},
// Image Dialog.
image :
{
title : 'Vlastnosti obrázku',
titleButton : 'Vlastností obrázkového tlačítka',
menu : 'Vlastnosti obrázku',
infoTab : 'Informace o obrázku',
btnUpload : 'Odeslat na server',
upload : 'Odeslat',
alt : 'Alternativní text',
lockRatio : 'Zámek',
resetSize : 'Původní velikost',
border : 'Okraje',
hSpace : 'Horizontální mezera',
vSpace : 'Vertikální mezera',
alertUrl : 'Zadejte prosím URL obrázku',
linkTab : 'Odkaz',
button2Img : 'Skutečně chcete převést zvolené obrázkové tlačítko na obyčejný obrázek?',
img2Button : 'Skutečně chcete převést zvolený obrázek na obrázkové tlačítko?',
urlMissing : 'Zadané URL zdroje obrázku nebylo nalezeno.',
validateBorder : 'Okraj musí být nastaven v celých číslech.',
validateHSpace : 'Horizontální mezera musí být nastavena v celých číslech.',
validateVSpace : 'Vertikální mezera musí být nastavena v celých číslech.'
},
// Flash Dialog
flash :
{
properties : 'Vlastnosti Flashe',
propertiesTab : 'Vlastnosti',
title : 'Vlastnosti Flashe',
chkPlay : 'Automatické spuštění',
chkLoop : 'Opakování',
chkMenu : 'Nabídka Flash',
chkFull : 'Povolit celoobrazovkový režim',
scale : 'Zobrazit',
scaleAll : 'Zobrazit vše',
scaleNoBorder : 'Bez okraje',
scaleFit : 'Přizpůsobit',
access : 'Přístup ke skriptu',
accessAlways : 'Vždy',
accessSameDomain: 'Ve stejné doméně',
accessNever : 'Nikdy',
alignAbsBottom : 'Zcela dolů',
alignAbsMiddle : 'Doprostřed',
alignBaseline : 'Na účaří',
alignTextTop : 'Na horní okraj textu',
quality : 'Kvalita',
qualityBest : 'Nejlepší',
qualityHigh : 'Vysoká',
qualityAutoHigh : 'Vysoká - auto',
qualityMedium : 'Střední',
qualityAutoLow : 'Nízká - auto',
qualityLow : 'Nejnižší',
windowModeWindow: 'Okno',
windowModeOpaque: 'Neprůhledné',
windowModeTransparent : 'Průhledné',
windowMode : 'Režim okna',
flashvars : 'Proměnné pro Flash',
bgcolor : 'Barva pozadí',
hSpace : 'Horizontální mezera',
vSpace : 'Vertikální mezera',
validateSrc : 'Zadejte prosím URL odkazu',
validateHSpace : 'Zadaná horizontální mezera musí být číslo.',
validateVSpace : 'Zadaná vertikální mezera musí být číslo.'
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'Zkontrolovat pravopis',
title : 'Kontrola pravopisu',
notAvailable : 'Omlouváme se, ale služba nyní není dostupná.',
errorLoading : 'Chyba nahrávání služby aplikace z: %s.',
notInDic : 'Není ve slovníku',
changeTo : 'Změnit na',
btnIgnore : 'Přeskočit',
btnIgnoreAll : 'Přeskakovat vše',
btnReplace : 'Zaměnit',
btnReplaceAll : 'Zaměňovat vše',
btnUndo : 'Zpět',
noSuggestions : '- žádné návrhy -',
progress : 'Probíhá kontrola pravopisu...',
noMispell : 'Kontrola pravopisu dokončena: Žádné pravopisné chyby nenalezeny',
noChanges : 'Kontrola pravopisu dokončena: Beze změn',
oneChange : 'Kontrola pravopisu dokončena: Jedno slovo změněno',
manyChanges : 'Kontrola pravopisu dokončena: %1 slov změněno',
ieSpellDownload : 'Kontrola pravopisu není nainstalována. Chcete ji nyní stáhnout?'
},
smiley :
{
toolbar : 'Smajlíci',
title : 'Vkládání smajlíků',
options : 'Nastavení smajlíků'
},
elementsPath :
{
eleLabel : 'Cesta objektu',
eleTitle : '%1 objekt'
},
numberedlist : 'Číslování',
bulletedlist : 'Odrážky',
indent : 'Zvětšit odsazení',
outdent : 'Zmenšit odsazení',
justify :
{
left : 'Zarovnat vlevo',
center : 'Zarovnat na střed',
right : 'Zarovnat vpravo',
block : 'Zarovnat do bloku'
},
blockquote : 'Citace',
clipboard :
{
title : 'Vložit',
cutError : 'Bezpečnostní nastavení vašeho prohlížeče nedovolují editoru spustit funkci pro vyjmutí zvoleného textu do schránky. Prosím vyjměte zvolený text do schránky pomocí klávesnice (Ctrl/Cmd+X).',
copyError : 'Bezpečnostní nastavení vašeho prohlížeče nedovolují editoru spustit funkci pro kopírování zvoleného textu do schránky. Prosím zkopírujte zvolený text do schránky pomocí klávesnice (Ctrl/Cmd+C).',
pasteMsg : 'Do následujícího pole vložte požadovaný obsah pomocí klávesnice (<STRONG>Ctrl/Cmd+V</STRONG>) a stiskněte <STRONG>OK</STRONG>.',
securityMsg : 'Z důvodů nastavení bezpečnosti vašeho prohlížeče nemůže editor přistupovat přímo do schránky. Obsah schránky prosím vložte znovu do tohoto okna.',
pasteArea : 'Oblast vkládání'
},
pastefromword :
{
confirmCleanup : 'Jak je vidět, vkládaný text je kopírován z Wordu. Chcete jej před vložením vyčistit?',
toolbar : 'Vložit z Wordu',
title : 'Vložit z Wordu',
error : 'Z důvodu vnitřní chyby nebylo možné provést vyčištění vkládaného textu.'
},
pasteText :
{
button : 'Vložit jako čistý text',
title : 'Vložit jako čistý text'
},
templates :
{
button : 'Šablony',
title : 'Šablony obsahu',
options : 'Nastavení šablon',
insertOption : 'Nahradit aktuální obsah',
selectPromptMsg : 'Prosím zvolte šablonu pro otevření v editoru<br>(aktuální obsah editoru bude ztracen):',
emptyListMsg : '(Není definována žádná šablona)'
},
showBlocks : 'Ukázat bloky',
stylesCombo :
{
label : 'Styl',
panelTitle : 'Formátovací styly',
panelTitle1 : 'Blokové styly',
panelTitle2 : 'Řádkové styly',
panelTitle3 : 'Objektové styly'
},
format :
{
label : 'Formát',
panelTitle : 'Formát',
tag_p : 'Normální',
tag_pre : 'Naformátováno',
tag_address : 'Adresa',
tag_h1 : 'Nadpis 1',
tag_h2 : 'Nadpis 2',
tag_h3 : 'Nadpis 3',
tag_h4 : 'Nadpis 4',
tag_h5 : 'Nadpis 5',
tag_h6 : 'Nadpis 6',
tag_div : 'Normální (DIV)'
},
div :
{
title : 'Vytvořit Div kontejner',
toolbar : 'Vytvořit Div kontejner',
cssClassInputLabel : 'Třídy stylů',
styleSelectLabel : 'Styly',
IdInputLabel : 'Id',
languageCodeInputLabel : ' Kód jazyka',
inlineStyleInputLabel : 'Vnitřní styly',
advisoryTitleInputLabel : 'Nápovědní titulek',
langDirLabel : 'Směr jazyka',
langDirLTRLabel : 'Zleva doprava (LTR)',
langDirRTLLabel : 'Zprava doleva (RTL)',
edit : 'Změnit Div',
remove : 'Odstranit Div'
},
iframe :
{
title : 'Vlastnosti IFrame',
toolbar : 'IFrame',
noUrl : 'Zadejte prosím URL obsahu pro IFrame',
scrolling : 'Zapnout posuvníky',
border : 'Zobrazit okraj'
},
font :
{
label : 'Písmo',
voiceLabel : 'Písmo',
panelTitle : 'Písmo'
},
fontSize :
{
label : 'Velikost',
voiceLabel : 'Velikost písma',
panelTitle : 'Velikost'
},
colorButton :
{
textColorTitle : 'Barva textu',
bgColorTitle : 'Barva pozadí',
panelTitle : 'Barvy',
auto : 'Automaticky',
more : 'Více barev...'
},
colors :
{
'000' : 'Černá',
'800000' : 'Kaštanová',
'8B4513' : 'Sedlová hněď',
'2F4F4F' : 'Tmavě bledě šedá',
'008080' : 'Čírka',
'000080' : 'Námořnická modř',
'4B0082' : 'Inkoustová',
'696969' : 'Tmavě šedá',
'B22222' : 'Pálená cihla',
'A52A2A' : 'Hnědá',
'DAA520' : 'Zlatý prut',
'006400' : 'Tmavě zelená',
'40E0D0' : 'Tyrkisová',
'0000CD' : 'Středně modrá',
'800080' : 'Purpurová',
'808080' : 'Šedá',
'F00' : 'Červená',
'FF8C00' : 'Tmavě oranžová',
'FFD700' : 'Zlatá',
'008000' : 'Zelená',
'0FF' : 'Azurová',
'00F' : 'Modrá',
'EE82EE' : 'Fialová',
'A9A9A9' : 'Kalně šedá',
'FFA07A' : 'Světle lososová',
'FFA500' : 'Oranžová',
'FFFF00' : 'Žlutá',
'00FF00' : 'Limetková',
'AFEEEE' : 'Bledě tyrkisová',
'ADD8E6' : 'Světle modrá',
'DDA0DD' : 'Švestková',
'D3D3D3' : 'Světle šedá',
'FFF0F5' : 'Levandulově ruměnná',
'FAEBD7' : 'Antická bílá',
'FFFFE0' : 'Světle žlutá',
'F0FFF0' : 'Medová rosa',
'F0FFFF' : 'Azurová',
'F0F8FF' : 'Alenčina modrá',
'E6E6FA' : 'Levandulová',
'FFF' : 'Bílá'
},
scayt :
{
title : 'Kontrola pravopisu během psaní (SCAYT)',
opera_title : 'Toto Opera nepodporuje',
enable : 'Zapnout SCAYT',
disable : 'Vypnout SCAYT',
about : 'O aplikaci SCAYT',
toggle : 'Vypínač SCAYT',
options : 'Nastavení',
langs : 'Jazyky',
moreSuggestions : 'Více návrhů',
ignore : 'Přeskočit',
ignoreAll : 'Přeskočit vše',
addWord : 'Přidat slovo',
emptyDic : 'Název slovníku nesmí být prázdný.',
optionsTab : 'Nastavení',
allCaps : 'Ignorovat slova tvořená velkými písmeny',
ignoreDomainNames : 'Ignorovat doménová jména',
mixedCase : 'Ignorovat slova obsahující různou velikost písma',
mixedWithDigits : 'Ignorovat slova obsahující čísla',
languagesTab : 'Jazyky',
dictionariesTab : 'Slovníky',
dic_field_name : 'Název slovníku',
dic_create : 'Vytvořit',
dic_restore : 'Obnovit',
dic_delete : 'Smazat',
dic_rename : 'Přejmenovat',
dic_info : 'Zpočátku se uživatelský slovník ukládá do cookies ve vašem prohlížeči. Ovšem cookies mají omezenou velikost, takže když slovník dosáhne velikosti, kdy se již do cookies nevejde, může být uložen na našem serveru. Chcete-li uložit váš osobní slovník na našem serveru, je třeba slovník nejdříve pojmenovat. Máte-li již slovník pojmenován a uložen, zadejte jeho název a klepněte na tlačítko Obnovit.',
aboutTab : 'O aplikaci'
},
about :
{
title : 'O aplikaci CKEditor',
dlgTitle : 'O aplikaci CKEditor',
help : 'Prohlédněte si $1 pro nápovědu.',
userGuide : 'Uživatelská příručka CKEditor',
moreInfo : 'Pro informace o lincenci navštivte naši webovou stránku:',
copy : 'Copyright © $1. All rights reserved.'
},
maximize : 'Maximalizovat',
minimize : 'Minimalizovat',
fakeobjects :
{
anchor : 'Záložka',
flash : 'Flash animace',
iframe : 'IFrame',
hiddenfield : 'Skryté pole',
unknown : 'Neznámý objekt'
},
resize : 'Uchopit pro změnu velikosti',
colordialog :
{
title : 'Výběr barvy',
options : 'Nastavení barvy',
highlight : 'Zvýraznit',
selected : 'Vybráno',
clear : 'Vyčistit'
},
toolbarCollapse : 'Skrýt panel nástrojů',
toolbarExpand : 'Zobrazit panel nástrojů',
toolbarGroups :
{
document : 'Dokument',
clipboard : 'Schránka/Zpět',
editing : 'Úpravy',
forms : 'Formuláře',
basicstyles : 'Základní styly',
paragraph : 'Odstavec',
links : 'Odkazy',
insert : 'Vložit',
styles : 'Styly',
colors : 'Barvy',
tools : 'Nástroje'
},
bidi :
{
ltr : 'Směr textu zleva doprava',
rtl : 'Směr textu zprava doleva'
},
docprops :
{
label : 'Vlastnosti dokumentu',
title : 'Vlastnosti dokumentu',
design : 'Vzhled',
meta : 'Metadata',
chooseColor : 'Výběr',
other : '<jiný>',
docTitle : 'Titulek stránky',
charset : 'Znaková sada',
charsetOther : 'Další znaková sada',
charsetASCII : 'ASCII',
charsetCE : 'Středoevropské jazyky',
charsetCT : 'Tradiční čínština (Big5)',
charsetCR : 'Cyrilice',
charsetGR : 'Řečtina',
charsetJP : 'Japonština',
charsetKR : 'Korejština',
charsetTR : 'Turečtina',
charsetUN : 'Unicode (UTF-8)',
charsetWE : 'Západoevropské jazyky',
docType : 'Typ dokumentu',
docTypeOther : 'Jiný typ dokumetu',
xhtmlDec : 'Zahrnout deklarace XHTML',
bgColor : 'Barva pozadí',
bgImage : 'URL obrázku na pozadí',
bgFixed : 'Nerolovatelné (Pevné) pozadí',
txtColor : 'Barva textu',
margin : 'Okraje stránky',
marginTop : 'Horní',
marginLeft : 'Levý',
marginRight : 'Pravý',
marginBottom : 'Dolní',
metaKeywords : 'Klíčová slova (oddělená čárkou)',
metaDescription : 'Popis dokumentu',
metaAuthor : 'Autor',
metaCopyright : 'Autorská práva',
previewHtml : '<p>Toto je <strong>ukázkový text</strong>. Používáte <a href="javascript:void(0)">CKEditor</a>.</p>'
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Portuguese language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['pt'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Editor de barras de ferramentas',
editor : 'Editor de texto enriquecido',
// Toolbar buttons without dialogs.
source : 'Fonte',
newPage : 'Nova Página',
save : 'Guardar',
preview : 'Pré-visualizar',
cut : 'Cortar',
copy : 'Copiar',
paste : 'Colar',
print : 'Imprimir',
underline : 'Sublinhado',
bold : 'Negrito',
italic : 'Itálico',
selectAll : 'Seleccionar Tudo',
removeFormat : 'Eliminar Formato',
strike : 'Rasurado',
subscript : 'Superior à Linha',
superscript : 'Inferior à Linha',
horizontalrule : 'Inserir Linha Horizontal',
pagebreak : 'Inserir Quebra de Página',
pagebreakAlt : 'Quebra de página',
unlink : 'Eliminar Hiperligação',
undo : 'Anular',
redo : 'Repetir',
// Common messages and labels.
common :
{
browseServer : 'Navegar no Servidor',
url : 'URL',
protocol : 'Protocolo',
upload : 'Carregar',
uploadSubmit : 'Enviar para o Servidor',
image : 'Imagem',
flash : 'Flash',
form : 'Formulário',
checkbox : 'Caixa de Verificação',
radio : 'Botão de Opção',
textField : 'Campo de Texto',
textarea : 'Área de Texto',
hiddenField : 'Campo Escondido',
button : 'Botão',
select : 'Caixa de Combinação',
imageButton : 'Botão de Imagem',
notSet : '<Não definido>',
id : 'Id',
name : 'Nome',
langDir : 'Orientação de idioma',
langDirLtr : 'Esquerda à Direita (LTR)',
langDirRtl : 'Direita a Esquerda (RTL)',
langCode : 'Código de Idioma',
longDescr : 'Descrição Completa do URL',
cssClass : 'Classes de Estilo de Folhas Classes',
advisoryTitle : 'Título',
cssStyle : 'Estilo',
ok : 'OK',
cancel : 'Cancelar',
close : 'Fechar',
preview : 'Pré-visualização',
generalTab : 'Geral',
advancedTab : 'Avançado',
validateNumberFailed : 'This value is not a number.', // MISSING
confirmNewPage : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?', // MISSING
confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING
options : 'Opções',
target : 'Alvo',
targetNew : 'Nova Janela (_blank)',
targetTop : 'Janela superior (_top)',
targetSelf : 'Mesma janela (_self)',
targetParent : 'Parent Window (_parent)', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Direita para Esquerda (RTL)',
styles : 'Estilo',
cssClasses : 'Stylesheet Classes', // MISSING
width : 'Largura',
height : 'Altura',
align : 'Alinhamento',
alignLeft : 'Esquerda',
alignRight : 'Direita',
alignCenter : 'Centrado',
alignTop : 'Topo',
alignMiddle : 'Centro',
alignBottom : 'Fundo',
invalidHeight : 'Height must be a number.', // MISSING
invalidWidth : 'Width must be a number.', // MISSING
invalidCssLength : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip : 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, unavailable</span>' // MISSING
},
contextmenu :
{
options : 'Menu de opções de contexto'
},
// Special char dialog.
specialChar :
{
toolbar : 'Inserir Caracter Especial',
title : 'Seleccione um caracter especial',
options : 'Special Character Options' // MISSING
},
// Link dialog.
link :
{
toolbar : 'Inserir/Editar Hiperligação',
other : '<outro>',
menu : 'Editar Hiperligação',
title : 'Hiperligação',
info : 'Informação de Hiperligação',
target : 'Destino',
upload : 'Carregar',
advanced : 'Avançado',
type : 'Tipo de Hiperligação',
toUrl : 'URL',
toAnchor : 'Referência a esta página',
toEmail : 'E-Mail',
targetFrame : '<Frame>',
targetPopup : '<Janela de popup>',
targetFrameName : 'Nome do Frame Destino',
targetPopupName : 'Nome da Janela de Popup',
popupFeatures : 'Características de Janela de Popup',
popupResizable : 'Redimensionável',
popupStatusBar : 'Barra de Estado',
popupLocationBar: 'Barra de localização',
popupToolbar : 'Barra de Ferramentas',
popupMenuBar : 'Barra de Menu',
popupFullScreen : 'Janela Completa (IE)',
popupScrollBars : 'Barras de deslocamento',
popupDependent : 'Dependente (Netscape)',
popupLeft : 'Posição Esquerda',
popupTop : 'Posição Direita',
id : 'ID',
langDir : 'Orientação de idioma',
langDirLTR : 'Esquerda à Direita (LTR)',
langDirRTL : 'Direita a Esquerda (RTL)',
acccessKey : 'Chave de Acesso',
name : 'Nome',
langCode : 'Orientação de idioma',
tabIndex : 'Índice de Tubulação',
advisoryTitle : 'Título',
advisoryContentType : 'Tipo de Conteúdo',
cssClasses : 'Classes de Estilo de Folhas Classes',
charset : 'Fonte de caracteres vinculado',
styles : 'Estilo',
rel : 'Relação',
selectAnchor : 'Seleccionar una referência',
anchorName : 'Por Nome de Referência',
anchorId : 'Por ID de elemento',
emailAddress : 'Endereço de E-Mail',
emailSubject : 'Título de Mensagem',
emailBody : 'Corpo da Mensagem',
noAnchors : '(Não há referências disponíveis no documento)',
noUrl : 'Por favor introduza a hiperligação URL',
noEmail : 'Por favor introduza o endereço de e-mail'
},
// Anchor dialog
anchor :
{
toolbar : ' Inserir/Editar Âncora',
menu : 'Propriedades da Âncora',
title : 'Propriedades da Âncora',
name : 'Nome da Âncora',
errorName : 'Por favor, introduza o nome da âncora',
remove : 'Remove Anchor' // MISSING
},
// List style dialog
list:
{
numberedTitle : 'Numbered List Properties', // MISSING
bulletedTitle : 'Bulleted List Properties', // MISSING
type : 'Tipo',
start : 'Iniciar',
validateStartNumber :'List start number must be a whole number.', // MISSING
circle : 'Círculo',
disc : 'Disco',
square : 'Quadrado',
none : 'Nenhum',
notset : '<not set>',
armenian : 'Numeração armênia',
georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING
lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING
upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING
lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING
upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING
lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING
decimal : 'Decimal (1, 2, 3, etc.)', // MISSING
decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Find and Replace', // MISSING
find : 'Procurar',
replace : 'Substituir',
findWhat : 'Texto a Procurar:',
replaceWith : 'Substituir por:',
notFoundMsg : 'O texto especificado não foi encontrado.',
findOptions : 'Find Options', // MISSING
matchCase : 'Maiúsculas/Minúsculas',
matchWord : 'Coincidir com toda a palavra',
matchCyclic : 'Match cyclic', // MISSING
replaceAll : 'Substituir Tudo',
replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING
},
// Table Dialog
table :
{
toolbar : 'Tabela',
title : 'Propriedades da Tabela',
menu : 'Propriedades da Tabela',
deleteTable : 'Eliminar Tabela',
rows : 'Linhas',
columns : 'Colunas',
border : 'Tamanho do Limite',
widthPx : 'pixeis',
widthPc : 'percentagem',
widthUnit : 'width unit', // MISSING
cellSpace : 'Esp. e/células',
cellPad : 'Esp. interior',
caption : 'Título',
summary : 'Sumário',
headers : 'Headers', // MISSING
headersNone : 'None', // MISSING
headersColumn : 'First column', // MISSING
headersRow : 'First Row', // MISSING
headersBoth : 'Both', // MISSING
invalidRows : 'Number of rows must be a number greater than 0.', // MISSING
invalidCols : 'Number of columns must be a number greater than 0.', // MISSING
invalidBorder : 'Border size must be a number.', // MISSING
invalidWidth : 'Table width must be a number.', // MISSING
invalidHeight : 'Table height must be a number.', // MISSING
invalidCellSpacing : 'Cell spacing must be a positive number.', // MISSING
invalidCellPadding : 'Cell padding must be a positive number.', // MISSING
cell :
{
menu : 'Célula',
insertBefore : 'Insert Cell Before', // MISSING
insertAfter : 'Insert Cell After', // MISSING
deleteCell : 'Eliminar Célula',
merge : 'Unir Células',
mergeRight : 'Merge Right', // MISSING
mergeDown : 'Merge Down', // MISSING
splitHorizontal : 'Split Cell Horizontally', // MISSING
splitVertical : 'Split Cell Vertically', // MISSING
title : 'Cell Properties', // MISSING
cellType : 'Cell Type', // MISSING
rowSpan : 'Rows Span', // MISSING
colSpan : 'Columns Span', // MISSING
wordWrap : 'Word Wrap', // MISSING
hAlign : 'Horizontal Alignment', // MISSING
vAlign : 'Vertical Alignment', // MISSING
alignBaseline : 'Baseline', // MISSING
bgColor : 'Background Color', // MISSING
borderColor : 'Border Color', // MISSING
data : 'Data', // MISSING
header : 'Header', // MISSING
yes : 'Yes', // MISSING
no : 'No', // MISSING
invalidWidth : 'Cell width must be a number.', // MISSING
invalidHeight : 'Cell height must be a number.', // MISSING
invalidRowSpan : 'Rows span must be a whole number.', // MISSING
invalidColSpan : 'Columns span must be a whole number.', // MISSING
chooseColor : 'Choose' // MISSING
},
row :
{
menu : 'Linha',
insertBefore : 'Insert Row Before', // MISSING
insertAfter : 'Insert Row After', // MISSING
deleteRow : 'Eliminar Linhas'
},
column :
{
menu : 'Coluna',
insertBefore : 'Insert Column Before', // MISSING
insertAfter : 'Insert Column After', // MISSING
deleteColumn : 'Eliminar Coluna'
}
},
// Button Dialog.
button :
{
title : 'Propriedades do Botão',
text : 'Texto (Valor)',
type : 'Tipo',
typeBtn : 'Button', // MISSING
typeSbm : 'Submit', // MISSING
typeRst : 'Reset' // MISSING
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'Propriedades da Caixa de Verificação',
radioTitle : 'Propriedades do Botão de Opção',
value : 'Valor',
selected : 'Seleccionado'
},
// Form Dialog.
form :
{
title : 'Propriedades do Formulário',
menu : 'Propriedades do Formulário',
action : 'Acção',
method : 'Método',
encoding : 'Encoding' // MISSING
},
// Select Field Dialog.
select :
{
title : 'Propriedades da Caixa de Combinação',
selectInfo : 'Informação',
opAvail : 'Opções Possíveis',
value : 'Valor',
size : 'Tamanho',
lines : 'linhas',
chkMulti : 'Permitir selecções múltiplas',
opText : 'Texto',
opValue : 'Valor',
btnAdd : 'Adicionar',
btnModify : 'Modificar',
btnUp : 'Para cima',
btnDown : 'Para baixo',
btnSetValue : 'Definir um valor por defeito',
btnDelete : 'Apagar'
},
// Textarea Dialog.
textarea :
{
title : 'Propriedades da Área de Texto',
cols : 'Colunas',
rows : 'Linhas'
},
// Text Field Dialog.
textfield :
{
title : 'Propriedades do Campo de Texto',
name : 'Nome',
value : 'Valor',
charWidth : 'Tamanho do caracter',
maxChars : 'Nr. Máximo de Caracteres',
type : 'Tipo',
typeText : 'Texto',
typePass : 'Palavra-chave'
},
// Hidden Field Dialog.
hidden :
{
title : 'Propriedades do Campo Escondido',
name : 'Nome',
value : 'Valor'
},
// Image Dialog.
image :
{
title : 'Propriedades da Imagem',
titleButton : 'Propriedades do Botão de imagens',
menu : 'Propriedades da Imagem',
infoTab : 'Informação da Imagem',
btnUpload : 'Enviar para o Servidor',
upload : 'Carregar',
alt : 'Texto Alternativo',
lockRatio : 'Proporcional',
resetSize : 'Tamanho Original',
border : 'Limite',
hSpace : 'Esp.Horiz',
vSpace : 'Esp.Vert',
alertUrl : 'Por favor introduza o URL da imagem',
linkTab : 'Hiperligação',
button2Img : 'Do you want to transform the selected image button on a simple image?', // MISSING
img2Button : 'Do you want to transform the selected image on a image button?', // MISSING
urlMissing : 'Image source URL is missing.', // MISSING
validateBorder : 'Border must be a whole number.', // MISSING
validateHSpace : 'HSpace must be a whole number.', // MISSING
validateVSpace : 'VSpace must be a whole number.' // MISSING
},
// Flash Dialog
flash :
{
properties : 'Propriedades do Flash',
propertiesTab : 'Properties', // MISSING
title : 'Propriedades do Flash',
chkPlay : 'Reproduzir automaticamente',
chkLoop : 'Loop',
chkMenu : 'Permitir Menu do Flash',
chkFull : 'Allow Fullscreen', // MISSING
scale : 'Escala',
scaleAll : 'Mostrar tudo',
scaleNoBorder : 'Sem Limites',
scaleFit : 'Tamanho Exacto',
access : 'Script Access', // MISSING
accessAlways : 'Always', // MISSING
accessSameDomain: 'Same domain', // MISSING
accessNever : 'Never', // MISSING
alignAbsBottom : 'Abs inferior',
alignAbsMiddle : 'Abs centro',
alignBaseline : 'Linha de base',
alignTextTop : 'Topo do texto',
quality : 'Quality', // MISSING
qualityBest : 'Best', // MISSING
qualityHigh : 'High', // MISSING
qualityAutoHigh : 'Auto High', // MISSING
qualityMedium : 'Medium', // MISSING
qualityAutoLow : 'Auto Low', // MISSING
qualityLow : 'Low', // MISSING
windowModeWindow: 'Window', // MISSING
windowModeOpaque: 'Opaque', // MISSING
windowModeTransparent : 'Transparent', // MISSING
windowMode : 'Window mode', // MISSING
flashvars : 'Variables for Flash', // MISSING
bgcolor : 'Cor de Fundo',
hSpace : 'Esp.Horiz',
vSpace : 'Esp.Vert',
validateSrc : 'Por favor introduza a hiperligação URL',
validateHSpace : 'HSpace must be a number.', // MISSING
validateVSpace : 'VSpace must be a number.' // MISSING
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'Verificação Ortográfica',
title : 'Spell Check', // MISSING
notAvailable : 'Sorry, but service is unavailable now.', // MISSING
errorLoading : 'Error loading application service host: %s.', // MISSING
notInDic : 'Não está num directório',
changeTo : 'Mudar para',
btnIgnore : 'Ignorar',
btnIgnoreAll : 'Ignorar Tudo',
btnReplace : 'Substituir',
btnReplaceAll : 'Substituir Tudo',
btnUndo : 'Anular',
noSuggestions : '- Sem sugestões -',
progress : 'Verificação ortográfica em progresso…',
noMispell : 'Verificação ortográfica completa: não foram encontrados erros',
noChanges : 'Verificação ortográfica completa: não houve alteração de palavras',
oneChange : 'Verificação ortográfica completa: uma palavra alterada',
manyChanges : 'Verificação ortográfica completa: %1 palavras alteradas',
ieSpellDownload : ' Verificação ortográfica não instalada. Quer descarregar agora?'
},
smiley :
{
toolbar : 'Emoticons',
title : 'Inserir um Emoticon',
options : 'Smiley Options' // MISSING
},
elementsPath :
{
eleLabel : 'Elements path', // MISSING
eleTitle : '%1 element' // MISSING
},
numberedlist : 'Numeração',
bulletedlist : 'Marcas',
indent : 'Aumentar Avanço',
outdent : 'Diminuir Avanço',
justify :
{
left : 'Alinhar à Esquerda',
center : 'Alinhar ao Centro',
right : 'Alinhar à Direita',
block : 'Justificado'
},
blockquote : 'Bloco de citação',
clipboard :
{
title : 'Colar',
cutError : 'A configuração de segurança do navegador não permite a execução automática de operações de cortar. Por favor use o teclado (Ctrl/Cmd+X).',
copyError : 'A configuração de segurança do navegador não permite a execução automática de operações de copiar. Por favor use o teclado (Ctrl/Cmd+C).',
pasteMsg : 'Por favor, cole dentro da seguinte caixa usando o teclado (<STRONG>Ctrl/Cmd+V</STRONG>) e prima <STRONG>OK</STRONG>.',
securityMsg : 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
pasteArea : 'Paste Area' // MISSING
},
pastefromword :
{
confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING
toolbar : 'Colar do Word',
title : 'Colar do Word',
error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING
},
pasteText :
{
button : 'Colar como Texto Simples',
title : 'Colar como Texto Simples'
},
templates :
{
button : 'Modelos',
title : 'Modelo de Conteúdo',
options : 'Template Options', // MISSING
insertOption : 'Replace actual contents', // MISSING
selectPromptMsg : 'Por favor, seleccione o modelo a abrir no editor<br>(o conteúdo actual será perdido):',
emptyListMsg : '(Sem modelos definidos)'
},
showBlocks : 'Exibir blocos',
stylesCombo :
{
label : 'Estilo',
panelTitle : 'Formatting Styles', // MISSING
panelTitle1 : 'Block Styles', // MISSING
panelTitle2 : 'Inline Styles', // MISSING
panelTitle3 : 'Object Styles' // MISSING
},
format :
{
label : 'Formato',
panelTitle : 'Formato',
tag_p : 'Normal',
tag_pre : 'Formatado',
tag_address : 'Endereço',
tag_h1 : 'Título 1',
tag_h2 : 'Título 2',
tag_h3 : 'Título 3',
tag_h4 : 'Título 4',
tag_h5 : 'Título 5',
tag_h6 : 'Título 6',
tag_div : 'Normal (DIV)' // MISSING
},
div :
{
title : 'Create Div Container', // MISSING
toolbar : 'Create Div Container', // MISSING
cssClassInputLabel : 'Stylesheet Classes', // MISSING
styleSelectLabel : 'Style', // MISSING
IdInputLabel : 'Id', // MISSING
languageCodeInputLabel : ' Language Code', // MISSING
inlineStyleInputLabel : 'Inline Style', // MISSING
advisoryTitleInputLabel : 'Advisory Title', // MISSING
langDirLabel : 'Language Direction', // MISSING
langDirLTRLabel : 'Left to Right (LTR)', // MISSING
langDirRTLLabel : 'Right to Left (RTL)', // MISSING
edit : 'Edit Div', // MISSING
remove : 'Remove Div' // MISSING
},
iframe :
{
title : 'IFrame Properties', // MISSING
toolbar : 'IFrame', // MISSING
noUrl : 'Please type the iframe URL', // MISSING
scrolling : 'Enable scrollbars', // MISSING
border : 'Show frame border' // MISSING
},
font :
{
label : 'Tipo de Letra',
voiceLabel : 'Font', // MISSING
panelTitle : 'Tipo de Letra'
},
fontSize :
{
label : 'Tamanho',
voiceLabel : 'Font Size', // MISSING
panelTitle : 'Tamanho'
},
colorButton :
{
textColorTitle : 'Cor do Texto',
bgColorTitle : 'Cor de Fundo',
panelTitle : 'Colors', // MISSING
auto : 'Automático',
more : 'Mais Cores...'
},
colors :
{
'000' : 'Black', // MISSING
'800000' : 'Maroon', // MISSING
'8B4513' : 'Saddle Brown', // MISSING
'2F4F4F' : 'Dark Slate Gray', // MISSING
'008080' : 'Teal', // MISSING
'000080' : 'Navy', // MISSING
'4B0082' : 'Indigo', // MISSING
'696969' : 'Dark Gray', // MISSING
'B22222' : 'Fire Brick', // MISSING
'A52A2A' : 'Brown', // MISSING
'DAA520' : 'Golden Rod', // MISSING
'006400' : 'Dark Green', // MISSING
'40E0D0' : 'Turquoise', // MISSING
'0000CD' : 'Medium Blue', // MISSING
'800080' : 'Purple', // MISSING
'808080' : 'Gray', // MISSING
'F00' : 'Red', // MISSING
'FF8C00' : 'Dark Orange', // MISSING
'FFD700' : 'Gold', // MISSING
'008000' : 'Green', // MISSING
'0FF' : 'Cyan', // MISSING
'00F' : 'Blue', // MISSING
'EE82EE' : 'Violet', // MISSING
'A9A9A9' : 'Dim Gray', // MISSING
'FFA07A' : 'Light Salmon', // MISSING
'FFA500' : 'Orange', // MISSING
'FFFF00' : 'Yellow', // MISSING
'00FF00' : 'Lime', // MISSING
'AFEEEE' : 'Pale Turquoise', // MISSING
'ADD8E6' : 'Light Blue', // MISSING
'DDA0DD' : 'Plum', // MISSING
'D3D3D3' : 'Light Grey', // MISSING
'FFF0F5' : 'Lavender Blush', // MISSING
'FAEBD7' : 'Antique White', // MISSING
'FFFFE0' : 'Light Yellow', // MISSING
'F0FFF0' : 'Honeydew', // MISSING
'F0FFFF' : 'Azure', // MISSING
'F0F8FF' : 'Alice Blue', // MISSING
'E6E6FA' : 'Lavender', // MISSING
'FFF' : 'White' // MISSING
},
scayt :
{
title : 'Spell Check As You Type', // MISSING
opera_title : 'Not supported by Opera', // MISSING
enable : 'Enable SCAYT', // MISSING
disable : 'Disable SCAYT', // MISSING
about : 'About SCAYT', // MISSING
toggle : 'Toggle SCAYT', // MISSING
options : 'Options', // MISSING
langs : 'Languages', // MISSING
moreSuggestions : 'More suggestions', // MISSING
ignore : 'Ignore', // MISSING
ignoreAll : 'Ignore All', // MISSING
addWord : 'Add Word', // MISSING
emptyDic : 'Dictionary name should not be empty.', // MISSING
optionsTab : 'Options', // MISSING
allCaps : 'Ignore All-Caps Words', // MISSING
ignoreDomainNames : 'Ignore Domain Names', // MISSING
mixedCase : 'Ignore Words with Mixed Case', // MISSING
mixedWithDigits : 'Ignore Words with Numbers', // MISSING
languagesTab : 'Languages', // MISSING
dictionariesTab : 'Dictionaries', // MISSING
dic_field_name : 'Dictionary name', // MISSING
dic_create : 'Create', // MISSING
dic_restore : 'Restore', // MISSING
dic_delete : 'Delete', // MISSING
dic_rename : 'Rename', // MISSING
dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING
aboutTab : 'About' // MISSING
},
about :
{
title : 'About CKEditor', // MISSING
dlgTitle : 'About CKEditor', // MISSING
help : 'Check $1 for help.', // MISSING
userGuide : 'CKEditor User\'s Guide', // MISSING
moreInfo : 'For licensing information please visit our web site:', // MISSING
copy : 'Copyright © $1. All rights reserved.' // MISSING
},
maximize : 'Maximizar',
minimize : 'Minimizar',
fakeobjects :
{
anchor : 'Anchor', // MISSING
flash : 'Flash Animation', // MISSING
iframe : 'IFrame', // MISSING
hiddenfield : 'Hidden Field', // MISSING
unknown : 'Unknown Object' // MISSING
},
resize : 'Arraste para redimensionar',
colordialog :
{
title : 'Select color', // MISSING
options : 'Color Options', // MISSING
highlight : 'Highlight', // MISSING
selected : 'Selected Color', // MISSING
clear : 'Clear' // MISSING
},
toolbarCollapse : 'Colapsar Barra',
toolbarExpand : 'Expandir Barra',
toolbarGroups :
{
document : 'Document', // MISSING
clipboard : 'Clipboard/Undo', // MISSING
editing : 'Editing', // MISSING
forms : 'Forms', // MISSING
basicstyles : 'Basic Styles', // MISSING
paragraph : 'Paragraph', // MISSING
links : 'Links', // MISSING
insert : 'Insert', // MISSING
styles : 'Styles', // MISSING
colors : 'Colors', // MISSING
tools : 'Tools' // MISSING
},
bidi :
{
ltr : 'Text direction from left to right', // MISSING
rtl : 'Text direction from right to left' // MISSING
},
docprops :
{
label : 'Propriedades do Documento',
title : 'Propriedades do Documento',
design : 'Design', // MISSING
meta : 'Meta Data',
chooseColor : 'Choose', // MISSING
other : '<outro>',
docTitle : 'Título da Página',
charset : 'Codificação de Caracteres',
charsetOther : 'Outra Codificação de Caracteres',
charsetASCII : 'ASCII', // MISSING
charsetCE : 'Central European', // MISSING
charsetCT : 'Chinese Traditional (Big5)', // MISSING
charsetCR : 'Cyrillic', // MISSING
charsetGR : 'Greek', // MISSING
charsetJP : 'Japanese', // MISSING
charsetKR : 'Korean', // MISSING
charsetTR : 'Turkish', // MISSING
charsetUN : 'Unicode (UTF-8)', // MISSING
charsetWE : 'Western European', // MISSING
docType : 'Tipo de Cabeçalho do Documento',
docTypeOther : 'Outro Tipo de Cabeçalho do Documento',
xhtmlDec : 'Incluir Declarações XHTML',
bgColor : 'Cor de Fundo',
bgImage : 'Caminho para a Imagem de Fundo',
bgFixed : 'Fundo Fixo',
txtColor : 'Cor do Texto',
margin : 'Margem das Páginas',
marginTop : 'Topo',
marginLeft : 'Esquerda',
marginRight : 'Direita',
marginBottom : 'Fundo',
metaKeywords : 'Palavras de Indexação do Documento (separadas por virgula)',
metaDescription : 'Descrição do Documento',
metaAuthor : 'Autor',
metaCopyright : 'Direitos de Autor',
previewHtml : '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>' // MISSING
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['pt-br'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Editor de texto rico, %1',
editorHelp : 'Pressione ALT+0 para ajuda',
// ARIA descriptions.
toolbars : 'Barra de Ferramentas do Editor',
editor : 'Editor de Texto',
// Toolbar buttons without dialogs.
source : 'Código-Fonte',
newPage : 'Novo',
save : 'Salvar',
preview : 'Visualizar',
cut : 'Recortar',
copy : 'Copiar',
paste : 'Colar',
print : 'Imprimir',
underline : 'Sublinhado',
bold : 'Negrito',
italic : 'Itálico',
selectAll : 'Selecionar Tudo',
removeFormat : 'Remover Formatação',
strike : 'Tachado',
subscript : 'Subscrito',
superscript : 'Sobrescrito',
horizontalrule : 'Inserir Linha Horizontal',
pagebreak : 'Inserir Quebra de Página',
pagebreakAlt : 'Quebra de Página',
unlink : 'Remover Link',
undo : 'Desfazer',
redo : 'Refazer',
// Common messages and labels.
common :
{
browseServer : 'Localizar no Servidor',
url : 'URL',
protocol : 'Protocolo',
upload : 'Enviar ao Servidor',
uploadSubmit : 'Enviar para o Servidor',
image : 'Imagem',
flash : 'Flash',
form : 'Formulário',
checkbox : 'Caixa de Seleção',
radio : 'Botão de Opção',
textField : 'Caixa de Texto',
textarea : 'Área de Texto',
hiddenField : 'Campo Oculto',
button : 'Botão',
select : 'Caixa de Listagem',
imageButton : 'Botão de Imagem',
notSet : '<não ajustado>',
id : 'Id',
name : 'Nome',
langDir : 'Direção do idioma',
langDirLtr : 'Esquerda para Direita (LTR)',
langDirRtl : 'Direita para Esquerda (RTL)',
langCode : 'Idioma',
longDescr : 'Descrição da URL',
cssClass : 'Classe de CSS',
advisoryTitle : 'Título',
cssStyle : 'Estilos',
ok : 'OK',
cancel : 'Cancelar',
close : 'Fechar',
preview : 'Visualizar',
generalTab : 'Geral',
advancedTab : 'Avançado',
validateNumberFailed : 'Este valor não é um número.',
confirmNewPage : 'Todas as mudanças não salvas serão perdidas. Tem certeza de que quer abrir uma nova página?',
confirmCancel : 'Algumas opções foram alteradas. Tem certeza de que quer fechar a caixa de diálogo?',
options : 'Opções',
target : 'Destino',
targetNew : 'Nova Janela (_blank)',
targetTop : 'Janela de Cima (_top)',
targetSelf : 'Mesma Janela (_self)',
targetParent : 'Janela Pai (_parent)',
langDirLTR : 'Esquerda para Direita (LTR)',
langDirRTL : 'Direita para Esquerda (RTL)',
styles : 'Estilo',
cssClasses : 'Classes',
width : 'Largura',
height : 'Altura',
align : 'Alinhamento',
alignLeft : 'Esquerda',
alignRight : 'Direita',
alignCenter : 'Centralizado',
alignTop : 'Superior',
alignMiddle : 'Centralizado',
alignBottom : 'Inferior',
invalidHeight : 'A altura tem que ser um número',
invalidWidth : 'A largura tem que ser um número.',
invalidCssLength : 'O valor do campo "%1" deve ser um número positivo opcionalmente seguido por uma válida unidade de medida de CSS (px, %, in, cm, mm, em, ex, pt, or pc).',
invalidHtmlLength : 'O valor do campo "%1" deve ser um número positivo opcionalmente seguido por uma válida unidade de medida de HTML (px or %).',
invalidInlineStyle : 'O valor válido para estilo deve conter uma ou mais tuplas no formato "nome : valor", separados por ponto e vírgula.',
cssLengthTooltip : 'Insira um número para valor em pixels ou um número seguido de uma válida unidade de medida de CSS (px, %, in, cm, mm, em, ex, pt, or pc).',
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, indisponível</span>'
},
contextmenu :
{
options : 'Opções Menu de Contexto'
},
// Special char dialog.
specialChar :
{
toolbar : 'Inserir Caractere Especial',
title : 'Selecione um Caractere Especial',
options : 'Opções de Caractere Especial'
},
// Link dialog.
link :
{
toolbar : 'Inserir/Editar Link',
other : '<outro>',
menu : 'Editar Link',
title : 'Editar Link',
info : 'Informações',
target : 'Destino',
upload : 'Enviar ao Servidor',
advanced : 'Avançado',
type : 'Tipo de hiperlink',
toUrl : 'URL',
toAnchor : 'Âncora nesta página',
toEmail : 'E-Mail',
targetFrame : '<frame>',
targetPopup : '<janela popup>',
targetFrameName : 'Nome do Frame de Destino',
targetPopupName : 'Nome da Janela Pop-up',
popupFeatures : 'Propriedades da Janela Pop-up',
popupResizable : 'Redimensionável',
popupStatusBar : 'Barra de Status',
popupLocationBar: 'Barra de Endereços',
popupToolbar : 'Barra de Ferramentas',
popupMenuBar : 'Barra de Menus',
popupFullScreen : 'Modo Tela Cheia (IE)',
popupScrollBars : 'Barras de Rolagem',
popupDependent : 'Dependente (Netscape)',
popupLeft : 'Esquerda',
popupTop : 'Topo',
id : 'Id',
langDir : 'Direção do idioma',
langDirLTR : 'Esquerda para Direita (LTR)',
langDirRTL : 'Direita para Esquerda (RTL)',
acccessKey : 'Chave de Acesso',
name : 'Nome',
langCode : 'Direção do idioma',
tabIndex : 'Índice de Tabulação',
advisoryTitle : 'Título',
advisoryContentType : 'Tipo de Conteúdo',
cssClasses : 'Classe de CSS',
charset : 'Charset do Link',
styles : 'Estilos',
rel : 'Tipo de Relação',
selectAnchor : 'Selecione uma âncora',
anchorName : 'Nome da âncora',
anchorId : 'Id da âncora',
emailAddress : 'Endereço E-Mail',
emailSubject : 'Assunto da Mensagem',
emailBody : 'Corpo da Mensagem',
noAnchors : '(Não há âncoras no documento)',
noUrl : 'Por favor, digite o endereço do Link',
noEmail : 'Por favor, digite o endereço de e-mail'
},
// Anchor dialog
anchor :
{
toolbar : 'Inserir/Editar Âncora',
menu : 'Formatar Âncora',
title : 'Formatar Âncora',
name : 'Nome da Âncora',
errorName : 'Por favor, digite o nome da âncora',
remove : 'Remover Âncora'
},
// List style dialog
list:
{
numberedTitle : 'Propriedades da Lista Numerada',
bulletedTitle : 'Propriedades da Lista sem Numeros',
type : 'Tipo',
start : 'Início',
validateStartNumber :'O número inicial da lista deve ser um número inteiro.',
circle : 'Círculo',
disc : 'Disco',
square : 'Quadrado',
none : 'Nenhum',
notset : '<não definido>',
armenian : 'Numeração Armêna',
georgian : 'Numeração da Geórgia (an, ban, gan, etc.)',
lowerRoman : 'Numeração Romana minúscula (i, ii, iii, iv, v, etc.)',
upperRoman : 'Numeração Romana maiúscula (I, II, III, IV, V, etc.)',
lowerAlpha : 'Numeração Alfabética minúscula (a, b, c, d, e, etc.)',
upperAlpha : 'Numeração Alfabética Maiúscula (A, B, C, D, E, etc.)',
lowerGreek : 'Numeração Grega minúscula (alpha, beta, gamma, etc.)',
decimal : 'Numeração Decimal (1, 2, 3, etc.)',
decimalLeadingZero : 'Numeração Decimal com zeros (01, 02, 03, etc.)'
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Localizar e Substituir',
find : 'Localizar',
replace : 'Substituir',
findWhat : 'Procurar por:',
replaceWith : 'Substituir por:',
notFoundMsg : 'O texto especificado não foi encontrado.',
findOptions : 'Opções',
matchCase : 'Coincidir Maiúsculas/Minúsculas',
matchWord : 'Coincidir a palavra inteira',
matchCyclic : 'Coincidir cíclico',
replaceAll : 'Substituir Tudo',
replaceSuccessMsg : '%1 ocorrência(s) substituída(s).'
},
// Table Dialog
table :
{
toolbar : 'Tabela',
title : 'Formatar Tabela',
menu : 'Formatar Tabela',
deleteTable : 'Apagar Tabela',
rows : 'Linhas',
columns : 'Colunas',
border : 'Borda',
widthPx : 'pixels',
widthPc : '%',
widthUnit : 'unidade largura',
cellSpace : 'Espaçamento',
cellPad : 'Margem interna',
caption : 'Legenda',
summary : 'Resumo',
headers : 'Cabeçalho',
headersNone : 'Nenhum',
headersColumn : 'Primeira coluna',
headersRow : 'Primeira linha',
headersBoth : 'Ambos',
invalidRows : 'O número de linhas tem que ser um número maior que 0.',
invalidCols : 'O número de colunas tem que ser um número maior que 0.',
invalidBorder : 'O tamanho da borda tem que ser um número.',
invalidWidth : 'A largura da tabela tem que ser um número.',
invalidHeight : 'A altura da tabela tem que ser um número.',
invalidCellSpacing : 'O espaçamento das células tem que ser um número.',
invalidCellPadding : 'A margem interna das células tem que ser um número.',
cell :
{
menu : 'Célula',
insertBefore : 'Inserir célula a esquerda',
insertAfter : 'Inserir célula a direita',
deleteCell : 'Remover Células',
merge : 'Mesclar Células',
mergeRight : 'Mesclar com célula a direita',
mergeDown : 'Mesclar com célula abaixo',
splitHorizontal : 'Dividir célula horizontalmente',
splitVertical : 'Dividir célula verticalmente',
title : 'Propriedades da célula',
cellType : 'Tipo de célula',
rowSpan : 'Linhas cobertas',
colSpan : 'Colunas cobertas',
wordWrap : 'Quebra de palavra',
hAlign : 'Alinhamento horizontal',
vAlign : 'Alinhamento vertical',
alignBaseline : 'Patamar de alinhamento',
bgColor : 'Cor de fundo',
borderColor : 'Cor das bordas',
data : 'Dados',
header : 'Cabeçalho',
yes : 'Sim',
no : 'Não',
invalidWidth : 'A largura da célula tem que ser um número.',
invalidHeight : 'A altura da célula tem que ser um número.',
invalidRowSpan : 'Linhas cobertas tem que ser um número inteiro.',
invalidColSpan : 'Colunas cobertas tem que ser um número inteiro.',
chooseColor : 'Escolher'
},
row :
{
menu : 'Linha',
insertBefore : 'Inserir linha acima',
insertAfter : 'Inserir linha abaixo',
deleteRow : 'Remover Linhas'
},
column :
{
menu : 'Coluna',
insertBefore : 'Inserir coluna a esquerda',
insertAfter : 'Inserir coluna a direita',
deleteColumn : 'Remover Colunas'
}
},
// Button Dialog.
button :
{
title : 'Formatar Botão',
text : 'Texto (Valor)',
type : 'Tipo',
typeBtn : 'Botão',
typeSbm : 'Enviar',
typeRst : 'Limpar'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'Formatar Caixa de Seleção',
radioTitle : 'Formatar Botão de Opção',
value : 'Valor',
selected : 'Selecionado'
},
// Form Dialog.
form :
{
title : 'Formatar Formulário',
menu : 'Formatar Formulário',
action : 'Ação',
method : 'Método',
encoding : 'Codificação'
},
// Select Field Dialog.
select :
{
title : 'Formatar Caixa de Listagem',
selectInfo : 'Informações',
opAvail : 'Opções disponíveis',
value : 'Valor',
size : 'Tamanho',
lines : 'linhas',
chkMulti : 'Permitir múltiplas seleções',
opText : 'Texto',
opValue : 'Valor',
btnAdd : 'Adicionar',
btnModify : 'Modificar',
btnUp : 'Para cima',
btnDown : 'Para baixo',
btnSetValue : 'Definir como selecionado',
btnDelete : 'Remover'
},
// Textarea Dialog.
textarea :
{
title : 'Formatar Área de Texto',
cols : 'Colunas',
rows : 'Linhas'
},
// Text Field Dialog.
textfield :
{
title : 'Formatar Caixa de Texto',
name : 'Nome',
value : 'Valor',
charWidth : 'Comprimento (em caracteres)',
maxChars : 'Número Máximo de Caracteres',
type : 'Tipo',
typeText : 'Texto',
typePass : 'Senha'
},
// Hidden Field Dialog.
hidden :
{
title : 'Formatar Campo Oculto',
name : 'Nome',
value : 'Valor'
},
// Image Dialog.
image :
{
title : 'Formatar Imagem',
titleButton : 'Formatar Botão de Imagem',
menu : 'Formatar Imagem',
infoTab : 'Informações da Imagem',
btnUpload : 'Enviar para o Servidor',
upload : 'Enviar',
alt : 'Texto Alternativo',
lockRatio : 'Travar Proporções',
resetSize : 'Redefinir para o Tamanho Original',
border : 'Borda',
hSpace : 'HSpace',
vSpace : 'VSpace',
alertUrl : 'Por favor, digite a URL da imagem.',
linkTab : 'Link',
button2Img : 'Deseja transformar o botão de imagem em uma imagem comum?',
img2Button : 'Deseja transformar a imagem em um botão de imagem?',
urlMissing : 'URL da imagem está faltando.',
validateBorder : 'A borda deve ser um número inteiro.',
validateHSpace : 'O HSpace deve ser um número inteiro.',
validateVSpace : 'O VSpace deve ser um número inteiro.'
},
// Flash Dialog
flash :
{
properties : 'Propriedades do Flash',
propertiesTab : 'Propriedades',
title : 'Propriedades do Flash',
chkPlay : 'Tocar Automaticamente',
chkLoop : 'Tocar Infinitamente',
chkMenu : 'Habilita Menu Flash',
chkFull : 'Permitir tela cheia',
scale : 'Escala',
scaleAll : 'Mostrar tudo',
scaleNoBorder : 'Sem Borda',
scaleFit : 'Escala Exata',
access : 'Acesso ao script',
accessAlways : 'Sempre',
accessSameDomain: 'Acessar Mesmo Domínio',
accessNever : 'Nunca',
alignAbsBottom : 'Inferior Absoluto',
alignAbsMiddle : 'Centralizado Absoluto',
alignBaseline : 'Baseline',
alignTextTop : 'Superior Absoluto',
quality : 'Qualidade',
qualityBest : 'Qualidade Melhor',
qualityHigh : 'Qualidade Alta',
qualityAutoHigh : 'Qualidade Alta Automática',
qualityMedium : 'Qualidade Média',
qualityAutoLow : 'Qualidade Baixa Automática',
qualityLow : 'Qualidade Baixa',
windowModeWindow: 'Janela',
windowModeOpaque: 'Opaca',
windowModeTransparent : 'Transparente',
windowMode : 'Modo da janela',
flashvars : 'Variáveis do Flash',
bgcolor : 'Cor do Plano de Fundo',
hSpace : 'HSpace',
vSpace : 'VSpace',
validateSrc : 'Por favor, digite o endereço do link',
validateHSpace : 'O HSpace tem que ser um número',
validateVSpace : 'O VSpace tem que ser um número.'
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'Verificar Ortografia',
title : 'Corretor Ortográfico',
notAvailable : 'Desculpe, o serviço não está disponível no momento.',
errorLoading : 'Erro carregando servidor de aplicação: %s.',
notInDic : 'Não encontrada',
changeTo : 'Alterar para',
btnIgnore : 'Ignorar uma vez',
btnIgnoreAll : 'Ignorar Todas',
btnReplace : 'Alterar',
btnReplaceAll : 'Alterar Todas',
btnUndo : 'Desfazer',
noSuggestions : '-sem sugestões de ortografia-',
progress : 'Verificação ortográfica em andamento...',
noMispell : 'Verificação encerrada: Não foram encontrados erros de ortografia',
noChanges : 'Verificação ortográfica encerrada: Não houve alterações',
oneChange : 'Verificação ortográfica encerrada: Uma palavra foi alterada',
manyChanges : 'Verificação ortográfica encerrada: %1 palavras foram alteradas',
ieSpellDownload : 'A verificação ortográfica não foi instalada. Você gostaria de realizar o download agora?'
},
smiley :
{
toolbar : 'Emoticon',
title : 'Inserir Emoticon',
options : 'Opções de Emoticons'
},
elementsPath :
{
eleLabel : 'Caminho dos Elementos',
eleTitle : 'Elemento %1'
},
numberedlist : 'Lista numerada',
bulletedlist : 'Lista sem números',
indent : 'Aumentar Recuo',
outdent : 'Diminuir Recuo',
justify :
{
left : 'Alinhar Esquerda',
center : 'Centralizar',
right : 'Alinhar Direita',
block : 'Justificado'
},
blockquote : 'Citação',
clipboard :
{
title : 'Colar',
cutError : 'As configurações de segurança do seu navegador não permitem que o editor execute operações de recortar automaticamente. Por favor, utilize o teclado para recortar (Ctrl/Cmd+X).',
copyError : 'As configurações de segurança do seu navegador não permitem que o editor execute operações de copiar automaticamente. Por favor, utilize o teclado para copiar (Ctrl/Cmd+C).',
pasteMsg : 'Transfira o link usado na caixa usando o teclado com (<STRONG>Ctrl/Cmd+V</STRONG>) e <STRONG>OK</STRONG>.',
securityMsg : 'As configurações de segurança do seu navegador não permitem que o editor acesse os dados da área de transferência diretamente. Por favor cole o conteúdo manualmente nesta janela.',
pasteArea : 'Área para Colar'
},
pastefromword :
{
confirmCleanup : 'O texto que você deseja colar parece ter sido copiado do Word. Você gostaria de remover a formatação antes de colar?',
toolbar : 'Colar do Word',
title : 'Colar do Word',
error : 'Não foi possível limpar os dados colados devido a um erro interno'
},
pasteText :
{
button : 'Colar como Texto sem Formatação',
title : 'Colar como Texto sem Formatação'
},
templates :
{
button : 'Modelos de layout',
title : 'Modelo de layout de conteúdo',
options : 'Opções de Template',
insertOption : 'Substituir o conteúdo atual',
selectPromptMsg : 'Selecione um modelo de layout para ser aberto no editor<br>(o conteúdo atual será perdido):',
emptyListMsg : '(Não foram definidos modelos de layout)'
},
showBlocks : 'Mostrar blocos de código',
stylesCombo :
{
label : 'Estilo',
panelTitle : 'Estilos de Formatação',
panelTitle1 : 'Estilos de bloco',
panelTitle2 : 'Estilos de texto corrido',
panelTitle3 : 'Estilos de objeto'
},
format :
{
label : 'Formatação',
panelTitle : 'Formatação',
tag_p : 'Normal',
tag_pre : 'Formatado',
tag_address : 'Endereço',
tag_h1 : 'Título 1',
tag_h2 : 'Título 2',
tag_h3 : 'Título 3',
tag_h4 : 'Título 4',
tag_h5 : 'Título 5',
tag_h6 : 'Título 6',
tag_div : 'Normal (DIV)'
},
div :
{
title : 'Criar Container de DIV',
toolbar : 'Criar Container de DIV',
cssClassInputLabel : 'Classes de CSS',
styleSelectLabel : 'Estilo',
IdInputLabel : 'Id',
languageCodeInputLabel : 'Código de Idioma',
inlineStyleInputLabel : 'Estilo Inline',
advisoryTitleInputLabel : 'Título Consulta',
langDirLabel : 'Direção da Escrita',
langDirLTRLabel : 'Esquerda para Direita (LTR)',
langDirRTLLabel : 'Direita para Esquerda (RTL)',
edit : 'Editar Div',
remove : 'Remover Div'
},
iframe :
{
title : 'Propriedade do IFrame',
toolbar : 'IFrame',
noUrl : 'Insira a URL do iframe',
scrolling : 'Abilita scrollbars',
border : 'Mostra borda do iframe'
},
font :
{
label : 'Fonte',
voiceLabel : 'Fonte',
panelTitle : 'Fonte'
},
fontSize :
{
label : 'Tamanho',
voiceLabel : 'Tamanho da fonte',
panelTitle : 'Tamanho'
},
colorButton :
{
textColorTitle : 'Cor do Texto',
bgColorTitle : 'Cor do Plano de Fundo',
panelTitle : 'Cores',
auto : 'Automático',
more : 'Mais Cores...'
},
colors :
{
'000' : 'Preto',
'800000' : 'Foquete',
'8B4513' : 'Marrom 1',
'2F4F4F' : 'Cinza 1',
'008080' : 'Cerceta',
'000080' : 'Azul Marinho',
'4B0082' : 'Índigo',
'696969' : 'Cinza 2',
'B22222' : 'Tijolo de Fogo',
'A52A2A' : 'Marrom 2',
'DAA520' : 'Vara Dourada',
'006400' : 'Verde Escuro',
'40E0D0' : 'Turquesa',
'0000CD' : 'Azul Médio',
'800080' : 'Roxo',
'808080' : 'Cinza 3',
'F00' : 'Vermelho',
'FF8C00' : 'Laranja Escuro',
'FFD700' : 'Dourado',
'008000' : 'Verde',
'0FF' : 'Ciano',
'00F' : 'Azul',
'EE82EE' : 'Violeta',
'A9A9A9' : 'Cinza Escuro',
'FFA07A' : 'Salmão Claro',
'FFA500' : 'Laranja',
'FFFF00' : 'Amarelo',
'00FF00' : 'Lima',
'AFEEEE' : 'Turquesa Pálido',
'ADD8E6' : 'Azul Claro',
'DDA0DD' : 'Ameixa',
'D3D3D3' : 'Cinza Claro',
'FFF0F5' : 'Lavanda 1',
'FAEBD7' : 'Branco Antiguidade',
'FFFFE0' : 'Amarelo Claro',
'F0FFF0' : 'Orvalho',
'F0FFFF' : 'Azure',
'F0F8FF' : 'Azul Alice',
'E6E6FA' : 'Lavanda 2',
'FFF' : 'Branco'
},
scayt :
{
title : 'Correção ortográfica durante a digitação',
opera_title : 'Não suportado no Opera',
enable : 'Habilitar correção ortográfica durante a digitação',
disable : 'Desabilitar correção ortográfica durante a digitação',
about : 'Sobre a correção ortográfica durante a digitação',
toggle : 'Ativar/desativar correção ortográfica durante a digitação',
options : 'Opções',
langs : 'Idiomas',
moreSuggestions : 'Mais sugestões',
ignore : 'Ignorar',
ignoreAll : 'Ignorar todas',
addWord : 'Adicionar palavra',
emptyDic : 'O nome do dicionário não deveria estar vazio.',
optionsTab : 'Opções',
allCaps : 'Ignorar palavras maiúsculas',
ignoreDomainNames : 'Ignorar nomes de domínio',
mixedCase : 'Ignorar palavras com maiúsculas e minúsculas misturadas',
mixedWithDigits : 'Ignorar palavras com números',
languagesTab : 'Idiomas',
dictionariesTab : 'Dicionários',
dic_field_name : 'Nome do Dicionário',
dic_create : 'Criar',
dic_restore : 'Restaurar',
dic_delete : 'Excluir',
dic_rename : 'Renomear',
dic_info : 'Inicialmente, o dicionário do usuário fica armazenado em um Cookie. Porém, Cookies tem tamanho limitado, portanto quand o dicionário do usuário atingir o tamanho limite poderá ser armazenado no nosso servidor. Para armazenar seu dicionário pessoal no nosso servidor deverá especificar um nome para ele. Se já tiver um dicionário armazenado por favor especifique o seu nome e clique em Restaurar.',
aboutTab : 'Sobre'
},
about :
{
title : 'Sobre o CKEditor',
dlgTitle : 'Sobre o CKEditor',
help : 'Verifique o $1 para obter ajuda.',
userGuide : 'Guia do Usuário do CKEditor',
moreInfo : 'Para informações sobre a licença por favor visite o nosso site:',
copy : 'Copyright © $1. Todos os direitos reservados.'
},
maximize : 'Maximizar',
minimize : 'Minimize',
fakeobjects :
{
anchor : 'Âncora',
flash : 'Animação em Flash',
iframe : 'IFrame',
hiddenfield : 'Campo Oculto',
unknown : 'Objeto desconhecido'
},
resize : 'Arraste para redimensionar',
colordialog :
{
title : 'Selecione uma Cor',
options : 'Opções de Cor',
highlight : 'Grifar',
selected : 'Cor Selecionada',
clear : 'Limpar'
},
toolbarCollapse : 'Diminuir Barra de Ferramentas',
toolbarExpand : 'Aumentar Barra de Ferramentas',
toolbarGroups :
{
document : 'Documento',
clipboard : 'Clipboard/Desfazer',
editing : 'Edição',
forms : 'Formulários',
basicstyles : 'Estilos Básicos',
paragraph : 'Paragrafo',
links : 'Links',
insert : 'Inserir',
styles : 'Estilos',
colors : 'Cores',
tools : 'Ferramentas'
},
bidi :
{
ltr : 'Direção do texto da esquerda para a direita',
rtl : 'Direção do texto da direita para a esquerda'
},
docprops :
{
label : 'Propriedades Documento',
title : 'Propriedades Documento',
design : 'Design',
meta : 'Meta Dados',
chooseColor : 'Escolher',
other : '<outro>',
docTitle : 'Título da Página',
charset : 'Codificação de Caracteres',
charsetOther : 'Outra Codificação de Caracteres',
charsetASCII : 'ASCII',
charsetCE : 'Europa Central',
charsetCT : 'Chinês Tradicional (Big5)',
charsetCR : 'Cirílico',
charsetGR : 'Grego',
charsetJP : 'Japonês',
charsetKR : 'Coreano',
charsetTR : 'Turco',
charsetUN : 'Unicode (UTF-8)',
charsetWE : 'Europa Ocidental',
docType : 'Cabeçalho Tipo de Documento',
docTypeOther : 'Outro Tipo de Documento',
xhtmlDec : 'Incluir Declarações XHTML',
bgColor : 'Cor do Plano de Fundo',
bgImage : 'URL da Imagem de Plano de Fundo',
bgFixed : 'Plano de Fundo Fixo',
txtColor : 'Cor do Texto',
margin : 'Margens da Página',
marginTop : 'Superior',
marginLeft : 'Inferior',
marginRight : 'Direita',
marginBottom : 'Inferior',
metaKeywords : 'Palavras-chave de Indexação do Documento (separadas por vírgula)',
metaDescription : 'Descrição do Documento',
metaAuthor : 'Autor',
metaCopyright : 'Direitos Autorais',
previewHtml : '<p>Este é um <strong>texto de exemplo</strong>. Você está usando <a href="javascript:void(0)">CKEditor</a>.</p>'
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Gujarati language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['gu'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'એડીટર ટૂલ બાર',
editor : 'રીચ ટેક્ષ્ત્ એડીટર',
// Toolbar buttons without dialogs.
source : 'મૂળ કે પ્રાથમિક દસ્તાવેજ',
newPage : 'નવુ પાનું',
save : 'સેવ',
preview : 'પૂર્વદર્શન',
cut : 'કાપવું',
copy : 'નકલ',
paste : 'પેસ્ટ',
print : 'પ્રિન્ટ',
underline : 'અન્ડર્લાઇન, નીચે લીટી',
bold : 'બોલ્ડ/સ્પષ્ટ',
italic : 'ઇટેલિક, ત્રાંસા',
selectAll : 'બઘું પસંદ કરવું',
removeFormat : 'ફૉર્મટ કાઢવું',
strike : 'છેકી નાખવું',
subscript : 'એક ચિહ્નની નીચે કરેલું બીજું ચિહ્ન',
superscript : 'એક ચિહ્ન ઉપર કરેલું બીજું ચિહ્ન.',
horizontalrule : 'સમસ્તરીય રેખા ઇન્સર્ટ/દાખલ કરવી',
pagebreak : 'ઇન્સર્ટ પેજબ્રેક/પાનાને અલગ કરવું/દાખલ કરવું',
pagebreakAlt : 'નવું પાનું',
unlink : 'લિંક કાઢવી',
undo : 'રદ કરવું; પહેલાં હતી એવી સ્થિતિ પાછી લાવવી',
redo : 'રિડૂ; પછી હતી એવી સ્થિતિ પાછી લાવવી',
// Common messages and labels.
common :
{
browseServer : 'સર્વર બ્રાઉઝ કરો',
url : 'URL',
protocol : 'પ્રોટોકૉલ',
upload : 'અપલોડ',
uploadSubmit : 'આ સર્વરને મોકલવું',
image : 'ચિત્ર',
flash : 'ફ્લૅશ',
form : 'ફૉર્મ/પત્રક',
checkbox : 'ચેક બોક્સ',
radio : 'રેડિઓ બટન',
textField : 'ટેક્સ્ટ ફીલ્ડ, શબ્દ ક્ષેત્ર',
textarea : 'ટેક્સ્ટ એરિઆ, શબ્દ વિસ્તાર',
hiddenField : 'ગુપ્ત ક્ષેત્ર',
button : 'બટન',
select : 'પસંદગી ક્ષેત્ર',
imageButton : 'ચિત્ર બટન',
notSet : '<સેટ નથી>',
id : 'Id',
name : 'નામ',
langDir : 'ભાષા લેખવાની પદ્ધતિ',
langDirLtr : 'ડાબે થી જમણે (LTR)',
langDirRtl : 'જમણે થી ડાબે (RTL)',
langCode : 'ભાષા કોડ',
longDescr : 'વધારે માહિતી માટે URL',
cssClass : 'સ્ટાઇલ-શીટ ક્લાસ',
advisoryTitle : 'મુખ્ય મથાળું',
cssStyle : 'સ્ટાઇલ',
ok : 'ઠીક છે',
cancel : 'રદ કરવું',
close : 'બંધ કરવું',
preview : 'જોવું',
generalTab : 'જનરલ',
advancedTab : 'અડ્વાન્સડ',
validateNumberFailed : 'આ રકમ આકડો નથી.',
confirmNewPage : 'સવે કાર્ય વગરનું ફકરો ખોવાઈ જશે. તમને ખાતરી છે કે તમને નવું પાનું ખોલવું છે?',
confirmCancel : 'ઘણા વિકલ્પો બદલાયા છે. તમારે આ બોક્ષ્ બંધ કરવું છે?',
options : 'વિકલ્પો',
target : 'લક્ષ્ય',
targetNew : 'નવી વિન્ડો (_blank)',
targetTop : 'ઉપરની વિન્ડો (_top)',
targetSelf : 'એજ વિન્ડો (_self)',
targetParent : 'પેરનટ વિન્ડો (_parent)',
langDirLTR : 'ડાબે થી જમણે (LTR)',
langDirRTL : 'જમણે થી ડાબે (RTL)',
styles : 'શૈલી',
cssClasses : 'શૈલી કલાસીસ',
width : 'પહોળાઈ',
height : 'ઊંચાઈ',
align : 'લાઇનદોરીમાં ગોઠવવું',
alignLeft : 'ડાબી બાજુ ગોઠવવું',
alignRight : 'જમણી',
alignCenter : 'મધ્ય સેન્ટર',
alignTop : 'ઉપર',
alignMiddle : 'વચ્ચે',
alignBottom : 'નીચે',
invalidHeight : 'ઉંચાઈ એક આંકડો હોવો જોઈએ.',
invalidWidth : 'પોહળ ઈ એક આંકડો હોવો જોઈએ.',
invalidCssLength : '"%1" ની વેલ્યુ એક પોસીટીવ આંકડો હોવો જોઈએ અથવા CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc) વગર.',
invalidHtmlLength : '"%1" ની વેલ્યુ એક પોસીટીવ આંકડો હોવો જોઈએ અથવા HTML measurement unit (px or %) વગર.',
invalidInlineStyle : 'ઈનલાઈન સ્ટાઈલ ની વેલ્યુ "name : value" ના ફોર્મેટ માં હોવી જોઈએ, વચ્ચે સેમી-કોલોન જોઈએ.',
cssLengthTooltip : 'પિક્ષ્લ્ નો આંકડો CSS unit (px, %, in, cm, mm, em, ex, pt, or pc) માં નાખો.',
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, નથી મળતું</span>'
},
contextmenu :
{
options : 'કોન્તેક્ષ્ત્ મેનુના વિકલ્પો'
},
// Special char dialog.
specialChar :
{
toolbar : 'વિશિષ્ટ અક્ષર ઇન્સર્ટ/દાખલ કરવું',
title : 'સ્પેશિઅલ વિશિષ્ટ અક્ષર પસંદ કરો',
options : 'સ્પેશિઅલ કરેક્ટરના વિકલ્પો'
},
// Link dialog.
link :
{
toolbar : 'લિંક ઇન્સર્ટ/દાખલ કરવી',
other : '<other> <અન્ય>',
menu : ' લિંક એડિટ/માં ફેરફાર કરવો',
title : 'લિંક',
info : 'લિંક ઇન્ફૉ ટૅબ',
target : 'ટાર્ગેટ/લક્ષ્ય',
upload : 'અપલોડ',
advanced : 'અડ્વાન્સડ',
type : 'લિંક પ્રકાર',
toUrl : 'URL',
toAnchor : 'આ પેજનો ઍંકર',
toEmail : 'ઈ-મેલ',
targetFrame : '<ફ્રેમ>',
targetPopup : '<પૉપ-અપ વિન્ડો>',
targetFrameName : 'ટાર્ગેટ ફ્રેમ નું નામ',
targetPopupName : 'પૉપ-અપ વિન્ડો નું નામ',
popupFeatures : 'પૉપ-અપ વિન્ડો ફીચરસૅ',
popupResizable : 'રીસાઈઝએબલ',
popupStatusBar : 'સ્ટૅટસ બાર',
popupLocationBar: 'લોકેશન બાર',
popupToolbar : 'ટૂલ બાર',
popupMenuBar : 'મેન્યૂ બાર',
popupFullScreen : 'ફુલ સ્ક્રીન (IE)',
popupScrollBars : 'સ્ક્રોલ બાર',
popupDependent : 'ડિપેન્ડન્ટ (Netscape)',
popupLeft : 'ડાબી બાજુ',
popupTop : 'જમણી બાજુ',
id : 'Id',
langDir : 'ભાષા લેખવાની પદ્ધતિ',
langDirLTR : 'ડાબે થી જમણે (LTR)',
langDirRTL : 'જમણે થી ડાબે (RTL)',
acccessKey : 'ઍક્સેસ કી',
name : 'નામ',
langCode : 'ભાષા લેખવાની પદ્ધતિ',
tabIndex : 'ટૅબ ઇન્ડેક્સ',
advisoryTitle : 'મુખ્ય મથાળું',
advisoryContentType : 'મુખ્ય કન્ટેન્ટ પ્રકાર',
cssClasses : 'સ્ટાઇલ-શીટ ક્લાસ',
charset : 'લિંક રિસૉર્સ કૅરિક્ટર સેટ',
styles : 'સ્ટાઇલ',
rel : 'સંબંધની સ્થિતિ',
selectAnchor : 'ઍંકર પસંદ કરો',
anchorName : 'ઍંકર નામથી પસંદ કરો',
anchorId : 'ઍંકર એલિમન્ટ Id થી પસંદ કરો',
emailAddress : 'ઈ-મેલ સરનામું',
emailSubject : 'ઈ-મેલ વિષય',
emailBody : 'સંદેશ',
noAnchors : '(ડૉક્યુમન્ટમાં ઍંકરની સંખ્યા)',
noUrl : 'લિંક URL ટાઇપ કરો',
noEmail : 'ઈ-મેલ સરનામું ટાઇપ કરો'
},
// Anchor dialog
anchor :
{
toolbar : 'ઍંકર ઇન્સર્ટ/દાખલ કરવી',
menu : 'ઍંકરના ગુણ',
title : 'ઍંકરના ગુણ',
name : 'ઍંકરનું નામ',
errorName : 'ઍંકરનું નામ ટાઈપ કરો',
remove : 'સ્થિર નકરવું'
},
// List style dialog
list:
{
numberedTitle : 'આંકડાના લીસ્ટના ગુણ',
bulletedTitle : 'બુલેટેડ લીસ્ટના ગુણ',
type : 'પ્રકાર',
start : 'શરુ કરવું',
validateStartNumber :'લીસ્ટના સરુઆતનો આંકડો પુરો હોવો જોઈએ.',
circle : 'વર્તુળ',
disc : 'ડિસ્ક',
square : 'ચોરસ',
none : 'કસુ ',
notset : '<સેટ નથી>',
armenian : 'અરમેનિયન આંકડા પદ્ધતિ',
georgian : 'ગેઓર્ગિયન આંકડા પદ્ધતિ (an, ban, gan, etc.)',
lowerRoman : 'રોમન નાના (i, ii, iii, iv, v, etc.)',
upperRoman : 'રોમન મોટા (I, II, III, IV, V, etc.)',
lowerAlpha : 'આલ્ફા નાના (a, b, c, d, e, etc.)',
upperAlpha : 'આલ્ફા મોટા (A, B, C, D, E, etc.)',
lowerGreek : 'ગ્રીક નાના (alpha, beta, gamma, etc.)',
decimal : 'આંકડા (1, 2, 3, etc.)',
decimalLeadingZero : 'સુન્ય આગળ આંકડા (01, 02, 03, etc.)'
},
// Find And Replace Dialog
findAndReplace :
{
title : 'શોધવું અને બદલવું',
find : 'શોધવું',
replace : 'રિપ્લેસ/બદલવું',
findWhat : 'આ શોધો',
replaceWith : 'આનાથી બદલો',
notFoundMsg : 'તમે શોધેલી ટેક્સ્ટ નથી મળી',
findOptions : 'વીકલ્પ શોધો',
matchCase : 'કેસ સરખા રાખો',
matchWord : 'બઘા શબ્દ સરખા રાખો',
matchCyclic : 'સરખાવવા બધા',
replaceAll : 'બઘા બદલી ',
replaceSuccessMsg : '%1 ફેરફારો બાદલાયા છે.'
},
// Table Dialog
table :
{
toolbar : 'ટેબલ, કોઠો',
title : 'ટેબલ, કોઠાનું મથાળું',
menu : 'ટેબલ, કોઠાનું મથાળું',
deleteTable : 'કોઠો ડિલીટ/કાઢી નાખવું',
rows : 'પંક્તિના ખાના',
columns : 'કૉલમ/ઊભી કટાર',
border : 'કોઠાની બાજુ(બોર્ડર) સાઇઝ',
widthPx : 'પિકસલ',
widthPc : 'પ્રતિશત',
widthUnit : 'પોહાલાઈ એકમ',
cellSpace : 'સેલ અંતર',
cellPad : 'સેલ પૅડિંગ',
caption : 'મથાળું/કૅપ્શન ',
summary : 'ટૂંકો એહેવાલ',
headers : 'મથાળા',
headersNone : 'નથી ',
headersColumn : 'પહેલી ઊભી કટાર',
headersRow : 'પહેલી કટાર',
headersBoth : 'બેવું',
invalidRows : 'આડી કટાર, 0 કરતા વધારે હોવી જોઈએ.',
invalidCols : 'ઉભી કટાર, 0 કરતા વધારે હોવી જોઈએ.',
invalidBorder : 'બોર્ડર એક આંકડો હોવો જોઈએ',
invalidWidth : 'ટેબલની પોહલાઈ આંકડો હોવો જોઈએ.',
invalidHeight : 'ટેબલની ઊંચાઈ આંકડો હોવો જોઈએ.',
invalidCellSpacing : 'સેલ વચ્ચેની જગ્યા સુન્ય કરતા વધારે હોવી જોઈએ.',
invalidCellPadding : 'સેલની અંદરની જગ્યા સુન્ય કરતા વધારે હોવી જોઈએ.',
cell :
{
menu : 'કોષના ખાના',
insertBefore : 'પહેલાં કોષ ઉમેરવો',
insertAfter : 'પછી કોષ ઉમેરવો',
deleteCell : 'કોષ ડિલીટ/કાઢી નાખવો',
merge : 'કોષ ભેગા કરવા',
mergeRight : 'જમણી બાજુ ભેગા કરવા',
mergeDown : 'નીચે ભેગા કરવા',
splitHorizontal : 'કોષને સમસ્તરીય વિભાજન કરવું',
splitVertical : 'કોષને સીધું ને ઊભું વિભાજન કરવું',
title : 'સેલના ગુણ',
cellType : 'સેલનો પ્રકાર',
rowSpan : 'આડી કટારની જગ્યા',
colSpan : 'ઊભી કતારની જગ્યા',
wordWrap : 'વર્ડ રેપ',
hAlign : 'સપાટ લાઈનદોરી',
vAlign : 'ઊભી લાઈનદોરી',
alignBaseline : 'બસે લાઈન',
bgColor : 'પાછાળનો રંગ',
borderColor : 'બોર્ડેર રંગ',
data : 'સ્વીકૃત માહિતી',
header : 'મથાળું',
yes : 'હા',
no : 'ના',
invalidWidth : 'સેલની પોહલાઈ આંકડો હોવો જોઈએ.',
invalidHeight : 'સેલની ઊંચાઈ આંકડો હોવો જોઈએ.',
invalidRowSpan : 'રો સ્પાન આંકડો હોવો જોઈએ.',
invalidColSpan : 'કોલમ સ્પાન આંકડો હોવો જોઈએ.',
chooseColor : 'પસંદ કરવું'
},
row :
{
menu : 'પંક્તિના ખાના',
insertBefore : 'પહેલાં પંક્તિ ઉમેરવી',
insertAfter : 'પછી પંક્તિ ઉમેરવી',
deleteRow : 'પંક્તિઓ ડિલીટ/કાઢી નાખવી'
},
column :
{
menu : 'કૉલમ/ઊભી કટાર',
insertBefore : 'પહેલાં કૉલમ/ઊભી કટાર ઉમેરવી',
insertAfter : 'પછી કૉલમ/ઊભી કટાર ઉમેરવી',
deleteColumn : 'કૉલમ/ઊભી કટાર ડિલીટ/કાઢી નાખવી'
}
},
// Button Dialog.
button :
{
title : 'બટનના ગુણ',
text : 'ટેક્સ્ટ (વૅલ્યૂ)',
type : 'પ્રકાર',
typeBtn : 'બટન',
typeSbm : 'સબ્મિટ',
typeRst : 'રિસેટ'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'ચેક બોક્સ ગુણ',
radioTitle : 'રેડિઓ બટનના ગુણ',
value : 'વૅલ્યૂ',
selected : 'સિલેક્ટેડ'
},
// Form Dialog.
form :
{
title : 'ફૉર્મ/પત્રકના ગુણ',
menu : 'ફૉર્મ/પત્રકના ગુણ',
action : 'ક્રિયા',
method : 'પદ્ધતિ',
encoding : 'અન્કોડીન્ગ'
},
// Select Field Dialog.
select :
{
title : 'પસંદગી ક્ષેત્રના ગુણ',
selectInfo : 'સૂચના',
opAvail : 'ઉપલબ્ધ વિકલ્પ',
value : 'વૅલ્યૂ',
size : 'સાઇઝ',
lines : 'લીટીઓ',
chkMulti : 'એકથી વધારે પસંદ કરી શકો',
opText : 'ટેક્સ્ટ',
opValue : 'વૅલ્યૂ',
btnAdd : 'ઉમેરવું',
btnModify : 'બદલવું',
btnUp : 'ઉપર',
btnDown : 'નીચે',
btnSetValue : 'પસંદ કરલી વૅલ્યૂ સેટ કરો',
btnDelete : 'રદ કરવું'
},
// Textarea Dialog.
textarea :
{
title : 'ટેક્સ્ટ એઅરિઆ, શબ્દ વિસ્તારના ગુણ',
cols : 'કૉલમ/ઊભી કટાર',
rows : 'પંક્તિઓ'
},
// Text Field Dialog.
textfield :
{
title : 'ટેક્સ્ટ ફીલ્ડ, શબ્દ ક્ષેત્રના ગુણ',
name : 'નામ',
value : 'વૅલ્યૂ',
charWidth : 'કેરેક્ટરની પહોળાઈ',
maxChars : 'અધિકતમ કેરેક્ટર',
type : 'ટાઇપ',
typeText : 'ટેક્સ્ટ',
typePass : 'પાસવર્ડ'
},
// Hidden Field Dialog.
hidden :
{
title : 'ગુપ્ત ક્ષેત્રના ગુણ',
name : 'નામ',
value : 'વૅલ્યૂ'
},
// Image Dialog.
image :
{
title : 'ચિત્રના ગુણ',
titleButton : 'ચિત્ર બટનના ગુણ',
menu : 'ચિત્રના ગુણ',
infoTab : 'ચિત્ર ની જાણકારી',
btnUpload : 'આ સર્વરને મોકલવું',
upload : 'અપલોડ',
alt : 'ઑલ્ટર્નટ ટેક્સ્ટ',
lockRatio : 'લૉક ગુણોત્તર',
resetSize : 'રીસેટ સાઇઝ',
border : 'બોર્ડર',
hSpace : 'સમસ્તરીય જગ્યા',
vSpace : 'લંબરૂપ જગ્યા',
alertUrl : 'ચિત્રની URL ટાઇપ કરો',
linkTab : 'લિંક',
button2Img : 'તમારે ઈમેજ બટનને સાદી ઈમેજમાં બદલવું છે.',
img2Button : 'તમારે સાદી ઈમેજને ઈમેજ બટનમાં બદલવું છે.',
urlMissing : 'ઈમેજની મૂળ URL છે નહી.',
validateBorder : 'બોર્ડેર આંકડો હોવો જોઈએ.',
validateHSpace : 'HSpaceઆંકડો હોવો જોઈએ.',
validateVSpace : 'VSpace આંકડો હોવો જોઈએ. '
},
// Flash Dialog
flash :
{
properties : 'ફ્લૅશના ગુણ',
propertiesTab : 'ગુણ',
title : 'ફ્લૅશ ગુણ',
chkPlay : 'ઑટો/સ્વયં પ્લે',
chkLoop : 'લૂપ',
chkMenu : 'ફ્લૅશ મેન્યૂ નો પ્રયોગ કરો',
chkFull : 'ફૂલ સ્ક્રીન કરવું',
scale : 'સ્કેલ',
scaleAll : 'સ્કેલ ઓલ/બધુ બતાવો',
scaleNoBorder : 'સ્કેલ બોર્ડર વગર',
scaleFit : 'સ્કેલ એકદમ ફીટ',
access : 'સ્ક્રીપ્ટ એક્સેસ',
accessAlways : 'હમેશાં',
accessSameDomain: 'એજ ડોમેન',
accessNever : 'નહી',
alignAbsBottom : 'Abs નીચે',
alignAbsMiddle : 'Abs ઉપર',
alignBaseline : 'આધાર લીટી',
alignTextTop : 'ટેક્સ્ટ ઉપર',
quality : 'ગુણધર્મ',
qualityBest : 'શ્રેષ્ઠ',
qualityHigh : 'ઊંચું',
qualityAutoHigh : 'ઓટો ઊંચું',
qualityMedium : 'મધ્યમ',
qualityAutoLow : 'ઓટો નીચું',
qualityLow : 'નીચું',
windowModeWindow: 'વિન્ડો',
windowModeOpaque: 'અપારદર્શક',
windowModeTransparent : 'પારદર્શક',
windowMode : 'વિન્ડો મોડ',
flashvars : 'ફલેશ ના વિકલ્પો',
bgcolor : 'બૅકગ્રાઉન્ડ રંગ,',
hSpace : 'સમસ્તરીય જગ્યા',
vSpace : 'લંબરૂપ જગ્યા',
validateSrc : 'લિંક URL ટાઇપ કરો',
validateHSpace : 'HSpace આંકડો હોવો જોઈએ.',
validateVSpace : 'VSpace આંકડો હોવો જોઈએ.'
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'જોડણી (સ્પેલિંગ) તપાસવી',
title : 'સ્પેલ ',
notAvailable : 'માફ કરશો, આ સુવિધા ઉપલબ્ધ નથી',
errorLoading : 'સર્વિસ એપ્લીકેશન લોડ નથી થ: %s.',
notInDic : 'શબ્દકોશમાં નથી',
changeTo : 'આનાથી બદલવું',
btnIgnore : 'ઇગ્નોર/અવગણના કરવી',
btnIgnoreAll : 'બધાની ઇગ્નોર/અવગણના કરવી',
btnReplace : 'બદલવું',
btnReplaceAll : 'બધા બદલી કરો',
btnUndo : 'અન્ડૂ',
noSuggestions : '- કઇ સજેશન નથી -',
progress : 'શબ્દની જોડણી/સ્પેલ ચેક ચાલુ છે...',
noMispell : 'શબ્દની જોડણી/સ્પેલ ચેક પૂર્ણ: ખોટી જોડણી મળી નથી',
noChanges : 'શબ્દની જોડણી/સ્પેલ ચેક પૂર્ણ: એકપણ શબ્દ બદલયો નથી',
oneChange : 'શબ્દની જોડણી/સ્પેલ ચેક પૂર્ણ: એક શબ્દ બદલયો છે',
manyChanges : 'શબ્દની જોડણી/સ્પેલ ચેક પૂર્ણ: %1 શબ્દ બદલયા છે',
ieSpellDownload : 'સ્પેલ-ચેકર ઇન્સ્ટોલ નથી. શું તમે ડાઉનલોડ કરવા માંગો છો?'
},
smiley :
{
toolbar : 'સ્માઇલી',
title : 'સ્માઇલી પસંદ કરો',
options : 'સમ્ય્લી વિકલ્પો'
},
elementsPath :
{
eleLabel : 'એલીમેન્ટ્સ નો ',
eleTitle : 'એલીમેન્ટ %1'
},
numberedlist : 'સંખ્યાંકન સૂચિ',
bulletedlist : 'બુલેટ સૂચિ',
indent : 'ઇન્ડેન્ટ, લીટીના આરંભમાં જગ્યા વધારવી',
outdent : 'ઇન્ડેન્ટ લીટીના આરંભમાં જગ્યા ઘટાડવી',
justify :
{
left : 'ડાબી બાજુએ/બાજુ તરફ',
center : 'સંકેંદ્રણ/સેંટરિંગ',
right : 'જમણી બાજુએ/બાજુ તરફ',
block : 'બ્લૉક, અંતરાય જસ્ટિફાઇ'
},
blockquote : 'બ્લૉક-કોટ, અવતરણચિહ્નો',
clipboard :
{
title : 'પેસ્ટ',
cutError : 'તમારા બ્રાઉઝર ની સુરક્ષિત સેટિંગસ કટ કરવાની પરવાનગી નથી આપતી. (Ctrl/Cmd+X) નો ઉપયોગ કરો.',
copyError : 'તમારા બ્રાઉઝર ની સુરક્ષિત સેટિંગસ કોપી કરવાની પરવાનગી નથી આપતી. (Ctrl/Cmd+C) का प्रयोग करें।',
pasteMsg : 'Ctrl/Cmd+V નો પ્રયોગ કરી પેસ્ટ કરો',
securityMsg : 'તમારા બ્રાઉઝર ની સુરક્ષિત સેટિંગસના કારણે,એડિટર તમારા કિલ્પબોર્ડ ડેટા ને કોપી નથી કરી શકતો. તમારે આ વિન્ડોમાં ફરીથી પેસ્ટ કરવું પડશે.',
pasteArea : 'પેસ્ટ કરવાની જગ્યા'
},
pastefromword :
{
confirmCleanup : 'તમે જે ટેક્ષ્ત્ કોપી કરી રહ્યા છો ટે વર્ડ ની છે. કોપી કરતા પેહલા સાફ કરવી છે?',
toolbar : 'પેસ્ટ (વડૅ ટેક્સ્ટ)',
title : 'પેસ્ટ (વડૅ ટેક્સ્ટ)',
error : 'પેસ્ટ કરેલો ડેટા ઇન્ટરનલ એરર ના લીથે સાફ કરી શકાયો નથી.'
},
pasteText :
{
button : 'પેસ્ટ (ટેક્સ્ટ)',
title : 'પેસ્ટ (ટેક્સ્ટ)'
},
templates :
{
button : 'ટેમ્પ્લેટ',
title : 'કન્ટેન્ટ ટેમ્પ્લેટ',
options : 'ટેમ્પ્લેટના વિકલ્પો',
insertOption : 'મૂળ શબ્દને બદલો',
selectPromptMsg : 'એડિટરમાં ઓપન કરવા ટેમ્પ્લેટ પસંદ કરો (વર્તમાન કન્ટેન્ટ સેવ નહીં થાય):',
emptyListMsg : '(કોઈ ટેમ્પ્લેટ ડિફાઇન નથી)'
},
showBlocks : 'બ્લૉક બતાવવું',
stylesCombo :
{
label : 'શૈલી/રીત',
panelTitle : 'ફોર્મેટ ',
panelTitle1 : 'બ્લોક ',
panelTitle2 : 'ઈનલાઈન ',
panelTitle3 : 'ઓબ્જેક્ટ પદ્ધતિ'
},
format :
{
label : 'ફૉન્ટ ફૉર્મટ, રચનાની શૈલી',
panelTitle : 'ફૉન્ટ ફૉર્મટ, રચનાની શૈલી',
tag_p : 'સામાન્ય',
tag_pre : 'ફૉર્મટેડ',
tag_address : 'સરનામું',
tag_h1 : 'શીર્ષક 1',
tag_h2 : 'શીર્ષક 2',
tag_h3 : 'શીર્ષક 3',
tag_h4 : 'શીર્ષક 4',
tag_h5 : 'શીર્ષક 5',
tag_h6 : 'શીર્ષક 6',
tag_div : 'શીર્ષક (DIV)'
},
div :
{
title : 'Div કન્ટેનર બનાવુંવું',
toolbar : 'Div કન્ટેનર બનાવુંવું',
cssClassInputLabel : 'સ્ટાઈલશીટ કલાસીસ',
styleSelectLabel : 'સ્ટાઈલ',
IdInputLabel : 'Id',
languageCodeInputLabel : 'ભાષાનો કોડ',
inlineStyleInputLabel : 'ઈનલાઈન પદ્ધતિ',
advisoryTitleInputLabel : 'એડવાઈઝર શીર્ષક',
langDirLabel : 'ભાષાની દિશા',
langDirLTRLabel : 'ડાબે થી જમણે (LTR)',
langDirRTLLabel : 'જમણે થી ડાબે (RTL)',
edit : 'ડીવીમાં ફેરફાર કરવો',
remove : 'ડીવી કાઢી કાઢવું'
},
iframe :
{
title : 'IFrame વિકલ્પો',
toolbar : 'IFrame',
noUrl : 'iframe URL ટાઈપ્ કરો',
scrolling : 'સ્ક્રોલબાર ચાલુ કરવા',
border : 'ફ્રેમ બોર્ડેર બતાવવી'
},
font :
{
label : 'ફૉન્ટ',
voiceLabel : 'ફોન્ટ',
panelTitle : 'ફૉન્ટ'
},
fontSize :
{
label : 'ફૉન્ટ સાઇઝ/કદ',
voiceLabel : 'ફોન્ટ સાઈઝ',
panelTitle : 'ફૉન્ટ સાઇઝ/કદ'
},
colorButton :
{
textColorTitle : 'શબ્દનો રંગ',
bgColorTitle : 'બૅકગ્રાઉન્ડ રંગ,',
panelTitle : 'રંગ',
auto : 'સ્વચાલિત',
more : 'ઔર રંગ...'
},
colors :
{
'000' : 'કાળો',
'800000' : 'મરુન',
'8B4513' : 'છીક',
'2F4F4F' : 'ડાર્ક સ્લેટ ગ્રે ',
'008080' : 'ટીલ',
'000080' : 'નેવી',
'4B0082' : 'જામલી',
'696969' : 'ડાર્ક ગ્રે',
'B22222' : 'ઈટ',
'A52A2A' : 'બ્રાઉન',
'DAA520' : 'ગોલ્ડન રોડ',
'006400' : 'ડાર્ક લીલો',
'40E0D0' : 'ટ્રકોઈસ',
'0000CD' : 'મધ્યમ વાદળી',
'800080' : 'પર્પલ',
'808080' : 'ગ્રે',
'F00' : 'લાલ',
'FF8C00' : 'ડાર્ક ઓરંજ',
'FFD700' : 'ગોલ્ડ',
'008000' : 'ગ્રીન',
'0FF' : 'સાયન',
'00F' : 'વાદળી',
'EE82EE' : 'વાયોલેટ',
'A9A9A9' : 'ડીમ ',
'FFA07A' : 'લાઈટ સાલમન',
'FFA500' : 'ઓરંજ',
'FFFF00' : 'પીળો',
'00FF00' : 'લાઈમ',
'AFEEEE' : 'પેલ કોઈસ',
'ADD8E6' : 'લાઈટ બ્લુ',
'DDA0DD' : 'પલ્મ',
'D3D3D3' : 'લાઈટ ગ્રે',
'FFF0F5' : 'લવંડર ',
'FAEBD7' : 'એન્ટીક સફેદ',
'FFFFE0' : 'લાઈટ પીળો',
'F0FFF0' : 'હનીડઉય',
'F0FFFF' : 'અઝુરે',
'F0F8FF' : 'એલીસ બ્લુ',
'E6E6FA' : 'લવંડર',
'FFF' : 'સફેદ'
},
scayt :
{
title : 'ટાઈપ કરતા સ્પેલ તપાસો',
opera_title : 'ઓપેરામાં સપોર્ટ નથી',
enable : 'SCAYT એનેબલ કરવું',
disable : 'SCAYT ડિસેબલ કરવું',
about : 'SCAYT વિષે',
toggle : 'SCAYT ટોગલ',
options : 'વિકલ્પો',
langs : 'ભાષાઓ',
moreSuggestions : 'વધારે વિકલ્પો',
ignore : 'ઇગ્નોર',
ignoreAll : 'બધા ઇગ્નોર ',
addWord : 'શબ્દ ઉમેરવો',
emptyDic : 'ડિક્સનરીનું નામ ખાલી ના હોય.',
optionsTab : 'વિકલ્પો',
allCaps : 'ઓલ-કેપ્સ વર્ડ છોડી દો.',
ignoreDomainNames : 'ડોમેન નામ છોડી દો.',
mixedCase : 'મિક્સ કેસ વર્ડ છોડી દો.',
mixedWithDigits : 'આંકડા વાળા શબ્દ છોડી દો.',
languagesTab : 'ભાષા',
dictionariesTab : 'શબ્દકોશ',
dic_field_name : 'શબ્દકોશ નામ',
dic_create : 'બનાવવું',
dic_restore : 'પાછું ',
dic_delete : 'કાઢી નાખવું',
dic_rename : 'નવું નામ આપવું',
dic_info : 'પેહલા User Dictionary, Cookie તરીકે સ્ટોર થાય છે. પણ Cookie ની સમતા ઓછી છે. જયારે User Dictionary, Cookie તરીકે સ્ટોર ના કરી શકાય, ત્યારે તે અમારા સર્વર પર સ્ટોર થાય છે. તમારી વ્યતિગત ડીકસ્નરી ને સર્વર પર સ્ટોર કરવા માટે તમારે તેનું નામ આપવું પડશે. જો તમે તમારી ડીકસ્નરી નું નામ આપેલું હોય તો તમે રિસ્ટોર બટન ક્લીક કરી શકો.',
aboutTab : 'વિષે'
},
about :
{
title : 'CKEditor વિષે',
dlgTitle : 'CKEditor વિષે',
help : 'મદદ માટે $1 તપાસો',
userGuide : 'CKEditor યુઝર્સ ગાઈડ',
moreInfo : 'લાયસનસની માહિતી માટે અમારી વેબ સાઈટ',
copy : 'કોપીરાઈટ © $1. ઓલ રાઈટ્સ '
},
maximize : 'મોટું કરવું',
minimize : 'નાનું કરવું',
fakeobjects :
{
anchor : 'અનકર',
flash : 'ફ્લેશ ',
iframe : 'IFrame',
hiddenfield : 'હિડન ',
unknown : 'અનનોન ઓબ્જેક્ટ'
},
resize : 'ખેંચી ને યોગ્ય કરવું',
colordialog :
{
title : 'રંગ પસંદ કરો',
options : 'રંગના વિકલ્પ',
highlight : 'હાઈઈટ',
selected : 'પસંદ કરેલો રંગ',
clear : 'સાફ કરવું'
},
toolbarCollapse : 'ટૂલબાર નાનું કરવું',
toolbarExpand : 'ટૂલબાર મોટું કરવું',
toolbarGroups :
{
document : 'દસ્તાવેજ',
clipboard : 'ક્લિપબોર્ડ/અન',
editing : 'એડીટ કરવું',
forms : 'ફોર્મ',
basicstyles : 'બેસિક્ સ્ટાઇલ',
paragraph : 'ફકરો',
links : 'લીંક',
insert : 'ઉમેરવું',
styles : 'સ્ટાઇલ',
colors : 'રંગ',
tools : 'ટૂલ્સ'
},
bidi :
{
ltr : 'ટેક્ષ્ત્ ની દિશા ડાબે થી જમણે',
rtl : 'ટેક્ષ્ત્ ની દિશા જમણે થી ડાબે'
},
docprops :
{
label : 'ડૉક્યુમન્ટ ગુણ/પ્રૉપર્ટિઝ',
title : 'ડૉક્યુમન્ટ ગુણ/પ્રૉપર્ટિઝ',
design : 'ડીસા',
meta : 'મેટાડૅટા',
chooseColor : 'વિકલ્પ',
other : '<other>',
docTitle : 'પેજ મથાળું/ટાઇટલ',
charset : 'કેરેક્ટર સેટ એન્કોડિંગ',
charsetOther : 'અન્ય કેરેક્ટર સેટ એન્કોડિંગ',
charsetASCII : 'ASCII',
charsetCE : 'મધ્ય યુરોપિઅન (Central European)',
charsetCT : 'ચાઇનીઝ (Chinese Traditional Big5)',
charsetCR : 'સિરીલિક (Cyrillic)',
charsetGR : 'ગ્રીક (Greek)',
charsetJP : 'જાપાનિઝ (Japanese)',
charsetKR : 'કોરીયન (Korean)',
charsetTR : 'ટર્કિ (Turkish)',
charsetUN : 'યૂનિકોડ (UTF-8)',
charsetWE : 'પશ્ચિમ યુરોપિઅન (Western European)',
docType : 'ડૉક્યુમન્ટ પ્રકાર શીર્ષક',
docTypeOther : 'અન્ય ડૉક્યુમન્ટ પ્રકાર શીર્ષક',
xhtmlDec : 'XHTML સૂચના સમાવિષ્ટ કરવી',
bgColor : 'બૅકગ્રાઉન્ડ રંગ',
bgImage : 'બૅકગ્રાઉન્ડ ચિત્ર URL',
bgFixed : 'સ્ક્રોલ ન થાય તેવું બૅકગ્રાઉન્ડ',
txtColor : 'શબ્દનો રંગ',
margin : 'પેજ માર્જિન',
marginTop : 'ઉપર',
marginLeft : 'ડાબી',
marginRight : 'જમણી',
marginBottom : 'નીચે',
metaKeywords : 'ડૉક્યુમન્ટ ઇન્ડેક્સ સંકેતશબ્દ (અલ્પવિરામ (,) થી અલગ કરો)',
metaDescription : 'ડૉક્યુમન્ટ વર્ણન',
metaAuthor : 'લેખક',
metaCopyright : 'કૉપિરાઇટ',
previewHtml : '<p>આ એક <strong>સેમ્પલ ટેક્ષ્ત્</strong> છે. તમે <a href="javascript:void(0)">CKEditor</a> વાપરો છો.</p>'
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* Canadian French language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['fr-ca'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Editor toolbars', // MISSING
editor : 'Rich Text Editor', // MISSING
// Toolbar buttons without dialogs.
source : 'Source',
newPage : 'Nouvelle page',
save : 'Sauvegarder',
preview : 'Previsualiser',
cut : 'Couper',
copy : 'Copier',
paste : 'Coller',
print : 'Imprimer',
underline : 'Souligné',
bold : 'Gras',
italic : 'Italique',
selectAll : 'Tout sélectionner',
removeFormat : 'Supprimer le formatage',
strike : 'Barrer',
subscript : 'Indice',
superscript : 'Exposant',
horizontalrule : 'Insérer un séparateur',
pagebreak : 'Insérer un saut de page',
pagebreakAlt : 'Page Break', // MISSING
unlink : 'Supprimer le lien',
undo : 'Annuler',
redo : 'Refaire',
// Common messages and labels.
common :
{
browseServer : 'Parcourir le serveur',
url : 'URL',
protocol : 'Protocole',
upload : 'Télécharger',
uploadSubmit : 'Envoyer sur le serveur',
image : 'Image',
flash : 'Animation Flash',
form : 'Formulaire',
checkbox : 'Case à cocher',
radio : 'Bouton radio',
textField : 'Champ texte',
textarea : 'Zone de texte',
hiddenField : 'Champ caché',
button : 'Bouton',
select : 'Champ de sélection',
imageButton : 'Bouton image',
notSet : '<Par défaut>',
id : 'Id',
name : 'Nom',
langDir : 'Sens d\'écriture',
langDirLtr : 'De gauche à droite (LTR)',
langDirRtl : 'De droite à gauche (RTL)',
langCode : 'Code langue',
longDescr : 'URL de description longue',
cssClass : 'Classes de feuilles de style',
advisoryTitle : 'Titre',
cssStyle : 'Style',
ok : 'OK',
cancel : 'Annuler',
close : 'Close', // MISSING
preview : 'Preview', // MISSING
generalTab : 'Général',
advancedTab : 'Avancée',
validateNumberFailed : 'This value is not a number.', // MISSING
confirmNewPage : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?', // MISSING
confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING
options : 'Options', // MISSING
target : 'Target', // MISSING
targetNew : 'New Window (_blank)', // MISSING
targetTop : 'Topmost Window (_top)', // MISSING
targetSelf : 'Same Window (_self)', // MISSING
targetParent : 'Parent Window (_parent)', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Right to Left (RTL)', // MISSING
styles : 'Style', // MISSING
cssClasses : 'Stylesheet Classes', // MISSING
width : 'Largeur',
height : 'Hauteur',
align : 'Alignement',
alignLeft : 'Gauche',
alignRight : 'Droite',
alignCenter : 'Centré',
alignTop : 'Haut',
alignMiddle : 'Milieu',
alignBottom : 'Bas',
invalidHeight : 'Height must be a number.', // MISSING
invalidWidth : 'Width must be a number.', // MISSING
invalidCssLength : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip : 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, unavailable</span>' // MISSING
},
contextmenu :
{
options : 'Context Menu Options' // MISSING
},
// Special char dialog.
specialChar :
{
toolbar : 'Insérer un caractère spécial',
title : 'Insérer un caractère spécial',
options : 'Special Character Options' // MISSING
},
// Link dialog.
link :
{
toolbar : 'Insérer/modifier le lien',
other : '<other>', // MISSING
menu : 'Modifier le lien',
title : 'Propriétés du lien',
info : 'Informations sur le lien',
target : 'Destination',
upload : 'Télécharger',
advanced : 'Avancée',
type : 'Type de lien',
toUrl : 'URL', // MISSING
toAnchor : 'Ancre dans cette page',
toEmail : 'E-Mail',
targetFrame : '<Cadre>',
targetPopup : '<fenêtre popup>',
targetFrameName : 'Nom du cadre de destination',
targetPopupName : 'Nom de la fenêtre popup',
popupFeatures : 'Caractéristiques de la fenêtre popup',
popupResizable : 'Resizable', // MISSING
popupStatusBar : 'Barre d\'état',
popupLocationBar: 'Barre d\'adresses',
popupToolbar : 'Barre d\'outils',
popupMenuBar : 'Barre de menu',
popupFullScreen : 'Plein écran (IE)',
popupScrollBars : 'Barres de défilement',
popupDependent : 'Dépendante (Netscape)',
popupLeft : 'Position à partir de la gauche',
popupTop : 'Position à partir du haut',
id : 'Id', // MISSING
langDir : 'Sens d\'écriture',
langDirLTR : 'De gauche à droite (LTR)',
langDirRTL : 'De droite à gauche (RTL)',
acccessKey : 'Équivalent clavier',
name : 'Nom',
langCode : 'Sens d\'écriture',
tabIndex : 'Ordre de tabulation',
advisoryTitle : 'Titre',
advisoryContentType : 'Type de contenu',
cssClasses : 'Classes de feuilles de style',
charset : 'Encodage de caractère',
styles : 'Style',
rel : 'Relationship', // MISSING
selectAnchor : 'Sélectionner une ancre',
anchorName : 'Par nom',
anchorId : 'Par id',
emailAddress : 'Adresse E-Mail',
emailSubject : 'Sujet du message',
emailBody : 'Corps du message',
noAnchors : '(Pas d\'ancre disponible dans le document)',
noUrl : 'Veuillez saisir l\'URL',
noEmail : 'Veuillez saisir l\'adresse e-mail'
},
// Anchor dialog
anchor :
{
toolbar : 'Insérer/modifier l\'ancre',
menu : 'Propriétés de l\'ancre',
title : 'Propriétés de l\'ancre',
name : 'Nom de l\'ancre',
errorName : 'Veuillez saisir le nom de l\'ancre',
remove : 'Remove Anchor' // MISSING
},
// List style dialog
list:
{
numberedTitle : 'Numbered List Properties', // MISSING
bulletedTitle : 'Bulleted List Properties', // MISSING
type : 'Type', // MISSING
start : 'Start', // MISSING
validateStartNumber :'List start number must be a whole number.', // MISSING
circle : 'Circle', // MISSING
disc : 'Disc', // MISSING
square : 'Square', // MISSING
none : 'None', // MISSING
notset : '<not set>', // MISSING
armenian : 'Armenian numbering', // MISSING
georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING
lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING
upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING
lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING
upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING
lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING
decimal : 'Decimal (1, 2, 3, etc.)', // MISSING
decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Chercher et Remplacer',
find : 'Chercher',
replace : 'Remplacer',
findWhat : 'Rechercher:',
replaceWith : 'Remplacer par:',
notFoundMsg : 'Le texte indiqué est introuvable.',
findOptions : 'Find Options', // MISSING
matchCase : 'Respecter la casse',
matchWord : 'Mot entier',
matchCyclic : 'Match cyclic', // MISSING
replaceAll : 'Tout remplacer',
replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING
},
// Table Dialog
table :
{
toolbar : 'Tableau',
title : 'Propriétés du tableau',
menu : 'Propriétés du tableau',
deleteTable : 'Supprimer le tableau',
rows : 'Lignes',
columns : 'Colonnes',
border : 'Taille de la bordure',
widthPx : 'pixels',
widthPc : 'pourcentage',
widthUnit : 'width unit', // MISSING
cellSpace : 'Espacement',
cellPad : 'Contour',
caption : 'Titre',
summary : 'Résumé',
headers : 'Headers', // MISSING
headersNone : 'None', // MISSING
headersColumn : 'First column', // MISSING
headersRow : 'First Row', // MISSING
headersBoth : 'Both', // MISSING
invalidRows : 'Number of rows must be a number greater than 0.', // MISSING
invalidCols : 'Number of columns must be a number greater than 0.', // MISSING
invalidBorder : 'Border size must be a number.', // MISSING
invalidWidth : 'Table width must be a number.', // MISSING
invalidHeight : 'Table height must be a number.', // MISSING
invalidCellSpacing : 'Cell spacing must be a positive number.', // MISSING
invalidCellPadding : 'Cell padding must be a positive number.', // MISSING
cell :
{
menu : 'Cellule',
insertBefore : 'Insérer une cellule avant',
insertAfter : 'Insérer une cellule après',
deleteCell : 'Supprimer des cellules',
merge : 'Fusionner les cellules',
mergeRight : 'Fusionner à droite',
mergeDown : 'Fusionner en bas',
splitHorizontal : 'Scinder la cellule horizontalement',
splitVertical : 'Scinder la cellule verticalement',
title : 'Cell Properties', // MISSING
cellType : 'Cell Type', // MISSING
rowSpan : 'Rows Span', // MISSING
colSpan : 'Columns Span', // MISSING
wordWrap : 'Word Wrap', // MISSING
hAlign : 'Horizontal Alignment', // MISSING
vAlign : 'Vertical Alignment', // MISSING
alignBaseline : 'Baseline', // MISSING
bgColor : 'Background Color', // MISSING
borderColor : 'Border Color', // MISSING
data : 'Data', // MISSING
header : 'Header', // MISSING
yes : 'Yes', // MISSING
no : 'No', // MISSING
invalidWidth : 'Cell width must be a number.', // MISSING
invalidHeight : 'Cell height must be a number.', // MISSING
invalidRowSpan : 'Rows span must be a whole number.', // MISSING
invalidColSpan : 'Columns span must be a whole number.', // MISSING
chooseColor : 'Choose' // MISSING
},
row :
{
menu : 'Ligne',
insertBefore : 'Insérer une ligne avant',
insertAfter : 'Insérer une ligne après',
deleteRow : 'Supprimer des lignes'
},
column :
{
menu : 'Colonne',
insertBefore : 'Insérer une colonne avant',
insertAfter : 'Insérer une colonne après',
deleteColumn : 'Supprimer des colonnes'
}
},
// Button Dialog.
button :
{
title : 'Propriétés du bouton',
text : 'Texte (Valeur)',
type : 'Type',
typeBtn : 'Bouton',
typeSbm : 'Soumettre',
typeRst : 'Réinitialiser'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'Propriétés de la case à cocher',
radioTitle : 'Propriétés du bouton radio',
value : 'Valeur',
selected : 'Sélectionné'
},
// Form Dialog.
form :
{
title : 'Propriétés du formulaire',
menu : 'Propriétés du formulaire',
action : 'Action',
method : 'Méthode',
encoding : 'Encoding' // MISSING
},
// Select Field Dialog.
select :
{
title : 'Propriétés de la liste/du menu',
selectInfo : 'Info',
opAvail : 'Options disponibles',
value : 'Valeur',
size : 'Taille',
lines : 'lignes',
chkMulti : 'Sélection multiple',
opText : 'Texte',
opValue : 'Valeur',
btnAdd : 'Ajouter',
btnModify : 'Modifier',
btnUp : 'Monter',
btnDown : 'Descendre',
btnSetValue : 'Valeur sélectionnée',
btnDelete : 'Supprimer'
},
// Textarea Dialog.
textarea :
{
title : 'Propriétés de la zone de texte',
cols : 'Colonnes',
rows : 'Lignes'
},
// Text Field Dialog.
textfield :
{
title : 'Propriétés du champ texte',
name : 'Nom',
value : 'Valeur',
charWidth : 'Largeur en caractères',
maxChars : 'Nombre maximum de caractères',
type : 'Type',
typeText : 'Texte',
typePass : 'Mot de passe'
},
// Hidden Field Dialog.
hidden :
{
title : 'Propriétés du champ caché',
name : 'Nom',
value : 'Valeur'
},
// Image Dialog.
image :
{
title : 'Propriétés de l\'image',
titleButton : 'Propriétés du bouton image',
menu : 'Propriétés de l\'image',
infoTab : 'Informations sur l\'image',
btnUpload : 'Envoyer sur le serveur',
upload : 'Télécharger',
alt : 'Texte de remplacement',
lockRatio : 'Garder les proportions',
resetSize : 'Taille originale',
border : 'Bordure',
hSpace : 'Espacement horizontal',
vSpace : 'Espacement vertical',
alertUrl : 'Veuillez saisir l\'URL de l\'image',
linkTab : 'Lien',
button2Img : 'Do you want to transform the selected image button on a simple image?', // MISSING
img2Button : 'Do you want to transform the selected image on a image button?', // MISSING
urlMissing : 'Image source URL is missing.', // MISSING
validateBorder : 'Border must be a whole number.', // MISSING
validateHSpace : 'HSpace must be a whole number.', // MISSING
validateVSpace : 'VSpace must be a whole number.' // MISSING
},
// Flash Dialog
flash :
{
properties : 'Propriétés de l\'animation Flash',
propertiesTab : 'Properties', // MISSING
title : 'Propriétés de l\'animation Flash',
chkPlay : 'Lecture automatique',
chkLoop : 'Boucle',
chkMenu : 'Activer le menu Flash',
chkFull : 'Allow Fullscreen', // MISSING
scale : 'Affichage',
scaleAll : 'Par défaut (tout montrer)',
scaleNoBorder : 'Sans bordure',
scaleFit : 'Ajuster aux dimensions',
access : 'Script Access', // MISSING
accessAlways : 'Always', // MISSING
accessSameDomain: 'Same domain', // MISSING
accessNever : 'Never', // MISSING
alignAbsBottom : 'Abs Bas',
alignAbsMiddle : 'Abs Milieu',
alignBaseline : 'Bas du texte',
alignTextTop : 'Haut du texte',
quality : 'Quality', // MISSING
qualityBest : 'Best', // MISSING
qualityHigh : 'High', // MISSING
qualityAutoHigh : 'Auto High', // MISSING
qualityMedium : 'Medium', // MISSING
qualityAutoLow : 'Auto Low', // MISSING
qualityLow : 'Low', // MISSING
windowModeWindow: 'Window', // MISSING
windowModeOpaque: 'Opaque', // MISSING
windowModeTransparent : 'Transparent', // MISSING
windowMode : 'Window mode', // MISSING
flashvars : 'Variables for Flash', // MISSING
bgcolor : 'Couleur de fond',
hSpace : 'Espacement horizontal',
vSpace : 'Espacement vertical',
validateSrc : 'Veuillez saisir l\'URL',
validateHSpace : 'HSpace must be a number.', // MISSING
validateVSpace : 'VSpace must be a number.' // MISSING
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'Orthographe',
title : 'Spell Check', // MISSING
notAvailable : 'Sorry, but service is unavailable now.', // MISSING
errorLoading : 'Error loading application service host: %s.', // MISSING
notInDic : 'Pas dans le dictionnaire',
changeTo : 'Changer en',
btnIgnore : 'Ignorer',
btnIgnoreAll : 'Ignorer tout',
btnReplace : 'Remplacer',
btnReplaceAll : 'Remplacer tout',
btnUndo : 'Annuler',
noSuggestions : '- Pas de suggestion -',
progress : 'Vérification d\'orthographe en cours...',
noMispell : 'Vérification d\'orthographe terminée: pas d\'erreur trouvée',
noChanges : 'Vérification d\'orthographe terminée: Pas de modifications',
oneChange : 'Vérification d\'orthographe terminée: Un mot modifié',
manyChanges : 'Vérification d\'orthographe terminée: %1 mots modifiés',
ieSpellDownload : 'Le Correcteur d\'orthographe n\'est pas installé. Souhaitez-vous le télécharger maintenant?'
},
smiley :
{
toolbar : 'Emoticon',
title : 'Insérer un Emoticon',
options : 'Smiley Options' // MISSING
},
elementsPath :
{
eleLabel : 'Elements path', // MISSING
eleTitle : '%1 element' // MISSING
},
numberedlist : 'Liste numérotée',
bulletedlist : 'Liste à puces',
indent : 'Augmenter le retrait',
outdent : 'Diminuer le retrait',
justify :
{
left : 'Aligner à gauche',
center : 'Centrer',
right : 'Aligner à Droite',
block : 'Texte justifié'
},
blockquote : 'Citation',
clipboard :
{
title : 'Coller',
cutError : 'Les paramètres de sécurité de votre navigateur empêchent l\'éditeur de couper automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl/Cmd+X).',
copyError : 'Les paramètres de sécurité de votre navigateur empêchent l\'éditeur de copier automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl/Cmd+C).',
pasteMsg : 'Veuillez coller dans la zone ci-dessous en utilisant le clavier (<STRONG>Ctrl/Cmd+V</STRONG>) et appuyer sur <STRONG>OK</STRONG>.',
securityMsg : 'A cause des paramètres de sécurité de votre navigateur, l\'éditeur ne peut accéder au presse-papier directement. Vous devez coller à nouveau le contenu dans cette fenêtre.',
pasteArea : 'Paste Area' // MISSING
},
pastefromword :
{
confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING
toolbar : 'Coller en tant que Word (formaté)',
title : 'Coller en tant que Word (formaté)',
error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING
},
pasteText :
{
button : 'Coller comme texte',
title : 'Coller comme texte'
},
templates :
{
button : 'Modèles',
title : 'Modèles de contenu',
options : 'Template Options', // MISSING
insertOption : 'Remplacer tout le contenu actuel',
selectPromptMsg : 'Sélectionner le modèle à ouvrir dans l\'éditeur<br>(le contenu actuel sera remplacé):',
emptyListMsg : '(Aucun modèle disponible)'
},
showBlocks : 'Afficher les blocs',
stylesCombo :
{
label : 'Style',
panelTitle : 'Formatting Styles', // MISSING
panelTitle1 : 'Block Styles', // MISSING
panelTitle2 : 'Inline Styles', // MISSING
panelTitle3 : 'Object Styles' // MISSING
},
format :
{
label : 'Format',
panelTitle : 'Format',
tag_p : 'Normal',
tag_pre : 'Formaté',
tag_address : 'Adresse',
tag_h1 : 'En-tête 1',
tag_h2 : 'En-tête 2',
tag_h3 : 'En-tête 3',
tag_h4 : 'En-tête 4',
tag_h5 : 'En-tête 5',
tag_h6 : 'En-tête 6',
tag_div : 'Normal (DIV)'
},
div :
{
title : 'Create Div Container', // MISSING
toolbar : 'Create Div Container', // MISSING
cssClassInputLabel : 'Stylesheet Classes', // MISSING
styleSelectLabel : 'Style', // MISSING
IdInputLabel : 'Id', // MISSING
languageCodeInputLabel : ' Language Code', // MISSING
inlineStyleInputLabel : 'Inline Style', // MISSING
advisoryTitleInputLabel : 'Advisory Title', // MISSING
langDirLabel : 'Language Direction', // MISSING
langDirLTRLabel : 'Left to Right (LTR)', // MISSING
langDirRTLLabel : 'Right to Left (RTL)', // MISSING
edit : 'Edit Div', // MISSING
remove : 'Remove Div' // MISSING
},
iframe :
{
title : 'IFrame Properties', // MISSING
toolbar : 'IFrame', // MISSING
noUrl : 'Please type the iframe URL', // MISSING
scrolling : 'Enable scrollbars', // MISSING
border : 'Show frame border' // MISSING
},
font :
{
label : 'Police',
voiceLabel : 'Font', // MISSING
panelTitle : 'Police'
},
fontSize :
{
label : 'Taille',
voiceLabel : 'Font Size', // MISSING
panelTitle : 'Taille'
},
colorButton :
{
textColorTitle : 'Couleur de caractère',
bgColorTitle : 'Couleur de fond',
panelTitle : 'Colors', // MISSING
auto : 'Automatique',
more : 'Plus de couleurs...'
},
colors :
{
'000' : 'Black', // MISSING
'800000' : 'Maroon', // MISSING
'8B4513' : 'Saddle Brown', // MISSING
'2F4F4F' : 'Dark Slate Gray', // MISSING
'008080' : 'Teal', // MISSING
'000080' : 'Navy', // MISSING
'4B0082' : 'Indigo', // MISSING
'696969' : 'Dark Gray', // MISSING
'B22222' : 'Fire Brick', // MISSING
'A52A2A' : 'Brown', // MISSING
'DAA520' : 'Golden Rod', // MISSING
'006400' : 'Dark Green', // MISSING
'40E0D0' : 'Turquoise', // MISSING
'0000CD' : 'Medium Blue', // MISSING
'800080' : 'Purple', // MISSING
'808080' : 'Gray', // MISSING
'F00' : 'Red', // MISSING
'FF8C00' : 'Dark Orange', // MISSING
'FFD700' : 'Gold', // MISSING
'008000' : 'Green', // MISSING
'0FF' : 'Cyan', // MISSING
'00F' : 'Blue', // MISSING
'EE82EE' : 'Violet', // MISSING
'A9A9A9' : 'Dim Gray', // MISSING
'FFA07A' : 'Light Salmon', // MISSING
'FFA500' : 'Orange', // MISSING
'FFFF00' : 'Yellow', // MISSING
'00FF00' : 'Lime', // MISSING
'AFEEEE' : 'Pale Turquoise', // MISSING
'ADD8E6' : 'Light Blue', // MISSING
'DDA0DD' : 'Plum', // MISSING
'D3D3D3' : 'Light Grey', // MISSING
'FFF0F5' : 'Lavender Blush', // MISSING
'FAEBD7' : 'Antique White', // MISSING
'FFFFE0' : 'Light Yellow', // MISSING
'F0FFF0' : 'Honeydew', // MISSING
'F0FFFF' : 'Azure', // MISSING
'F0F8FF' : 'Alice Blue', // MISSING
'E6E6FA' : 'Lavender', // MISSING
'FFF' : 'White' // MISSING
},
scayt :
{
title : 'Spell Check As You Type', // MISSING
opera_title : 'Not supported by Opera', // MISSING
enable : 'Enable SCAYT', // MISSING
disable : 'Disable SCAYT', // MISSING
about : 'About SCAYT', // MISSING
toggle : 'Toggle SCAYT', // MISSING
options : 'Options', // MISSING
langs : 'Languages', // MISSING
moreSuggestions : 'More suggestions', // MISSING
ignore : 'Ignore', // MISSING
ignoreAll : 'Ignore All', // MISSING
addWord : 'Add Word', // MISSING
emptyDic : 'Dictionary name should not be empty.', // MISSING
optionsTab : 'Options', // MISSING
allCaps : 'Ignore All-Caps Words', // MISSING
ignoreDomainNames : 'Ignore Domain Names', // MISSING
mixedCase : 'Ignore Words with Mixed Case', // MISSING
mixedWithDigits : 'Ignore Words with Numbers', // MISSING
languagesTab : 'Languages', // MISSING
dictionariesTab : 'Dictionaries', // MISSING
dic_field_name : 'Dictionary name', // MISSING
dic_create : 'Create', // MISSING
dic_restore : 'Restore', // MISSING
dic_delete : 'Delete', // MISSING
dic_rename : 'Rename', // MISSING
dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING
aboutTab : 'About' // MISSING
},
about :
{
title : 'About CKEditor', // MISSING
dlgTitle : 'About CKEditor', // MISSING
help : 'Check $1 for help.', // MISSING
userGuide : 'CKEditor User\'s Guide', // MISSING
moreInfo : 'For licensing information please visit our web site:', // MISSING
copy : 'Copyright © $1. All rights reserved.' // MISSING
},
maximize : 'Maximize', // MISSING
minimize : 'Minimize', // MISSING
fakeobjects :
{
anchor : 'Anchor', // MISSING
flash : 'Flash Animation', // MISSING
iframe : 'IFrame', // MISSING
hiddenfield : 'Hidden Field', // MISSING
unknown : 'Unknown Object' // MISSING
},
resize : 'Drag to resize', // MISSING
colordialog :
{
title : 'Select color', // MISSING
options : 'Color Options', // MISSING
highlight : 'Highlight', // MISSING
selected : 'Selected Color', // MISSING
clear : 'Clear' // MISSING
},
toolbarCollapse : 'Collapse Toolbar', // MISSING
toolbarExpand : 'Expand Toolbar', // MISSING
toolbarGroups :
{
document : 'Document', // MISSING
clipboard : 'Clipboard/Undo', // MISSING
editing : 'Editing', // MISSING
forms : 'Forms', // MISSING
basicstyles : 'Basic Styles', // MISSING
paragraph : 'Paragraph', // MISSING
links : 'Links', // MISSING
insert : 'Insert', // MISSING
styles : 'Styles', // MISSING
colors : 'Colors', // MISSING
tools : 'Tools' // MISSING
},
bidi :
{
ltr : 'Text direction from left to right', // MISSING
rtl : 'Text direction from right to left' // MISSING
},
docprops :
{
label : 'Propriétés du document',
title : 'Propriétés du document',
design : 'Design', // MISSING
meta : 'Méta-Données',
chooseColor : 'Choose', // MISSING
other : '<other>',
docTitle : 'Titre de la page',
charset : 'Encodage de caractère',
charsetOther : 'Autre encodage de caractère',
charsetASCII : 'ASCII', // MISSING
charsetCE : 'Europe Centrale',
charsetCT : 'Chinois Traditionnel (Big5)',
charsetCR : 'Cyrillique',
charsetGR : 'Grecque',
charsetJP : 'Japonais',
charsetKR : 'Coréen',
charsetTR : 'Turcque',
charsetUN : 'Unicode (UTF-8)', // MISSING
charsetWE : 'Occidental',
docType : 'Type de document',
docTypeOther : 'Autre type de document',
xhtmlDec : 'Inclure les déclarations XHTML',
bgColor : 'Couleur de fond',
bgImage : 'Image de fond',
bgFixed : 'Image fixe sans défilement',
txtColor : 'Couleur de caractère',
margin : 'Marges',
marginTop : 'Haut',
marginLeft : 'Gauche',
marginRight : 'Droite',
marginBottom : 'Bas',
metaKeywords : 'Mots-clés (séparés par des virgules)',
metaDescription : 'Description',
metaAuthor : 'Auteur',
metaCopyright : 'Copyright', // MISSING
previewHtml : '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>' // MISSING
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
var CKEDITOR_LANGS = (function()
{
var langs =
{
af : 'Afrikaans',
ar : 'Arabic',
bg : 'Bulgarian',
bn : 'Bengali/Bangla',
bs : 'Bosnian',
ca : 'Catalan',
cs : 'Czech',
cy : 'Welsh',
da : 'Danish',
de : 'German',
el : 'Greek',
en : 'English',
'en-au' : 'English (Australia)',
'en-ca' : 'English (Canadian)',
'en-gb' : 'English (United Kingdom)',
eo : 'Esperanto',
es : 'Spanish',
et : 'Estonian',
eu : 'Basque',
fa : 'Persian',
fi : 'Finnish',
fo : 'Faroese',
fr : 'French',
'fr-ca' : 'French (Canada)',
gl : 'Galician',
gu : 'Gujarati',
he : 'Hebrew',
hi : 'Hindi',
hr : 'Croatian',
hu : 'Hungarian',
is : 'Icelandic',
it : 'Italian',
ja : 'Japanese',
ka : 'Georgian',
km : 'Khmer',
ko : 'Korean',
lt : 'Lithuanian',
lv : 'Latvian',
mn : 'Mongolian',
ms : 'Malay',
nb : 'Norwegian Bokmal',
nl : 'Dutch',
no : 'Norwegian',
pl : 'Polish',
pt : 'Portuguese (Portugal)',
'pt-br' : 'Portuguese (Brazil)',
ro : 'Romanian',
ru : 'Russian',
sk : 'Slovak',
sl : 'Slovenian',
sr : 'Serbian (Cyrillic)',
'sr-latn' : 'Serbian (Latin)',
sv : 'Swedish',
th : 'Thai',
tr : 'Turkish',
uk : 'Ukrainian',
vi : 'Vietnamese',
zh : 'Chinese Traditional',
'zh-cn' : 'Chinese Simplified'
};
var langsArray = [];
for ( var code in langs )
{
langsArray.push( { code : code, name : langs[ code ] } );
}
langsArray.sort( function( a, b )
{
return ( a.name < b.name ) ? -1 : 1;
});
return langsArray;
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.lang} object, for the
* English (Australia) language.
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['en-au'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Editor toolbars',
editor : 'Rich Text Editor',
// Toolbar buttons without dialogs.
source : 'Source',
newPage : 'New Page',
save : 'Save',
preview : 'Preview',
cut : 'Cut',
copy : 'Copy',
paste : 'Paste',
print : 'Print',
underline : 'Underline',
bold : 'Bold',
italic : 'Italic',
selectAll : 'Select All',
removeFormat : 'Remove Format',
strike : 'Strike Through',
subscript : 'Subscript',
superscript : 'Superscript',
horizontalrule : 'Insert Horizontal Line',
pagebreak : 'Insert Page Break for Printing',
pagebreakAlt : 'Page Break', // MISSING
unlink : 'Unlink',
undo : 'Undo',
redo : 'Redo',
// Common messages and labels.
common :
{
browseServer : 'Browse Server',
url : 'URL',
protocol : 'Protocol',
upload : 'Upload',
uploadSubmit : 'Send it to the Server',
image : 'Image',
flash : 'Flash',
form : 'Form',
checkbox : 'Checkbox',
radio : 'Radio Button',
textField : 'Text Field',
textarea : 'Textarea',
hiddenField : 'Hidden Field',
button : 'Button',
select : 'Selection Field',
imageButton : 'Image Button',
notSet : '<not set>',
id : 'Id',
name : 'Name',
langDir : 'Language Direction',
langDirLtr : 'Left to Right (LTR)',
langDirRtl : 'Right to Left (RTL)',
langCode : 'Language Code',
longDescr : 'Long Description URL',
cssClass : 'Stylesheet Classes',
advisoryTitle : 'Advisory Title',
cssStyle : 'Style',
ok : 'OK',
cancel : 'Cancel',
close : 'Close', // MISSING
preview : 'Preview', // MISSING
generalTab : 'General',
advancedTab : 'Advanced',
validateNumberFailed : 'This value is not a number.',
confirmNewPage : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?',
confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?',
options : 'Options', // MISSING
target : 'Target', // MISSING
targetNew : 'New Window (_blank)', // MISSING
targetTop : 'Topmost Window (_top)', // MISSING
targetSelf : 'Same Window (_self)', // MISSING
targetParent : 'Parent Window (_parent)', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Right to Left (RTL)', // MISSING
styles : 'Style', // MISSING
cssClasses : 'Stylesheet Classes', // MISSING
width : 'Width', // MISSING
height : 'Height', // MISSING
align : 'Align',
alignLeft : 'Left', // MISSING
alignRight : 'Right', // MISSING
alignCenter : 'Centre',
alignTop : 'Top', // MISSING
alignMiddle : 'Middle', // MISSING
alignBottom : 'Bottom', // MISSING
invalidHeight : 'Height must be a number.', // MISSING
invalidWidth : 'Width must be a number.', // MISSING
invalidCssLength : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip : 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, unavailable</span>' // MISSING
},
contextmenu :
{
options : 'Context Menu Options' // MISSING
},
// Special char dialog.
specialChar :
{
toolbar : 'Insert Special Character',
title : 'Select Special Character',
options : 'Special Character Options' // MISSING
},
// Link dialog.
link :
{
toolbar : 'Link',
other : '<other>',
menu : 'Edit Link',
title : 'Link',
info : 'Link Info',
target : 'Target',
upload : 'Upload',
advanced : 'Advanced',
type : 'Link Type',
toUrl : 'URL', // MISSING
toAnchor : 'Link to anchor in the text',
toEmail : 'E-mail',
targetFrame : '<frame>',
targetPopup : '<popup window>',
targetFrameName : 'Target Frame Name',
targetPopupName : 'Popup Window Name',
popupFeatures : 'Popup Window Features',
popupResizable : 'Resizable',
popupStatusBar : 'Status Bar',
popupLocationBar: 'Location Bar',
popupToolbar : 'Toolbar',
popupMenuBar : 'Menu Bar',
popupFullScreen : 'Full Screen (IE)',
popupScrollBars : 'Scroll Bars',
popupDependent : 'Dependent (Netscape)',
popupLeft : 'Left Position',
popupTop : 'Top Position',
id : 'Id',
langDir : 'Language Direction',
langDirLTR : 'Left to Right (LTR)',
langDirRTL : 'Right to Left (RTL)',
acccessKey : 'Access Key',
name : 'Name',
langCode : 'Language Code',
tabIndex : 'Tab Index',
advisoryTitle : 'Advisory Title',
advisoryContentType : 'Advisory Content Type',
cssClasses : 'Stylesheet Classes',
charset : 'Linked Resource Charset',
styles : 'Style',
rel : 'Relationship', // MISSING
selectAnchor : 'Select an Anchor',
anchorName : 'By Anchor Name',
anchorId : 'By Element Id',
emailAddress : 'E-Mail Address',
emailSubject : 'Message Subject',
emailBody : 'Message Body',
noAnchors : '(No anchors available in the document)',
noUrl : 'Please type the link URL',
noEmail : 'Please type the e-mail address'
},
// Anchor dialog
anchor :
{
toolbar : 'Anchor',
menu : 'Edit Anchor',
title : 'Anchor Properties',
name : 'Anchor Name',
errorName : 'Please type the anchor name',
remove : 'Remove Anchor' // MISSING
},
// List style dialog
list:
{
numberedTitle : 'Numbered List Properties', // MISSING
bulletedTitle : 'Bulleted List Properties', // MISSING
type : 'Type', // MISSING
start : 'Start', // MISSING
validateStartNumber :'List start number must be a whole number.', // MISSING
circle : 'Circle', // MISSING
disc : 'Disc', // MISSING
square : 'Square', // MISSING
none : 'None', // MISSING
notset : '<not set>', // MISSING
armenian : 'Armenian numbering', // MISSING
georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING
lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING
upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING
lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING
upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING
lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING
decimal : 'Decimal (1, 2, 3, etc.)', // MISSING
decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Find and Replace',
find : 'Find',
replace : 'Replace',
findWhat : 'Find what:',
replaceWith : 'Replace with:',
notFoundMsg : 'The specified text was not found.',
findOptions : 'Find Options', // MISSING
matchCase : 'Match case',
matchWord : 'Match whole word',
matchCyclic : 'Match cyclic',
replaceAll : 'Replace All',
replaceSuccessMsg : '%1 occurrence(s) replaced.'
},
// Table Dialog
table :
{
toolbar : 'Table',
title : 'Table Properties',
menu : 'Table Properties',
deleteTable : 'Delete Table',
rows : 'Rows',
columns : 'Columns',
border : 'Border size',
widthPx : 'pixels',
widthPc : 'percent',
widthUnit : 'width unit', // MISSING
cellSpace : 'Cell spacing',
cellPad : 'Cell padding',
caption : 'Caption',
summary : 'Summary',
headers : 'Headers',
headersNone : 'None',
headersColumn : 'First column',
headersRow : 'First Row',
headersBoth : 'Both',
invalidRows : 'Number of rows must be a number greater than 0.',
invalidCols : 'Number of columns must be a number greater than 0.',
invalidBorder : 'Border size must be a number.',
invalidWidth : 'Table width must be a number.',
invalidHeight : 'Table height must be a number.',
invalidCellSpacing : 'Cell spacing must be a number.',
invalidCellPadding : 'Cell padding must be a number.',
cell :
{
menu : 'Cell',
insertBefore : 'Insert Cell Before',
insertAfter : 'Insert Cell After',
deleteCell : 'Delete Cells',
merge : 'Merge Cells',
mergeRight : 'Merge Right',
mergeDown : 'Merge Down',
splitHorizontal : 'Split Cell Horizontally',
splitVertical : 'Split Cell Vertically',
title : 'Cell Properties',
cellType : 'Cell Type',
rowSpan : 'Rows Span',
colSpan : 'Columns Span',
wordWrap : 'Word Wrap',
hAlign : 'Horizontal Alignment',
vAlign : 'Vertical Alignment',
alignBaseline : 'Baseline',
bgColor : 'Background Color',
borderColor : 'Border Color',
data : 'Data',
header : 'Header',
yes : 'Yes',
no : 'No',
invalidWidth : 'Cell width must be a number.',
invalidHeight : 'Cell height must be a number.',
invalidRowSpan : 'Rows span must be a whole number.',
invalidColSpan : 'Columns span must be a whole number.',
chooseColor : 'Choose' // MISSING
},
row :
{
menu : 'Row',
insertBefore : 'Insert Row Before',
insertAfter : 'Insert Row After',
deleteRow : 'Delete Rows'
},
column :
{
menu : 'Column',
insertBefore : 'Insert Column Before',
insertAfter : 'Insert Column After',
deleteColumn : 'Delete Columns'
}
},
// Button Dialog.
button :
{
title : 'Button Properties',
text : 'Text (Value)',
type : 'Type',
typeBtn : 'Button',
typeSbm : 'Submit',
typeRst : 'Reset'
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'Checkbox Properties',
radioTitle : 'Radio Button Properties',
value : 'Value',
selected : 'Selected'
},
// Form Dialog.
form :
{
title : 'Form Properties',
menu : 'Form Properties',
action : 'Action',
method : 'Method',
encoding : 'Encoding'
},
// Select Field Dialog.
select :
{
title : 'Selection Field Properties',
selectInfo : 'Select Info',
opAvail : 'Available Options',
value : 'Value',
size : 'Size',
lines : 'lines',
chkMulti : 'Allow multiple selections',
opText : 'Text',
opValue : 'Value',
btnAdd : 'Add',
btnModify : 'Modify',
btnUp : 'Up',
btnDown : 'Down',
btnSetValue : 'Set as selected value',
btnDelete : 'Delete'
},
// Textarea Dialog.
textarea :
{
title : 'Textarea Properties',
cols : 'Columns',
rows : 'Rows'
},
// Text Field Dialog.
textfield :
{
title : 'Text Field Properties',
name : 'Name',
value : 'Value',
charWidth : 'Character Width',
maxChars : 'Maximum Characters',
type : 'Type',
typeText : 'Text',
typePass : 'Password'
},
// Hidden Field Dialog.
hidden :
{
title : 'Hidden Field Properties',
name : 'Name',
value : 'Value'
},
// Image Dialog.
image :
{
title : 'Image Properties',
titleButton : 'Image Button Properties',
menu : 'Image Properties',
infoTab : 'Image Info',
btnUpload : 'Send it to the Server',
upload : 'Upload',
alt : 'Alternative Text',
lockRatio : 'Lock Ratio',
resetSize : 'Reset Size',
border : 'Border',
hSpace : 'HSpace',
vSpace : 'VSpace',
alertUrl : 'Please type the image URL',
linkTab : 'Link',
button2Img : 'Do you want to transform the selected image button on a simple image?',
img2Button : 'Do you want to transform the selected image on a image button?',
urlMissing : 'Image source URL is missing.', // MISSING
validateBorder : 'Border must be a whole number.', // MISSING
validateHSpace : 'HSpace must be a whole number.', // MISSING
validateVSpace : 'VSpace must be a whole number.' // MISSING
},
// Flash Dialog
flash :
{
properties : 'Flash Properties',
propertiesTab : 'Properties',
title : 'Flash Properties',
chkPlay : 'Auto Play',
chkLoop : 'Loop',
chkMenu : 'Enable Flash Menu',
chkFull : 'Allow Fullscreen',
scale : 'Scale',
scaleAll : 'Show all',
scaleNoBorder : 'No Border',
scaleFit : 'Exact Fit',
access : 'Script Access',
accessAlways : 'Always',
accessSameDomain: 'Same domain',
accessNever : 'Never',
alignAbsBottom : 'Abs Bottom',
alignAbsMiddle : 'Abs Middle',
alignBaseline : 'Baseline',
alignTextTop : 'Text Top',
quality : 'Quality',
qualityBest : 'Best', // MISSING
qualityHigh : 'High', // MISSING
qualityAutoHigh : 'Auto High', // MISSING
qualityMedium : 'Medium', // MISSING
qualityAutoLow : 'Auto Low', // MISSING
qualityLow : 'Low', // MISSING
windowModeWindow: 'Window', // MISSING
windowModeOpaque: 'Opaque', // MISSING
windowModeTransparent : 'Transparent', // MISSING
windowMode : 'Window mode',
flashvars : 'Variables for Flash',
bgcolor : 'Background colour',
hSpace : 'HSpace',
vSpace : 'VSpace',
validateSrc : 'URL must not be empty.',
validateHSpace : 'HSpace must be a number.',
validateVSpace : 'VSpace must be a number.'
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'Check Spelling',
title : 'Spell Check',
notAvailable : 'Sorry, but service is unavailable now.',
errorLoading : 'Error loading application service host: %s.',
notInDic : 'Not in dictionary',
changeTo : 'Change to',
btnIgnore : 'Ignore',
btnIgnoreAll : 'Ignore All',
btnReplace : 'Replace',
btnReplaceAll : 'Replace All',
btnUndo : 'Undo',
noSuggestions : '- No suggestions -',
progress : 'Spell check in progress...',
noMispell : 'Spell check complete: No misspellings found',
noChanges : 'Spell check complete: No words changed',
oneChange : 'Spell check complete: One word changed',
manyChanges : 'Spell check complete: %1 words changed',
ieSpellDownload : 'Spell checker not installed. Do you want to download it now?'
},
smiley :
{
toolbar : 'Smiley',
title : 'Insert a Smiley',
options : 'Smiley Options' // MISSING
},
elementsPath :
{
eleLabel : 'Elements path', // MISSING
eleTitle : '%1 element'
},
numberedlist : 'Insert/Remove Numbered List',
bulletedlist : 'Insert/Remove Bulleted List',
indent : 'Increase Indent',
outdent : 'Decrease Indent',
justify :
{
left : 'Align Left',
center : 'Centre',
right : 'Align Right',
block : 'Justify'
},
blockquote : 'Block Quote',
clipboard :
{
title : 'Paste',
cutError : 'Your browser security settings don\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).',
copyError : 'Your browser security settings don\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).',
pasteMsg : 'Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK',
securityMsg : 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.',
pasteArea : 'Paste Area' // MISSING
},
pastefromword :
{
confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING
toolbar : 'Paste from Word',
title : 'Paste from Word',
error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING
},
pasteText :
{
button : 'Paste as plain text',
title : 'Paste as Plain Text'
},
templates :
{
button : 'Templates',
title : 'Content Templates',
options : 'Template Options', // MISSING
insertOption : 'Replace actual contents',
selectPromptMsg : 'Please select the template to open in the editor',
emptyListMsg : '(No templates defined)'
},
showBlocks : 'Show Blocks',
stylesCombo :
{
label : 'Styles',
panelTitle : 'Formatting Styles', // MISSING
panelTitle1 : 'Block Styles',
panelTitle2 : 'Inline Styles',
panelTitle3 : 'Object Styles'
},
format :
{
label : 'Format',
panelTitle : 'Paragraph Format',
tag_p : 'Normal',
tag_pre : 'Formatted',
tag_address : 'Address',
tag_h1 : 'Heading 1',
tag_h2 : 'Heading 2',
tag_h3 : 'Heading 3',
tag_h4 : 'Heading 4',
tag_h5 : 'Heading 5',
tag_h6 : 'Heading 6',
tag_div : 'Normal (DIV)'
},
div :
{
title : 'Create Div Container', // MISSING
toolbar : 'Create Div Container', // MISSING
cssClassInputLabel : 'Stylesheet Classes', // MISSING
styleSelectLabel : 'Style', // MISSING
IdInputLabel : 'Id', // MISSING
languageCodeInputLabel : ' Language Code', // MISSING
inlineStyleInputLabel : 'Inline Style', // MISSING
advisoryTitleInputLabel : 'Advisory Title', // MISSING
langDirLabel : 'Language Direction', // MISSING
langDirLTRLabel : 'Left to Right (LTR)', // MISSING
langDirRTLLabel : 'Right to Left (RTL)', // MISSING
edit : 'Edit Div', // MISSING
remove : 'Remove Div' // MISSING
},
iframe :
{
title : 'IFrame Properties', // MISSING
toolbar : 'IFrame', // MISSING
noUrl : 'Please type the iframe URL', // MISSING
scrolling : 'Enable scrollbars', // MISSING
border : 'Show frame border' // MISSING
},
font :
{
label : 'Font',
voiceLabel : 'Font', // MISSING
panelTitle : 'Font Name'
},
fontSize :
{
label : 'Size',
voiceLabel : 'Font Size', // MISSING
panelTitle : 'Font Size'
},
colorButton :
{
textColorTitle : 'Text Colour',
bgColorTitle : 'Background Colour',
panelTitle : 'Colors', // MISSING
auto : 'Automatic',
more : 'More Colours...'
},
colors :
{
'000' : 'Black', // MISSING
'800000' : 'Maroon', // MISSING
'8B4513' : 'Saddle Brown', // MISSING
'2F4F4F' : 'Dark Slate Gray', // MISSING
'008080' : 'Teal', // MISSING
'000080' : 'Navy', // MISSING
'4B0082' : 'Indigo', // MISSING
'696969' : 'Dark Gray', // MISSING
'B22222' : 'Fire Brick', // MISSING
'A52A2A' : 'Brown', // MISSING
'DAA520' : 'Golden Rod', // MISSING
'006400' : 'Dark Green', // MISSING
'40E0D0' : 'Turquoise', // MISSING
'0000CD' : 'Medium Blue', // MISSING
'800080' : 'Purple', // MISSING
'808080' : 'Gray', // MISSING
'F00' : 'Red', // MISSING
'FF8C00' : 'Dark Orange', // MISSING
'FFD700' : 'Gold', // MISSING
'008000' : 'Green', // MISSING
'0FF' : 'Cyan', // MISSING
'00F' : 'Blue', // MISSING
'EE82EE' : 'Violet', // MISSING
'A9A9A9' : 'Dim Gray', // MISSING
'FFA07A' : 'Light Salmon', // MISSING
'FFA500' : 'Orange', // MISSING
'FFFF00' : 'Yellow', // MISSING
'00FF00' : 'Lime', // MISSING
'AFEEEE' : 'Pale Turquoise', // MISSING
'ADD8E6' : 'Light Blue', // MISSING
'DDA0DD' : 'Plum', // MISSING
'D3D3D3' : 'Light Grey', // MISSING
'FFF0F5' : 'Lavender Blush', // MISSING
'FAEBD7' : 'Antique White', // MISSING
'FFFFE0' : 'Light Yellow', // MISSING
'F0FFF0' : 'Honeydew', // MISSING
'F0FFFF' : 'Azure', // MISSING
'F0F8FF' : 'Alice Blue', // MISSING
'E6E6FA' : 'Lavender', // MISSING
'FFF' : 'White' // MISSING
},
scayt :
{
title : 'Spell Check As You Type', // MISSING
opera_title : 'Not supported by Opera', // MISSING
enable : 'Enable SCAYT', // MISSING
disable : 'Disable SCAYT', // MISSING
about : 'About SCAYT', // MISSING
toggle : 'Toggle SCAYT', // MISSING
options : 'Options', // MISSING
langs : 'Languages', // MISSING
moreSuggestions : 'More suggestions', // MISSING
ignore : 'Ignore', // MISSING
ignoreAll : 'Ignore All', // MISSING
addWord : 'Add Word', // MISSING
emptyDic : 'Dictionary name should not be empty.', // MISSING
optionsTab : 'Options', // MISSING
allCaps : 'Ignore All-Caps Words', // MISSING
ignoreDomainNames : 'Ignore Domain Names', // MISSING
mixedCase : 'Ignore Words with Mixed Case', // MISSING
mixedWithDigits : 'Ignore Words with Numbers', // MISSING
languagesTab : 'Languages', // MISSING
dictionariesTab : 'Dictionaries', // MISSING
dic_field_name : 'Dictionary name', // MISSING
dic_create : 'Create', // MISSING
dic_restore : 'Restore', // MISSING
dic_delete : 'Delete', // MISSING
dic_rename : 'Rename', // MISSING
dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING
aboutTab : 'About' // MISSING
},
about :
{
title : 'About CKEditor',
dlgTitle : 'About CKEditor', // MISSING
help : 'Check $1 for help.', // MISSING
userGuide : 'CKEditor User\'s Guide', // MISSING
moreInfo : 'For licensing information please visit our web site:',
copy : 'Copyright © $1. All rights reserved.'
},
maximize : 'Maximize',
minimize : 'Minimize', // MISSING
fakeobjects :
{
anchor : 'Anchor', // MISSING
flash : 'Flash Animation', // MISSING
iframe : 'IFrame', // MISSING
hiddenfield : 'Hidden Field', // MISSING
unknown : 'Unknown Object' // MISSING
},
resize : 'Drag to resize', // MISSING
colordialog :
{
title : 'Select color', // MISSING
options : 'Color Options', // MISSING
highlight : 'Highlight', // MISSING
selected : 'Selected Color', // MISSING
clear : 'Clear' // MISSING
},
toolbarCollapse : 'Collapse Toolbar', // MISSING
toolbarExpand : 'Expand Toolbar', // MISSING
toolbarGroups :
{
document : 'Document', // MISSING
clipboard : 'Clipboard/Undo', // MISSING
editing : 'Editing', // MISSING
forms : 'Forms', // MISSING
basicstyles : 'Basic Styles', // MISSING
paragraph : 'Paragraph', // MISSING
links : 'Links', // MISSING
insert : 'Insert', // MISSING
styles : 'Styles', // MISSING
colors : 'Colors', // MISSING
tools : 'Tools' // MISSING
},
bidi :
{
ltr : 'Text direction from left to right', // MISSING
rtl : 'Text direction from right to left' // MISSING
},
docprops :
{
label : 'Document Properties', // MISSING
title : 'Document Properties', // MISSING
design : 'Design', // MISSING
meta : 'Meta Tags', // MISSING
chooseColor : 'Choose', // MISSING
other : 'Other...', // MISSING
docTitle : 'Page Title', // MISSING
charset : 'Character Set Encoding', // MISSING
charsetOther : 'Other Character Set Encoding', // MISSING
charsetASCII : 'ASCII', // MISSING
charsetCE : 'Central European', // MISSING
charsetCT : 'Chinese Traditional (Big5)', // MISSING
charsetCR : 'Cyrillic', // MISSING
charsetGR : 'Greek', // MISSING
charsetJP : 'Japanese', // MISSING
charsetKR : 'Korean', // MISSING
charsetTR : 'Turkish', // MISSING
charsetUN : 'Unicode (UTF-8)', // MISSING
charsetWE : 'Western European', // MISSING
docType : 'Document Type Heading', // MISSING
docTypeOther : 'Other Document Type Heading', // MISSING
xhtmlDec : 'Include XHTML Declarations', // MISSING
bgColor : 'Background Color', // MISSING
bgImage : 'Background Image URL', // MISSING
bgFixed : 'Non-scrolling (Fixed) Background', // MISSING
txtColor : 'Text Color', // MISSING
margin : 'Page Margins', // MISSING
marginTop : 'Top', // MISSING
marginLeft : 'Left', // MISSING
marginRight : 'Right', // MISSING
marginBottom : 'Bottom', // MISSING
metaKeywords : 'Document Indexing Keywords (comma separated)', // MISSING
metaDescription : 'Document Description', // MISSING
metaAuthor : 'Author', // MISSING
metaCopyright : 'Copyright', // MISSING
previewHtml : '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>' // MISSING
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview
*/
/**#@+
@type String
@example
*/
/**
* Contains the dictionary of language entries.
* @namespace
*/
CKEDITOR.lang['id'] =
{
/**
* The language reading direction. Possible values are "rtl" for
* Right-To-Left languages (like Arabic) and "ltr" for Left-To-Right
* languages (like English).
* @default 'ltr'
*/
dir : 'ltr',
/*
* Screenreader titles. Please note that screenreaders are not always capable
* of reading non-English words. So be careful while translating it.
*/
editorTitle : 'Rich text editor, %1', // MISSING
editorHelp : 'Press ALT 0 for help', // MISSING
// ARIA descriptions.
toolbars : 'Editor toolbars', // MISSING
editor : 'Rich Text Editor', // MISSING
// Toolbar buttons without dialogs.
source : 'Source', // MISSING
newPage : 'New Page', // MISSING
save : 'Save', // MISSING
preview : 'Preview', // MISSING
cut : 'Cut', // MISSING
copy : 'Copy', // MISSING
paste : 'Paste', // MISSING
print : 'Print', // MISSING
underline : 'Underline', // MISSING
bold : 'Bold', // MISSING
italic : 'Italic', // MISSING
selectAll : 'Select All', // MISSING
removeFormat : 'Remove Format', // MISSING
strike : 'Strike Through', // MISSING
subscript : 'Subscript', // MISSING
superscript : 'Superscript', // MISSING
horizontalrule : 'Insert Horizontal Line', // MISSING
pagebreak : 'Insert Page Break for Printing', // MISSING
pagebreakAlt : 'Page Break', // MISSING
unlink : 'Unlink', // MISSING
undo : 'Undo', // MISSING
redo : 'Redo', // MISSING
// Common messages and labels.
common :
{
browseServer : 'Browse Server', // MISSING
url : 'URL', // MISSING
protocol : 'Protocol', // MISSING
upload : 'Upload', // MISSING
uploadSubmit : 'Send it to the Server', // MISSING
image : 'Image', // MISSING
flash : 'Flash', // MISSING
form : 'Form', // MISSING
checkbox : 'Checkbox', // MISSING
radio : 'Radio Button', // MISSING
textField : 'Text Field', // MISSING
textarea : 'Textarea', // MISSING
hiddenField : 'Hidden Field', // MISSING
button : 'Button', // MISSING
select : 'Selection Field', // MISSING
imageButton : 'Image Button', // MISSING
notSet : '<not set>', // MISSING
id : 'Id', // MISSING
name : 'Name', // MISSING
langDir : 'Language Direction', // MISSING
langDirLtr : 'Left to Right (LTR)', // MISSING
langDirRtl : 'Right to Left (RTL)', // MISSING
langCode : 'Language Code', // MISSING
longDescr : 'Long Description URL', // MISSING
cssClass : 'Stylesheet Classes', // MISSING
advisoryTitle : 'Advisory Title', // MISSING
cssStyle : 'Style', // MISSING
ok : 'OK', // MISSING
cancel : 'Cancel', // MISSING
close : 'Close', // MISSING
preview : 'Preview', // MISSING
generalTab : 'General', // MISSING
advancedTab : 'Advanced', // MISSING
validateNumberFailed : 'This value is not a number.', // MISSING
confirmNewPage : 'Any unsaved changes to this content will be lost. Are you sure you want to load new page?', // MISSING
confirmCancel : 'Some of the options have been changed. Are you sure to close the dialog?', // MISSING
options : 'Options', // MISSING
target : 'Target', // MISSING
targetNew : 'New Window (_blank)', // MISSING
targetTop : 'Topmost Window (_top)', // MISSING
targetSelf : 'Same Window (_self)', // MISSING
targetParent : 'Parent Window (_parent)', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Right to Left (RTL)', // MISSING
styles : 'Style', // MISSING
cssClasses : 'Stylesheet Classes', // MISSING
width : 'Width', // MISSING
height : 'Height', // MISSING
align : 'Alignment', // MISSING
alignLeft : 'Left', // MISSING
alignRight : 'Right', // MISSING
alignCenter : 'Center', // MISSING
alignTop : 'Top', // MISSING
alignMiddle : 'Middle', // MISSING
alignBottom : 'Bottom', // MISSING
invalidHeight : 'Height must be a number.', // MISSING
invalidWidth : 'Width must be a number.', // MISSING
invalidCssLength : 'Value specified for the "%1" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', // MISSING
invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', // MISSING
cssLengthTooltip : 'Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).', // MISSING
// Put the voice-only part of the label in the span.
unavailable : '%1<span class="cke_accessibility">, unavailable</span>' // MISSING
},
contextmenu :
{
options : 'Context Menu Options' // MISSING
},
// Special char dialog.
specialChar :
{
toolbar : 'Insert Special Character', // MISSING
title : 'Select Special Character', // MISSING
options : 'Special Character Options' // MISSING
},
// Link dialog.
link :
{
toolbar : 'Link', // MISSING
other : '<other>', // MISSING
menu : 'Edit Link', // MISSING
title : 'Link', // MISSING
info : 'Link Info', // MISSING
target : 'Target', // MISSING
upload : 'Upload', // MISSING
advanced : 'Advanced', // MISSING
type : 'Link Type', // MISSING
toUrl : 'URL', // MISSING
toAnchor : 'Link to anchor in the text', // MISSING
toEmail : 'E-mail', // MISSING
targetFrame : '<frame>', // MISSING
targetPopup : '<popup window>', // MISSING
targetFrameName : 'Target Frame Name', // MISSING
targetPopupName : 'Popup Window Name', // MISSING
popupFeatures : 'Popup Window Features', // MISSING
popupResizable : 'Resizable', // MISSING
popupStatusBar : 'Status Bar', // MISSING
popupLocationBar: 'Location Bar', // MISSING
popupToolbar : 'Toolbar', // MISSING
popupMenuBar : 'Menu Bar', // MISSING
popupFullScreen : 'Full Screen (IE)', // MISSING
popupScrollBars : 'Scroll Bars', // MISSING
popupDependent : 'Dependent (Netscape)', // MISSING
popupLeft : 'Left Position', // MISSING
popupTop : 'Top Position', // MISSING
id : 'Id', // MISSING
langDir : 'Language Direction', // MISSING
langDirLTR : 'Left to Right (LTR)', // MISSING
langDirRTL : 'Right to Left (RTL)', // MISSING
acccessKey : 'Access Key', // MISSING
name : 'Name', // MISSING
langCode : 'Language Code', // MISSING
tabIndex : 'Tab Index', // MISSING
advisoryTitle : 'Advisory Title', // MISSING
advisoryContentType : 'Advisory Content Type', // MISSING
cssClasses : 'Stylesheet Classes', // MISSING
charset : 'Linked Resource Charset', // MISSING
styles : 'Style', // MISSING
rel : 'Relationship', // MISSING
selectAnchor : 'Select an Anchor', // MISSING
anchorName : 'By Anchor Name', // MISSING
anchorId : 'By Element Id', // MISSING
emailAddress : 'E-Mail Address', // MISSING
emailSubject : 'Message Subject', // MISSING
emailBody : 'Message Body', // MISSING
noAnchors : '(No anchors available in the document)', // MISSING
noUrl : 'Please type the link URL', // MISSING
noEmail : 'Please type the e-mail address' // MISSING
},
// Anchor dialog
anchor :
{
toolbar : 'Anchor', // MISSING
menu : 'Edit Anchor', // MISSING
title : 'Anchor Properties', // MISSING
name : 'Anchor Name', // MISSING
errorName : 'Please type the anchor name', // MISSING
remove : 'Remove Anchor' // MISSING
},
// List style dialog
list:
{
numberedTitle : 'Numbered List Properties', // MISSING
bulletedTitle : 'Bulleted List Properties', // MISSING
type : 'Type', // MISSING
start : 'Start', // MISSING
validateStartNumber :'List start number must be a whole number.', // MISSING
circle : 'Circle', // MISSING
disc : 'Disc', // MISSING
square : 'Square', // MISSING
none : 'None', // MISSING
notset : '<not set>', // MISSING
armenian : 'Armenian numbering', // MISSING
georgian : 'Georgian numbering (an, ban, gan, etc.)', // MISSING
lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', // MISSING
upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', // MISSING
lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', // MISSING
upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', // MISSING
lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', // MISSING
decimal : 'Decimal (1, 2, 3, etc.)', // MISSING
decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' // MISSING
},
// Find And Replace Dialog
findAndReplace :
{
title : 'Find and Replace', // MISSING
find : 'Find', // MISSING
replace : 'Replace', // MISSING
findWhat : 'Find what:', // MISSING
replaceWith : 'Replace with:', // MISSING
notFoundMsg : 'The specified text was not found.', // MISSING
findOptions : 'Find Options', // MISSING
matchCase : 'Match case', // MISSING
matchWord : 'Match whole word', // MISSING
matchCyclic : 'Match cyclic', // MISSING
replaceAll : 'Replace All', // MISSING
replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING
},
// Table Dialog
table :
{
toolbar : 'Table', // MISSING
title : 'Table Properties', // MISSING
menu : 'Table Properties', // MISSING
deleteTable : 'Delete Table', // MISSING
rows : 'Rows', // MISSING
columns : 'Columns', // MISSING
border : 'Border size', // MISSING
widthPx : 'pixels', // MISSING
widthPc : 'percent', // MISSING
widthUnit : 'width unit', // MISSING
cellSpace : 'Cell spacing', // MISSING
cellPad : 'Cell padding', // MISSING
caption : 'Caption', // MISSING
summary : 'Summary', // MISSING
headers : 'Headers', // MISSING
headersNone : 'None', // MISSING
headersColumn : 'First column', // MISSING
headersRow : 'First Row', // MISSING
headersBoth : 'Both', // MISSING
invalidRows : 'Number of rows must be a number greater than 0.', // MISSING
invalidCols : 'Number of columns must be a number greater than 0.', // MISSING
invalidBorder : 'Border size must be a number.', // MISSING
invalidWidth : 'Table width must be a number.', // MISSING
invalidHeight : 'Table height must be a number.', // MISSING
invalidCellSpacing : 'Cell spacing must be a positive number.', // MISSING
invalidCellPadding : 'Cell padding must be a positive number.', // MISSING
cell :
{
menu : 'Cell', // MISSING
insertBefore : 'Insert Cell Before', // MISSING
insertAfter : 'Insert Cell After', // MISSING
deleteCell : 'Delete Cells', // MISSING
merge : 'Merge Cells', // MISSING
mergeRight : 'Merge Right', // MISSING
mergeDown : 'Merge Down', // MISSING
splitHorizontal : 'Split Cell Horizontally', // MISSING
splitVertical : 'Split Cell Vertically', // MISSING
title : 'Cell Properties', // MISSING
cellType : 'Cell Type', // MISSING
rowSpan : 'Rows Span', // MISSING
colSpan : 'Columns Span', // MISSING
wordWrap : 'Word Wrap', // MISSING
hAlign : 'Horizontal Alignment', // MISSING
vAlign : 'Vertical Alignment', // MISSING
alignBaseline : 'Baseline', // MISSING
bgColor : 'Background Color', // MISSING
borderColor : 'Border Color', // MISSING
data : 'Data', // MISSING
header : 'Header', // MISSING
yes : 'Yes', // MISSING
no : 'No', // MISSING
invalidWidth : 'Cell width must be a number.', // MISSING
invalidHeight : 'Cell height must be a number.', // MISSING
invalidRowSpan : 'Rows span must be a whole number.', // MISSING
invalidColSpan : 'Columns span must be a whole number.', // MISSING
chooseColor : 'Choose' // MISSING
},
row :
{
menu : 'Row', // MISSING
insertBefore : 'Insert Row Before', // MISSING
insertAfter : 'Insert Row After', // MISSING
deleteRow : 'Delete Rows' // MISSING
},
column :
{
menu : 'Column', // MISSING
insertBefore : 'Insert Column Before', // MISSING
insertAfter : 'Insert Column After', // MISSING
deleteColumn : 'Delete Columns' // MISSING
}
},
// Button Dialog.
button :
{
title : 'Button Properties', // MISSING
text : 'Text (Value)', // MISSING
type : 'Type', // MISSING
typeBtn : 'Button', // MISSING
typeSbm : 'Submit', // MISSING
typeRst : 'Reset' // MISSING
},
// Checkbox and Radio Button Dialogs.
checkboxAndRadio :
{
checkboxTitle : 'Checkbox Properties', // MISSING
radioTitle : 'Radio Button Properties', // MISSING
value : 'Value', // MISSING
selected : 'Selected' // MISSING
},
// Form Dialog.
form :
{
title : 'Form Properties', // MISSING
menu : 'Form Properties', // MISSING
action : 'Action', // MISSING
method : 'Method', // MISSING
encoding : 'Encoding' // MISSING
},
// Select Field Dialog.
select :
{
title : 'Selection Field Properties', // MISSING
selectInfo : 'Select Info', // MISSING
opAvail : 'Available Options', // MISSING
value : 'Value', // MISSING
size : 'Size', // MISSING
lines : 'lines', // MISSING
chkMulti : 'Allow multiple selections', // MISSING
opText : 'Text', // MISSING
opValue : 'Value', // MISSING
btnAdd : 'Add', // MISSING
btnModify : 'Modify', // MISSING
btnUp : 'Up', // MISSING
btnDown : 'Down', // MISSING
btnSetValue : 'Set as selected value', // MISSING
btnDelete : 'Delete' // MISSING
},
// Textarea Dialog.
textarea :
{
title : 'Textarea Properties', // MISSING
cols : 'Columns', // MISSING
rows : 'Rows' // MISSING
},
// Text Field Dialog.
textfield :
{
title : 'Text Field Properties', // MISSING
name : 'Name', // MISSING
value : 'Value', // MISSING
charWidth : 'Character Width', // MISSING
maxChars : 'Maximum Characters', // MISSING
type : 'Type', // MISSING
typeText : 'Text', // MISSING
typePass : 'Password' // MISSING
},
// Hidden Field Dialog.
hidden :
{
title : 'Hidden Field Properties', // MISSING
name : 'Name', // MISSING
value : 'Value' // MISSING
},
// Image Dialog.
image :
{
title : 'Image Properties', // MISSING
titleButton : 'Image Button Properties', // MISSING
menu : 'Image Properties', // MISSING
infoTab : 'Image Info', // MISSING
btnUpload : 'Send it to the Server', // MISSING
upload : 'Upload', // MISSING
alt : 'Alternative Text', // MISSING
lockRatio : 'Lock Ratio', // MISSING
resetSize : 'Reset Size', // MISSING
border : 'Border', // MISSING
hSpace : 'HSpace', // MISSING
vSpace : 'VSpace', // MISSING
alertUrl : 'Please type the image URL', // MISSING
linkTab : 'Link', // MISSING
button2Img : 'Do you want to transform the selected image button on a simple image?', // MISSING
img2Button : 'Do you want to transform the selected image on a image button?', // MISSING
urlMissing : 'Image source URL is missing.', // MISSING
validateBorder : 'Border must be a whole number.', // MISSING
validateHSpace : 'HSpace must be a whole number.', // MISSING
validateVSpace : 'VSpace must be a whole number.' // MISSING
},
// Flash Dialog
flash :
{
properties : 'Flash Properties', // MISSING
propertiesTab : 'Properties', // MISSING
title : 'Flash Properties', // MISSING
chkPlay : 'Auto Play', // MISSING
chkLoop : 'Loop', // MISSING
chkMenu : 'Enable Flash Menu', // MISSING
chkFull : 'Allow Fullscreen', // MISSING
scale : 'Scale', // MISSING
scaleAll : 'Show all', // MISSING
scaleNoBorder : 'No Border', // MISSING
scaleFit : 'Exact Fit', // MISSING
access : 'Script Access', // MISSING
accessAlways : 'Always', // MISSING
accessSameDomain: 'Same domain', // MISSING
accessNever : 'Never', // MISSING
alignAbsBottom : 'Abs Bottom', // MISSING
alignAbsMiddle : 'Abs Middle', // MISSING
alignBaseline : 'Baseline', // MISSING
alignTextTop : 'Text Top', // MISSING
quality : 'Quality', // MISSING
qualityBest : 'Best', // MISSING
qualityHigh : 'High', // MISSING
qualityAutoHigh : 'Auto High', // MISSING
qualityMedium : 'Medium', // MISSING
qualityAutoLow : 'Auto Low', // MISSING
qualityLow : 'Low', // MISSING
windowModeWindow: 'Window', // MISSING
windowModeOpaque: 'Opaque', // MISSING
windowModeTransparent : 'Transparent', // MISSING
windowMode : 'Window mode', // MISSING
flashvars : 'Variables for Flash', // MISSING
bgcolor : 'Background color', // MISSING
hSpace : 'HSpace', // MISSING
vSpace : 'VSpace', // MISSING
validateSrc : 'URL must not be empty.', // MISSING
validateHSpace : 'HSpace must be a number.', // MISSING
validateVSpace : 'VSpace must be a number.' // MISSING
},
// Speller Pages Dialog
spellCheck :
{
toolbar : 'Check Spelling', // MISSING
title : 'Spell Check', // MISSING
notAvailable : 'Sorry, but service is unavailable now.', // MISSING
errorLoading : 'Error loading application service host: %s.', // MISSING
notInDic : 'Not in dictionary', // MISSING
changeTo : 'Change to', // MISSING
btnIgnore : 'Ignore', // MISSING
btnIgnoreAll : 'Ignore All', // MISSING
btnReplace : 'Replace', // MISSING
btnReplaceAll : 'Replace All', // MISSING
btnUndo : 'Undo', // MISSING
noSuggestions : '- No suggestions -', // MISSING
progress : 'Spell check in progress...', // MISSING
noMispell : 'Spell check complete: No misspellings found', // MISSING
noChanges : 'Spell check complete: No words changed', // MISSING
oneChange : 'Spell check complete: One word changed', // MISSING
manyChanges : 'Spell check complete: %1 words changed', // MISSING
ieSpellDownload : 'Spell checker not installed. Do you want to download it now?' // MISSING
},
smiley :
{
toolbar : 'Smiley', // MISSING
title : 'Insert a Smiley', // MISSING
options : 'Smiley Options' // MISSING
},
elementsPath :
{
eleLabel : 'Elements path', // MISSING
eleTitle : '%1 element' // MISSING
},
numberedlist : 'Insert/Remove Numbered List', // MISSING
bulletedlist : 'Insert/Remove Bulleted List', // MISSING
indent : 'Increase Indent', // MISSING
outdent : 'Decrease Indent', // MISSING
justify :
{
left : 'Align Left', // MISSING
center : 'Center', // MISSING
right : 'Align Right', // MISSING
block : 'Justify' // MISSING
},
blockquote : 'Block Quote', // MISSING
clipboard :
{
title : 'Paste', // MISSING
cutError : 'Your browser security settings don\'t permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).', // MISSING
copyError : 'Your browser security settings don\'t permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).', // MISSING
pasteMsg : 'Please paste inside the following box using the keyboard (<strong>Ctrl/Cmd+V</strong>) and hit OK', // MISSING
securityMsg : 'Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.', // MISSING
pasteArea : 'Paste Area' // MISSING
},
pastefromword :
{
confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', // MISSING
toolbar : 'Paste from Word', // MISSING
title : 'Paste from Word', // MISSING
error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING
},
pasteText :
{
button : 'Paste as plain text', // MISSING
title : 'Paste as Plain Text' // MISSING
},
templates :
{
button : 'Templates', // MISSING
title : 'Content Templates', // MISSING
options : 'Template Options', // MISSING
insertOption : 'Replace actual contents', // MISSING
selectPromptMsg : 'Please select the template to open in the editor', // MISSING
emptyListMsg : '(No templates defined)' // MISSING
},
showBlocks : 'Show Blocks', // MISSING
stylesCombo :
{
label : 'Styles', // MISSING
panelTitle : 'Formatting Styles', // MISSING
panelTitle1 : 'Block Styles', // MISSING
panelTitle2 : 'Inline Styles', // MISSING
panelTitle3 : 'Object Styles' // MISSING
},
format :
{
label : 'Format', // MISSING
panelTitle : 'Paragraph Format', // MISSING
tag_p : 'Normal', // MISSING
tag_pre : 'Formatted', // MISSING
tag_address : 'Address', // MISSING
tag_h1 : 'Heading 1', // MISSING
tag_h2 : 'Heading 2', // MISSING
tag_h3 : 'Heading 3', // MISSING
tag_h4 : 'Heading 4', // MISSING
tag_h5 : 'Heading 5', // MISSING
tag_h6 : 'Heading 6', // MISSING
tag_div : 'Normal (DIV)' // MISSING
},
div :
{
title : 'Create Div Container', // MISSING
toolbar : 'Create Div Container', // MISSING
cssClassInputLabel : 'Stylesheet Classes', // MISSING
styleSelectLabel : 'Style', // MISSING
IdInputLabel : 'Id', // MISSING
languageCodeInputLabel : ' Language Code', // MISSING
inlineStyleInputLabel : 'Inline Style', // MISSING
advisoryTitleInputLabel : 'Advisory Title', // MISSING
langDirLabel : 'Language Direction', // MISSING
langDirLTRLabel : 'Left to Right (LTR)', // MISSING
langDirRTLLabel : 'Right to Left (RTL)', // MISSING
edit : 'Edit Div', // MISSING
remove : 'Remove Div' // MISSING
},
iframe :
{
title : 'IFrame Properties', // MISSING
toolbar : 'IFrame', // MISSING
noUrl : 'Please type the iframe URL', // MISSING
scrolling : 'Enable scrollbars', // MISSING
border : 'Show frame border' // MISSING
},
font :
{
label : 'Font', // MISSING
voiceLabel : 'Font', // MISSING
panelTitle : 'Font Name' // MISSING
},
fontSize :
{
label : 'Size', // MISSING
voiceLabel : 'Font Size', // MISSING
panelTitle : 'Font Size' // MISSING
},
colorButton :
{
textColorTitle : 'Text Color', // MISSING
bgColorTitle : 'Background Color', // MISSING
panelTitle : 'Colors', // MISSING
auto : 'Automatic', // MISSING
more : 'More Colors...' // MISSING
},
colors :
{
'000' : 'Black', // MISSING
'800000' : 'Maroon', // MISSING
'8B4513' : 'Saddle Brown', // MISSING
'2F4F4F' : 'Dark Slate Gray', // MISSING
'008080' : 'Teal', // MISSING
'000080' : 'Navy', // MISSING
'4B0082' : 'Indigo', // MISSING
'696969' : 'Dark Gray', // MISSING
'B22222' : 'Fire Brick', // MISSING
'A52A2A' : 'Brown', // MISSING
'DAA520' : 'Golden Rod', // MISSING
'006400' : 'Dark Green', // MISSING
'40E0D0' : 'Turquoise', // MISSING
'0000CD' : 'Medium Blue', // MISSING
'800080' : 'Purple', // MISSING
'808080' : 'Gray', // MISSING
'F00' : 'Red', // MISSING
'FF8C00' : 'Dark Orange', // MISSING
'FFD700' : 'Gold', // MISSING
'008000' : 'Green', // MISSING
'0FF' : 'Cyan', // MISSING
'00F' : 'Blue', // MISSING
'EE82EE' : 'Violet', // MISSING
'A9A9A9' : 'Dim Gray', // MISSING
'FFA07A' : 'Light Salmon', // MISSING
'FFA500' : 'Orange', // MISSING
'FFFF00' : 'Yellow', // MISSING
'00FF00' : 'Lime', // MISSING
'AFEEEE' : 'Pale Turquoise', // MISSING
'ADD8E6' : 'Light Blue', // MISSING
'DDA0DD' : 'Plum', // MISSING
'D3D3D3' : 'Light Grey', // MISSING
'FFF0F5' : 'Lavender Blush', // MISSING
'FAEBD7' : 'Antique White', // MISSING
'FFFFE0' : 'Light Yellow', // MISSING
'F0FFF0' : 'Honeydew', // MISSING
'F0FFFF' : 'Azure', // MISSING
'F0F8FF' : 'Alice Blue', // MISSING
'E6E6FA' : 'Lavender', // MISSING
'FFF' : 'White' // MISSING
},
scayt :
{
title : 'Spell Check As You Type', // MISSING
opera_title : 'Not supported by Opera', // MISSING
enable : 'Enable SCAYT', // MISSING
disable : 'Disable SCAYT', // MISSING
about : 'About SCAYT', // MISSING
toggle : 'Toggle SCAYT', // MISSING
options : 'Options', // MISSING
langs : 'Languages', // MISSING
moreSuggestions : 'More suggestions', // MISSING
ignore : 'Ignore', // MISSING
ignoreAll : 'Ignore All', // MISSING
addWord : 'Add Word', // MISSING
emptyDic : 'Dictionary name should not be empty.', // MISSING
optionsTab : 'Options', // MISSING
allCaps : 'Ignore All-Caps Words', // MISSING
ignoreDomainNames : 'Ignore Domain Names', // MISSING
mixedCase : 'Ignore Words with Mixed Case', // MISSING
mixedWithDigits : 'Ignore Words with Numbers', // MISSING
languagesTab : 'Languages', // MISSING
dictionariesTab : 'Dictionaries', // MISSING
dic_field_name : 'Dictionary name', // MISSING
dic_create : 'Create', // MISSING
dic_restore : 'Restore', // MISSING
dic_delete : 'Delete', // MISSING
dic_rename : 'Rename', // MISSING
dic_info : 'Initially the User Dictionary is stored in a Cookie. However, Cookies are limited in size. When the User Dictionary grows to a point where it cannot be stored in a Cookie, then the dictionary may be stored on our server. To store your personal dictionary on our server you should specify a name for your dictionary. If you already have a stored dictionary, please type its name and click the Restore button.', // MISSING
aboutTab : 'About' // MISSING
},
about :
{
title : 'About CKEditor', // MISSING
dlgTitle : 'About CKEditor', // MISSING
help : 'Check $1 for help.', // MISSING
userGuide : 'CKEditor User\'s Guide', // MISSING
moreInfo : 'For licensing information please visit our web site:', // MISSING
copy : 'Copyright © $1. All rights reserved.' // MISSING
},
maximize : 'Maximize', // MISSING
minimize : 'Minimize', // MISSING
fakeobjects :
{
anchor : 'Anchor', // MISSING
flash : 'Flash Animation', // MISSING
iframe : 'IFrame', // MISSING
hiddenfield : 'Hidden Field', // MISSING
unknown : 'Unknown Object' // MISSING
},
resize : 'Drag to resize', // MISSING
colordialog :
{
title : 'Select color', // MISSING
options : 'Color Options', // MISSING
highlight : 'Highlight', // MISSING
selected : 'Selected Color', // MISSING
clear : 'Clear' // MISSING
},
toolbarCollapse : 'Collapse Toolbar', // MISSING
toolbarExpand : 'Expand Toolbar', // MISSING
toolbarGroups :
{
document : 'Document', // MISSING
clipboard : 'Clipboard/Undo', // MISSING
editing : 'Editing', // MISSING
forms : 'Forms', // MISSING
basicstyles : 'Basic Styles', // MISSING
paragraph : 'Paragraph', // MISSING
links : 'Links', // MISSING
insert : 'Insert', // MISSING
styles : 'Styles', // MISSING
colors : 'Colors', // MISSING
tools : 'Tools' // MISSING
},
bidi :
{
ltr : 'Text direction from left to right', // MISSING
rtl : 'Text direction from right to left' // MISSING
},
docprops :
{
label : 'Document Properties', // MISSING
title : 'Document Properties', // MISSING
design : 'Design', // MISSING
meta : 'Meta Tags', // MISSING
chooseColor : 'Choose', // MISSING
other : 'Other...', // MISSING
docTitle : 'Page Title', // MISSING
charset : 'Character Set Encoding', // MISSING
charsetOther : 'Other Character Set Encoding', // MISSING
charsetASCII : 'ASCII', // MISSING
charsetCE : 'Central European', // MISSING
charsetCT : 'Chinese Traditional (Big5)', // MISSING
charsetCR : 'Cyrillic', // MISSING
charsetGR : 'Greek', // MISSING
charsetJP : 'Japanese', // MISSING
charsetKR : 'Korean', // MISSING
charsetTR : 'Turkish', // MISSING
charsetUN : 'Unicode (UTF-8)', // MISSING
charsetWE : 'Western European', // MISSING
docType : 'Document Type Heading', // MISSING
docTypeOther : 'Other Document Type Heading', // MISSING
xhtmlDec : 'Include XHTML Declarations', // MISSING
bgColor : 'Background Color', // MISSING
bgImage : 'Background Image URL', // MISSING
bgFixed : 'Non-scrolling (Fixed) Background', // MISSING
txtColor : 'Text Color', // MISSING
margin : 'Page Margins', // MISSING
marginTop : 'Top', // MISSING
marginLeft : 'Left', // MISSING
marginRight : 'Right', // MISSING
marginBottom : 'Bottom', // MISSING
metaKeywords : 'Document Indexing Keywords (comma separated)', // MISSING
metaDescription : 'Document Description', // MISSING
metaAuthor : 'Author', // MISSING
metaCopyright : 'Copyright', // MISSING
previewHtml : '<p>This is some <strong>sample text</strong>. You are using <a href="javascript:void(0)">CKEditor</a>.</p>' // MISSING
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'menu',
{
beforeInit : function( editor )
{
var groups = editor.config.menu_groups.split( ',' ),
groupsOrder = editor._.menuGroups = {},
menuItems = editor._.menuItems = {};
for ( var i = 0 ; i < groups.length ; i++ )
groupsOrder[ groups[ i ] ] = i + 1;
/**
* Registers an item group to the editor context menu in order to make it
* possible to associate it with menu items later.
* @name CKEDITOR.editor.prototype.addMenuGroup
* @param {String} name Specify a group name.
* @param {Number} [order=100] Define the display sequence of this group
* inside the menu. A smaller value gets displayed first.
*/
editor.addMenuGroup = function( name, order )
{
groupsOrder[ name ] = order || 100;
};
/**
* Adds an item from the specified definition to the editor context menu.
* @name CKEDITOR.editor.prototype.addMenuItem
* @param {String} name The menu item name.
* @param {CKEDITOR.menu.definition} definition The menu item definition.
*/
editor.addMenuItem = function( name, definition )
{
if ( groupsOrder[ definition.group ] )
menuItems[ name ] = new CKEDITOR.menuItem( this, name, definition );
};
/**
* Adds one or more items from the specified definition array to the editor context menu.
* @name CKEDITOR.editor.prototype.addMenuItems
* @param {Array} definitions List of definitions for each menu item as if {@link CKEDITOR.editor.addMenuItem} is called.
*/
editor.addMenuItems = function( definitions )
{
for ( var itemName in definitions )
{
this.addMenuItem( itemName, definitions[ itemName ] );
}
};
/**
* Retrieves a particular menu item definition from the editor context menu.
* @name CKEDITOR.editor.prototype.getMenuItem
* @param {String} name The name of the desired menu item.
* @return {CKEDITOR.menu.definition}
*/
editor.getMenuItem = function( name )
{
return menuItems[ name ];
};
/**
* Removes a particular menu item added before from the editor context menu.
* @name CKEDITOR.editor.prototype.removeMenuItem
* @param {String} name The name of the desired menu item.
* @since 3.6.1
*/
editor.removeMenuItem = function( name )
{
delete menuItems[ name ];
};
},
requires : [ 'floatpanel' ]
});
(function()
{
CKEDITOR.menu = CKEDITOR.tools.createClass(
{
$ : function( editor, definition )
{
definition = this._.definition = definition || {};
this.id = CKEDITOR.tools.getNextId();
this.editor = editor;
this.items = [];
this._.listeners = [];
this._.level = definition.level || 1;
var panelDefinition = CKEDITOR.tools.extend( {}, definition.panel,
{
css : editor.skin.editor.css,
level : this._.level - 1,
block : {}
} );
var attrs = panelDefinition.block.attributes = ( panelDefinition.attributes || {} );
// Provide default role of 'menu'.
!attrs.role && ( attrs.role = 'menu' );
this._.panelDefinition = panelDefinition;
},
_ :
{
onShow : function()
{
var selection = this.editor.getSelection();
// Selection will be unavailable after menu shows up
// in IE, lock it now.
if ( CKEDITOR.env.ie )
selection && selection.lock();
var element = selection && selection.getStartElement(),
listeners = this._.listeners,
includedItems = [];
this.removeAll();
// Call all listeners, filling the list of items to be displayed.
for ( var i = 0 ; i < listeners.length ; i++ )
{
var listenerItems = listeners[ i ]( element, selection );
if ( listenerItems )
{
for ( var itemName in listenerItems )
{
var item = this.editor.getMenuItem( itemName );
if ( item && ( !item.command || this.editor.getCommand( item.command ).state ) )
{
item.state = listenerItems[ itemName ];
this.add( item );
}
}
}
}
},
onClick : function( item )
{
this.hide( false );
if ( item.onClick )
item.onClick();
else if ( item.command )
this.editor.execCommand( item.command );
},
onEscape : function( keystroke )
{
var parent = this.parent;
// 1. If it's sub-menu, restore the last focused item
// of upper level menu.
// 2. In case of a top-menu, close it.
if ( parent )
{
parent._.panel.hideChild();
// Restore parent block item focus.
var parentBlock = parent._.panel._.panel._.currentBlock,
parentFocusIndex = parentBlock._.focusIndex;
parentBlock._.markItem( parentFocusIndex );
}
else if ( keystroke == 27 )
this.hide();
return false;
},
onHide : function()
{
// Unlock the selection upon first panel closing.
if ( CKEDITOR.env.ie && !this.parent )
{
var selection = this.editor.getSelection();
selection && selection.unlock( true );
}
this.onHide && this.onHide();
},
showSubMenu : function( index )
{
var menu = this._.subMenu,
item = this.items[ index ],
subItemDefs = item.getItems && item.getItems();
// If this item has no subitems, we just hide the submenu, if
// available, and return back.
if ( !subItemDefs )
{
this._.panel.hideChild();
return;
}
// Record parent menu focused item first (#3389).
var block = this._.panel.getBlock( this.id );
block._.focusIndex = index;
// Create the submenu, if not available, or clean the existing
// one.
if ( menu )
menu.removeAll();
else
{
menu = this._.subMenu = new CKEDITOR.menu( this.editor,
CKEDITOR.tools.extend( {}, this._.definition, { level : this._.level + 1 }, true ) );
menu.parent = this;
menu._.onClick = CKEDITOR.tools.bind( this._.onClick, this );
}
// Add all submenu items to the menu.
for ( var subItemName in subItemDefs )
{
var subItem = this.editor.getMenuItem( subItemName );
if ( subItem )
{
subItem.state = subItemDefs[ subItemName ];
menu.add( subItem );
}
}
// Get the element representing the current item.
var element = this._.panel.getBlock( this.id ).element.getDocument().getById( this.id + String( index ) );
// Show the submenu.
menu.show( element, 2 );
}
},
proto :
{
add : function( item )
{
// Later we may sort the items, but Array#sort is not stable in
// some browsers, here we're forcing the original sequence with
// 'order' attribute if it hasn't been assigned. (#3868)
if ( !item.order )
item.order = this.items.length;
this.items.push( item );
},
removeAll : function()
{
this.items = [];
},
show : function( offsetParent, corner, offsetX, offsetY )
{
// Not for sub menu.
if ( !this.parent )
{
this._.onShow();
// Don't menu with zero items.
if ( ! this.items.length )
return;
}
corner = corner || ( this.editor.lang.dir == 'rtl' ? 2 : 1 );
var items = this.items,
editor = this.editor,
panel = this._.panel,
element = this._.element;
// Create the floating panel for this menu.
if ( !panel )
{
panel = this._.panel = new CKEDITOR.ui.floatPanel( this.editor,
CKEDITOR.document.getBody(),
this._.panelDefinition,
this._.level );
panel.onEscape = CKEDITOR.tools.bind( function( keystroke )
{
if ( this._.onEscape( keystroke ) === false )
return false;
},
this );
panel.onHide = CKEDITOR.tools.bind( function()
{
this._.onHide && this._.onHide();
},
this );
// Create an autosize block inside the panel.
var block = panel.addBlock( this.id, this._.panelDefinition.block );
block.autoSize = true;
var keys = block.keys;
keys[ 40 ] = 'next'; // ARROW-DOWN
keys[ 9 ] = 'next'; // TAB
keys[ 38 ] = 'prev'; // ARROW-UP
keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB
keys[ ( editor.lang.dir == 'rtl' ? 37 : 39 ) ]= CKEDITOR.env.ie ? 'mouseup' : 'click'; // ARROW-RIGHT/ARROW-LEFT(rtl)
keys[ 32 ] = CKEDITOR.env.ie ? 'mouseup' : 'click'; // SPACE
CKEDITOR.env.ie && ( keys[ 13 ] = 'mouseup' ); // Manage ENTER, since onclick is blocked in IE (#8041).
element = this._.element = block.element;
element.addClass( editor.skinClass );
var elementDoc = element.getDocument();
elementDoc.getBody().setStyle( 'overflow', 'hidden' );
elementDoc.getElementsByTag( 'html' ).getItem( 0 ).setStyle( 'overflow', 'hidden' );
this._.itemOverFn = CKEDITOR.tools.addFunction( function( index )
{
clearTimeout( this._.showSubTimeout );
this._.showSubTimeout = CKEDITOR.tools.setTimeout( this._.showSubMenu, editor.config.menu_subMenuDelay || 400, this, [ index ] );
},
this );
this._.itemOutFn = CKEDITOR.tools.addFunction( function( index )
{
clearTimeout( this._.showSubTimeout );
},
this );
this._.itemClickFn = CKEDITOR.tools.addFunction( function( index )
{
var item = this.items[ index ];
if ( item.state == CKEDITOR.TRISTATE_DISABLED )
{
this.hide();
return;
}
if ( item.getItems )
this._.showSubMenu( index );
else
this._.onClick( item );
},
this );
}
// Put the items in the right order.
sortItems( items );
var chromeRoot = editor.container.getChild( 1 ),
mixedContentClass = chromeRoot.hasClass( 'cke_mixed_dir_content' ) ? ' cke_mixed_dir_content' : '';
// Build the HTML that composes the menu and its items.
var output = [ '<div class="cke_menu' + mixedContentClass + '" role="presentation">' ];
var length = items.length,
lastGroup = length && items[ 0 ].group;
for ( var i = 0 ; i < length ; i++ )
{
var item = items[ i ];
if ( lastGroup != item.group )
{
output.push( '<div class="cke_menuseparator" role="separator"></div>' );
lastGroup = item.group;
}
item.render( this, i, output );
}
output.push( '</div>' );
// Inject the HTML inside the panel.
element.setHtml( output.join( '' ) );
CKEDITOR.ui.fire( 'ready', this );
// Show the panel.
if ( this.parent )
this.parent._.panel.showAsChild( panel, this.id, offsetParent, corner, offsetX, offsetY );
else
panel.showBlock( this.id, offsetParent, corner, offsetX, offsetY );
editor.fire( 'menuShow', [ panel ] );
},
addListener : function( listenerFn )
{
this._.listeners.push( listenerFn );
},
hide : function( returnFocus )
{
this._.onHide && this._.onHide();
this._.panel && this._.panel.hide( returnFocus );
}
}
});
function sortItems( items )
{
items.sort( function( itemA, itemB )
{
if ( itemA.group < itemB.group )
return -1;
else if ( itemA.group > itemB.group )
return 1;
return itemA.order < itemB.order ? -1 :
itemA.order > itemB.order ? 1 :
0;
});
}
CKEDITOR.menuItem = CKEDITOR.tools.createClass(
{
$ : function( editor, name, definition )
{
CKEDITOR.tools.extend( this, definition,
// Defaults
{
order : 0,
className : 'cke_button_' + name
});
// Transform the group name into its order number.
this.group = editor._.menuGroups[ this.group ];
this.editor = editor;
this.name = name;
},
proto :
{
render : function( menu, index, output )
{
var id = menu.id + String( index ),
state = ( typeof this.state == 'undefined' ) ? CKEDITOR.TRISTATE_OFF : this.state;
var classes = ' cke_' + (
state == CKEDITOR.TRISTATE_ON ? 'on' :
state == CKEDITOR.TRISTATE_DISABLED ? 'disabled' :
'off' );
var htmlLabel = this.label;
if ( this.className )
classes += ' ' + this.className;
var hasSubMenu = this.getItems;
output.push(
'<span class="cke_menuitem' + ( this.icon && this.icon.indexOf( '.png' ) == -1 ? ' cke_noalphafix' : '' ) + '">' +
'<a id="', id, '"' +
' class="', classes, '" href="javascript:void(\'', ( this.label || '' ).replace( "'", '' ), '\')"' +
' title="', this.label, '"' +
' tabindex="-1"' +
'_cke_focus=1' +
' hidefocus="true"' +
' role="menuitem"' +
( hasSubMenu ? 'aria-haspopup="true"' : '' ) +
( state == CKEDITOR.TRISTATE_DISABLED ? 'aria-disabled="true"' : '' ) +
( state == CKEDITOR.TRISTATE_ON ? 'aria-pressed="true"' : '' ) );
// Some browsers don't cancel key events in the keydown but in the
// keypress.
// TODO: Check if really needed for Gecko+Mac.
if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) )
{
output.push(
' onkeypress="return false;"' );
}
// With Firefox, we need to force the button to redraw, otherwise it
// will remain in the focus state.
if ( CKEDITOR.env.gecko )
{
output.push(
' onblur="this.style.cssText = this.style.cssText;"' );
}
var offset = ( this.iconOffset || 0 ) * -16;
output.push(
// ' onkeydown="return CKEDITOR.ui.button._.keydown(', index, ', event);"' +
' onmouseover="CKEDITOR.tools.callFunction(', menu._.itemOverFn, ',', index, ');"' +
' onmouseout="CKEDITOR.tools.callFunction(', menu._.itemOutFn, ',', index, ');" ' +
( CKEDITOR.env.ie ? 'onclick="return false;" onmouseup' : 'onclick' ) + // #188
'="CKEDITOR.tools.callFunction(', menu._.itemClickFn, ',', index, '); return false;"' +
'>' +
'<span class="cke_icon_wrapper"><span class="cke_icon"' +
( this.icon ? ' style="background-image:url(' + CKEDITOR.getUrl( this.icon ) + ');background-position:0 ' + offset + 'px;"'
: '' ) +
'></span></span>' +
'<span class="cke_label">' );
if ( hasSubMenu )
{
output.push(
'<span class="cke_menuarrow">',
'<span>&#',
( this.editor.lang.dir == 'rtl' ?
'9668' : // BLACK LEFT-POINTING POINTER
'9658' ), // BLACK RIGHT-POINTING POINTER
';</span>',
'</span>' );
}
output.push(
htmlLabel,
'</span>' +
'</a>' +
'</span>' );
}
}
});
})();
/**
* The amount of time, in milliseconds, the editor waits before displaying submenu
* options when moving the mouse over options that contain submenus, like the
* "Cell Properties" entry for tables.
* @type Number
* @default 400
* @example
* // Remove the submenu delay.
* config.menu_subMenuDelay = 0;
*/
/**
* A comma separated list of items group names to be displayed in the context
* menu. The order of items will reflect the order specified in this list if
* no priority was defined in the groups.
* @type String
* @default 'clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea'
* @example
* config.menu_groups = 'clipboard,table,anchor,link,image';
*/
CKEDITOR.config.menu_groups =
'clipboard,' +
'form,' +
'tablecell,tablecellproperties,tablerow,tablecolumn,table,'+
'anchor,link,image,flash,' +
'checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview The "placeholder" plugin.
*
*/
(function()
{
var placeholderReplaceRegex = /\[\[[^\]]+\]\]/g;
CKEDITOR.plugins.add( 'placeholder',
{
requires : [ 'dialog' ],
lang : [ 'bg', 'cs', 'cy', 'da', 'de', 'el', 'en', 'eo', 'et', 'fa', 'fi', 'fr', 'he', 'hr', 'it', 'nb', 'nl', 'no', 'pl', 'pt-br', 'tr', 'ug', 'uk', 'vi', 'zh-cn' ],
init : function( editor )
{
var lang = editor.lang.placeholder;
editor.addCommand( 'createplaceholder', new CKEDITOR.dialogCommand( 'createplaceholder' ) );
editor.addCommand( 'editplaceholder', new CKEDITOR.dialogCommand( 'editplaceholder' ) );
editor.ui.addButton( 'CreatePlaceholder',
{
label : lang.toolbar,
command :'createplaceholder',
icon : this.path + 'placeholder.gif'
});
if ( editor.addMenuItems )
{
editor.addMenuGroup( 'placeholder', 20 );
editor.addMenuItems(
{
editplaceholder :
{
label : lang.edit,
command : 'editplaceholder',
group : 'placeholder',
order : 1,
icon : this.path + 'placeholder.gif'
}
} );
if ( editor.contextMenu )
{
editor.contextMenu.addListener( function( element, selection )
{
if ( !element || !element.data( 'cke-placeholder' ) )
return null;
return { editplaceholder : CKEDITOR.TRISTATE_OFF };
} );
}
}
editor.on( 'doubleclick', function( evt )
{
if ( CKEDITOR.plugins.placeholder.getSelectedPlaceHoder( editor ) )
evt.data.dialog = 'editplaceholder';
});
editor.addCss(
'.cke_placeholder' +
'{' +
'background-color: #ffff00;' +
( CKEDITOR.env.gecko ? 'cursor: default;' : '' ) +
'}'
);
editor.on( 'contentDom', function()
{
editor.document.getBody().on( 'resizestart', function( evt )
{
if ( editor.getSelection().getSelectedElement().data( 'cke-placeholder' ) )
evt.data.preventDefault();
});
});
CKEDITOR.dialog.add( 'createplaceholder', this.path + 'dialogs/placeholder.js' );
CKEDITOR.dialog.add( 'editplaceholder', this.path + 'dialogs/placeholder.js' );
},
afterInit : function( editor )
{
var dataProcessor = editor.dataProcessor,
dataFilter = dataProcessor && dataProcessor.dataFilter,
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
if ( dataFilter )
{
dataFilter.addRules(
{
text : function( text )
{
return text.replace( placeholderReplaceRegex, function( match )
{
return CKEDITOR.plugins.placeholder.createPlaceholder( editor, null, match, 1 );
});
}
});
}
if ( htmlFilter )
{
htmlFilter.addRules(
{
elements :
{
'span' : function( element )
{
if ( element.attributes && element.attributes[ 'data-cke-placeholder' ] )
delete element.name;
}
}
});
}
}
});
})();
CKEDITOR.plugins.placeholder =
{
createPlaceholder : function( editor, oldElement, text, isGet )
{
var element = new CKEDITOR.dom.element( 'span', editor.document );
element.setAttributes(
{
contentEditable : 'false',
'data-cke-placeholder' : 1,
'class' : 'cke_placeholder'
}
);
text && element.setText( text );
if ( isGet )
return element.getOuterHtml();
if ( oldElement )
{
if ( CKEDITOR.env.ie )
{
element.insertAfter( oldElement );
// Some time is required for IE before the element is removed.
setTimeout( function()
{
oldElement.remove();
element.focus();
}, 10 );
}
else
element.replace( oldElement );
}
else
editor.insertElement( element );
return null;
},
getSelectedPlaceHoder : function( editor )
{
var range = editor.getSelection().getRanges()[ 0 ];
range.shrink( CKEDITOR.SHRINK_TEXT );
var node = range.startContainer;
while( node && !( node.type == CKEDITOR.NODE_ELEMENT && node.data( 'cke-placeholder' ) ) )
node = node.getParent();
return node;
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'nl',
{
placeholder :
{
title : 'Eigenschappen placeholder',
toolbar : 'Placeholder aanmaken',
text : 'Placeholder tekst',
edit : 'Placeholder wijzigen',
textMissing : 'De placeholder moet tekst bevatten.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'ug',
{
placeholder :
{
title : 'ئورۇن بەلگە خاسلىقى',
toolbar : 'ئورۇن بەلگە قۇر',
text : 'ئورۇن بەلگە تېكىستى',
edit : 'ئورۇن بەلگە تەھرىر',
textMissing : 'ئورۇن بەلگىسىدە چوقۇم تېكىست بولۇشى لازىم'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'it',
{
placeholder :
{
title : 'Proprietà segnaposto',
toolbar : 'Crea segnaposto',
text : 'Testo segnaposto',
edit : 'Modifica segnaposto',
textMissing : 'Il segnaposto deve contenere del testo.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'de',
{
placeholder :
{
title : 'Platzhalter Einstellungen',
toolbar : 'Platzhalter erstellen',
text : 'Platzhalter Text',
edit : 'Platzhalter bearbeiten',
textMissing : 'Der Platzhalter muss einen Text beinhalten.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'pl',
{
placeholder :
{
title : 'Właściwości wypełniacza',
toolbar : 'Utwórz wypełniacz',
text : 'Tekst wypełnienia',
edit : 'Edytuj wypełnienie',
textMissing : 'Wypełnienie musi posiadać jakiś tekst.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'vi',
{
placeholder :
{
title : 'Thuộc tính đặt chỗ',
toolbar : 'Tạo đặt chỗ',
text : 'Văn bản đặt chỗ',
edit : 'Chỉnh sửa ',
textMissing : 'The placeholder must contain text.' // MISSING
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'hr',
{
placeholder :
{
title : 'Svojstva rezerviranog mjesta',
toolbar : 'Napravi rezervirano mjesto',
text : 'Tekst rezerviranog mjesta',
edit : 'Uredi rezervirano mjesto',
textMissing : 'Rezervirano mjesto mora sadržavati tekst.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'tr',
{
placeholder :
{
title : 'Yer tutucu özellikleri',
toolbar : 'Yer tutucu oluşturun',
text : 'Yer tutucu metini',
edit : 'Yer tutucuyu düzenle',
textMissing : 'Yer tutucu metin içermelidir.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'fr',
{
placeholder :
{
title : 'Propriétés de l\'Espace réservé',
toolbar : 'Créer l\'Espace réservé',
text : 'Texte de l\'Espace réservé',
edit : 'Modifier l\'Espace réservé',
textMissing : 'L\'Espace réservé doit contenir du texte.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'zh-cn',
{
placeholder :
{
title : '占位符属性',
toolbar : '创建占位符',
text : '占位符文字',
edit : '编辑占位符',
textMissing : '占位符必需包含有文字'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'eo',
{
placeholder :
{
title : 'Atributoj de la rezervita spaco',
toolbar : 'Krei la rezervitan spacon',
text : 'Texto de la rezervita spaco',
edit : 'Modifi la rezervitan spacon',
textMissing : 'La rezervita spaco devas enteni tekston.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'en',
{
placeholder :
{
title : 'Placeholder Properties',
toolbar : 'Create Placeholder',
text : 'Placeholder Text',
edit : 'Edit Placeholder',
textMissing : 'The placeholder must contain text.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'da',
{
placeholder :
{
title : 'Egenskaber for pladsholder',
toolbar : 'Opret pladsholder',
text : 'Tekst til pladsholder',
edit : 'Redigér pladsholder',
textMissing : 'Pladsholder skal indeholde tekst'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'nb',
{
placeholder :
{
title : 'Egenskaper for plassholder',
toolbar : 'Opprett plassholder',
text : 'Tekst for plassholder',
edit : 'Rediger plassholder',
textMissing : 'Plassholderen må inneholde tekst.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'bg',
{
placeholder :
{
title : 'Настройки на контейнера',
toolbar : 'Нов контейнер',
text : 'Текст за контейнера',
edit : 'Промяна на контейнер',
textMissing : 'Контейнера трябва да съдържа текст.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'el',
{
placeholder :
{
title : 'Ιδιότητες Υποκατάστατου Κειμένου',
toolbar : 'Δημιουργία Υποκατάσταστου Κειμένου',
text : 'Υποκαθιστόμενο Κείμενο',
edit : 'Επεξεργασία Υποκατάσταστου Κειμένου',
textMissing : 'Πρέπει να υπάρχει υποκαθιστόμενο κείμενο.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'fi',
{
placeholder :
{
title : 'Paikkamerkin ominaisuudet',
toolbar : 'Luo paikkamerkki',
text : 'Paikkamerkin teksti',
edit : 'Muokkaa paikkamerkkiä',
textMissing : 'Paikkamerkin täytyy sisältää tekstiä'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'cy',
{
placeholder :
{
title : 'Priodweddau\'r Daliwr Geiriau',
toolbar : 'Creu Daliwr Geiriau',
text : 'Testun y Daliwr Geiriau',
edit : 'Golygu\'r Dailwr Geiriau',
textMissing : 'Mae\'n rhaid i\'r daliwr geiriau gynnwys testun.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'no',
{
placeholder :
{
title : 'Egenskaper for plassholder',
toolbar : 'Opprett plassholder',
text : 'Tekst for plassholder',
edit : 'Rediger plassholder',
textMissing : 'Plassholderen må inneholde tekst.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'fa',
{
placeholder :
{
title : 'ویژگیهای محل نگهداری',
toolbar : 'ایجاد یک محل نگهداری',
text : 'متن محل نگهداری',
edit : 'ویرایش محل نگهداری',
textMissing : 'محل نگهداری باید محتوی متن باشد.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'et',
{
placeholder :
{
title : 'Kohahoidja omadused',
toolbar : 'Kohahoidja loomine',
text : 'Kohahoidja tekst',
edit : 'Kohahoidja muutmine',
textMissing : 'Kohahoidja peab sisaldama teksti.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'he',
{
placeholder :
{
title : 'מאפייני שומר מקום',
toolbar : 'צור שומר מקום',
text : 'תוכן שומר המקום',
edit : 'ערוך שומר מקום',
textMissing : 'שומר המקום חייב להכיל טקסט.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'uk',
{
placeholder :
{
title : 'Налаштування Заповнювача',
toolbar : 'Створити Заповнювач',
text : 'Текст Заповнювача',
edit : 'Редагувати Заповнювач',
textMissing : 'Заповнювач повинен містити текст.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'cs',
{
placeholder :
{
title : 'Vlastnosti vyhrazeného prostoru',
toolbar : 'Vytvořit vyhrazený prostor',
text : 'Vyhrazený text',
edit : 'Upravit vyhrazený prostor',
textMissing : 'Vyhrazený prostor musí obsahovat text.'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'placeholder', 'pt-br',
{
placeholder :
{
title : 'Propriedades do Espaço Reservado',
toolbar : 'Criar Espaço Reservado',
text : 'Texto do Espaço Reservado',
edit : 'Editar Espaço Reservado',
textMissing : 'O espaço reservado deve conter texto.'
}
});
| JavaScript |
/*
* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
function placeholderDialog( editor, isEdit )
{
var lang = editor.lang.placeholder,
generalLabel = editor.lang.common.generalTab;
return {
title : lang.title,
minWidth : 300,
minHeight : 80,
contents :
[
{
id : 'info',
label : generalLabel,
title : generalLabel,
elements :
[
{
id : 'text',
type : 'text',
style : 'width: 100%;',
label : lang.text,
'default' : '',
required : true,
validate : CKEDITOR.dialog.validate.notEmpty( lang.textMissing ),
setup : function( element )
{
if ( isEdit )
this.setValue( element.getText().slice( 2, -2 ) );
},
commit : function( element )
{
var text = '[[' + this.getValue() + ']]';
// The placeholder must be recreated.
CKEDITOR.plugins.placeholder.createPlaceholder( editor, element, text );
}
}
]
}
],
onShow : function()
{
if ( isEdit )
this._element = CKEDITOR.plugins.placeholder.getSelectedPlaceHoder( editor );
this.setupContent( this._element );
},
onOk : function()
{
this.commitContent( this._element );
delete this._element;
}
};
}
CKEDITOR.dialog.add( 'createplaceholder', function( editor )
{
return placeholderDialog( editor );
});
CKEDITOR.dialog.add( 'editplaceholder', function( editor )
{
return placeholderDialog( editor, 1 );
});
} )();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'removeformat',
{
requires : [ 'selection' ],
init : function( editor )
{
editor.addCommand( 'removeFormat', CKEDITOR.plugins.removeformat.commands.removeformat );
editor.ui.addButton( 'RemoveFormat',
{
label : editor.lang.removeFormat,
command : 'removeFormat'
});
editor._.removeFormat = { filters: [] };
}
});
CKEDITOR.plugins.removeformat =
{
commands :
{
removeformat :
{
exec : function( editor )
{
var tagsRegex = editor._.removeFormatRegex ||
( editor._.removeFormatRegex = new RegExp( '^(?:' + editor.config.removeFormatTags.replace( /,/g,'|' ) + ')$', 'i' ) );
var removeAttributes = editor._.removeAttributes ||
( editor._.removeAttributes = editor.config.removeFormatAttributes.split( ',' ) );
var filter = CKEDITOR.plugins.removeformat.filter;
var ranges = editor.getSelection().getRanges( 1 ),
iterator = ranges.createIterator(),
range;
while ( ( range = iterator.getNextRange() ) )
{
if ( ! range.collapsed )
range.enlarge( CKEDITOR.ENLARGE_ELEMENT );
// Bookmark the range so we can re-select it after processing.
var bookmark = range.createBookmark(),
// The style will be applied within the bookmark boundaries.
startNode = bookmark.startNode,
endNode = bookmark.endNode,
currentNode;
// We need to check the selection boundaries (bookmark spans) to break
// the code in a way that we can properly remove partially selected nodes.
// For example, removing a <b> style from
// <b>This is [some text</b> to show <b>the] problem</b>
// ... where [ and ] represent the selection, must result:
// <b>This is </b>[some text to show the]<b> problem</b>
// The strategy is simple, we just break the partial nodes before the
// removal logic, having something that could be represented this way:
// <b>This is </b>[<b>some text</b> to show <b>the</b>]<b> problem</b>
var breakParent = function( node )
{
// Let's start checking the start boundary.
var path = new CKEDITOR.dom.elementPath( node ),
pathElements = path.elements;
for ( var i = 1, pathElement ; pathElement = pathElements[ i ] ; i++ )
{
if ( pathElement.equals( path.block ) || pathElement.equals( path.blockLimit ) )
break;
// If this element can be removed (even partially).
if ( tagsRegex.test( pathElement.getName() ) && filter( editor, pathElement ) )
node.breakParent( pathElement );
}
};
breakParent( startNode );
if ( endNode )
{
breakParent( endNode );
// Navigate through all nodes between the bookmarks.
currentNode = startNode.getNextSourceNode( true, CKEDITOR.NODE_ELEMENT );
while ( currentNode )
{
// If we have reached the end of the selection, stop looping.
if ( currentNode.equals( endNode ) )
break;
// Cache the next node to be processed. Do it now, because
// currentNode may be removed.
var nextNode = currentNode.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT );
// This node must not be a fake element.
if ( !( currentNode.getName() == 'img'
&& currentNode.data( 'cke-realelement' ) )
&& filter( editor, currentNode ) )
{
// Remove elements nodes that match with this style rules.
if ( tagsRegex.test( currentNode.getName() ) )
currentNode.remove( 1 );
else
{
currentNode.removeAttributes( removeAttributes );
editor.fire( 'removeFormatCleanup', currentNode );
}
}
currentNode = nextNode;
}
}
range.moveToBookmark( bookmark );
}
editor.getSelection().selectRanges( ranges );
}
}
},
/**
* Perform the remove format filters on the passed element.
* @param {CKEDITOR.editor} editor
* @param {CKEDITOR.dom.element} element
*/
filter : function ( editor, element )
{
var filters = editor._.removeFormat.filters;
for ( var i = 0; i < filters.length; i++ )
{
if ( filters[ i ]( element ) === false )
return false;
}
return true;
}
};
/**
* Add to a collection of functions to decide whether a specific
* element should be considered as formatting element and thus
* could be removed during <b>removeFormat</b> command,
* Note: Only available with the existence of 'removeformat' plugin.
* @since 3.3
* @param {Function} func The function to be called, which will be passed a {CKEDITOR.dom.element} element to test.
* @example
* // Don't remove empty span
* editor.addRemoveFormatFilter.push( function( element )
* {
* return !( element.is( 'span' ) && CKEDITOR.tools.isEmpty( element.getAttributes() ) );
* });
*/
CKEDITOR.editor.prototype.addRemoveFormatFilter = function( func )
{
this._.removeFormat.filters.push( func );
};
/**
* A comma separated list of elements to be removed when executing the "remove
" format" command. Note that only inline elements are allowed.
* @type String
* @default 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var'
* @example
*/
CKEDITOR.config.removeFormatTags = 'b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';
/**
* A comma separated list of elements attributes to be removed when executing
* the "remove format" command.
* @type String
* @default 'class,style,lang,width,height,align,hspace,valign'
* @example
*/
CKEDITOR.config.removeFormatAttributes = 'class,style,lang,width,height,align,hspace,valign';
/**
* Fired after an element was cleaned by the removeFormat plugin.
* @name CKEDITOR.editor#removeFormatCleanup
* @event
* @param {Object} data.element The element that was cleaned up.
*/
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'panelbutton',
{
requires : [ 'button' ],
onLoad : function()
{
function clickFn( editor )
{
var _ = this._;
if ( _.state == CKEDITOR.TRISTATE_DISABLED )
return;
this.createPanel( editor );
if ( _.on )
{
_.panel.hide();
return;
}
_.panel.showBlock( this._.id, this.document.getById( this._.id ), 4 );
}
CKEDITOR.ui.panelButton = CKEDITOR.tools.createClass(
{
base : CKEDITOR.ui.button,
$ : function( definition )
{
// We don't want the panel definition in this object.
var panelDefinition = definition.panel;
delete definition.panel;
this.base( definition );
this.document = ( panelDefinition
&& panelDefinition.parent
&& panelDefinition.parent.getDocument() )
|| CKEDITOR.document;
panelDefinition.block =
{
attributes : panelDefinition.attributes
};
this.hasArrow = true;
this.click = clickFn;
this._ =
{
panelDefinition : panelDefinition
};
},
statics :
{
handler :
{
create : function( definition )
{
return new CKEDITOR.ui.panelButton( definition );
}
}
},
proto :
{
createPanel : function( editor )
{
var _ = this._;
if ( _.panel )
return;
var panelDefinition = this._.panelDefinition || {},
panelBlockDefinition = this._.panelDefinition.block,
panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(),
panel = this._.panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ),
block = panel.addBlock( _.id, panelBlockDefinition ),
me = this;
panel.onShow = function()
{
if ( me.className )
this.element.getFirst().addClass( me.className + '_panel' );
me.setState( CKEDITOR.TRISTATE_ON );
_.on = 1;
if ( me.onOpen )
me.onOpen();
};
panel.onHide = function( preventOnClose )
{
if ( me.className )
this.element.getFirst().removeClass( me.className + '_panel' );
me.setState( me.modes && me.modes[ editor.mode ] ? CKEDITOR.TRISTATE_OFF : CKEDITOR.TRISTATE_DISABLED );
_.on = 0;
if ( !preventOnClose && me.onClose )
me.onClose();
};
panel.onEscape = function()
{
panel.hide();
me.document.getById( _.id ).focus();
};
if ( this.onBlock )
this.onBlock( panel, block );
block.onHide = function()
{
_.on = 0;
me.setState( CKEDITOR.TRISTATE_OFF );
};
}
}
});
},
beforeInit : function( editor )
{
editor.ui.addHandler( CKEDITOR.UI_PANELBUTTON, CKEDITOR.ui.panelButton.handler );
}
});
/**
* Button UI element.
* @constant
* @example
*/
CKEDITOR.UI_PANELBUTTON = 'panelbutton';
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'popup' );
CKEDITOR.tools.extend( CKEDITOR.editor.prototype,
{
/**
* Opens Browser in a popup. The "width" and "height" parameters accept
* numbers (pixels) or percent (of screen size) values.
* @param {String} url The url of the external file browser.
* @param {String} width Popup window width.
* @param {String} height Popup window height.
* @param {String} options Popup window features.
*/
popup : function( url, width, height, options )
{
width = width || '80%';
height = height || '70%';
if ( typeof width == 'string' && width.length > 1 && width.substr( width.length - 1, 1 ) == '%' )
width = parseInt( window.screen.width * parseInt( width, 10 ) / 100, 10 );
if ( typeof height == 'string' && height.length > 1 && height.substr( height.length - 1, 1 ) == '%' )
height = parseInt( window.screen.height * parseInt( height, 10 ) / 100, 10 );
if ( width < 640 )
width = 640;
if ( height < 420 )
height = 420;
var top = parseInt( ( window.screen.height - height ) / 2, 10 ),
left = parseInt( ( window.screen.width - width ) / 2, 10 );
options = ( options || 'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes' ) +
',width=' + width +
',height=' + height +
',top=' + top +
',left=' + left;
var popupWindow = window.open( '', null, options, true );
// Blocked by a popup blocker.
if ( !popupWindow )
return false;
try
{
// Chrome is problematic with moveTo/resizeTo, but it's not really needed here (#8855).
var ua = navigator.userAgent.toLowerCase();
if ( ua.indexOf( ' chrome/' ) == -1 )
{
popupWindow.moveTo( left, top );
popupWindow.resizeTo( width, height );
}
popupWindow.focus();
popupWindow.location.href = url;
}
catch ( e )
{
popupWindow = window.open( url, null, options, true );
}
return true;
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview The "toolbar" plugin. Renders the default toolbar interface in
* the editor.
*/
(function()
{
var toolbox = function()
{
this.toolbars = [];
this.focusCommandExecuted = false;
};
toolbox.prototype.focus = function()
{
for ( var t = 0, toolbar ; toolbar = this.toolbars[ t++ ] ; )
{
for ( var i = 0, item ; item = toolbar.items[ i++ ] ; )
{
if ( item.focus )
{
item.focus();
return;
}
}
}
};
var commands =
{
toolbarFocus :
{
modes : { wysiwyg : 1, source : 1 },
readOnly : 1,
exec : function( editor )
{
if ( editor.toolbox )
{
editor.toolbox.focusCommandExecuted = true;
// Make the first button focus accessible for IE. (#3417)
// Adobe AIR instead need while of delay.
if ( CKEDITOR.env.ie || CKEDITOR.env.air )
setTimeout( function(){ editor.toolbox.focus(); }, 100 );
else
editor.toolbox.focus();
}
}
}
};
CKEDITOR.plugins.add( 'toolbar',
{
requires : [ 'button' ],
init : function( editor )
{
var endFlag;
var itemKeystroke = function( item, keystroke )
{
var next, toolbar;
var rtl = editor.lang.dir == 'rtl',
toolbarGroupCycling = editor.config.toolbarGroupCycling;
toolbarGroupCycling = toolbarGroupCycling === undefined || toolbarGroupCycling;
switch ( keystroke )
{
case 9 : // TAB
case CKEDITOR.SHIFT + 9 : // SHIFT + TAB
// Cycle through the toolbars, starting from the one
// closest to the current item.
while ( !toolbar || !toolbar.items.length )
{
toolbar = keystroke == 9 ?
( ( toolbar ? toolbar.next : item.toolbar.next ) || editor.toolbox.toolbars[ 0 ] ) :
( ( toolbar ? toolbar.previous : item.toolbar.previous ) || editor.toolbox.toolbars[ editor.toolbox.toolbars.length - 1 ] );
// Look for the first item that accepts focus.
if ( toolbar.items.length )
{
item = toolbar.items[ endFlag ? ( toolbar.items.length - 1 ) : 0 ];
while ( item && !item.focus )
{
item = endFlag ? item.previous : item.next;
if ( !item )
toolbar = 0;
}
}
}
if ( item )
item.focus();
return false;
case rtl ? 37 : 39 : // RIGHT-ARROW
case 40 : // DOWN-ARROW
next = item;
do
{
// Look for the next item in the toolbar.
next = next.next;
// If it's the last item, cycle to the first one.
if ( !next && toolbarGroupCycling )
next = item.toolbar.items[ 0 ];
}
while ( next && !next.focus )
// If available, just focus it, otherwise focus the
// first one.
if ( next )
next.focus();
else
// Send a TAB.
itemKeystroke( item, 9 );
return false;
case rtl ? 39 : 37 : // LEFT-ARROW
case 38 : // UP-ARROW
next = item;
do
{
// Look for the previous item in the toolbar.
next = next.previous;
// If it's the first item, cycle to the last one.
if ( !next && toolbarGroupCycling )
next = item.toolbar.items[ item.toolbar.items.length - 1 ];
}
while ( next && !next.focus )
// If available, just focus it, otherwise focus the
// last one.
if ( next )
next.focus();
else
{
endFlag = 1;
// Send a SHIFT + TAB.
itemKeystroke( item, CKEDITOR.SHIFT + 9 );
endFlag = 0;
}
return false;
case 27 : // ESC
editor.focus();
return false;
case 13 : // ENTER
case 32 : // SPACE
item.execute();
return false;
}
return true;
};
editor.on( 'themeSpace', function( event )
{
if ( event.data.space == editor.config.toolbarLocation )
{
editor.toolbox = new toolbox();
var labelId = CKEDITOR.tools.getNextId();
var output = [ '<div class="cke_toolbox" role="group" aria-labelledby="', labelId, '" onmousedown="return false;"' ],
expanded = editor.config.toolbarStartupExpanded !== false,
groupStarted;
output.push( expanded ? '>' : ' style="display:none">' );
// Sends the ARIA label.
output.push( '<span id="', labelId, '" class="cke_voice_label">', editor.lang.toolbars, '</span>' );
var toolbars = editor.toolbox.toolbars,
toolbar =
( editor.config.toolbar instanceof Array ) ?
editor.config.toolbar
:
editor.config[ 'toolbar_' + editor.config.toolbar ];
for ( var r = 0 ; r < toolbar.length ; r++ )
{
var toolbarId,
toolbarObj = 0,
toolbarName,
row = toolbar[ r ],
items;
// It's better to check if the row object is really
// available because it's a common mistake to leave
// an extra comma in the toolbar definition
// settings, which leads on the editor not loading
// at all in IE. (#3983)
if ( !row )
continue;
if ( groupStarted )
{
output.push( '</div>' );
groupStarted = 0;
}
if ( row === '/' )
{
output.push( '<div class="cke_break"></div>' );
continue;
}
items = row.items || row;
// Create all items defined for this toolbar.
for ( var i = 0 ; i < items.length ; i++ )
{
var item,
itemName = items[ i ],
canGroup;
item = editor.ui.create( itemName );
if ( item )
{
canGroup = item.canGroup !== false;
// Initialize the toolbar first, if needed.
if ( !toolbarObj )
{
// Create the basic toolbar object.
toolbarId = CKEDITOR.tools.getNextId();
toolbarObj = { id : toolbarId, items : [] };
toolbarName = row.name && ( editor.lang.toolbarGroups[ row.name ] || row.name );
// Output the toolbar opener.
output.push( '<span id="', toolbarId, '" class="cke_toolbar"',
( toolbarName ? ' aria-labelledby="'+ toolbarId + '_label"' : '' ),
' role="toolbar">' );
// If a toolbar name is available, send the voice label.
toolbarName && output.push( '<span id="', toolbarId, '_label" class="cke_voice_label">', toolbarName, '</span>' );
output.push( '<span class="cke_toolbar_start"></span>' );
// Add the toolbar to the "editor.toolbox.toolbars"
// array.
var index = toolbars.push( toolbarObj ) - 1;
// Create the next/previous reference.
if ( index > 0 )
{
toolbarObj.previous = toolbars[ index - 1 ];
toolbarObj.previous.next = toolbarObj;
}
}
if ( canGroup )
{
if ( !groupStarted )
{
output.push( '<span class="cke_toolgroup" role="presentation">' );
groupStarted = 1;
}
}
else if ( groupStarted )
{
output.push( '</span>' );
groupStarted = 0;
}
var itemObj = item.render( editor, output );
index = toolbarObj.items.push( itemObj ) - 1;
if ( index > 0 )
{
itemObj.previous = toolbarObj.items[ index - 1 ];
itemObj.previous.next = itemObj;
}
itemObj.toolbar = toolbarObj;
itemObj.onkey = itemKeystroke;
/*
* Fix for #3052:
* Prevent JAWS from focusing the toolbar after document load.
*/
itemObj.onfocus = function()
{
if ( !editor.toolbox.focusCommandExecuted )
editor.focus();
};
}
}
if ( groupStarted )
{
output.push( '</span>' );
groupStarted = 0;
}
if ( toolbarObj )
output.push( '<span class="cke_toolbar_end"></span></span>' );
}
output.push( '</div>' );
if ( editor.config.toolbarCanCollapse )
{
var collapserFn = CKEDITOR.tools.addFunction(
function()
{
editor.execCommand( 'toolbarCollapse' );
});
editor.on( 'destroy', function () {
CKEDITOR.tools.removeFunction( collapserFn );
});
var collapserId = CKEDITOR.tools.getNextId();
editor.addCommand( 'toolbarCollapse',
{
readOnly : 1,
exec : function( editor )
{
var collapser = CKEDITOR.document.getById( collapserId ),
toolbox = collapser.getPrevious(),
contents = editor.getThemeSpace( 'contents' ),
toolboxContainer = toolbox.getParent(),
contentHeight = parseInt( contents.$.style.height, 10 ),
previousHeight = toolboxContainer.$.offsetHeight,
collapsed = !toolbox.isVisible();
if ( !collapsed )
{
toolbox.hide();
collapser.addClass( 'cke_toolbox_collapser_min' );
collapser.setAttribute( 'title', editor.lang.toolbarExpand );
}
else
{
toolbox.show();
collapser.removeClass( 'cke_toolbox_collapser_min' );
collapser.setAttribute( 'title', editor.lang.toolbarCollapse );
}
// Update collapser symbol.
collapser.getFirst().setText( collapsed ?
'\u25B2' : // BLACK UP-POINTING TRIANGLE
'\u25C0' ); // BLACK LEFT-POINTING TRIANGLE
var dy = toolboxContainer.$.offsetHeight - previousHeight;
contents.setStyle( 'height', ( contentHeight - dy ) + 'px' );
editor.fire( 'resize' );
},
modes : { wysiwyg : 1, source : 1 }
} );
output.push( '<a title="' + ( expanded ? editor.lang.toolbarCollapse : editor.lang.toolbarExpand )
+ '" id="' + collapserId + '" tabIndex="-1" class="cke_toolbox_collapser' );
if ( !expanded )
output.push( ' cke_toolbox_collapser_min' );
output.push( '" onclick="CKEDITOR.tools.callFunction(' + collapserFn + ')">',
'<span>▲</span>', // BLACK UP-POINTING TRIANGLE
'</a>' );
}
event.data.html += output.join( '' );
}
});
editor.on( 'destroy', function()
{
var toolbars, index = 0, i,
items, instance;
toolbars = this.toolbox.toolbars;
for ( ; index < toolbars.length; index++ )
{
items = toolbars[ index ].items;
for ( i = 0; i < items.length; i++ )
{
instance = items[ i ];
if ( instance.clickFn ) CKEDITOR.tools.removeFunction( instance.clickFn );
if ( instance.keyDownFn ) CKEDITOR.tools.removeFunction( instance.keyDownFn );
}
}
});
editor.addCommand( 'toolbarFocus', commands.toolbarFocus );
editor.ui.add( '-', CKEDITOR.UI_SEPARATOR, {} );
editor.ui.addHandler( CKEDITOR.UI_SEPARATOR,
{
create: function()
{
return {
render : function( editor, output )
{
output.push( '<span class="cke_separator" role="separator"></span>' );
return {};
}
};
}
});
}
});
})();
CKEDITOR.UI_SEPARATOR = 'separator';
/**
* The "theme space" to which rendering the toolbar. For the default theme,
* the recommended options are "top" and "bottom".
* @type String
* @default 'top'
* @see CKEDITOR.config.theme
* @example
* config.toolbarLocation = 'bottom';
*/
CKEDITOR.config.toolbarLocation = 'top';
/**
* The toolbar definition. It is an array of toolbars (strips),
* each one being also an array, containing a list of UI items.
* Note that this setting is composed by "toolbar_" added by the toolbar name,
* which in this case is called "Basic". This second part of the setting name
* can be anything. You must use this name in the
* {@link CKEDITOR.config.toolbar} setting, so you instruct the editor which
* toolbar_(name) setting to you.
* @type Array
* @example
* // Defines a toolbar with only one strip containing the "Source" button, a
* // separator and the "Bold" and "Italic" buttons.
* <b>config.toolbar_Basic =
* [
* [ 'Source', '-', 'Bold', 'Italic' ]
* ]</b>;
* config.toolbar = 'Basic';
*/
CKEDITOR.config.toolbar_Basic =
[
['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink','-','About']
];
/**
* This is the default toolbar definition used by the editor. It contains all
* editor features.
* @type Array
* @default (see example)
* @example
* // This is actually the default value.
* config.toolbar_Full =
* [
* { name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
* { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
* { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
* { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
* '/',
* { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
* { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
* { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
* { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
* '/',
* { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
* { name: 'colors', items : [ 'TextColor','BGColor' ] },
* { name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
* ];
*/
CKEDITOR.config.toolbar_Full =
[
{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
'/',
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
'/',
{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
{ name: 'colors', items : [ 'TextColor','BGColor' ] },
{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
];
/**
* The toolbox (alias toolbar) definition. It is a toolbar name or an array of
* toolbars (strips), each one being also an array, containing a list of UI items.
* @type Array|String
* @default 'Full'
* @example
* // Defines a toolbar with only one strip containing the "Source" button, a
* // separator and the "Bold" and "Italic" buttons.
* config.toolbar =
* [
* [ 'Source', '-', 'Bold', 'Italic' ]
* ];
* @example
* // Load toolbar_Name where Name = Basic.
* config.toolbar = 'Basic';
*/
CKEDITOR.config.toolbar = 'Full';
/**
* Whether the toolbar can be collapsed by the user. If disabled, the collapser
* button will not be displayed.
* @type Boolean
* @default true
* @example
* config.toolbarCanCollapse = false;
*/
CKEDITOR.config.toolbarCanCollapse = true;
/**
* Whether the toolbar must start expanded when the editor is loaded.
* @name CKEDITOR.config.toolbarStartupExpanded
* @type Boolean
* @default true
* @example
* config.toolbarStartupExpanded = false;
*/
/**
* When enabled, makes the arrow keys navigation cycle within the current
* toolbar group. Otherwise the arrows will move trought all items available in
* the toolbar. The TAB key will still be used to quickly jump among the
* toolbar groups.
* @name CKEDITOR.config.toolbarGroupCycling
* @since 3.6
* @type Boolean
* @default true
* @example
* config.toolbarGroupCycling = false;
*/
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview The "sourcearea" plugin. It registers the "source" editing
* mode, which displays the raw data being edited in the editor.
*/
CKEDITOR.plugins.add( 'sourcearea',
{
requires : [ 'editingblock' ],
init : function( editor )
{
var sourcearea = CKEDITOR.plugins.sourcearea,
win = CKEDITOR.document.getWindow();
editor.on( 'editingBlockReady', function()
{
var textarea,
onResize;
editor.addMode( 'source',
{
load : function( holderElement, data )
{
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
holderElement.setStyle( 'position', 'relative' );
// Create the source area <textarea>.
editor.textarea = textarea = new CKEDITOR.dom.element( 'textarea' );
textarea.setAttributes(
{
dir : 'ltr',
tabIndex : CKEDITOR.env.webkit ? -1 : editor.tabIndex,
'role' : 'textbox',
'aria-label' : editor.lang.editorTitle.replace( '%1', editor.name )
});
textarea.addClass( 'cke_source' );
textarea.addClass( 'cke_enable_context_menu' );
editor.readOnly && textarea.setAttribute( 'readOnly', 'readonly' );
var styles =
{
// IE7 has overflow the <textarea> from wrapping table cell.
width : CKEDITOR.env.ie7Compat ? '99%' : '100%',
height : '100%',
resize : 'none',
outline : 'none',
'text-align' : 'left'
};
// Having to make <textarea> fixed sized to conque the following bugs:
// 1. The textarea height/width='100%' doesn't constraint to the 'td' in IE6/7.
// 2. Unexpected vertical-scrolling behavior happens whenever focus is moving out of editor
// if text content within it has overflowed. (#4762)
if ( CKEDITOR.env.ie )
{
onResize = function()
{
// Holder rectange size is stretched by textarea,
// so hide it just for a moment.
textarea.hide();
textarea.setStyle( 'height', holderElement.$.clientHeight + 'px' );
textarea.setStyle( 'width', holderElement.$.clientWidth + 'px' );
// When we have proper holder size, show textarea again.
textarea.show();
};
editor.on( 'resize', onResize );
win.on( 'resize', onResize );
setTimeout( onResize, 0 );
}
// Reset the holder element and append the
// <textarea> to it.
holderElement.setHtml( '' );
holderElement.append( textarea );
textarea.setStyles( styles );
editor.fire( 'ariaWidget', textarea );
textarea.on( 'blur', function()
{
editor.focusManager.blur();
});
textarea.on( 'focus', function()
{
editor.focusManager.focus();
});
// The editor data "may be dirty" after this point.
editor.mayBeDirty = true;
// Set the <textarea> value.
this.loadData( data );
var keystrokeHandler = editor.keystrokeHandler;
if ( keystrokeHandler )
keystrokeHandler.attach( textarea );
setTimeout( function()
{
editor.mode = 'source';
editor.fire( 'mode', { previousMode : editor._.previousMode } );
},
( CKEDITOR.env.gecko || CKEDITOR.env.webkit ) ? 100 : 0 );
},
loadData : function( data )
{
textarea.setValue( data );
editor.fire( 'dataReady' );
},
getData : function()
{
return textarea.getValue();
},
getSnapshotData : function()
{
return textarea.getValue();
},
unload : function( holderElement )
{
textarea.clearCustomData();
editor.textarea = textarea = null;
if ( onResize )
{
editor.removeListener( 'resize', onResize );
win.removeListener( 'resize', onResize );
}
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 )
holderElement.removeStyle( 'position' );
},
focus : function()
{
textarea.focus();
}
});
});
editor.on( 'readOnly', function()
{
if ( editor.mode == 'source' )
{
if ( editor.readOnly )
editor.textarea.setAttribute( 'readOnly', 'readonly' );
else
editor.textarea.removeAttribute( 'readOnly' );
}
});
editor.addCommand( 'source', sourcearea.commands.source );
if ( editor.ui.addButton )
{
editor.ui.addButton( 'Source',
{
label : editor.lang.source,
command : 'source'
});
}
editor.on( 'mode', function()
{
editor.getCommand( 'source' ).setState(
editor.mode == 'source' ?
CKEDITOR.TRISTATE_ON :
CKEDITOR.TRISTATE_OFF );
});
}
});
/**
* Holds the definition of commands an UI elements included with the sourcearea
* plugin.
* @example
*/
CKEDITOR.plugins.sourcearea =
{
commands :
{
source :
{
modes : { wysiwyg:1, source:1 },
editorFocus : false,
readOnly : 1,
exec : function( editor )
{
if ( editor.mode == 'wysiwyg' )
editor.fire( 'saveSnapshot' );
editor.getCommand( 'source' ).setState( CKEDITOR.TRISTATE_DISABLED );
editor.setMode( editor.mode == 'source' ? 'wysiwyg' : 'source' );
},
canUndo : false
}
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @file Horizontal Page Break
*/
// Register a plugin named "pagebreak".
CKEDITOR.plugins.add( 'pagebreak',
{
init : function( editor )
{
// Register the command.
editor.addCommand( 'pagebreak', CKEDITOR.plugins.pagebreakCmd );
// Register the toolbar button.
editor.ui.addButton( 'PageBreak',
{
label : editor.lang.pagebreak,
command : 'pagebreak'
});
var cssStyles = [
'{' ,
'background: url(' + CKEDITOR.getUrl( this.path + 'images/pagebreak.gif' ) + ') no-repeat center center;' ,
'clear: both;' ,
'width:100%; _width:99.9%;' ,
'border-top: #999999 1px dotted;' ,
'border-bottom: #999999 1px dotted;' ,
'padding:0;' ,
'height: 5px;' ,
'cursor: default;' ,
'}'
].join( '' ).replace(/;/g, ' !important;' ); // Increase specificity to override other styles, e.g. block outline.
// Add the style that renders our placeholder.
editor.addCss( 'div.cke_pagebreak' + cssStyles );
// Opera needs help to select the page-break.
CKEDITOR.env.opera && editor.on( 'contentDom', function()
{
editor.document.on( 'click', function( evt )
{
var target = evt.data.getTarget();
if ( target.is( 'div' ) && target.hasClass( 'cke_pagebreak') )
editor.getSelection().selectElement( target );
});
});
},
afterInit : function( editor )
{
var label = editor.lang.pagebreakAlt;
// Register a filter to displaying placeholders after mode change.
var dataProcessor = editor.dataProcessor,
dataFilter = dataProcessor && dataProcessor.dataFilter,
htmlFilter = dataProcessor && dataProcessor.htmlFilter;
if ( htmlFilter )
{
htmlFilter.addRules(
{
attributes : {
'class' : function( value, element )
{
var className = value.replace( 'cke_pagebreak', '' );
if ( className != value )
{
var span = CKEDITOR.htmlParser.fragment.fromHtml( '<span style="display: none;"> </span>' );
element.children.length = 0;
element.add( span );
var attrs = element.attributes;
delete attrs[ 'aria-label' ];
delete attrs.contenteditable;
delete attrs.title;
}
return className;
}
}
}, 5 );
}
if ( dataFilter )
{
dataFilter.addRules(
{
elements :
{
div : function( element )
{
var attributes = element.attributes,
style = attributes && attributes.style,
child = style && element.children.length == 1 && element.children[ 0 ],
childStyle = child && ( child.name == 'span' ) && child.attributes.style;
if ( childStyle && ( /page-break-after\s*:\s*always/i ).test( style ) && ( /display\s*:\s*none/i ).test( childStyle ) )
{
attributes.contenteditable = "false";
attributes[ 'class' ] = "cke_pagebreak";
attributes[ 'data-cke-display-name' ] = "pagebreak";
attributes[ 'aria-label' ] = label;
attributes[ 'title' ] = label;
element.children.length = 0;
}
}
}
});
}
},
requires : [ 'fakeobjects' ]
});
CKEDITOR.plugins.pagebreakCmd =
{
exec : function( editor )
{
var label = editor.lang.pagebreakAlt;
// Create read-only element that represents a print break.
var pagebreak = CKEDITOR.dom.element.createFromHtml(
'<div style="' +
'page-break-after: always;"' +
'contenteditable="false" ' +
'title="'+ label + '" ' +
'aria-label="'+ label + '" ' +
'data-cke-display-name="pagebreak" ' +
'class="cke_pagebreak">' +
'</div>', editor.document );
var ranges = editor.getSelection().getRanges( true );
editor.fire( 'saveSnapshot' );
for ( var range, i = ranges.length - 1 ; i >= 0; i-- )
{
range = ranges[ i ];
if ( i < ranges.length -1 )
pagebreak = pagebreak.clone( true );
range.splitBlock( 'p' );
range.insertNode( pagebreak );
if ( i == ranges.length - 1 )
{
var next = pagebreak.getNext();
range.moveToPosition( pagebreak, CKEDITOR.POSITION_AFTER_END );
// If there's nothing or a non-editable block followed by, establish a new paragraph
// to make sure cursor is not trapped.
if ( !next || next.type == CKEDITOR.NODE_ELEMENT && !next.isEditable() )
range.fixBlock( true, editor.config.enterMode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
range.select();
}
}
editor.fire( 'saveSnapshot' );
}
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @file Horizontal Rule plugin.
*/
(function()
{
var horizontalruleCmd =
{
canUndo : false, // The undo snapshot will be handled by 'insertElement'.
exec : function( editor )
{
var hr = editor.document.createElement( 'hr' );
editor.insertElement( hr );
}
};
var pluginName = 'horizontalrule';
// Register a plugin named "horizontalrule".
CKEDITOR.plugins.add( pluginName,
{
init : function( editor )
{
editor.addCommand( pluginName, horizontalruleCmd );
editor.ui.addButton( 'HorizontalRule',
{
label : editor.lang.horizontalrule,
command : pluginName
});
}
});
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
function addCombo( editor, comboName, styleType, lang, entries, defaultLabel, styleDefinition )
{
var config = editor.config;
// Gets the list of fonts from the settings.
var names = entries.split( ';' ),
values = [];
// Create style objects for all fonts.
var styles = {};
for ( var i = 0 ; i < names.length ; i++ )
{
var parts = names[ i ];
if ( parts )
{
parts = parts.split( '/' );
var vars = {},
name = names[ i ] = parts[ 0 ];
vars[ styleType ] = values[ i ] = parts[ 1 ] || name;
styles[ name ] = new CKEDITOR.style( styleDefinition, vars );
styles[ name ]._.definition.name = name;
}
else
names.splice( i--, 1 );
}
editor.ui.addRichCombo( comboName,
{
label : lang.label,
title : lang.panelTitle,
className : 'cke_' + ( styleType == 'size' ? 'fontSize' : 'font' ),
panel :
{
css : editor.skin.editor.css.concat( config.contentsCss ),
multiSelect : false,
attributes : { 'aria-label' : lang.panelTitle }
},
init : function()
{
this.startGroup( lang.panelTitle );
for ( var i = 0 ; i < names.length ; i++ )
{
var name = names[ i ];
// Add the tag entry to the panel list.
this.add( name, styles[ name ].buildPreview(), name );
}
},
onClick : function( value )
{
editor.focus();
editor.fire( 'saveSnapshot' );
var style = styles[ value ];
if ( this.getValue() == value )
style.remove( editor.document );
else
style.apply( editor.document );
editor.fire( 'saveSnapshot' );
},
onRender : function()
{
editor.on( 'selectionChange', function( ev )
{
var currentValue = this.getValue();
var elementPath = ev.data.path,
elements = elementPath.elements;
// For each element into the elements path.
for ( var i = 0, element ; i < elements.length ; i++ )
{
element = elements[i];
// Check if the element is removable by any of
// the styles.
for ( var value in styles )
{
if ( styles[ value ].checkElementMatch( element, true ) )
{
if ( value != currentValue )
this.setValue( value );
return;
}
}
}
// If no styles match, just empty it.
this.setValue( '', defaultLabel );
},
this);
}
});
}
CKEDITOR.plugins.add( 'font',
{
requires : [ 'richcombo', 'styles' ],
init : function( editor )
{
var config = editor.config;
addCombo( editor, 'Font', 'family', editor.lang.font, config.font_names, config.font_defaultLabel, config.font_style );
addCombo( editor, 'FontSize', 'size', editor.lang.fontSize, config.fontSize_sizes, config.fontSize_defaultLabel, config.fontSize_style );
}
});
})();
/**
* The list of fonts names to be displayed in the Font combo in the toolbar.
* Entries are separated by semi-colons (;), while it's possible to have more
* than one font for each entry, in the HTML way (separated by comma).
*
* A display name may be optionally defined by prefixing the entries with the
* name and the slash character. For example, "Arial/Arial, Helvetica, sans-serif"
* will be displayed as "Arial" in the list, but will be outputted as
* "Arial, Helvetica, sans-serif".
* @type String
* @example
* config.font_names =
* 'Arial/Arial, Helvetica, sans-serif;' +
* 'Times New Roman/Times New Roman, Times, serif;' +
* 'Verdana';
* @example
* config.font_names = 'Arial;Times New Roman;Verdana';
*/
CKEDITOR.config.font_names =
'Arial/Arial, Helvetica, sans-serif;' +
'Comic Sans MS/Comic Sans MS, cursive;' +
'Courier New/Courier New, Courier, monospace;' +
'Georgia/Georgia, serif;' +
'Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;' +
'Tahoma/Tahoma, Geneva, sans-serif;' +
'Times New Roman/Times New Roman, Times, serif;' +
'Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;' +
'Verdana/Verdana, Geneva, sans-serif';
/**
* The text to be displayed in the Font combo is none of the available values
* matches the current cursor position or text selection.
* @type String
* @example
* // If the default site font is Arial, we may making it more explicit to the end user.
* config.font_defaultLabel = 'Arial';
*/
CKEDITOR.config.font_defaultLabel = '';
/**
* The style definition to be used to apply the font in the text.
* @type Object
* @example
* // This is actually the default value for it.
* config.font_style =
* {
* element : 'span',
* styles : { 'font-family' : '#(family)' },
* overrides : [ { element : 'font', attributes : { 'face' : null } } ]
* };
*/
CKEDITOR.config.font_style =
{
element : 'span',
styles : { 'font-family' : '#(family)' },
overrides : [ { element : 'font', attributes : { 'face' : null } } ]
};
/**
* The list of fonts size to be displayed in the Font Size combo in the
* toolbar. Entries are separated by semi-colons (;).
*
* Any kind of "CSS like" size can be used, like "12px", "2.3em", "130%",
* "larger" or "x-small".
*
* A display name may be optionally defined by prefixing the entries with the
* name and the slash character. For example, "Bigger Font/14px" will be
* displayed as "Bigger Font" in the list, but will be outputted as "14px".
* @type String
* @default '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px'
* @example
* config.fontSize_sizes = '16/16px;24/24px;48/48px;';
* @example
* config.fontSize_sizes = '12px;2.3em;130%;larger;x-small';
* @example
* config.fontSize_sizes = '12 Pixels/12px;Big/2.3em;30 Percent More/130%;Bigger/larger;Very Small/x-small';
*/
CKEDITOR.config.fontSize_sizes =
'8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
/**
* The text to be displayed in the Font Size combo is none of the available
* values matches the current cursor position or text selection.
* @type String
* @example
* // If the default site font size is 12px, we may making it more explicit to the end user.
* config.fontSize_defaultLabel = '12px';
*/
CKEDITOR.config.fontSize_defaultLabel = '';
/**
* The style definition to be used to apply the font size in the text.
* @type Object
* @example
* // This is actually the default value for it.
* config.fontSize_style =
* {
* element : 'span',
* styles : { 'font-size' : '#(size)' },
* overrides : [ { element : 'font', attributes : { 'size' : null } } ]
* };
*/
CKEDITOR.config.fontSize_style =
{
element : 'span',
styles : { 'font-size' : '#(size)' },
overrides : [ { element : 'font', attributes : { 'size' : null } } ]
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'basicstyles',
{
requires : [ 'styles', 'button' ],
init : function( editor )
{
// All buttons use the same code to register. So, to avoid
// duplications, let's use this tool function.
var addButtonCommand = function( buttonName, buttonLabel, commandName, styleDefiniton )
{
var style = new CKEDITOR.style( styleDefiniton );
editor.attachStyleStateChange( style, function( state )
{
!editor.readOnly && editor.getCommand( commandName ).setState( state );
});
editor.addCommand( commandName, new CKEDITOR.styleCommand( style ) );
editor.ui.addButton( buttonName,
{
label : buttonLabel,
command : commandName
});
};
var config = editor.config,
lang = editor.lang;
addButtonCommand( 'Bold' , lang.bold , 'bold' , config.coreStyles_bold );
addButtonCommand( 'Italic' , lang.italic , 'italic' , config.coreStyles_italic );
addButtonCommand( 'Underline' , lang.underline , 'underline' , config.coreStyles_underline );
addButtonCommand( 'Strike' , lang.strike , 'strike' , config.coreStyles_strike );
addButtonCommand( 'Subscript' , lang.subscript , 'subscript' , config.coreStyles_subscript );
addButtonCommand( 'Superscript' , lang.superscript , 'superscript' , config.coreStyles_superscript );
}
});
// Basic Inline Styles.
/**
* The style definition that applies the <strong>bold</strong> style to the text.
* @type Object
* @default <code>{ element : 'strong', overrides : 'b' }</code>
* @example
* config.coreStyles_bold = { element : 'b', overrides : 'strong' };
* @example
* config.coreStyles_bold =
* {
* element : 'span',
* attributes : { 'class' : 'Bold' }
* };
*/
CKEDITOR.config.coreStyles_bold = { element : 'strong', overrides : 'b' };
/**
* The style definition that applies the <em>italics</em> style to the text.
* @type Object
* @default <code>{ element : 'em', overrides : 'i' }</code>
* @example
* config.coreStyles_italic = { element : 'i', overrides : 'em' };
* @example
* CKEDITOR.config.coreStyles_italic =
* {
* element : 'span',
* attributes : { 'class' : 'Italic' }
* };
*/
CKEDITOR.config.coreStyles_italic = { element : 'em', overrides : 'i' };
/**
* The style definition that applies the <u>underline</u> style to the text.
* @type Object
* @default <code>{ element : 'u' }</code>
* @example
* CKEDITOR.config.coreStyles_underline =
* {
* element : 'span',
* attributes : { 'class' : 'Underline' }
* };
*/
CKEDITOR.config.coreStyles_underline = { element : 'u' };
/**
* The style definition that applies the <strike>strike-through</strike> style to the text.
* @type Object
* @default <code>{ element : 'strike' }</code>
* @example
* CKEDITOR.config.coreStyles_strike =
* {
* element : 'span',
* attributes : { 'class' : 'StrikeThrough' },
* overrides : 'strike'
* };
*/
CKEDITOR.config.coreStyles_strike = { element : 'strike' };
/**
* The style definition that applies the subscript style to the text.
* @type Object
* @default <code>{ element : 'sub' }</code>
* @example
* CKEDITOR.config.coreStyles_subscript =
* {
* element : 'span',
* attributes : { 'class' : 'Subscript' },
* overrides : 'sub'
* };
*/
CKEDITOR.config.coreStyles_subscript = { element : 'sub' };
/**
* The style definition that applies the superscript style to the text.
* @type Object
* @default <code>{ element : 'sup' }</code>
* @example
* CKEDITOR.config.coreStyles_superscript =
* {
* element : 'span',
* attributes : { 'class' : 'Superscript' },
* overrides : 'sup'
* };
*/
CKEDITOR.config.coreStyles_superscript = { element : 'sup' };
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'smiley',
{
requires : [ 'dialog' ],
init : function( editor )
{
editor.config.smiley_path = editor.config.smiley_path || ( this.path + 'images/' );
editor.addCommand( 'smiley', new CKEDITOR.dialogCommand( 'smiley' ) );
editor.ui.addButton( 'Smiley',
{
label : editor.lang.smiley.toolbar,
command : 'smiley'
});
CKEDITOR.dialog.add( 'smiley', this.path + 'dialogs/smiley.js' );
}
} );
/**
* The base path used to build the URL for the smiley images. It must end with
* a slash.
* @name CKEDITOR.config.smiley_path
* @type String
* @default <code><em>CKEDITOR.basePath</em> + 'plugins/smiley/images/'</code>
* @example
* config.smiley_path = 'http://www.example.com/images/smileys/';
* @example
* config.smiley_path = '/images/smileys/';
*/
/**
* The file names for the smileys to be displayed. These files must be
* contained inside the URL path defined with the
* {@link CKEDITOR.config.smiley_path} setting.
* @type Array
* @default (see example)
* @example
* // This is actually the default value.
* config.smiley_images = [
* 'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',
* 'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
* 'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',
* 'broken_heart.gif','kiss.gif','envelope.gif'];
*/
CKEDITOR.config.smiley_images = [
'regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif',
'embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif',
'devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif',
'broken_heart.gif','kiss.gif','envelope.gif'];
/**
* The description to be used for each of the smileys defined in the
* {@link CKEDITOR.config.smiley_images} setting. Each entry in this array list
* must match its relative pair in the {@link CKEDITOR.config.smiley_images}
* setting.
* @type Array
* @default The textual descriptions of smiley.
* @example
* // Default settings.
* config.smiley_descriptions =
* [
* 'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',
* 'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',
* 'yes', 'heart', 'broken heart', 'kiss', 'mail'
* ];
* @example
* // Use textual emoticons as description.
* config.smiley_descriptions =
* [
* ':)', ':(', ';)', ':D', ':/', ':P', ':*)', ':-o',
* ':|', '>:(', 'o:)', '8-)', '>:-)', ';(', '', '', '',
* '', '', ':-*', ''
* ];
*/
CKEDITOR.config.smiley_descriptions =
[
'smiley', 'sad', 'wink', 'laugh', 'frown', 'cheeky', 'blush', 'surprise',
'indecision', 'angry', 'angel', 'cool', 'devil', 'crying', 'enlightened', 'no',
'yes', 'heart', 'broken heart', 'kiss', 'mail'
];
/**
* The number of columns to be generated by the smilies matrix.
* @name CKEDITOR.config.smiley_columns
* @type Number
* @default 8
* @since 3.3.2
* @example
* config.smiley_columns = 6;
*/
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.dialog.add( 'smiley', function( editor )
{
var config = editor.config,
lang = editor.lang.smiley,
images = config.smiley_images,
columns = config.smiley_columns || 8,
i;
/**
* Simulate "this" of a dialog for non-dialog events.
* @type {CKEDITOR.dialog}
*/
var dialog;
var onClick = function( evt )
{
var target = evt.data.getTarget(),
targetName = target.getName();
if ( targetName == 'a' )
target = target.getChild( 0 );
else if ( targetName != 'img' )
return;
var src = target.getAttribute( 'cke_src' ),
title = target.getAttribute( 'title' );
var img = editor.document.createElement( 'img',
{
attributes :
{
src : src,
'data-cke-saved-src' : src,
title : title,
alt : title,
width : target.$.width,
height : target.$.height
}
});
editor.insertElement( img );
dialog.hide();
evt.data.preventDefault();
};
var onKeydown = CKEDITOR.tools.addFunction( function( ev, element )
{
ev = new CKEDITOR.dom.event( ev );
element = new CKEDITOR.dom.element( element );
var relative, nodeToMove;
var keystroke = ev.getKeystroke(),
rtl = editor.lang.dir == 'rtl';
switch ( keystroke )
{
// UP-ARROW
case 38 :
// relative is TR
if ( ( relative = element.getParent().getParent().getPrevious() ) )
{
nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] );
nodeToMove.focus();
}
ev.preventDefault();
break;
// DOWN-ARROW
case 40 :
// relative is TR
if ( ( relative = element.getParent().getParent().getNext() ) )
{
nodeToMove = relative.getChild( [element.getParent().getIndex(), 0] );
if ( nodeToMove )
nodeToMove.focus();
}
ev.preventDefault();
break;
// ENTER
// SPACE
case 32 :
onClick( { data: ev } );
ev.preventDefault();
break;
// RIGHT-ARROW
case rtl ? 37 : 39 :
// TAB
case 9 :
// relative is TD
if ( ( relative = element.getParent().getNext() ) )
{
nodeToMove = relative.getChild( 0 );
nodeToMove.focus();
ev.preventDefault(true);
}
// relative is TR
else if ( ( relative = element.getParent().getParent().getNext() ) )
{
nodeToMove = relative.getChild( [0, 0] );
if ( nodeToMove )
nodeToMove.focus();
ev.preventDefault(true);
}
break;
// LEFT-ARROW
case rtl ? 39 : 37 :
// SHIFT + TAB
case CKEDITOR.SHIFT + 9 :
// relative is TD
if ( ( relative = element.getParent().getPrevious() ) )
{
nodeToMove = relative.getChild( 0 );
nodeToMove.focus();
ev.preventDefault(true);
}
// relative is TR
else if ( ( relative = element.getParent().getParent().getPrevious() ) )
{
nodeToMove = relative.getLast().getChild( 0 );
nodeToMove.focus();
ev.preventDefault(true);
}
break;
default :
// Do not stop not handled events.
return;
}
});
// Build the HTML for the smiley images table.
var labelId = CKEDITOR.tools.getNextId() + '_smiley_emtions_label';
var html =
[
'<div>' +
'<span id="' + labelId + '" class="cke_voice_label">' + lang.options +'</span>',
'<table role="listbox" aria-labelledby="' + labelId + '" style="width:100%;height:100%" cellspacing="2" cellpadding="2"',
CKEDITOR.env.ie && CKEDITOR.env.quirks ? ' style="position:absolute;"' : '',
'><tbody>'
];
var size = images.length;
for ( i = 0 ; i < size ; i++ )
{
if ( i % columns === 0 )
html.push( '<tr>' );
var smileyLabelId = 'cke_smile_label_' + i + '_' + CKEDITOR.tools.getNextNumber();
html.push(
'<td class="cke_dark_background cke_centered" style="vertical-align: middle;">' +
'<a href="javascript:void(0)" role="option"',
' aria-posinset="' + ( i +1 ) + '"',
' aria-setsize="' + size + '"',
' aria-labelledby="' + smileyLabelId + '"',
' class="cke_smile cke_hand" tabindex="-1" onkeydown="CKEDITOR.tools.callFunction( ', onKeydown, ', event, this );">',
'<img class="cke_hand" title="', config.smiley_descriptions[i], '"' +
' cke_src="', CKEDITOR.tools.htmlEncode( config.smiley_path + images[ i ] ), '" alt="', config.smiley_descriptions[i], '"',
' src="', CKEDITOR.tools.htmlEncode( config.smiley_path + images[ i ] ), '"',
// IE BUG: Below is a workaround to an IE image loading bug to ensure the image sizes are correct.
( CKEDITOR.env.ie ? ' onload="this.setAttribute(\'width\', 2); this.removeAttribute(\'width\');" ' : '' ),
'>' +
'<span id="' + smileyLabelId + '" class="cke_voice_label">' +config.smiley_descriptions[ i ] + '</span>' +
'</a>',
'</td>' );
if ( i % columns == columns - 1 )
html.push( '</tr>' );
}
if ( i < columns - 1 )
{
for ( ; i < columns - 1 ; i++ )
html.push( '<td></td>' );
html.push( '</tr>' );
}
html.push( '</tbody></table></div>' );
var smileySelector =
{
type : 'html',
id : 'smileySelector',
html : html.join( '' ),
onLoad : function( event )
{
dialog = event.sender;
},
focus : function()
{
var self = this;
// IE need a while to move the focus (#6539).
setTimeout( function ()
{
var firstSmile = self.getElement().getElementsByTag( 'a' ).getItem( 0 );
firstSmile.focus();
}, 0 );
},
onClick : onClick,
style : 'width: 100%; border-collapse: separate;'
};
return {
title : editor.lang.smiley.title,
minWidth : 270,
minHeight : 120,
contents : [
{
id : 'tab1',
label : '',
title : '',
expand : true,
padding : 0,
elements : [
smileySelector
]
}
],
buttons : [ CKEDITOR.dialog.cancelButton ]
};
} );
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
var flashFilenameRegex = /\.swf(?:$|\?)/i;
function isFlashEmbed( element )
{
var attributes = element.attributes;
return ( attributes.type == 'application/x-shockwave-flash' || flashFilenameRegex.test( attributes.src || '' ) );
}
function createFakeElement( editor, realElement )
{
return editor.createFakeParserElement( realElement, 'cke_flash', 'flash', true );
}
CKEDITOR.plugins.add( 'flash',
{
init : function( editor )
{
editor.addCommand( 'flash', new CKEDITOR.dialogCommand( 'flash' ) );
editor.ui.addButton( 'Flash',
{
label : editor.lang.common.flash,
command : 'flash'
});
CKEDITOR.dialog.add( 'flash', this.path + 'dialogs/flash.js' );
editor.addCss(
'img.cke_flash' +
'{' +
'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/placeholder.png' ) + ');' +
'background-position: center center;' +
'background-repeat: no-repeat;' +
'border: 1px solid #a9a9a9;' +
'width: 80px;' +
'height: 80px;' +
'}'
);
// If the "menu" plugin is loaded, register the menu items.
if ( editor.addMenuItems )
{
editor.addMenuItems(
{
flash :
{
label : editor.lang.flash.properties,
command : 'flash',
group : 'flash'
}
});
}
editor.on( 'doubleclick', function( evt )
{
var element = evt.data.element;
if ( element.is( 'img' ) && element.data( 'cke-real-element-type' ) == 'flash' )
evt.data.dialog = 'flash';
});
// If the "contextmenu" plugin is loaded, register the listeners.
if ( editor.contextMenu )
{
editor.contextMenu.addListener( function( element, selection )
{
if ( element && element.is( 'img' ) && !element.isReadOnly()
&& element.data( 'cke-real-element-type' ) == 'flash' )
return { flash : CKEDITOR.TRISTATE_OFF };
});
}
},
afterInit : function( editor )
{
var dataProcessor = editor.dataProcessor,
dataFilter = dataProcessor && dataProcessor.dataFilter;
if ( dataFilter )
{
dataFilter.addRules(
{
elements :
{
'cke:object' : function( element )
{
var attributes = element.attributes,
classId = attributes.classid && String( attributes.classid ).toLowerCase();
if ( !classId && !isFlashEmbed( element ) )
{
// Look for the inner <embed>
for ( var i = 0 ; i < element.children.length ; i++ )
{
if ( element.children[ i ].name == 'cke:embed' )
{
if ( !isFlashEmbed( element.children[ i ] ) )
return null;
return createFakeElement( editor, element );
}
}
return null;
}
return createFakeElement( editor, element );
},
'cke:embed' : function( element )
{
if ( !isFlashEmbed( element ) )
return null;
return createFakeElement( editor, element );
}
}
},
5);
}
},
requires : [ 'fakeobjects' ]
});
})();
CKEDITOR.tools.extend( CKEDITOR.config,
{
/**
* Save as EMBED tag only. This tag is unrecommended.
* @type Boolean
* @default false
*/
flashEmbedTagOnly : false,
/**
* Add EMBED tag as alternative: <object><embed></embed></object>
* @type Boolean
* @default false
*/
flashAddEmbedTag : true,
/**
* Use embedTagOnly and addEmbedTag values on edit.
* @type Boolean
* @default false
*/
flashConvertOnEdit : false
} );
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
/*
* It is possible to set things in three different places.
* 1. As attributes in the object tag.
* 2. As param tags under the object tag.
* 3. As attributes in the embed tag.
* It is possible for a single attribute to be present in more than one place.
* So let's define a mapping between a sementic attribute and its syntactic
* equivalents.
* Then we'll set and retrieve attribute values according to the mapping,
* instead of having to check and set each syntactic attribute every time.
*
* Reference: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701
*/
var ATTRTYPE_OBJECT = 1,
ATTRTYPE_PARAM = 2,
ATTRTYPE_EMBED = 4;
var attributesMap =
{
id : [ { type : ATTRTYPE_OBJECT, name : 'id' } ],
classid : [ { type : ATTRTYPE_OBJECT, name : 'classid' } ],
codebase : [ { type : ATTRTYPE_OBJECT, name : 'codebase'} ],
pluginspage : [ { type : ATTRTYPE_EMBED, name : 'pluginspage' } ],
src : [ { type : ATTRTYPE_PARAM, name : 'movie' }, { type : ATTRTYPE_EMBED, name : 'src' }, { type : ATTRTYPE_OBJECT, name : 'data' } ],
name : [ { type : ATTRTYPE_EMBED, name : 'name' } ],
align : [ { type : ATTRTYPE_OBJECT, name : 'align' } ],
'class' : [ { type : ATTRTYPE_OBJECT, name : 'class' }, { type : ATTRTYPE_EMBED, name : 'class'} ],
width : [ { type : ATTRTYPE_OBJECT, name : 'width' }, { type : ATTRTYPE_EMBED, name : 'width' } ],
height : [ { type : ATTRTYPE_OBJECT, name : 'height' }, { type : ATTRTYPE_EMBED, name : 'height' } ],
hSpace : [ { type : ATTRTYPE_OBJECT, name : 'hSpace' }, { type : ATTRTYPE_EMBED, name : 'hSpace' } ],
vSpace : [ { type : ATTRTYPE_OBJECT, name : 'vSpace' }, { type : ATTRTYPE_EMBED, name : 'vSpace' } ],
style : [ { type : ATTRTYPE_OBJECT, name : 'style' }, { type : ATTRTYPE_EMBED, name : 'style' } ],
type : [ { type : ATTRTYPE_EMBED, name : 'type' } ]
};
var names = [ 'play', 'loop', 'menu', 'quality', 'scale', 'salign', 'wmode', 'bgcolor', 'base', 'flashvars', 'allowScriptAccess',
'allowFullScreen' ];
for ( var i = 0 ; i < names.length ; i++ )
attributesMap[ names[i] ] = [ { type : ATTRTYPE_EMBED, name : names[i] }, { type : ATTRTYPE_PARAM, name : names[i] } ];
names = [ 'allowFullScreen', 'play', 'loop', 'menu' ];
for ( i = 0 ; i < names.length ; i++ )
attributesMap[ names[i] ][0]['default'] = attributesMap[ names[i] ][1]['default'] = true;
var defaultToPixel = CKEDITOR.tools.cssLength;
function loadValue( objectNode, embedNode, paramMap )
{
var attributes = attributesMap[ this.id ];
if ( !attributes )
return;
var isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox );
for ( var i = 0 ; i < attributes.length ; i++ )
{
var attrDef = attributes[ i ];
switch ( attrDef.type )
{
case ATTRTYPE_OBJECT:
if ( !objectNode )
continue;
if ( objectNode.getAttribute( attrDef.name ) !== null )
{
var value = objectNode.getAttribute( attrDef.name );
if ( isCheckbox )
this.setValue( value.toLowerCase() == 'true' );
else
this.setValue( value );
return;
}
else if ( isCheckbox )
this.setValue( !!attrDef[ 'default' ] );
break;
case ATTRTYPE_PARAM:
if ( !objectNode )
continue;
if ( attrDef.name in paramMap )
{
value = paramMap[ attrDef.name ];
if ( isCheckbox )
this.setValue( value.toLowerCase() == 'true' );
else
this.setValue( value );
return;
}
else if ( isCheckbox )
this.setValue( !!attrDef[ 'default' ] );
break;
case ATTRTYPE_EMBED:
if ( !embedNode )
continue;
if ( embedNode.getAttribute( attrDef.name ) )
{
value = embedNode.getAttribute( attrDef.name );
if ( isCheckbox )
this.setValue( value.toLowerCase() == 'true' );
else
this.setValue( value );
return;
}
else if ( isCheckbox )
this.setValue( !!attrDef[ 'default' ] );
}
}
}
function commitValue( objectNode, embedNode, paramMap )
{
var attributes = attributesMap[ this.id ];
if ( !attributes )
return;
var isRemove = ( this.getValue() === '' ),
isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox );
for ( var i = 0 ; i < attributes.length ; i++ )
{
var attrDef = attributes[i];
switch ( attrDef.type )
{
case ATTRTYPE_OBJECT:
// Avoid applying the data attribute when not needed (#7733)
if ( !objectNode || ( attrDef.name == 'data' && embedNode && !objectNode.hasAttribute( 'data' ) ) )
continue;
var value = this.getValue();
if ( isRemove || isCheckbox && value === attrDef[ 'default' ] )
objectNode.removeAttribute( attrDef.name );
else
objectNode.setAttribute( attrDef.name, value );
break;
case ATTRTYPE_PARAM:
if ( !objectNode )
continue;
value = this.getValue();
if ( isRemove || isCheckbox && value === attrDef[ 'default' ] )
{
if ( attrDef.name in paramMap )
paramMap[ attrDef.name ].remove();
}
else
{
if ( attrDef.name in paramMap )
paramMap[ attrDef.name ].setAttribute( 'value', value );
else
{
var param = CKEDITOR.dom.element.createFromHtml( '<cke:param></cke:param>', objectNode.getDocument() );
param.setAttributes( { name : attrDef.name, value : value } );
if ( objectNode.getChildCount() < 1 )
param.appendTo( objectNode );
else
param.insertBefore( objectNode.getFirst() );
}
}
break;
case ATTRTYPE_EMBED:
if ( !embedNode )
continue;
value = this.getValue();
if ( isRemove || isCheckbox && value === attrDef[ 'default' ])
embedNode.removeAttribute( attrDef.name );
else
embedNode.setAttribute( attrDef.name, value );
}
}
}
CKEDITOR.dialog.add( 'flash', function( editor )
{
var makeObjectTag = !editor.config.flashEmbedTagOnly,
makeEmbedTag = editor.config.flashAddEmbedTag || editor.config.flashEmbedTagOnly;
var previewPreloader,
previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'<br>' +
'<div id="cke_FlashPreviewLoader' + CKEDITOR.tools.getNextNumber() + '" style="display:none"><div class="loading"> </div></div>' +
'<div id="cke_FlashPreviewBox' + CKEDITOR.tools.getNextNumber() + '" class="FlashPreviewBox"></div></div>';
return {
title : editor.lang.flash.title,
minWidth : 420,
minHeight : 310,
onShow : function()
{
// Clear previously saved elements.
this.fakeImage = this.objectNode = this.embedNode = null;
previewPreloader = new CKEDITOR.dom.element( 'embed', editor.document );
// Try to detect any embed or object tag that has Flash parameters.
var fakeImage = this.getSelectedElement();
if ( fakeImage && fakeImage.data( 'cke-real-element-type' ) && fakeImage.data( 'cke-real-element-type' ) == 'flash' )
{
this.fakeImage = fakeImage;
var realElement = editor.restoreRealElement( fakeImage ),
objectNode = null, embedNode = null, paramMap = {};
if ( realElement.getName() == 'cke:object' )
{
objectNode = realElement;
var embedList = objectNode.getElementsByTag( 'embed', 'cke' );
if ( embedList.count() > 0 )
embedNode = embedList.getItem( 0 );
var paramList = objectNode.getElementsByTag( 'param', 'cke' );
for ( var i = 0, length = paramList.count() ; i < length ; i++ )
{
var item = paramList.getItem( i ),
name = item.getAttribute( 'name' ),
value = item.getAttribute( 'value' );
paramMap[ name ] = value;
}
}
else if ( realElement.getName() == 'cke:embed' )
embedNode = realElement;
this.objectNode = objectNode;
this.embedNode = embedNode;
this.setupContent( objectNode, embedNode, paramMap, fakeImage );
}
},
onOk : function()
{
// If there's no selected object or embed, create one. Otherwise, reuse the
// selected object and embed nodes.
var objectNode = null,
embedNode = null,
paramMap = null;
if ( !this.fakeImage )
{
if ( makeObjectTag )
{
objectNode = CKEDITOR.dom.element.createFromHtml( '<cke:object></cke:object>', editor.document );
var attributes = {
classid : 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
codebase : 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'
};
objectNode.setAttributes( attributes );
}
if ( makeEmbedTag )
{
embedNode = CKEDITOR.dom.element.createFromHtml( '<cke:embed></cke:embed>', editor.document );
embedNode.setAttributes(
{
type : 'application/x-shockwave-flash',
pluginspage : 'http://www.macromedia.com/go/getflashplayer'
} );
if ( objectNode )
embedNode.appendTo( objectNode );
}
}
else
{
objectNode = this.objectNode;
embedNode = this.embedNode;
}
// Produce the paramMap if there's an object tag.
if ( objectNode )
{
paramMap = {};
var paramList = objectNode.getElementsByTag( 'param', 'cke' );
for ( var i = 0, length = paramList.count() ; i < length ; i++ )
paramMap[ paramList.getItem( i ).getAttribute( 'name' ) ] = paramList.getItem( i );
}
// A subset of the specified attributes/styles
// should also be applied on the fake element to
// have better visual effect. (#5240)
var extraStyles = {}, extraAttributes = {};
this.commitContent( objectNode, embedNode, paramMap, extraStyles, extraAttributes );
// Refresh the fake image.
var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true );
newFakeImage.setAttributes( extraAttributes );
newFakeImage.setStyles( extraStyles );
if ( this.fakeImage )
{
newFakeImage.replace( this.fakeImage );
editor.getSelection().selectElement( newFakeImage );
}
else
editor.insertElement( newFakeImage );
},
onHide : function()
{
if ( this.preview )
this.preview.setHtml('');
},
contents : [
{
id : 'info',
label : editor.lang.common.generalTab,
accessKey : 'I',
elements :
[
{
type : 'vbox',
padding : 0,
children :
[
{
type : 'hbox',
widths : [ '280px', '110px' ],
align : 'right',
children :
[
{
id : 'src',
type : 'text',
label : editor.lang.common.url,
required : true,
validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.flash.validateSrc ),
setup : loadValue,
commit : commitValue,
onLoad : function()
{
var dialog = this.getDialog(),
updatePreview = function( src ){
// Query the preloader to figure out the url impacted by based href.
previewPreloader.setAttribute( 'src', src );
dialog.preview.setHtml( '<embed height="100%" width="100%" src="'
+ CKEDITOR.tools.htmlEncode( previewPreloader.getAttribute( 'src' ) )
+ '" type="application/x-shockwave-flash"></embed>' );
};
// Preview element
dialog.preview = dialog.getContentElement( 'info', 'preview' ).getElement().getChild( 3 );
// Sync on inital value loaded.
this.on( 'change', function( evt ){
if ( evt.data && evt.data.value )
updatePreview( evt.data.value );
} );
// Sync when input value changed.
this.getInputElement().on( 'change', function( evt ){
updatePreview( this.getValue() );
}, this );
}
},
{
type : 'button',
id : 'browse',
filebrowser : 'info:src',
hidden : true,
// v-align with the 'src' field.
// TODO: We need something better than a fixed size here.
style : 'display:inline-block;margin-top:10px;',
label : editor.lang.common.browseServer
}
]
}
]
},
{
type : 'hbox',
widths : [ '25%', '25%', '25%', '25%', '25%' ],
children :
[
{
type : 'text',
id : 'width',
style : 'width:95px',
label : editor.lang.common.width,
validate : CKEDITOR.dialog.validate.htmlLength( editor.lang.common.invalidHtmlLength.replace( '%1', editor.lang.common.width ) ),
setup : loadValue,
commit : commitValue
},
{
type : 'text',
id : 'height',
style : 'width:95px',
label : editor.lang.common.height,
validate : CKEDITOR.dialog.validate.htmlLength( editor.lang.common.invalidHtmlLength.replace( '%1', editor.lang.common.height ) ),
setup : loadValue,
commit : commitValue
},
{
type : 'text',
id : 'hSpace',
style : 'width:95px',
label : editor.lang.flash.hSpace,
validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateHSpace ),
setup : loadValue,
commit : commitValue
},
{
type : 'text',
id : 'vSpace',
style : 'width:95px',
label : editor.lang.flash.vSpace,
validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateVSpace ),
setup : loadValue,
commit : commitValue
}
]
},
{
type : 'vbox',
children :
[
{
type : 'html',
id : 'preview',
style : 'width:95%;',
html : previewAreaHtml
}
]
}
]
},
{
id : 'Upload',
hidden : true,
filebrowser : 'uploadButton',
label : editor.lang.common.upload,
elements :
[
{
type : 'file',
id : 'upload',
label : editor.lang.common.upload,
size : 38
},
{
type : 'fileButton',
id : 'uploadButton',
label : editor.lang.common.uploadSubmit,
filebrowser : 'info:src',
'for' : [ 'Upload', 'upload' ]
}
]
},
{
id : 'properties',
label : editor.lang.flash.propertiesTab,
elements :
[
{
type : 'hbox',
widths : [ '50%', '50%' ],
children :
[
{
id : 'scale',
type : 'select',
label : editor.lang.flash.scale,
'default' : '',
style : 'width : 100%;',
items :
[
[ editor.lang.common.notSet , ''],
[ editor.lang.flash.scaleAll, 'showall' ],
[ editor.lang.flash.scaleNoBorder, 'noborder' ],
[ editor.lang.flash.scaleFit, 'exactfit' ]
],
setup : loadValue,
commit : commitValue
},
{
id : 'allowScriptAccess',
type : 'select',
label : editor.lang.flash.access,
'default' : '',
style : 'width : 100%;',
items :
[
[ editor.lang.common.notSet , ''],
[ editor.lang.flash.accessAlways, 'always' ],
[ editor.lang.flash.accessSameDomain, 'samedomain' ],
[ editor.lang.flash.accessNever, 'never' ]
],
setup : loadValue,
commit : commitValue
}
]
},
{
type : 'hbox',
widths : [ '50%', '50%' ],
children :
[
{
id : 'wmode',
type : 'select',
label : editor.lang.flash.windowMode,
'default' : '',
style : 'width : 100%;',
items :
[
[ editor.lang.common.notSet , '' ],
[ editor.lang.flash.windowModeWindow, 'window' ],
[ editor.lang.flash.windowModeOpaque, 'opaque' ],
[ editor.lang.flash.windowModeTransparent, 'transparent' ]
],
setup : loadValue,
commit : commitValue
},
{
id : 'quality',
type : 'select',
label : editor.lang.flash.quality,
'default' : 'high',
style : 'width : 100%;',
items :
[
[ editor.lang.common.notSet , '' ],
[ editor.lang.flash.qualityBest, 'best' ],
[ editor.lang.flash.qualityHigh, 'high' ],
[ editor.lang.flash.qualityAutoHigh, 'autohigh' ],
[ editor.lang.flash.qualityMedium, 'medium' ],
[ editor.lang.flash.qualityAutoLow, 'autolow' ],
[ editor.lang.flash.qualityLow, 'low' ]
],
setup : loadValue,
commit : commitValue
}
]
},
{
type : 'hbox',
widths : [ '50%', '50%' ],
children :
[
{
id : 'align',
type : 'select',
label : editor.lang.common.align,
'default' : '',
style : 'width : 100%;',
items :
[
[ editor.lang.common.notSet , ''],
[ editor.lang.common.alignLeft , 'left'],
[ editor.lang.flash.alignAbsBottom , 'absBottom'],
[ editor.lang.flash.alignAbsMiddle , 'absMiddle'],
[ editor.lang.flash.alignBaseline , 'baseline'],
[ editor.lang.common.alignBottom , 'bottom'],
[ editor.lang.common.alignMiddle , 'middle'],
[ editor.lang.common.alignRight , 'right'],
[ editor.lang.flash.alignTextTop , 'textTop'],
[ editor.lang.common.alignTop , 'top']
],
setup : loadValue,
commit : function( objectNode, embedNode, paramMap, extraStyles, extraAttributes )
{
var value = this.getValue();
commitValue.apply( this, arguments );
value && ( extraAttributes.align = value );
}
},
{
type : 'html',
html : '<div></div>'
}
]
},
{
type : 'fieldset',
label : CKEDITOR.tools.htmlEncode( editor.lang.flash.flashvars ),
children :
[
{
type : 'vbox',
padding : 0,
children :
[
{
type : 'checkbox',
id : 'menu',
label : editor.lang.flash.chkMenu,
'default' : true,
setup : loadValue,
commit : commitValue
},
{
type : 'checkbox',
id : 'play',
label : editor.lang.flash.chkPlay,
'default' : true,
setup : loadValue,
commit : commitValue
},
{
type : 'checkbox',
id : 'loop',
label : editor.lang.flash.chkLoop,
'default' : true,
setup : loadValue,
commit : commitValue
},
{
type : 'checkbox',
id : 'allowFullScreen',
label : editor.lang.flash.chkFull,
'default' : true,
setup : loadValue,
commit : commitValue
}
]
}
]
}
]
},
{
id : 'advanced',
label : editor.lang.common.advancedTab,
elements :
[
{
type : 'hbox',
children :
[
{
type : 'text',
id : 'id',
label : editor.lang.common.id,
setup : loadValue,
commit : commitValue
}
]
},
{
type : 'hbox',
widths : [ '45%', '55%' ],
children :
[
{
type : 'text',
id : 'bgcolor',
label : editor.lang.flash.bgcolor,
setup : loadValue,
commit : commitValue
},
{
type : 'text',
id : 'class',
label : editor.lang.common.cssClass,
setup : loadValue,
commit : commitValue
}
]
},
{
type : 'text',
id : 'style',
validate : CKEDITOR.dialog.validate.inlineStyle( editor.lang.common.invalidInlineStyle ),
label : editor.lang.common.cssStyle,
setup : loadValue,
commit : commitValue
}
]
}
]
};
} );
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.stylesSet.add( 'default',
[
/* Block Styles */
// These styles are already available in the "Format" combo, so they are
// not needed here by default. You may enable them to avoid placing the
// "Format" combo in the toolbar, maintaining the same features.
/*
{ name : 'Paragraph' , element : 'p' },
{ name : 'Heading 1' , element : 'h1' },
{ name : 'Heading 2' , element : 'h2' },
{ name : 'Heading 3' , element : 'h3' },
{ name : 'Heading 4' , element : 'h4' },
{ name : 'Heading 5' , element : 'h5' },
{ name : 'Heading 6' , element : 'h6' },
{ name : 'Preformatted Text', element : 'pre' },
{ name : 'Address' , element : 'address' },
*/
{ name : 'Blue Title' , element : 'h3', styles : { 'color' : 'Blue' } },
{ name : 'Red Title' , element : 'h3', styles : { 'color' : 'Red' } },
/* Inline Styles */
// These are core styles available as toolbar buttons. You may opt enabling
// some of them in the Styles combo, removing them from the toolbar.
/*
{ name : 'Strong' , element : 'strong', overrides : 'b' },
{ name : 'Emphasis' , element : 'em' , overrides : 'i' },
{ name : 'Underline' , element : 'u' },
{ name : 'Strikethrough' , element : 'strike' },
{ name : 'Subscript' , element : 'sub' },
{ name : 'Superscript' , element : 'sup' },
*/
{ name : 'Marker: Yellow' , element : 'span', styles : { 'background-color' : 'Yellow' } },
{ name : 'Marker: Green' , element : 'span', styles : { 'background-color' : 'Lime' } },
{ name : 'Big' , element : 'big' },
{ name : 'Small' , element : 'small' },
{ name : 'Typewriter' , element : 'tt' },
{ name : 'Computer Code' , element : 'code' },
{ name : 'Keyboard Phrase' , element : 'kbd' },
{ name : 'Sample Text' , element : 'samp' },
{ name : 'Variable' , element : 'var' },
{ name : 'Deleted Text' , element : 'del' },
{ name : 'Inserted Text' , element : 'ins' },
{ name : 'Cited Work' , element : 'cite' },
{ name : 'Inline Quotation' , element : 'q' },
{ name : 'Language: RTL' , element : 'span', attributes : { 'dir' : 'rtl' } },
{ name : 'Language: LTR' , element : 'span', attributes : { 'dir' : 'ltr' } },
/* Object Styles */
{
name : 'Image on Left',
element : 'img',
attributes :
{
'style' : 'padding: 5px; margin-right: 5px',
'border' : '2',
'align' : 'left'
}
},
{
name : 'Image on Right',
element : 'img',
attributes :
{
'style' : 'padding: 5px; margin-left: 5px',
'border' : '2',
'align' : 'right'
}
},
{ name : 'Borderless Table', element : 'table', styles: { 'border-style': 'hidden', 'background-color' : '#E6E6FA' } },
{ name : 'Square Bulleted List', element : 'ul', styles : { 'list-style-type' : 'square' } }
]);
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'styles',
{
requires : [ 'selection' ],
init : function( editor )
{
// This doesn't look like correct, but it's the safest way to proper
// pass the disableReadonlyStyling configuration to the style system
// without having to change any method signature in the API. (#6103)
editor.on( 'contentDom', function()
{
editor.document.setCustomData( 'cke_includeReadonly', !editor.config.disableReadonlyStyling );
});
}
});
/**
* Registers a function to be called whenever the selection position changes in the
* editing area. The current state is passed to the function. The possible
* states are {@link CKEDITOR.TRISTATE_ON} and {@link CKEDITOR.TRISTATE_OFF}.
* @param {CKEDITOR.style} style The style to be watched.
* @param {Function} callback The function to be called.
* @example
* // Create a style object for the <b> element.
* var style = new CKEDITOR.style( { element : 'b' } );
* var editor = CKEDITOR.instances.editor1;
* editor.attachStyleStateChange( style, function( state )
* {
* if ( state == CKEDITOR.TRISTATE_ON )
* alert( 'The current state for the B element is ON' );
* else
* alert( 'The current state for the B element is OFF' );
* });
*/
CKEDITOR.editor.prototype.attachStyleStateChange = function( style, callback )
{
// Try to get the list of attached callbacks.
var styleStateChangeCallbacks = this._.styleStateChangeCallbacks;
// If it doesn't exist, it means this is the first call. So, let's create
// all the structure to manage the style checks and the callback calls.
if ( !styleStateChangeCallbacks )
{
// Create the callbacks array.
styleStateChangeCallbacks = this._.styleStateChangeCallbacks = [];
// Attach to the selectionChange event, so we can check the styles at
// that point.
this.on( 'selectionChange', function( ev )
{
// Loop throw all registered callbacks.
for ( var i = 0 ; i < styleStateChangeCallbacks.length ; i++ )
{
var callback = styleStateChangeCallbacks[ i ];
// Check the current state for the style defined for that
// callback.
var currentState = callback.style.checkActive( ev.data.path ) ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF;
// Call the callback function, passing the current
// state to it.
callback.fn.call( this, currentState );
}
});
}
// Save the callback info, so it can be checked on the next occurrence of
// selectionChange.
styleStateChangeCallbacks.push( { style : style, fn : callback } );
};
CKEDITOR.STYLE_BLOCK = 1;
CKEDITOR.STYLE_INLINE = 2;
CKEDITOR.STYLE_OBJECT = 3;
(function()
{
var blockElements = { address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,details:1,datagrid:1,datalist:1 },
objectElements = { a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1,audio:1,video:1 };
var semicolonFixRegex = /\s*(?:;\s*|$)/,
varRegex = /#\((.+?)\)/g;
var notBookmark = CKEDITOR.dom.walker.bookmark( 0, 1 ),
nonWhitespaces = CKEDITOR.dom.walker.whitespaces( 1 );
CKEDITOR.style = function( styleDefinition, variablesValues )
{
if ( variablesValues )
{
styleDefinition = CKEDITOR.tools.clone( styleDefinition );
replaceVariables( styleDefinition.attributes, variablesValues );
replaceVariables( styleDefinition.styles, variablesValues );
}
var element = this.element = styleDefinition.element ?
( typeof styleDefinition.element == 'string' ? styleDefinition.element.toLowerCase() : styleDefinition.element )
: '*';
this.type =
blockElements[ element ] ?
CKEDITOR.STYLE_BLOCK
: objectElements[ element ] ?
CKEDITOR.STYLE_OBJECT
:
CKEDITOR.STYLE_INLINE;
// If the 'element' property is an object with a set of possible element, it will be applied like an object style: only to existing elements
if ( typeof this.element == 'object' )
this.type = CKEDITOR.STYLE_OBJECT;
this._ =
{
definition : styleDefinition
};
};
CKEDITOR.style.prototype =
{
apply : function( document )
{
applyStyle.call( this, document, false );
},
remove : function( document )
{
applyStyle.call( this, document, true );
},
applyToRange : function( range )
{
return ( this.applyToRange =
this.type == CKEDITOR.STYLE_INLINE ?
applyInlineStyle
: this.type == CKEDITOR.STYLE_BLOCK ?
applyBlockStyle
: this.type == CKEDITOR.STYLE_OBJECT ?
applyObjectStyle
: null ).call( this, range );
},
removeFromRange : function( range )
{
return ( this.removeFromRange =
this.type == CKEDITOR.STYLE_INLINE ?
removeInlineStyle
: this.type == CKEDITOR.STYLE_BLOCK ?
removeBlockStyle
: this.type == CKEDITOR.STYLE_OBJECT ?
removeObjectStyle
: null ).call( this, range );
},
applyToObject : function( element )
{
setupElement( element, this );
},
/**
* Get the style state inside an element path. Returns "true" if the
* element is active in the path.
*/
checkActive : function( elementPath )
{
switch ( this.type )
{
case CKEDITOR.STYLE_BLOCK :
return this.checkElementRemovable( elementPath.block || elementPath.blockLimit, true );
case CKEDITOR.STYLE_OBJECT :
case CKEDITOR.STYLE_INLINE :
var elements = elementPath.elements;
for ( var i = 0, element ; i < elements.length ; i++ )
{
element = elements[ i ];
if ( this.type == CKEDITOR.STYLE_INLINE
&& ( element == elementPath.block || element == elementPath.blockLimit ) )
continue;
if( this.type == CKEDITOR.STYLE_OBJECT )
{
var name = element.getName();
if ( !( typeof this.element == 'string' ? name == this.element : name in this.element ) )
continue;
}
if ( this.checkElementRemovable( element, true ) )
return true;
}
}
return false;
},
/**
* Whether this style can be applied at the element path.
* @param elementPath
*/
checkApplicable : function( elementPath )
{
switch ( this.type )
{
case CKEDITOR.STYLE_INLINE :
case CKEDITOR.STYLE_BLOCK :
break;
case CKEDITOR.STYLE_OBJECT :
return elementPath.lastElement.getAscendant( this.element, true );
}
return true;
},
// Check if the element matches the current style definition.
checkElementMatch : function( element, fullMatch )
{
var def = this._.definition;
if ( !element || !def.ignoreReadonly && element.isReadOnly() )
return false;
var attribs,
name = element.getName();
// If the element name is the same as the style name.
if ( typeof this.element == 'string' ? name == this.element : name in this.element )
{
// If no attributes are defined in the element.
if ( !fullMatch && !element.hasAttributes() )
return true;
attribs = getAttributesForComparison( def );
if ( attribs._length )
{
for ( var attName in attribs )
{
if ( attName == '_length' )
continue;
var elementAttr = element.getAttribute( attName ) || '';
// Special treatment for 'style' attribute is required.
if ( attName == 'style' ?
compareCssText( attribs[ attName ], normalizeCssText( elementAttr, false ) )
: attribs[ attName ] == elementAttr )
{
if ( !fullMatch )
return true;
}
else if ( fullMatch )
return false;
}
if ( fullMatch )
return true;
}
else
return true;
}
return false;
},
// Checks if an element, or any of its attributes, is removable by the
// current style definition.
checkElementRemovable : function( element, fullMatch )
{
// Check element matches the style itself.
if ( this.checkElementMatch( element, fullMatch ) )
return true;
// Check if the element matches the style overrides.
var override = getOverrides( this )[ element.getName() ] ;
if ( override )
{
var attribs, attName;
// If no attributes have been defined, remove the element.
if ( !( attribs = override.attributes ) )
return true;
for ( var i = 0 ; i < attribs.length ; i++ )
{
attName = attribs[i][0];
var actualAttrValue = element.getAttribute( attName );
if ( actualAttrValue )
{
var attValue = attribs[i][1];
// Remove the attribute if:
// - The override definition value is null;
// - The override definition value is a string that
// matches the attribute value exactly.
// - The override definition value is a regex that
// has matches in the attribute value.
if ( attValue === null ||
( typeof attValue == 'string' && actualAttrValue == attValue ) ||
attValue.test( actualAttrValue ) )
return true;
}
}
}
return false;
},
// Builds the preview HTML based on the styles definition.
buildPreview : function( label )
{
var styleDefinition = this._.definition,
html = [],
elementName = styleDefinition.element;
// Avoid <bdo> in the preview.
if ( elementName == 'bdo' )
elementName = 'span';
html = [ '<', elementName ];
// Assign all defined attributes.
var attribs = styleDefinition.attributes;
if ( attribs )
{
for ( var att in attribs )
{
html.push( ' ', att, '="', attribs[ att ], '"' );
}
}
// Assign the style attribute.
var cssStyle = CKEDITOR.style.getStyleText( styleDefinition );
if ( cssStyle )
html.push( ' style="', cssStyle, '"' );
html.push( '>', ( label || styleDefinition.name ), '</', elementName, '>' );
return html.join( '' );
}
};
// Build the cssText based on the styles definition.
CKEDITOR.style.getStyleText = function( styleDefinition )
{
// If we have already computed it, just return it.
var stylesDef = styleDefinition._ST;
if ( stylesDef )
return stylesDef;
stylesDef = styleDefinition.styles;
// Builds the StyleText.
var stylesText = ( styleDefinition.attributes && styleDefinition.attributes[ 'style' ] ) || '',
specialStylesText = '';
if ( stylesText.length )
stylesText = stylesText.replace( semicolonFixRegex, ';' );
for ( var style in stylesDef )
{
var styleVal = stylesDef[ style ],
text = ( style + ':' + styleVal ).replace( semicolonFixRegex, ';' );
// Some browsers don't support 'inherit' property value, leave them intact. (#5242)
if ( styleVal == 'inherit' )
specialStylesText += text;
else
stylesText += text;
}
// Browsers make some changes to the style when applying them. So, here
// we normalize it to the browser format.
if ( stylesText.length )
stylesText = normalizeCssText( stylesText );
stylesText += specialStylesText;
// Return it, saving it to the next request.
return ( styleDefinition._ST = stylesText );
};
// Gets the parent element which blocks the styling for an element. This
// can be done through read-only elements (contenteditable=false) or
// elements with the "data-nostyle" attribute.
function getUnstylableParent( element )
{
var unstylable,
editable;
while ( ( element = element.getParent() ) )
{
if ( element.getName() == 'body' )
break;
if ( element.getAttribute( 'data-nostyle' ) )
unstylable = element;
else if ( !editable )
{
var contentEditable = element.getAttribute( 'contentEditable' );
if ( contentEditable == 'false' )
unstylable = element;
else if ( contentEditable == 'true' )
editable = 1;
}
}
return unstylable;
}
function applyInlineStyle( range )
{
var document = range.document;
if ( range.collapsed )
{
// Create the element to be inserted in the DOM.
var collapsedElement = getElement( this, document );
// Insert the empty element into the DOM at the range position.
range.insertNode( collapsedElement );
// Place the selection right inside the empty element.
range.moveToPosition( collapsedElement, CKEDITOR.POSITION_BEFORE_END );
return;
}
var elementName = this.element;
var def = this._.definition;
var isUnknownElement;
// Indicates that fully selected read-only elements are to be included in the styling range.
var ignoreReadonly = def.ignoreReadonly,
includeReadonly = ignoreReadonly || def.includeReadonly;
// If the read-only inclusion is not available in the definition, try
// to get it from the document data.
if ( includeReadonly == undefined )
includeReadonly = document.getCustomData( 'cke_includeReadonly' );
// Get the DTD definition for the element. Defaults to "span".
var dtd = CKEDITOR.dtd[ elementName ] || ( isUnknownElement = true, CKEDITOR.dtd.span );
// Expand the range.
range.enlarge( CKEDITOR.ENLARGE_ELEMENT, 1 );
range.trim();
// Get the first node to be processed and the last, which concludes the
// processing.
var boundaryNodes = range.createBookmark(),
firstNode = boundaryNodes.startNode,
lastNode = boundaryNodes.endNode;
var currentNode = firstNode;
var styleRange;
if ( !ignoreReadonly )
{
// Check if the boundaries are inside non stylable elements.
var firstUnstylable = getUnstylableParent( firstNode ),
lastUnstylable = getUnstylableParent( lastNode );
// If the first element can't be styled, we'll start processing right
// after its unstylable root.
if ( firstUnstylable )
currentNode = firstUnstylable.getNextSourceNode( true );
// If the last element can't be styled, we'll stop processing on its
// unstylable root.
if ( lastUnstylable )
lastNode = lastUnstylable;
}
// Do nothing if the current node now follows the last node to be processed.
if ( currentNode.getPosition( lastNode ) == CKEDITOR.POSITION_FOLLOWING )
currentNode = 0;
while ( currentNode )
{
var applyStyle = false;
if ( currentNode.equals( lastNode ) )
{
currentNode = null;
applyStyle = true;
}
else
{
var nodeType = currentNode.type;
var nodeName = nodeType == CKEDITOR.NODE_ELEMENT ? currentNode.getName() : null;
var nodeIsReadonly = nodeName && ( currentNode.getAttribute( 'contentEditable' ) == 'false' );
var nodeIsNoStyle = nodeName && currentNode.getAttribute( 'data-nostyle' );
if ( nodeName && currentNode.data( 'cke-bookmark' ) )
{
currentNode = currentNode.getNextSourceNode( true );
continue;
}
// Check if the current node can be a child of the style element.
if ( !nodeName || ( dtd[ nodeName ]
&& !nodeIsNoStyle
&& ( !nodeIsReadonly || includeReadonly )
&& ( currentNode.getPosition( lastNode ) | CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
&& ( !def.childRule || def.childRule( currentNode ) ) ) )
{
var currentParent = currentNode.getParent();
// Check if the style element can be a child of the current
// node parent or if the element is not defined in the DTD.
if ( currentParent
&& ( ( currentParent.getDtd() || CKEDITOR.dtd.span )[ elementName ] || isUnknownElement )
&& ( !def.parentRule || def.parentRule( currentParent ) ) )
{
// This node will be part of our range, so if it has not
// been started, place its start right before the node.
// In the case of an element node, it will be included
// only if it is entirely inside the range.
if ( !styleRange && ( !nodeName || !CKEDITOR.dtd.$removeEmpty[ nodeName ] || ( currentNode.getPosition( lastNode ) | CKEDITOR.POSITION_PRECEDING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_PRECEDING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED ) ) )
{
styleRange = new CKEDITOR.dom.range( document );
styleRange.setStartBefore( currentNode );
}
// Non element nodes, readonly elements, or empty
// elements can be added completely to the range.
if ( nodeType == CKEDITOR.NODE_TEXT || nodeIsReadonly || ( nodeType == CKEDITOR.NODE_ELEMENT && !currentNode.getChildCount() ) )
{
var includedNode = currentNode;
var parentNode;
// This node is about to be included completelly, but,
// if this is the last node in its parent, we must also
// check if the parent itself can be added completelly
// to the range, otherwise apply the style immediately.
while ( ( applyStyle = !includedNode.getNext( notBookmark ) )
&& ( parentNode = includedNode.getParent(), dtd[ parentNode.getName() ] )
&& ( parentNode.getPosition( firstNode ) | CKEDITOR.POSITION_FOLLOWING | CKEDITOR.POSITION_IDENTICAL | CKEDITOR.POSITION_IS_CONTAINED ) == ( CKEDITOR.POSITION_FOLLOWING + CKEDITOR.POSITION_IDENTICAL + CKEDITOR.POSITION_IS_CONTAINED )
&& ( !def.childRule || def.childRule( parentNode ) ) )
{
includedNode = parentNode;
}
styleRange.setEndAfter( includedNode );
}
}
else
applyStyle = true;
}
else
applyStyle = true;
// Get the next node to be processed.
currentNode = currentNode.getNextSourceNode( nodeIsNoStyle || nodeIsReadonly );
}
// Apply the style if we have something to which apply it.
if ( applyStyle && styleRange && !styleRange.collapsed )
{
// Build the style element, based on the style object definition.
var styleNode = getElement( this, document ),
styleHasAttrs = styleNode.hasAttributes();
// Get the element that holds the entire range.
var parent = styleRange.getCommonAncestor();
var removeList = {
styles : {},
attrs : {},
// Styles cannot be removed.
blockedStyles : {},
// Attrs cannot be removed.
blockedAttrs : {}
};
var attName, styleName, value;
// Loop through the parents, removing the redundant attributes
// from the element to be applied.
while ( styleNode && parent )
{
if ( parent.getName() == elementName )
{
for ( attName in def.attributes )
{
if ( removeList.blockedAttrs[ attName ] || !( value = parent.getAttribute( styleName ) ) )
continue;
if ( styleNode.getAttribute( attName ) == value )
removeList.attrs[ attName ] = 1;
else
removeList.blockedAttrs[ attName ] = 1;
}
for ( styleName in def.styles )
{
if ( removeList.blockedStyles[ styleName ] || !( value = parent.getStyle( styleName ) ) )
continue;
if ( styleNode.getStyle( styleName ) == value )
removeList.styles[ styleName ] = 1;
else
removeList.blockedStyles[ styleName ] = 1;
}
}
parent = parent.getParent();
}
for ( attName in removeList.attrs )
styleNode.removeAttribute( attName );
for ( styleName in removeList.styles )
styleNode.removeStyle( styleName );
if ( styleHasAttrs && !styleNode.hasAttributes() )
styleNode = null;
if ( styleNode )
{
// Move the contents of the range to the style element.
styleRange.extractContents().appendTo( styleNode );
// Here we do some cleanup, removing all duplicated
// elements from the style element.
removeFromInsideElement( this, styleNode );
// Insert it into the range position (it is collapsed after
// extractContents.
styleRange.insertNode( styleNode );
// Let's merge our new style with its neighbors, if possible.
styleNode.mergeSiblings();
// As the style system breaks text nodes constantly, let's normalize
// things for performance.
// With IE, some paragraphs get broken when calling normalize()
// repeatedly. Also, for IE, we must normalize body, not documentElement.
// IE is also known for having a "crash effect" with normalize().
// We should try to normalize with IE too in some way, somewhere.
if ( !CKEDITOR.env.ie )
styleNode.$.normalize();
}
// Style already inherit from parents, left just to clear up any internal overrides. (#5931)
else
{
styleNode = new CKEDITOR.dom.element( 'span' );
styleRange.extractContents().appendTo( styleNode );
styleRange.insertNode( styleNode );
removeFromInsideElement( this, styleNode );
styleNode.remove( true );
}
// Style applied, let's release the range, so it gets
// re-initialization in the next loop.
styleRange = null;
}
}
// Remove the bookmark nodes.
range.moveToBookmark( boundaryNodes );
// Minimize the result range to exclude empty text nodes. (#5374)
range.shrink( CKEDITOR.SHRINK_TEXT );
}
function removeInlineStyle( range )
{
/*
* Make sure our range has included all "collpased" parent inline nodes so
* that our operation logic can be simpler.
*/
range.enlarge( CKEDITOR.ENLARGE_ELEMENT, 1 );
var bookmark = range.createBookmark(),
startNode = bookmark.startNode;
if ( range.collapsed )
{
var startPath = new CKEDITOR.dom.elementPath( startNode.getParent() ),
// The topmost element in elementspatch which we should jump out of.
boundaryElement;
for ( var i = 0, element ; i < startPath.elements.length
&& ( element = startPath.elements[i] ) ; i++ )
{
/*
* 1. If it's collaped inside text nodes, try to remove the style from the whole element.
*
* 2. Otherwise if it's collapsed on element boundaries, moving the selection
* outside the styles instead of removing the whole tag,
* also make sure other inner styles were well preserverd.(#3309)
*/
if ( element == startPath.block || element == startPath.blockLimit )
break;
if ( this.checkElementRemovable( element ) )
{
var isStart;
if ( range.collapsed && (
range.checkBoundaryOfElement( element, CKEDITOR.END ) ||
( isStart = range.checkBoundaryOfElement( element, CKEDITOR.START ) ) ) )
{
boundaryElement = element;
boundaryElement.match = isStart ? 'start' : 'end';
}
else
{
/*
* Before removing the style node, there may be a sibling to the style node
* that's exactly the same to the one to be removed. To the user, it makes
* no difference that they're separate entities in the DOM tree. So, merge
* them before removal.
*/
element.mergeSiblings();
if ( element.getName() == this.element )
removeFromElement( this, element );
else
removeOverrides( element, getOverrides( this )[ element.getName() ] );
}
}
}
// Re-create the style tree after/before the boundary element,
// the replication start from bookmark start node to define the
// new range.
if ( boundaryElement )
{
var clonedElement = startNode;
for ( i = 0 ;; i++ )
{
var newElement = startPath.elements[ i ];
if ( newElement.equals( boundaryElement ) )
break;
// Avoid copying any matched element.
else if ( newElement.match )
continue;
else
newElement = newElement.clone();
newElement.append( clonedElement );
clonedElement = newElement;
}
clonedElement[ boundaryElement.match == 'start' ?
'insertBefore' : 'insertAfter' ]( boundaryElement );
}
}
else
{
/*
* Now our range isn't collapsed. Lets walk from the start node to the end
* node via DFS and remove the styles one-by-one.
*/
var endNode = bookmark.endNode,
me = this;
/*
* Find out the style ancestor that needs to be broken down at startNode
* and endNode.
*/
function breakNodes()
{
var startPath = new CKEDITOR.dom.elementPath( startNode.getParent() ),
endPath = new CKEDITOR.dom.elementPath( endNode.getParent() ),
breakStart = null,
breakEnd = null;
for ( var i = 0 ; i < startPath.elements.length ; i++ )
{
var element = startPath.elements[ i ];
if ( element == startPath.block || element == startPath.blockLimit )
break;
if ( me.checkElementRemovable( element ) )
breakStart = element;
}
for ( i = 0 ; i < endPath.elements.length ; i++ )
{
element = endPath.elements[ i ];
if ( element == endPath.block || element == endPath.blockLimit )
break;
if ( me.checkElementRemovable( element ) )
breakEnd = element;
}
if ( breakEnd )
endNode.breakParent( breakEnd );
if ( breakStart )
startNode.breakParent( breakStart );
}
breakNodes();
// Now, do the DFS walk.
var currentNode = startNode;
while ( !currentNode.equals( endNode ) )
{
/*
* Need to get the next node first because removeFromElement() can remove
* the current node from DOM tree.
*/
var nextNode = currentNode.getNextSourceNode();
if ( currentNode.type == CKEDITOR.NODE_ELEMENT && this.checkElementRemovable( currentNode ) )
{
// Remove style from element or overriding element.
if ( currentNode.getName() == this.element )
removeFromElement( this, currentNode );
else
removeOverrides( currentNode, getOverrides( this )[ currentNode.getName() ] );
/*
* removeFromElement() may have merged the next node with something before
* the startNode via mergeSiblings(). In that case, the nextNode would
* contain startNode and we'll have to call breakNodes() again and also
* reassign the nextNode to something after startNode.
*/
if ( nextNode.type == CKEDITOR.NODE_ELEMENT && nextNode.contains( startNode ) )
{
breakNodes();
nextNode = startNode.getNext();
}
}
currentNode = nextNode;
}
}
range.moveToBookmark( bookmark );
}
function applyObjectStyle( range )
{
var root = range.getCommonAncestor( true, true ),
element = root.getAscendant( this.element, true );
element && !element.isReadOnly() && setupElement( element, this );
}
function removeObjectStyle( range )
{
var root = range.getCommonAncestor( true, true ),
element = root.getAscendant( this.element, true );
if ( !element )
return;
var style = this,
def = style._.definition,
attributes = def.attributes;
// Remove all defined attributes.
if ( attributes )
{
for ( var att in attributes )
{
element.removeAttribute( att, attributes[ att ] );
}
}
// Assign all defined styles.
if ( def.styles )
{
for ( var i in def.styles )
{
if ( !def.styles.hasOwnProperty( i ) )
continue;
element.removeStyle( i );
}
}
}
function applyBlockStyle( range )
{
// Serializible bookmarks is needed here since
// elements may be merged.
var bookmark = range.createBookmark( true );
var iterator = range.createIterator();
iterator.enforceRealBlocks = true;
// make recognize <br /> tag as a separator in ENTER_BR mode (#5121)
if ( this._.enterMode )
iterator.enlargeBr = ( this._.enterMode != CKEDITOR.ENTER_BR );
var block;
var doc = range.document;
var previousPreBlock;
while ( ( block = iterator.getNextParagraph() ) ) // Only one =
{
if ( !block.isReadOnly() )
{
var newBlock = getElement( this, doc, block );
replaceBlock( block, newBlock );
}
}
range.moveToBookmark( bookmark );
}
function removeBlockStyle( range )
{
// Serializible bookmarks is needed here since
// elements may be merged.
var bookmark = range.createBookmark( 1 );
var iterator = range.createIterator();
iterator.enforceRealBlocks = true;
iterator.enlargeBr = this._.enterMode != CKEDITOR.ENTER_BR;
var block;
while ( ( block = iterator.getNextParagraph() ) )
{
if ( this.checkElementRemovable( block ) )
{
// <pre> get special treatment.
if ( block.is( 'pre' ) )
{
var newBlock = this._.enterMode == CKEDITOR.ENTER_BR ?
null : range.document.createElement(
this._.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
newBlock && block.copyAttributes( newBlock );
replaceBlock( block, newBlock );
}
else
removeFromElement( this, block, 1 );
}
}
range.moveToBookmark( bookmark );
}
// Replace the original block with new one, with special treatment
// for <pre> blocks to make sure content format is well preserved, and merging/splitting adjacent
// when necessary.(#3188)
function replaceBlock( block, newBlock )
{
// Block is to be removed, create a temp element to
// save contents.
var removeBlock = !newBlock;
if ( removeBlock )
{
newBlock = block.getDocument().createElement( 'div' );
block.copyAttributes( newBlock );
}
var newBlockIsPre = newBlock && newBlock.is( 'pre' );
var blockIsPre = block.is( 'pre' );
var isToPre = newBlockIsPre && !blockIsPre;
var isFromPre = !newBlockIsPre && blockIsPre;
if ( isToPre )
newBlock = toPre( block, newBlock );
else if ( isFromPre )
// Split big <pre> into pieces before start to convert.
newBlock = fromPres( removeBlock ?
[ block.getHtml() ] : splitIntoPres( block ), newBlock );
else
block.moveChildren( newBlock );
newBlock.replace( block );
if ( newBlockIsPre )
{
// Merge previous <pre> blocks.
mergePre( newBlock );
}
else if ( removeBlock )
removeNoAttribsElement( newBlock );
}
/**
* Merge a <pre> block with a previous sibling if available.
*/
function mergePre( preBlock )
{
var previousBlock;
if ( !( ( previousBlock = preBlock.getPrevious( nonWhitespaces ) )
&& previousBlock.is
&& previousBlock.is( 'pre') ) )
return;
// Merge the previous <pre> block contents into the current <pre>
// block.
//
// Another thing to be careful here is that currentBlock might contain
// a '\n' at the beginning, and previousBlock might contain a '\n'
// towards the end. These new lines are not normally displayed but they
// become visible after merging.
var mergedHtml = replace( previousBlock.getHtml(), /\n$/, '' ) + '\n\n' +
replace( preBlock.getHtml(), /^\n/, '' ) ;
// Krugle: IE normalizes innerHTML from <pre>, breaking whitespaces.
if ( CKEDITOR.env.ie )
preBlock.$.outerHTML = '<pre>' + mergedHtml + '</pre>';
else
preBlock.setHtml( mergedHtml );
previousBlock.remove();
}
/**
* Split into multiple <pre> blocks separated by double line-break.
* @param preBlock
*/
function splitIntoPres( preBlock )
{
// Exclude the ones at header OR at tail,
// and ignore bookmark content between them.
var duoBrRegex = /(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,
blockName = preBlock.getName(),
splitedHtml = replace( preBlock.getOuterHtml(),
duoBrRegex,
function( match, charBefore, bookmark )
{
return charBefore + '</pre>' + bookmark + '<pre>';
} );
var pres = [];
splitedHtml.replace( /<pre\b.*?>([\s\S]*?)<\/pre>/gi, function( match, preContent ){
pres.push( preContent );
} );
return pres;
}
// Wrapper function of String::replace without considering of head/tail bookmarks nodes.
function replace( str, regexp, replacement )
{
var headBookmark = '',
tailBookmark = '';
str = str.replace( /(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,
function( str, m1, m2 ){
m1 && ( headBookmark = m1 );
m2 && ( tailBookmark = m2 );
return '';
} );
return headBookmark + str.replace( regexp, replacement ) + tailBookmark;
}
/**
* Converting a list of <pre> into blocks with format well preserved.
*/
function fromPres( preHtmls, newBlock )
{
var docFrag;
if ( preHtmls.length > 1 )
docFrag = new CKEDITOR.dom.documentFragment( newBlock.getDocument() );
for ( var i = 0 ; i < preHtmls.length ; i++ )
{
var blockHtml = preHtmls[ i ];
// 1. Trim the first and last line-breaks immediately after and before <pre>,
// they're not visible.
blockHtml = blockHtml.replace( /(\r\n|\r)/g, '\n' ) ;
blockHtml = replace( blockHtml, /^[ \t]*\n/, '' ) ;
blockHtml = replace( blockHtml, /\n$/, '' ) ;
// 2. Convert spaces or tabs at the beginning or at the end to
blockHtml = replace( blockHtml, /^[ \t]+|[ \t]+$/g, function( match, offset, s )
{
if ( match.length == 1 ) // one space, preserve it
return ' ' ;
else if ( !offset ) // beginning of block
return CKEDITOR.tools.repeat( ' ', match.length - 1 ) + ' ';
else // end of block
return ' ' + CKEDITOR.tools.repeat( ' ', match.length - 1 );
} ) ;
// 3. Convert \n to <BR>.
// 4. Convert contiguous (i.e. non-singular) spaces or tabs to
blockHtml = blockHtml.replace( /\n/g, '<br>' ) ;
blockHtml = blockHtml.replace( /[ \t]{2,}/g,
function ( match )
{
return CKEDITOR.tools.repeat( ' ', match.length - 1 ) + ' ' ;
} ) ;
if ( docFrag )
{
var newBlockClone = newBlock.clone();
newBlockClone.setHtml( blockHtml );
docFrag.append( newBlockClone );
}
else
newBlock.setHtml( blockHtml );
}
return docFrag || newBlock;
}
/**
* Converting from a non-PRE block to a PRE block in formatting operations.
*/
function toPre( block, newBlock )
{
var bogus = block.getBogus();
bogus && bogus.remove();
// First trim the block content.
var preHtml = block.getHtml();
// 1. Trim head/tail spaces, they're not visible.
preHtml = replace( preHtml, /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g, '' );
// 2. Delete ANSI whitespaces immediately before and after <BR> because
// they are not visible.
preHtml = preHtml.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '$1' );
// 3. Compress other ANSI whitespaces since they're only visible as one
// single space previously.
// 4. Convert to spaces since is no longer needed in <PRE>.
preHtml = preHtml.replace( /([ \t\n\r]+| )/g, ' ' );
// 5. Convert any <BR /> to \n. This must not be done earlier because
// the \n would then get compressed.
preHtml = preHtml.replace( /<br\b[^>]*>/gi, '\n' );
// Krugle: IE normalizes innerHTML to <pre>, breaking whitespaces.
if ( CKEDITOR.env.ie )
{
var temp = block.getDocument().createElement( 'div' );
temp.append( newBlock );
newBlock.$.outerHTML = '<pre>' + preHtml + '</pre>';
newBlock.copyAttributes( temp.getFirst() );
newBlock = temp.getFirst().remove();
}
else
newBlock.setHtml( preHtml );
return newBlock;
}
// Removes a style from an element itself, don't care about its subtree.
function removeFromElement( style, element )
{
var def = style._.definition,
attributes = def.attributes,
styles = def.styles,
overrides = getOverrides( style )[ element.getName() ],
// If the style is only about the element itself, we have to remove the element.
removeEmpty = CKEDITOR.tools.isEmpty( attributes ) && CKEDITOR.tools.isEmpty( styles );
// Remove definition attributes/style from the elemnt.
for ( var attName in attributes )
{
// The 'class' element value must match (#1318).
if ( ( attName == 'class' || style._.definition.fullMatch )
&& element.getAttribute( attName ) != normalizeProperty( attName, attributes[ attName ] ) )
continue;
removeEmpty = element.hasAttribute( attName );
element.removeAttribute( attName );
}
for ( var styleName in styles )
{
// Full match style insist on having fully equivalence. (#5018)
if ( style._.definition.fullMatch
&& element.getStyle( styleName ) != normalizeProperty( styleName, styles[ styleName ], true ) )
continue;
removeEmpty = removeEmpty || !!element.getStyle( styleName );
element.removeStyle( styleName );
}
// Remove overrides, but don't remove the element if it's a block element
removeOverrides( element, overrides, blockElements[ element.getName() ] ) ;
if ( removeEmpty )
{
!CKEDITOR.dtd.$block[ element.getName() ] || style._.enterMode == CKEDITOR.ENTER_BR && !element.hasAttributes() ?
removeNoAttribsElement( element ) :
element.renameNode( style._.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' );
}
}
// Removes a style from inside an element.
function removeFromInsideElement( style, element )
{
var def = style._.definition,
attribs = def.attributes,
styles = def.styles,
overrides = getOverrides( style ),
innerElements = element.getElementsByTag( style.element );
for ( var i = innerElements.count(); --i >= 0 ; )
removeFromElement( style, innerElements.getItem( i ) );
// Now remove any other element with different name that is
// defined to be overriden.
for ( var overrideElement in overrides )
{
if ( overrideElement != style.element )
{
innerElements = element.getElementsByTag( overrideElement ) ;
for ( i = innerElements.count() - 1 ; i >= 0 ; i-- )
{
var innerElement = innerElements.getItem( i );
removeOverrides( innerElement, overrides[ overrideElement ] ) ;
}
}
}
}
/**
* Remove overriding styles/attributes from the specific element.
* Note: Remove the element if no attributes remain.
* @param {Object} element
* @param {Object} overrides
* @param {Boolean} Don't remove the element
*/
function removeOverrides( element, overrides, dontRemove )
{
var attributes = overrides && overrides.attributes ;
if ( attributes )
{
for ( var i = 0 ; i < attributes.length ; i++ )
{
var attName = attributes[i][0], actualAttrValue ;
if ( ( actualAttrValue = element.getAttribute( attName ) ) )
{
var attValue = attributes[i][1] ;
// Remove the attribute if:
// - The override definition value is null ;
// - The override definition valie is a string that
// matches the attribute value exactly.
// - The override definition value is a regex that
// has matches in the attribute value.
if ( attValue === null ||
( attValue.test && attValue.test( actualAttrValue ) ) ||
( typeof attValue == 'string' && actualAttrValue == attValue ) )
element.removeAttribute( attName ) ;
}
}
}
if ( !dontRemove )
removeNoAttribsElement( element );
}
// If the element has no more attributes, remove it.
function removeNoAttribsElement( element )
{
// If no more attributes remained in the element, remove it,
// leaving its children.
if ( !element.hasAttributes() )
{
if ( CKEDITOR.dtd.$block[ element.getName() ] )
{
var previous = element.getPrevious( nonWhitespaces ),
next = element.getNext( nonWhitespaces );
if ( previous && ( previous.type == CKEDITOR.NODE_TEXT || !previous.isBlockBoundary( { br : 1 } ) ) )
element.append( 'br', 1 );
if ( next && ( next.type == CKEDITOR.NODE_TEXT || !next.isBlockBoundary( { br : 1 } ) ) )
element.append( 'br' );
element.remove( true );
}
else
{
// Removing elements may open points where merging is possible,
// so let's cache the first and last nodes for later checking.
var firstChild = element.getFirst();
var lastChild = element.getLast();
element.remove( true );
if ( firstChild )
{
// Check the cached nodes for merging.
firstChild.type == CKEDITOR.NODE_ELEMENT && firstChild.mergeSiblings();
if ( lastChild && !firstChild.equals( lastChild )
&& lastChild.type == CKEDITOR.NODE_ELEMENT )
lastChild.mergeSiblings();
}
}
}
}
function getElement( style, targetDocument, element )
{
var el,
def = style._.definition,
elementName = style.element;
// The "*" element name will always be a span for this function.
if ( elementName == '*' )
elementName = 'span';
// Create the element.
el = new CKEDITOR.dom.element( elementName, targetDocument );
// #6226: attributes should be copied before the new ones are applied
if ( element )
element.copyAttributes( el );
el = setupElement( el, style );
// Avoid ID duplication.
if ( targetDocument.getCustomData( 'doc_processing_style' ) && el.hasAttribute( 'id' ) )
el.removeAttribute( 'id' );
else
targetDocument.setCustomData( 'doc_processing_style', 1 );
return el;
}
function setupElement( el, style )
{
var def = style._.definition,
attributes = def.attributes,
styles = CKEDITOR.style.getStyleText( def );
// Assign all defined attributes.
if ( attributes )
{
for ( var att in attributes )
{
el.setAttribute( att, attributes[ att ] );
}
}
// Assign all defined styles.
if( styles )
el.setAttribute( 'style', styles );
return el;
}
function replaceVariables( list, variablesValues )
{
for ( var item in list )
{
list[ item ] = list[ item ].replace( varRegex, function( match, varName )
{
return variablesValues[ varName ];
});
}
}
// Returns an object that can be used for style matching comparison.
// Attributes names and values are all lowercased, and the styles get
// merged with the style attribute.
function getAttributesForComparison( styleDefinition )
{
// If we have already computed it, just return it.
var attribs = styleDefinition._AC;
if ( attribs )
return attribs;
attribs = {};
var length = 0;
// Loop through all defined attributes.
var styleAttribs = styleDefinition.attributes;
if ( styleAttribs )
{
for ( var styleAtt in styleAttribs )
{
length++;
attribs[ styleAtt ] = styleAttribs[ styleAtt ];
}
}
// Includes the style definitions.
var styleText = CKEDITOR.style.getStyleText( styleDefinition );
if ( styleText )
{
if ( !attribs[ 'style' ] )
length++;
attribs[ 'style' ] = styleText;
}
// Appends the "length" information to the object.
attribs._length = length;
// Return it, saving it to the next request.
return ( styleDefinition._AC = attribs );
}
/**
* Get the the collection used to compare the elements and attributes,
* defined in this style overrides, with other element. All information in
* it is lowercased.
* @param {CKEDITOR.style} style
*/
function getOverrides( style )
{
if ( style._.overrides )
return style._.overrides;
var overrides = ( style._.overrides = {} ),
definition = style._.definition.overrides;
if ( definition )
{
// The override description can be a string, object or array.
// Internally, well handle arrays only, so transform it if needed.
if ( !CKEDITOR.tools.isArray( definition ) )
definition = [ definition ];
// Loop through all override definitions.
for ( var i = 0 ; i < definition.length ; i++ )
{
var override = definition[i];
var elementName;
var overrideEl;
var attrs;
// If can be a string with the element name.
if ( typeof override == 'string' )
elementName = override.toLowerCase();
// Or an object.
else
{
elementName = override.element ? override.element.toLowerCase() : style.element;
attrs = override.attributes;
}
// We can have more than one override definition for the same
// element name, so we attempt to simply append information to
// it if it already exists.
overrideEl = overrides[ elementName ] || ( overrides[ elementName ] = {} );
if ( attrs )
{
// The returning attributes list is an array, because we
// could have different override definitions for the same
// attribute name.
var overrideAttrs = ( overrideEl.attributes = overrideEl.attributes || new Array() );
for ( var attName in attrs )
{
// Each item in the attributes array is also an array,
// where [0] is the attribute name and [1] is the
// override value.
overrideAttrs.push( [ attName.toLowerCase(), attrs[ attName ] ] );
}
}
}
}
return overrides;
}
// Make the comparison of attribute value easier by standardizing it.
function normalizeProperty( name, value, isStyle )
{
var temp = new CKEDITOR.dom.element( 'span' );
temp [ isStyle ? 'setStyle' : 'setAttribute' ]( name, value );
return temp[ isStyle ? 'getStyle' : 'getAttribute' ]( name );
}
// Make the comparison of style text easier by standardizing it.
function normalizeCssText( unparsedCssText, nativeNormalize )
{
var styleText;
if ( nativeNormalize !== false )
{
// Injects the style in a temporary span object, so the browser parses it,
// retrieving its final format.
var temp = new CKEDITOR.dom.element( 'span' );
temp.setAttribute( 'style', unparsedCssText );
styleText = temp.getAttribute( 'style' ) || '';
}
else
styleText = unparsedCssText;
// Normalize font-family property, ignore quotes and being case insensitive. (#7322)
// http://www.w3.org/TR/css3-fonts/#font-family-the-font-family-property
styleText = styleText.replace( /(font-family:)(.*?)(?=;|$)/, function ( match, prop, val )
{
var names = val.split( ',' );
for ( var i = 0; i < names.length; i++ )
names[ i ] = CKEDITOR.tools.trim( names[ i ].replace( /["']/g, '' ) );
return prop + names.join( ',' );
});
// Shrinking white-spaces around colon and semi-colon (#4147).
// Compensate tail semi-colon.
return styleText.replace( /\s*([;:])\s*/, '$1' )
.replace( /([^\s;])$/, '$1;')
// Trimming spaces after comma(#4107),
// remove quotations(#6403),
// mostly for differences on "font-family".
.replace( /,\s+/g, ',' )
.replace( /\"/g,'' )
.toLowerCase();
}
// Turn inline style text properties into one hash.
function parseStyleText( styleText )
{
var retval = {};
styleText
.replace( /"/g, '"' )
.replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value )
{
retval[ name ] = value;
} );
return retval;
}
/**
* Compare two bunch of styles, with the speciality that value 'inherit'
* is treated as a wildcard which will match any value.
* @param {Object|String} source
* @param {Object|String} target
*/
function compareCssText( source, target )
{
typeof source == 'string' && ( source = parseStyleText( source ) );
typeof target == 'string' && ( target = parseStyleText( target ) );
for( var name in source )
{
if ( !( name in target &&
( target[ name ] == source[ name ]
|| source[ name ] == 'inherit'
|| target[ name ] == 'inherit' ) ) )
{
return false;
}
}
return true;
}
function applyStyle( document, remove )
{
var selection = document.getSelection(),
// Bookmark the range so we can re-select it after processing.
bookmarks = selection.createBookmarks( 1 ),
ranges = selection.getRanges(),
func = remove ? this.removeFromRange : this.applyToRange,
range;
var iterator = ranges.createIterator();
while ( ( range = iterator.getNextRange() ) )
func.call( this, range );
if ( bookmarks.length == 1 && bookmarks[ 0 ].collapsed )
{
selection.selectRanges( ranges );
document.getById( bookmarks[ 0 ].startNode ).remove();
}
else
selection.selectBookmarks( bookmarks );
document.removeCustomData( 'doc_processing_style' );
}
})();
CKEDITOR.styleCommand = function( style )
{
this.style = style;
};
CKEDITOR.styleCommand.prototype.exec = function( editor )
{
editor.focus();
var doc = editor.document;
if ( doc )
{
if ( this.state == CKEDITOR.TRISTATE_OFF )
this.style.apply( doc );
else if ( this.state == CKEDITOR.TRISTATE_ON )
this.style.remove( doc );
}
return !!doc;
};
/**
* Manages styles registration and loading. See also {@link CKEDITOR.config.stylesSet}.
* @namespace
* @augments CKEDITOR.resourceManager
* @constructor
* @since 3.2
* @example
* // The set of styles for the <b>Styles</b> combo
* CKEDITOR.stylesSet.add( 'default',
* [
* // Block Styles
* { name : 'Blue Title' , element : 'h3', styles : { 'color' : 'Blue' } },
* { name : 'Red Title' , element : 'h3', styles : { 'color' : 'Red' } },
*
* // Inline Styles
* { name : 'Marker: Yellow' , element : 'span', styles : { 'background-color' : 'Yellow' } },
* { name : 'Marker: Green' , element : 'span', styles : { 'background-color' : 'Lime' } },
*
* // Object Styles
* {
* name : 'Image on Left',
* element : 'img',
* attributes :
* {
* 'style' : 'padding: 5px; margin-right: 5px',
* 'border' : '2',
* 'align' : 'left'
* }
* }
* ]);
*/
CKEDITOR.stylesSet = new CKEDITOR.resourceManager( '', 'stylesSet' );
// Backward compatibility (#5025).
CKEDITOR.addStylesSet = CKEDITOR.tools.bind( CKEDITOR.stylesSet.add, CKEDITOR.stylesSet );
CKEDITOR.loadStylesSet = function( name, url, callback )
{
CKEDITOR.stylesSet.addExternal( name, url, '' );
CKEDITOR.stylesSet.load( name, callback );
};
/**
* Gets the current styleSet for this instance
* @param {Function} callback The function to be called with the styles data.
* @example
* editor.getStylesSet( function( stylesDefinitions ) {} );
*/
CKEDITOR.editor.prototype.getStylesSet = function( callback )
{
if ( !this._.stylesDefinitions )
{
var editor = this,
// Respect the backwards compatible definition entry
configStyleSet = editor.config.stylesCombo_stylesSet || editor.config.stylesSet || 'default';
// #5352 Allow to define the styles directly in the config object
if ( configStyleSet instanceof Array )
{
editor._.stylesDefinitions = configStyleSet;
callback( configStyleSet );
return;
}
var partsStylesSet = configStyleSet.split( ':' ),
styleSetName = partsStylesSet[ 0 ],
externalPath = partsStylesSet[ 1 ],
pluginPath = CKEDITOR.plugins.registered.styles.path;
CKEDITOR.stylesSet.addExternal( styleSetName,
externalPath ?
partsStylesSet.slice( 1 ).join( ':' ) :
pluginPath + 'styles/' + styleSetName + '.js', '' );
CKEDITOR.stylesSet.load( styleSetName, function( stylesSet )
{
editor._.stylesDefinitions = stylesSet[ styleSetName ];
callback( editor._.stylesDefinitions );
} ) ;
}
else
callback( this._.stylesDefinitions );
};
/**
* Indicates that fully selected read-only elements will be included when
* applying the style (for inline styles only).
* @name CKEDITOR.style.includeReadonly
* @type Boolean
* @default false
* @since 3.5
*/
/**
* Disables inline styling on read-only elements.
* @name CKEDITOR.config.disableReadonlyStyling
* @type Boolean
* @default false
* @since 3.5
*/
/**
* The "styles definition set" to use in the editor. They will be used in the
* styles combo and the Style selector of the div container. <br>
* The styles may be defined in the page containing the editor, or can be
* loaded on demand from an external file. In the second case, if this setting
* contains only a name, the styles definition file will be loaded from the
* "styles" folder inside the styles plugin folder.
* Otherwise, this setting has the "name:url" syntax, making it
* possible to set the URL from which loading the styles file.<br>
* Previously this setting was available as config.stylesCombo_stylesSet<br>
* @name CKEDITOR.config.stylesSet
* @type String|Array
* @default 'default'
* @since 3.3
* @example
* // Load from the styles' styles folder (mystyles.js file).
* config.stylesSet = 'mystyles';
* @example
* // Load from a relative URL.
* config.stylesSet = 'mystyles:/editorstyles/styles.js';
* @example
* // Load from a full URL.
* config.stylesSet = 'mystyles:http://www.example.com/editorstyles/styles.js';
* @example
* // Load from a list of definitions.
* config.stylesSet = [
* { name : 'Strong Emphasis', element : 'strong' },
* { name : 'Emphasis', element : 'em' }, ... ];
*/
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
// #### checkSelectionChange : START
// The selection change check basically saves the element parent tree of
// the current node and check it on successive requests. If there is any
// change on the tree, then the selectionChange event gets fired.
function checkSelectionChange()
{
try
{
// In IE, the "selectionchange" event may still get thrown when
// releasing the WYSIWYG mode, so we need to check it first.
var sel = this.getSelection();
if ( !sel || !sel.document.getWindow().$ )
return;
var firstElement = sel.getStartElement();
var currentPath = new CKEDITOR.dom.elementPath( firstElement );
if ( !currentPath.compare( this._.selectionPreviousPath ) )
{
this._.selectionPreviousPath = currentPath;
this.fire( 'selectionChange', { selection : sel, path : currentPath, element : firstElement } );
}
}
catch (e)
{}
}
var checkSelectionChangeTimer,
checkSelectionChangeTimeoutPending;
function checkSelectionChangeTimeout()
{
// Firing the "OnSelectionChange" event on every key press started to
// be too slow. This function guarantees that there will be at least
// 200ms delay between selection checks.
checkSelectionChangeTimeoutPending = true;
if ( checkSelectionChangeTimer )
return;
checkSelectionChangeTimeoutExec.call( this );
checkSelectionChangeTimer = CKEDITOR.tools.setTimeout( checkSelectionChangeTimeoutExec, 200, this );
}
function checkSelectionChangeTimeoutExec()
{
checkSelectionChangeTimer = null;
if ( checkSelectionChangeTimeoutPending )
{
// Call this with a timeout so the browser properly moves the
// selection after the mouseup. It happened that the selection was
// being moved after the mouseup when clicking inside selected text
// with Firefox.
CKEDITOR.tools.setTimeout( checkSelectionChange, 0, this );
checkSelectionChangeTimeoutPending = false;
}
}
// #### checkSelectionChange : END
function rangeRequiresFix( range )
{
function isInlineCt( node )
{
return node && node.type == CKEDITOR.NODE_ELEMENT
&& node.getName() in CKEDITOR.dtd.$removeEmpty;
}
function singletonBlock( node )
{
var body = range.document.getBody();
return !node.is( 'body' ) && body.getChildCount() == 1;
}
var start = range.startContainer,
offset = range.startOffset;
if ( start.type == CKEDITOR.NODE_TEXT )
return false;
// 1. Empty inline element. <span>^</span>
// 2. Adjoin to inline element. <p><strong>text</strong>^</p>
// 3. The only empty block in document. <body><p>^</p></body> (#7222)
return !CKEDITOR.tools.trim( start.getHtml() ) ? isInlineCt( start ) || singletonBlock( start )
: isInlineCt( start.getChild( offset - 1 ) ) || isInlineCt( start.getChild( offset ) );
}
var selectAllCmd =
{
modes : { wysiwyg : 1, source : 1 },
readOnly : CKEDITOR.env.ie || CKEDITOR.env.webkit,
exec : function( editor )
{
switch ( editor.mode )
{
case 'wysiwyg' :
editor.document.$.execCommand( 'SelectAll', false, null );
// Force triggering selectionChange (#7008)
editor.forceNextSelectionCheck();
editor.selectionChange();
break;
case 'source' :
// Select the contents of the textarea
var textarea = editor.textarea.$;
if ( CKEDITOR.env.ie )
textarea.createTextRange().execCommand( 'SelectAll' );
else
{
textarea.selectionStart = 0;
textarea.selectionEnd = textarea.value.length;
}
textarea.focus();
}
},
canUndo : false
};
function createFillingChar( doc )
{
removeFillingChar( doc );
var fillingChar = doc.createText( '\u200B' );
doc.setCustomData( 'cke-fillingChar', fillingChar );
return fillingChar;
}
function getFillingChar( doc )
{
return doc && doc.getCustomData( 'cke-fillingChar' );
}
// Checks if a filling char has been used, eventualy removing it (#1272).
function checkFillingChar( doc )
{
var fillingChar = doc && getFillingChar( doc );
if ( fillingChar )
{
// Use this flag to avoid removing the filling char right after
// creating it.
if ( fillingChar.getCustomData( 'ready' ) )
removeFillingChar( doc );
else
fillingChar.setCustomData( 'ready', 1 );
}
}
function removeFillingChar( doc )
{
var fillingChar = doc && doc.removeCustomData( 'cke-fillingChar' );
if ( fillingChar )
{
var bm,
sel = doc.getSelection().getNative(),
// Be error proof.
range = sel && sel.type != 'None' && sel.getRangeAt( 0 );
// Text selection position might get mangled by
// subsequent dom modification, save it now for restoring. (#8617)
if ( fillingChar.getLength() > 1
&& range && range.intersectsNode( fillingChar.$ ) )
{
bm = [ sel.anchorOffset, sel.focusOffset ];
// Anticipate the offset change brought by the removed char.
var startAffected = sel.anchorNode == fillingChar.$ && sel.anchorOffset > 0,
endAffected = sel.focusNode == fillingChar.$ && sel.focusOffset > 0;
startAffected && bm[ 0 ]--;
endAffected && bm[ 1 ]--;
// Revert the bookmark order on reverse selection.
isReversedSelection( sel ) && bm.unshift( bm.pop() );
}
// We can't simply remove the filling node because the user
// will actually enlarge it when typing, so we just remove the
// invisible char from it.
fillingChar.setText( fillingChar.getText().replace( /\u200B/g, '' ) );
// Restore the bookmark.
if ( bm )
{
var rng = sel.getRangeAt( 0 );
rng.setStart( rng.startContainer, bm[ 0 ] );
rng.setEnd( rng.startContainer, bm[ 1 ] );
sel.removeAllRanges();
sel.addRange( rng );
}
}
}
function isReversedSelection( sel )
{
if ( !sel.isCollapsed )
{
var range = sel.getRangeAt( 0 );
// Potentially alter an reversed selection range.
range.setStart( sel.anchorNode, sel.anchorOffset );
range.setEnd( sel.focusNode, sel.focusOffset );
return range.collapsed;
}
}
CKEDITOR.plugins.add( 'selection',
{
init : function( editor )
{
// On WebKit only, we need a special "filling" char on some situations
// (#1272). Here we set the events that should invalidate that char.
if ( CKEDITOR.env.webkit )
{
editor.on( 'selectionChange', function() { checkFillingChar( editor.document ); } );
editor.on( 'beforeSetMode', function() { removeFillingChar( editor.document ); } );
var fillingCharBefore,
resetSelection;
function beforeData()
{
var doc = editor.document,
fillingChar = getFillingChar( doc );
if ( fillingChar )
{
// If cursor is right blinking by side of the filler node, save it for restoring,
// as the following text substitution will blind it. (#7437)
var sel = doc.$.defaultView.getSelection();
if ( sel.type == 'Caret' && sel.anchorNode == fillingChar.$ )
resetSelection = 1;
fillingCharBefore = fillingChar.getText();
fillingChar.setText( fillingCharBefore.replace( /\u200B/g, '' ) );
}
}
function afterData()
{
var doc = editor.document,
fillingChar = getFillingChar( doc );
if ( fillingChar )
{
fillingChar.setText( fillingCharBefore );
if ( resetSelection )
{
doc.$.defaultView.getSelection().setPosition( fillingChar.$,fillingChar.getLength() );
resetSelection = 0;
}
}
}
editor.on( 'beforeUndoImage', beforeData );
editor.on( 'afterUndoImage', afterData );
editor.on( 'beforeGetData', beforeData, null, null, 0 );
editor.on( 'getData', afterData );
}
editor.on( 'contentDom', function()
{
var doc = editor.document,
body = doc.getBody(),
html = doc.getDocumentElement();
if ( CKEDITOR.env.ie )
{
// Other browsers don't loose the selection if the
// editor document loose the focus. In IE, we don't
// have support for it, so we reproduce it here, other
// than firing the selection change event.
var savedRange,
saveEnabled,
restoreEnabled = 1;
// "onfocusin" is fired before "onfocus". It makes it
// possible to restore the selection before click
// events get executed.
body.on( 'focusin', function( evt )
{
// If there are elements with layout they fire this event but
// it must be ignored to allow edit its contents #4682
if ( evt.data.$.srcElement.nodeName != 'BODY' )
return;
// Give the priority to locked selection since it probably
// reflects the actual situation, besides locked selection
// could be interfered because of text nodes normalizing.
// (#6083, #6987)
var lockedSelection = doc.getCustomData( 'cke_locked_selection' );
if ( lockedSelection )
{
lockedSelection.unlock( 1 );
lockedSelection.lock();
}
// Then check ff we have saved a range, restore it at this
// point.
else if ( savedRange && restoreEnabled )
{
// Well not break because of this.
try { savedRange.select(); } catch (e) {}
savedRange = null;
}
});
body.on( 'focus', function()
{
// Enable selections to be saved.
saveEnabled = 1;
saveSelection();
});
body.on( 'beforedeactivate', function( evt )
{
// Ignore this event if it's caused by focus switch between
// internal editable control type elements, e.g. layouted paragraph. (#4682)
if ( evt.data.$.toElement )
return;
// Disable selections from being saved.
saveEnabled = 0;
restoreEnabled = 1;
});
// [IE] Iframe will still keep the selection when blurred, if
// focus is moved onto a non-editing host, e.g. link or button, but
// it becomes a problem for the object type selection, since the resizer
// handler attached on it will mark other part of the UI, especially
// for the dialog. (#8157)
// [IE<8] Even worse For old IEs, the cursor will not vanish even if
// the selection has been moved to another text input in some cases. (#4716)
//
// Now the range restore is disabled, so we simply force IE to clean
// up the selection before blur.
CKEDITOR.env.ie && editor.on( 'blur', function()
{
// Error proof when the editor is not visible. (#6375)
try{ doc.$.selection.empty(); } catch ( er){}
});
// Listening on document element ensures that
// scrollbar is included. (#5280)
html.on( 'mousedown', function()
{
// Lock restore selection now, as we have
// a followed 'click' event which introduce
// new selection. (#5735)
restoreEnabled = 0;
});
html.on( 'mouseup', function()
{
restoreEnabled = 1;
});
var scroll;
// IE fires the "selectionchange" event when clicking
// inside a selection. We don't want to capture that.
body.on( 'mousedown', function( evt )
{
// IE scrolls document to top on right mousedown
// when editor has no focus, remember this scroll
// position and revert it before context menu opens. (#5778)
if ( evt.data.$.button == 2 )
{
var sel = editor.document.$.selection;
if ( sel.type == 'None' )
scroll = editor.window.getScrollPosition();
}
disableSave();
});
body.on( 'mouseup',
function( evt )
{
// Restore recorded scroll position when needed on right mouseup.
if ( evt.data.$.button == 2 && scroll )
{
editor.document.$.documentElement.scrollLeft = scroll.x;
editor.document.$.documentElement.scrollTop = scroll.y;
}
scroll = null;
saveEnabled = 1;
setTimeout( function()
{
saveSelection( true );
},
0 );
});
body.on( 'keydown', disableSave );
body.on( 'keyup',
function()
{
saveEnabled = 1;
saveSelection();
});
// When content doc is in standards mode, IE doesn't focus the editor when
// clicking at the region below body (on html element) content, we emulate
// the normal behavior on old IEs. (#1659, #7932)
if ( ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat )
&& doc.$.compatMode != 'BackCompat' )
{
function moveRangeToPoint( range, x, y )
{
// Error prune in IE7. (#9034, #9110)
try { range.moveToPoint( x, y ); } catch ( e ) {}
}
html.on( 'mousedown', function( evt )
{
// Expand the text range along with mouse move.
function onHover( evt )
{
evt = evt.data.$;
if ( textRng )
{
// Read the current cursor.
var rngEnd = body.$.createTextRange();
moveRangeToPoint( rngEnd, evt.x, evt.y );
// Handle drag directions.
textRng.setEndPoint(
textRng.compareEndPoints( 'StartToStart', rngEnd ) < 0 ?
'EndToEnd' :
'StartToStart',
rngEnd );
// Update selection with new range.
textRng.select();
}
}
evt = evt.data.$;
// We're sure that the click happens at the region
// below body, but not on scrollbar.
if ( evt.y < html.$.clientHeight
&& evt.y > body.$.offsetTop + body.$.clientHeight
&& evt.x < html.$.clientWidth )
{
// Start to build the text range.
var textRng = body.$.createTextRange();
moveRangeToPoint( textRng, evt.x, evt.y );
html.on( 'mousemove', onHover );
html.on( 'mouseup', function( evt )
{
html.removeListener( 'mousemove', onHover );
evt.removeListener();
// Make it in effect on mouse up. (#9022)
textRng.select();
} );
}
});
}
// It's much simpler for IE8, we just need to reselect the reported range.
if ( CKEDITOR.env.ie8 )
{
html.on( 'mouseup', function( evt )
{
// The event is not fired when clicking on the scrollbars,
// so we can safely check the following to understand
// whether the empty space following <body> has been clicked.
if ( evt.data.getTarget().getName() == 'html' )
{
var sel = CKEDITOR.document.$.selection,
range = sel.createRange();
// The selection range is reported on host, but actually it should applies to the content doc.
if ( sel.type != 'None' && range.parentElement().ownerDocument == doc.$ )
range.select();
}
} );
}
// IE is the only to provide the "selectionchange"
// event.
doc.on( 'selectionchange', saveSelection );
function disableSave()
{
saveEnabled = 0;
}
function saveSelection( testIt )
{
if ( saveEnabled )
{
var doc = editor.document,
sel = editor.getSelection(),
nativeSel = sel && sel.getNative();
// There is a very specific case, when clicking
// inside a text selection. In that case, the
// selection collapses at the clicking point,
// but the selection object remains in an
// unknown state, making createRange return a
// range at the very start of the document. In
// such situation we have to test the range, to
// be sure it's valid.
if ( testIt && nativeSel && nativeSel.type == 'None' )
{
// The "InsertImage" command can be used to
// test whether the selection is good or not.
// If not, it's enough to give some time to
// IE to put things in order for us.
if ( !doc.$.queryCommandEnabled( 'InsertImage' ) )
{
CKEDITOR.tools.setTimeout( saveSelection, 50, this, true );
return;
}
}
// Avoid saving selection from within text input. (#5747)
var parentTag;
if ( nativeSel && nativeSel.type && nativeSel.type != 'Control'
&& ( parentTag = nativeSel.createRange() )
&& ( parentTag = parentTag.parentElement() )
&& ( parentTag = parentTag.nodeName )
&& parentTag.toLowerCase() in { input: 1, textarea : 1 } )
{
return;
}
savedRange = nativeSel && sel.getRanges()[ 0 ];
checkSelectionChangeTimeout.call( editor );
}
}
}
else
{
// In other browsers, we make the selection change
// check based on other events, like clicks or keys
// press.
doc.on( 'mouseup', checkSelectionChangeTimeout, editor );
doc.on( 'keyup', checkSelectionChangeTimeout, editor );
doc.on( 'selectionchange', checkSelectionChangeTimeout, editor );
}
if ( CKEDITOR.env.webkit )
{
doc.on( 'keydown', function( evt )
{
var key = evt.data.getKey();
// Remove the filling char before some keys get
// executed, so they'll not get blocked by it.
switch ( key )
{
case 13 : // ENTER
case 33 : // PAGEUP
case 34 : // PAGEDOWN
case 35 : // HOME
case 36 : // END
case 37 : // LEFT-ARROW
case 39 : // RIGHT-ARROW
case 8 : // BACKSPACE
case 45 : // INS
case 46 : // DEl
removeFillingChar( editor.document );
}
}, null, null, 10 );
}
});
// Clear the cached range path before unload. (#7174)
editor.on( 'contentDomUnload', editor.forceNextSelectionCheck, editor );
editor.addCommand( 'selectAll', selectAllCmd );
editor.ui.addButton( 'SelectAll',
{
label : editor.lang.selectAll,
command : 'selectAll'
});
/**
* Check if to fire the {@link CKEDITOR.editor#selectionChange} event
* for the current editor instance.
*
* @param {Boolean} checkNow Check immediately without any delay.
*/
editor.selectionChange = function( checkNow )
{
( checkNow ? checkSelectionChange : checkSelectionChangeTimeout ).call( this );
};
// IE9 might cease to work if there's an object selection inside the iframe (#7639).
CKEDITOR.env.ie9Compat && editor.on( 'destroy', function()
{
var sel = editor.getSelection();
sel && sel.getNative().clear();
}, null, null, 9 );
}
});
/**
* Gets the current selection from the editing area when in WYSIWYG mode.
* @returns {CKEDITOR.dom.selection} A selection object or null if not in
* WYSIWYG mode or no selection is available.
* @example
* var selection = CKEDITOR.instances.editor1.<strong>getSelection()</strong>;
* alert( selection.getType() );
*/
CKEDITOR.editor.prototype.getSelection = function()
{
return this.document && this.document.getSelection();
};
CKEDITOR.editor.prototype.forceNextSelectionCheck = function()
{
delete this._.selectionPreviousPath;
};
/**
* Gets the current selection from the document.
* @returns {CKEDITOR.dom.selection} A selection object.
* @example
* var selection = CKEDITOR.instances.editor1.document.<strong>getSelection()</strong>;
* alert( selection.getType() );
*/
CKEDITOR.dom.document.prototype.getSelection = function()
{
var sel = new CKEDITOR.dom.selection( this );
return ( !sel || sel.isInvalid ) ? null : sel;
};
/**
* No selection.
* @constant
* @example
* if ( editor.getSelection().getType() == CKEDITOR.SELECTION_NONE )
* alert( 'Nothing is selected' );
*/
CKEDITOR.SELECTION_NONE = 1;
/**
* A text or a collapsed selection.
* @constant
* @example
* if ( editor.getSelection().getType() == CKEDITOR.SELECTION_TEXT )
* alert( 'A text is selected' );
*/
CKEDITOR.SELECTION_TEXT = 2;
/**
* Element selection.
* @constant
* @example
* if ( editor.getSelection().getType() == CKEDITOR.SELECTION_ELEMENT )
* alert( 'An element is selected' );
*/
CKEDITOR.SELECTION_ELEMENT = 3;
/**
* Manipulates the selection in a DOM document.
* @constructor
* @param {CKEDITOR.dom.document} document The DOM document that contains the selection.
* @example
* var sel = new <strong>CKEDITOR.dom.selection( CKEDITOR.document )</strong>;
*/
CKEDITOR.dom.selection = function( document )
{
var lockedSelection = document.getCustomData( 'cke_locked_selection' );
if ( lockedSelection )
return lockedSelection;
this.document = document;
this.isLocked = 0;
this._ =
{
cache : {}
};
/**
* IE BUG: The selection's document may be a different document than the
* editor document. Return null if that is the case.
*/
if ( CKEDITOR.env.ie )
{
// Avoid breaking because of it. (#8836)
try
{
var range = this.getNative().createRange();
if ( !range ||
( range.item && range.item( 0 ).ownerDocument != this.document.$ ) ||
( range.parentElement && range.parentElement().ownerDocument != this.document.$ ) )
{
throw 0;
}
}
catch ( e )
{
this.isInvalid = true;
}
}
return this;
};
var styleObjectElements =
{
img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,
a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,thead:1,tfoot:1
};
CKEDITOR.dom.selection.prototype =
{
/**
* Gets the native selection object from the browser.
* @function
* @returns {Object} The native browser selection object.
* @example
* var selection = editor.getSelection().<strong>getNative()</strong>;
*/
getNative :
CKEDITOR.env.ie ?
function()
{
return this._.cache.nativeSel || ( this._.cache.nativeSel = this.document.$.selection );
}
:
function()
{
return this._.cache.nativeSel || ( this._.cache.nativeSel = this.document.getWindow().$.getSelection() );
},
/**
* Gets the type of the current selection. The following values are
* available:
* <ul>
* <li><code>{@link CKEDITOR.SELECTION_NONE}</code> (1): No selection.</li>
* <li><code>{@link CKEDITOR.SELECTION_TEXT}</code> (2): A text or a collapsed
* selection is selected.</li>
* <li><code>{@link CKEDITOR.SELECTION_ELEMENT}</code> (3): An element is
* selected.</li>
* </ul>
* @function
* @returns {Number} One of the following constant values:
* <code>{@link CKEDITOR.SELECTION_NONE}</code>, <code>{@link CKEDITOR.SELECTION_TEXT}</code>, or
* <code>{@link CKEDITOR.SELECTION_ELEMENT}</code>.
* @example
* if ( editor.getSelection().<strong>getType()</strong> == CKEDITOR.SELECTION_TEXT )
* alert( 'A text is selected' );
*/
getType :
CKEDITOR.env.ie ?
function()
{
var cache = this._.cache;
if ( cache.type )
return cache.type;
var type = CKEDITOR.SELECTION_NONE;
try
{
var sel = this.getNative(),
ieType = sel.type;
if ( ieType == 'Text' )
type = CKEDITOR.SELECTION_TEXT;
if ( ieType == 'Control' )
type = CKEDITOR.SELECTION_ELEMENT;
// It is possible that we can still get a text range
// object even when type == 'None' is returned by IE.
// So we'd better check the object returned by
// createRange() rather than by looking at the type.
if ( sel.createRange().parentElement )
type = CKEDITOR.SELECTION_TEXT;
}
catch(e) {}
return ( cache.type = type );
}
:
function()
{
var cache = this._.cache;
if ( cache.type )
return cache.type;
var type = CKEDITOR.SELECTION_TEXT;
var sel = this.getNative();
if ( !sel )
type = CKEDITOR.SELECTION_NONE;
else if ( sel.rangeCount == 1 )
{
// Check if the actual selection is a control (IMG,
// TABLE, HR, etc...).
var range = sel.getRangeAt(0),
startContainer = range.startContainer;
if ( startContainer == range.endContainer
&& startContainer.nodeType == 1
&& ( range.endOffset - range.startOffset ) == 1
&& styleObjectElements[ startContainer.childNodes[ range.startOffset ].nodeName.toLowerCase() ] )
{
type = CKEDITOR.SELECTION_ELEMENT;
}
}
return ( cache.type = type );
},
/**
* Retrieves the <code>{@link CKEDITOR.dom.range}</code> instances that represent the current selection.
* Note: Some browsers return multiple ranges even for a continuous selection. Firefox, for example, returns
* one range for each table cell when one or more table rows are selected.
* @function
* @param {Boolean} [onlyEditables] If set to <code>true</code>, this function retrives editable ranges only.
* @return {Array} Range instances that represent the current selection.
* @example
* var ranges = selection.<strong>getRanges()</strong>;
* alert( ranges.length );
*/
getRanges : (function()
{
var func = CKEDITOR.env.ie ?
( function()
{
function getNodeIndex( node ) { return new CKEDITOR.dom.node( node ).getIndex(); }
// Finds the container and offset for a specific boundary
// of an IE range.
var getBoundaryInformation = function( range, start )
{
// Creates a collapsed range at the requested boundary.
range = range.duplicate();
range.collapse( start );
// Gets the element that encloses the range entirely.
var parent = range.parentElement(),
doc = parent.ownerDocument;
// Empty parent element, e.g. <i>^</i>
if ( !parent.hasChildNodes() )
return { container : parent, offset : 0 };
var siblings = parent.children,
child,
sibling,
testRange = range.duplicate(),
startIndex = 0,
endIndex = siblings.length - 1,
index = -1,
position,
distance,
container;
// Binary search over all element childs to test the range to see whether
// range is right on the boundary of one element.
while ( startIndex <= endIndex )
{
index = Math.floor( ( startIndex + endIndex ) / 2 );
child = siblings[ index ];
testRange.moveToElementText( child );
position = testRange.compareEndPoints( 'StartToStart', range );
if ( position > 0 )
endIndex = index - 1;
else if ( position < 0 )
startIndex = index + 1;
else
{
// IE9 report wrong measurement with compareEndPoints when range anchors between two BRs.
// e.g. <p>text<br />^<br /></p> (#7433)
if ( CKEDITOR.env.ie9Compat && child.tagName == 'BR' )
{
// "Fall back" to w3c selection.
var sel = doc.defaultView.getSelection();
return { container : sel[ start ? 'anchorNode' : 'focusNode' ],
offset : sel[ start ? 'anchorOffset' : 'focusOffset' ] };
}
else
return { container : parent, offset : getNodeIndex( child ) };
}
}
// All childs are text nodes,
// or to the right hand of test range are all text nodes. (#6992)
if ( index == -1 || index == siblings.length - 1 && position < 0 )
{
// Adapt test range to embrace the entire parent contents.
testRange.moveToElementText( parent );
testRange.setEndPoint( 'StartToStart', range );
// IE report line break as CRLF with range.text but
// only LF with textnode.nodeValue, normalize them to avoid
// breaking character counting logic below. (#3949)
distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length;
siblings = parent.childNodes;
// Actual range anchor right beside test range at the boundary of text node.
if ( !distance )
{
child = siblings[ siblings.length - 1 ];
if ( child.nodeType != CKEDITOR.NODE_TEXT )
return { container : parent, offset : siblings.length };
else
return { container : child, offset : child.nodeValue.length };
}
// Start the measuring until distance overflows, meanwhile count the text nodes.
var i = siblings.length;
while ( distance > 0 && i > 0 )
{
sibling = siblings[ --i ];
if ( sibling.nodeType == CKEDITOR.NODE_TEXT )
{
container = sibling;
distance -= sibling.nodeValue.length;
}
}
return { container : container, offset : -distance };
}
// Test range was one offset beyond OR behind the anchored text node.
else
{
// Adapt one side of test range to the actual range
// for measuring the offset between them.
testRange.collapse( position > 0 ? true : false );
testRange.setEndPoint( position > 0 ? 'StartToStart' : 'EndToStart', range );
// IE report line break as CRLF with range.text but
// only LF with textnode.nodeValue, normalize them to avoid
// breaking character counting logic below. (#3949)
distance = testRange.text.replace( /(\r\n|\r)/g, '\n' ).length;
// Actual range anchor right beside test range at the inner boundary of text node.
if ( !distance )
return { container : parent, offset : getNodeIndex( child ) + ( position > 0 ? 0 : 1 ) };
// Start the measuring until distance overflows, meanwhile count the text nodes.
while ( distance > 0 )
{
try
{
sibling = child[ position > 0 ? 'previousSibling' : 'nextSibling' ];
if ( sibling.nodeType == CKEDITOR.NODE_TEXT )
{
distance -= sibling.nodeValue.length;
container = sibling;
}
child = sibling;
}
// Measurement in IE could be somtimes wrong because of <select> element. (#4611)
catch( e )
{
return { container : parent, offset : getNodeIndex( child ) };
}
}
return { container : container, offset : position > 0 ? -distance : container.nodeValue.length + distance };
}
};
return function()
{
// IE doesn't have range support (in the W3C way), so we
// need to do some magic to transform selections into
// CKEDITOR.dom.range instances.
var sel = this.getNative(),
nativeRange = sel && sel.createRange(),
type = this.getType(),
range;
if ( !sel )
return [];
if ( type == CKEDITOR.SELECTION_TEXT )
{
range = new CKEDITOR.dom.range( this.document );
var boundaryInfo = getBoundaryInformation( nativeRange, true );
range.setStart( new CKEDITOR.dom.node( boundaryInfo.container ), boundaryInfo.offset );
boundaryInfo = getBoundaryInformation( nativeRange );
range.setEnd( new CKEDITOR.dom.node( boundaryInfo.container ), boundaryInfo.offset );
// Correct an invalid IE range case on empty list item. (#5850)
if ( range.endContainer.getPosition( range.startContainer ) & CKEDITOR.POSITION_PRECEDING
&& range.endOffset <= range.startContainer.getIndex() )
{
range.collapse();
}
return [ range ];
}
else if ( type == CKEDITOR.SELECTION_ELEMENT )
{
var retval = [];
for ( var i = 0 ; i < nativeRange.length ; i++ )
{
var element = nativeRange.item( i ),
parentElement = element.parentNode,
j = 0;
range = new CKEDITOR.dom.range( this.document );
for (; j < parentElement.childNodes.length && parentElement.childNodes[j] != element ; j++ )
{ /*jsl:pass*/ }
range.setStart( new CKEDITOR.dom.node( parentElement ), j );
range.setEnd( new CKEDITOR.dom.node( parentElement ), j + 1 );
retval.push( range );
}
return retval;
}
return [];
};
})()
:
function()
{
// On browsers implementing the W3C range, we simply
// tranform the native ranges in CKEDITOR.dom.range
// instances.
var ranges = [],
range,
doc = this.document,
sel = this.getNative();
if ( !sel )
return ranges;
// On WebKit, it may happen that we'll have no selection
// available. We normalize it here by replicating the
// behavior of other browsers.
if ( !sel.rangeCount )
{
range = new CKEDITOR.dom.range( doc );
range.moveToElementEditStart( doc.getBody() );
ranges.push( range );
}
for ( var i = 0 ; i < sel.rangeCount ; i++ )
{
var nativeRange = sel.getRangeAt( i );
range = new CKEDITOR.dom.range( doc );
range.setStart( new CKEDITOR.dom.node( nativeRange.startContainer ), nativeRange.startOffset );
range.setEnd( new CKEDITOR.dom.node( nativeRange.endContainer ), nativeRange.endOffset );
ranges.push( range );
}
return ranges;
};
return function( onlyEditables )
{
var cache = this._.cache;
if ( cache.ranges && !onlyEditables )
return cache.ranges;
else if ( !cache.ranges )
cache.ranges = new CKEDITOR.dom.rangeList( func.call( this ) );
// Split range into multiple by read-only nodes.
if ( onlyEditables )
{
var ranges = cache.ranges;
for ( var i = 0; i < ranges.length; i++ )
{
var range = ranges[ i ];
// Drop range spans inside one ready-only node.
var parent = range.getCommonAncestor();
if ( parent.isReadOnly() )
ranges.splice( i, 1 );
if ( range.collapsed )
continue;
// Range may start inside a non-editable element,
// replace the range start after it.
if ( range.startContainer.isReadOnly() )
{
var current = range.startContainer;
while( current )
{
if ( current.is( 'body' ) || !current.isReadOnly() )
break;
if ( current.type == CKEDITOR.NODE_ELEMENT
&& current.getAttribute( 'contentEditable' ) == 'false' )
range.setStartAfter( current );
current = current.getParent();
}
}
var startContainer = range.startContainer,
endContainer = range.endContainer,
startOffset = range.startOffset,
endOffset = range.endOffset,
walkerRange = range.clone();
// Enlarge range start/end with text node to avoid walker
// being DOM destructive, it doesn't interfere our checking
// of elements below as well.
if ( startContainer && startContainer.type == CKEDITOR.NODE_TEXT )
{
if ( startOffset >= startContainer.getLength() )
walkerRange.setStartAfter( startContainer );
else
walkerRange.setStartBefore( startContainer );
}
if ( endContainer && endContainer.type == CKEDITOR.NODE_TEXT )
{
if ( !endOffset )
walkerRange.setEndBefore( endContainer );
else
walkerRange.setEndAfter( endContainer );
}
// Looking for non-editable element inside the range.
var walker = new CKEDITOR.dom.walker( walkerRange );
walker.evaluator = function( node )
{
if ( node.type == CKEDITOR.NODE_ELEMENT
&& node.isReadOnly() )
{
var newRange = range.clone();
range.setEndBefore( node );
// Drop collapsed range around read-only elements,
// it make sure the range list empty when selecting
// only non-editable elements.
if ( range.collapsed )
ranges.splice( i--, 1 );
// Avoid creating invalid range.
if ( !( node.getPosition( walkerRange.endContainer ) & CKEDITOR.POSITION_CONTAINS ) )
{
newRange.setStartAfter( node );
if ( !newRange.collapsed )
ranges.splice( i + 1, 0, newRange );
}
return true;
}
return false;
};
walker.next();
}
}
return cache.ranges;
};
})(),
/**
* Gets the DOM element in which the selection starts.
* @returns {CKEDITOR.dom.element} The element at the beginning of the
* selection.
* @example
* var element = editor.getSelection().<strong>getStartElement()</strong>;
* alert( element.getName() );
*/
getStartElement : function()
{
var cache = this._.cache;
if ( cache.startElement !== undefined )
return cache.startElement;
var node,
sel = this.getNative();
switch ( this.getType() )
{
case CKEDITOR.SELECTION_ELEMENT :
return this.getSelectedElement();
case CKEDITOR.SELECTION_TEXT :
var range = this.getRanges()[0];
if ( range )
{
if ( !range.collapsed )
{
range.optimize();
// Decrease the range content to exclude particial
// selected node on the start which doesn't have
// visual impact. ( #3231 )
while ( 1 )
{
var startContainer = range.startContainer,
startOffset = range.startOffset;
// Limit the fix only to non-block elements.(#3950)
if ( startOffset == ( startContainer.getChildCount ?
startContainer.getChildCount() : startContainer.getLength() )
&& !startContainer.isBlockBoundary() )
range.setStartAfter( startContainer );
else break;
}
node = range.startContainer;
if ( node.type != CKEDITOR.NODE_ELEMENT )
return node.getParent();
node = node.getChild( range.startOffset );
if ( !node || node.type != CKEDITOR.NODE_ELEMENT )
node = range.startContainer;
else
{
var child = node.getFirst();
while ( child && child.type == CKEDITOR.NODE_ELEMENT )
{
node = child;
child = child.getFirst();
}
}
}
else
{
node = range.startContainer;
if ( node.type != CKEDITOR.NODE_ELEMENT )
node = node.getParent();
}
node = node.$;
}
}
return cache.startElement = ( node ? new CKEDITOR.dom.element( node ) : null );
},
/**
* Gets the currently selected element.
* @returns {CKEDITOR.dom.element} The selected element. Null if no
* selection is available or the selection type is not
* <code>{@link CKEDITOR.SELECTION_ELEMENT}</code>.
* @example
* var element = editor.getSelection().<strong>getSelectedElement()</strong>;
* alert( element.getName() );
*/
getSelectedElement : function()
{
var cache = this._.cache;
if ( cache.selectedElement !== undefined )
return cache.selectedElement;
var self = this;
var node = CKEDITOR.tools.tryThese(
// Is it native IE control type selection?
function()
{
return self.getNative().createRange().item( 0 );
},
// If a table or list is fully selected.
function()
{
var root,
retval,
range = self.getRanges()[ 0 ],
ancestor = range.getCommonAncestor( 1, 1 ),
tags = { table:1,ul:1,ol:1,dl:1 };
for ( var t in tags )
{
if ( ( root = ancestor.getAscendant( t, 1 ) ) )
break;
}
if ( root )
{
// Enlarging the start boundary.
var testRange = new CKEDITOR.dom.range( this.document );
testRange.setStartAt( root, CKEDITOR.POSITION_AFTER_START );
testRange.setEnd( range.startContainer, range.startOffset );
var enlargeables = CKEDITOR.tools.extend( tags, CKEDITOR.dtd.$listItem, CKEDITOR.dtd.$tableContent ),
walker = new CKEDITOR.dom.walker( testRange ),
// Check the range is at the inner boundary of the structural element.
guard = function( walker, isEnd )
{
return function( node, isWalkOut )
{
if ( node.type == CKEDITOR.NODE_TEXT && ( !CKEDITOR.tools.trim( node.getText() ) || node.getParent().data( 'cke-bookmark' ) ) )
return true;
var tag;
if ( node.type == CKEDITOR.NODE_ELEMENT )
{
tag = node.getName();
// Bypass bogus br at the end of block.
if ( tag == 'br' && isEnd && node.equals( node.getParent().getBogus() ) )
return true;
if ( isWalkOut && tag in enlargeables || tag in CKEDITOR.dtd.$removeEmpty )
return true;
}
walker.halted = 1;
return false;
};
};
walker.guard = guard( walker );
if ( walker.checkBackward() && !walker.halted )
{
walker = new CKEDITOR.dom.walker( testRange );
testRange.setStart( range.endContainer, range.endOffset );
testRange.setEndAt( root, CKEDITOR.POSITION_BEFORE_END );
walker.guard = guard( walker, 1 );
if ( walker.checkForward() && !walker.halted )
retval = root.$;
}
}
if ( !retval )
throw 0;
return retval;
},
// Figure it out by checking if there's a single enclosed
// node of the range.
function()
{
var range = self.getRanges()[ 0 ],
enclosed,
selected;
// Check first any enclosed element, e.g. <ul>[<li><a href="#">item</a></li>]</ul>
for ( var i = 2; i && !( ( enclosed = range.getEnclosedNode() )
&& ( enclosed.type == CKEDITOR.NODE_ELEMENT )
&& styleObjectElements[ enclosed.getName() ]
&& ( selected = enclosed ) ); i-- )
{
// Then check any deep wrapped element, e.g. [<b><i><img /></i></b>]
range.shrink( CKEDITOR.SHRINK_ELEMENT );
}
return selected.$;
});
return cache.selectedElement = ( node ? new CKEDITOR.dom.element( node ) : null );
},
/**
* Retrieves the text contained within the range. An empty string is returned for non-text selection.
* @returns {String} A string of text within the current selection.
* @since 3.6.1
* @example
* var text = editor.getSelection().<strong>getSelectedText()</strong>;
* alert( text );
*/
getSelectedText : function()
{
var cache = this._.cache;
if ( cache.selectedText !== undefined )
return cache.selectedText;
var text = '',
nativeSel = this.getNative();
if ( this.getType() == CKEDITOR.SELECTION_TEXT )
text = CKEDITOR.env.ie ? nativeSel.createRange().text : nativeSel.toString();
return ( cache.selectedText = text );
},
/**
* Locks the selection made in the editor in order to make it possible to
* manipulate it without browser interference. A locked selection is
* cached and remains unchanged until it is released with the <code>#unlock</code>
* method.
* @example
* editor.getSelection().<strong>lock()</strong>;
*/
lock : function()
{
// Call all cacheable function.
this.getRanges();
this.getStartElement();
this.getSelectedElement();
this.getSelectedText();
// The native selection is not available when locked.
this._.cache.nativeSel = {};
this.isLocked = 1;
// Save this selection inside the DOM document.
this.document.setCustomData( 'cke_locked_selection', this );
},
/**
* Unlocks the selection made in the editor and locked with the <code>#lock</code> method.
* An unlocked selection is no longer cached and can be changed.
* @param {Boolean} [restore] If set to <code>true</code>, the selection is restored back to the selection saved earlier by using the <code>#lock</code> method.
* @example
* editor.getSelection().<strong>unlock()</strong>;
*/
unlock : function( restore )
{
var doc = this.document,
lockedSelection = doc.getCustomData( 'cke_locked_selection' );
if ( lockedSelection )
{
doc.setCustomData( 'cke_locked_selection', null );
if ( restore )
{
var selectedElement = lockedSelection.getSelectedElement(),
ranges = !selectedElement && lockedSelection.getRanges();
this.isLocked = 0;
this.reset();
if ( selectedElement )
this.selectElement( selectedElement );
else
this.selectRanges( ranges );
}
}
if ( !lockedSelection || !restore )
{
this.isLocked = 0;
this.reset();
}
},
/**
* Clears the selection cache.
* @example
* editor.getSelection().<strong>reset()</strong>;
*/
reset : function()
{
this._.cache = {};
},
/**
* Makes the current selection of type <code>{@link CKEDITOR.SELECTION_ELEMENT}</code> by enclosing the specified element.
* @param {CKEDITOR.dom.element} element The element to enclose in the selection.
* @example
* var element = editor.document.getById( 'sampleElement' );
* editor.getSelection.<strong>selectElement( element )</strong>;
*/
selectElement : function( element )
{
if ( this.isLocked )
{
var range = new CKEDITOR.dom.range( this.document );
range.setStartBefore( element );
range.setEndAfter( element );
this._.cache.selectedElement = element;
this._.cache.startElement = element;
this._.cache.ranges = new CKEDITOR.dom.rangeList( range );
this._.cache.type = CKEDITOR.SELECTION_ELEMENT;
return;
}
range = new CKEDITOR.dom.range( element.getDocument() );
range.setStartBefore( element );
range.setEndAfter( element );
range.select();
this.document.fire( 'selectionchange' );
this.reset();
},
/**
* Clears the original selection and adds the specified ranges
* to the document selection.
* @param {Array} ranges An array of <code>{@link CKEDITOR.dom.range}</code> instances representing ranges to be added to the document.
* @example
* var ranges = new CKEDITOR.dom.range( editor.document );
* editor.getSelection().<strong>selectRanges( [ ranges ] )</strong>;
*/
selectRanges : function( ranges )
{
if ( this.isLocked )
{
this._.cache.selectedElement = null;
this._.cache.startElement = ranges[ 0 ] && ranges[ 0 ].getTouchedStartNode();
this._.cache.ranges = new CKEDITOR.dom.rangeList( ranges );
this._.cache.type = CKEDITOR.SELECTION_TEXT;
return;
}
if ( CKEDITOR.env.ie )
{
if ( ranges.length > 1 )
{
// IE doesn't accept multiple ranges selection, so we join all into one.
var last = ranges[ ranges.length -1 ] ;
ranges[ 0 ].setEnd( last.endContainer, last.endOffset );
ranges.length = 1;
}
if ( ranges[ 0 ] )
ranges[ 0 ].select();
this.reset();
}
else
{
var sel = this.getNative();
// getNative() returns null if iframe is "display:none" in FF. (#6577)
if ( !sel )
return;
if ( ranges.length )
{
sel.removeAllRanges();
// Remove any existing filling char first.
CKEDITOR.env.webkit && removeFillingChar( this.document );
}
for ( var i = 0 ; i < ranges.length ; i++ )
{
// Joining sequential ranges introduced by
// readonly elements protection.
if ( i < ranges.length -1 )
{
var left = ranges[ i ], right = ranges[ i +1 ],
between = left.clone();
between.setStart( left.endContainer, left.endOffset );
between.setEnd( right.startContainer, right.startOffset );
// Don't confused by Firefox adjancent multi-ranges
// introduced by table cells selection.
if ( !between.collapsed )
{
between.shrink( CKEDITOR.NODE_ELEMENT, true );
var ancestor = between.getCommonAncestor(),
enclosed = between.getEnclosedNode();
// The following cases has to be considered:
// 1. <span contenteditable="false">[placeholder]</span>
// 2. <input contenteditable="false" type="radio"/> (#6621)
if ( ancestor.isReadOnly() || enclosed && enclosed.isReadOnly() )
{
right.setStart( left.startContainer, left.startOffset );
ranges.splice( i--, 1 );
continue;
}
}
}
var range = ranges[ i ];
var nativeRange = this.document.$.createRange();
var startContainer = range.startContainer;
// In FF2, if we have a collapsed range, inside an empty
// element, we must add something to it otherwise the caret
// will not be visible.
// In Opera instead, the selection will be moved out of the
// element. (#4657)
if ( range.collapsed &&
( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) ) &&
startContainer.type == CKEDITOR.NODE_ELEMENT &&
!startContainer.getChildCount() )
{
startContainer.appendText( '' );
}
if ( range.collapsed
&& CKEDITOR.env.webkit
&& rangeRequiresFix( range ) )
{
// Append a zero-width space so WebKit will not try to
// move the selection by itself (#1272).
var fillingChar = createFillingChar( this.document );
range.insertNode( fillingChar ) ;
var next = fillingChar.getNext();
// If the filling char is followed by a <br>, whithout
// having something before it, it'll not blink.
// Let's remove it in this case.
if ( next && !fillingChar.getPrevious() && next.type == CKEDITOR.NODE_ELEMENT && next.getName() == 'br' )
{
removeFillingChar( this.document );
range.moveToPosition( next, CKEDITOR.POSITION_BEFORE_START );
}
else
range.moveToPosition( fillingChar, CKEDITOR.POSITION_AFTER_END );
}
nativeRange.setStart( range.startContainer.$, range.startOffset );
try
{
nativeRange.setEnd( range.endContainer.$, range.endOffset );
}
catch ( e )
{
// There is a bug in Firefox implementation (it would be too easy
// otherwise). The new start can't be after the end (W3C says it can).
// So, let's create a new range and collapse it to the desired point.
if ( e.toString().indexOf( 'NS_ERROR_ILLEGAL_VALUE' ) >= 0 )
{
range.collapse( 1 );
nativeRange.setEnd( range.endContainer.$, range.endOffset );
}
else
throw e;
}
// Select the range.
sel.addRange( nativeRange );
}
// Don't miss selection change event for non-IEs.
this.document.fire( 'selectionchange' );
this.reset();
}
},
/**
* Creates a bookmark for each range of this selection (from <code>#getRanges</code>)
* by calling the <code>{@link CKEDITOR.dom.range.prototype.createBookmark}</code> method,
* with extra care taken to avoid interference among those ranges. The arguments
* received are the same as with the underlying range method.
* @returns {Array} Array of bookmarks for each range.
* @example
* var bookmarks = editor.getSelection().<strong>createBookmarks()</strong>;
*/
createBookmarks : function( serializable )
{
return this.getRanges().createBookmarks( serializable );
},
/**
* Creates a bookmark for each range of this selection (from <code>#getRanges</code>)
* by calling the <code>{@link CKEDITOR.dom.range.prototype.createBookmark2}</code> method,
* with extra care taken to avoid interference among those ranges. The arguments
* received are the same as with the underlying range method.
* @returns {Array} Array of bookmarks for each range.
* @example
* var bookmarks = editor.getSelection().<strong>createBookmarks2()</strong>;
*/
createBookmarks2 : function( normalized )
{
return this.getRanges().createBookmarks2( normalized );
},
/**
* Selects the virtual ranges denoted by the bookmarks by calling <code>#selectRanges</code>.
* @param {Array} bookmarks The bookmarks representing ranges to be selected.
* @returns {CKEDITOR.dom.selection} This selection object, after the ranges were selected.
* @example
* var bookmarks = editor.getSelection().createBookmarks();
* editor.getSelection().<strong>selectBookmarks( bookmarks )</strong>;
*/
selectBookmarks : function( bookmarks )
{
var ranges = [];
for ( var i = 0 ; i < bookmarks.length ; i++ )
{
var range = new CKEDITOR.dom.range( this.document );
range.moveToBookmark( bookmarks[i] );
ranges.push( range );
}
this.selectRanges( ranges );
return this;
},
/**
* Retrieves the common ancestor node of the first range and the last range.
* @returns {CKEDITOR.dom.element} The common ancestor of the selection.
* @example
* var ancestor = editor.getSelection().<strong>getCommonAncestor()</strong>;
*/
getCommonAncestor : function()
{
var ranges = this.getRanges(),
startNode = ranges[ 0 ].startContainer,
endNode = ranges[ ranges.length - 1 ].endContainer;
return startNode.getCommonAncestor( endNode );
},
/**
* Moves the scrollbar to the starting position of the current selection.
* @example
* editor.getSelection().<strong>scrollIntoView()</strong>;
*/
scrollIntoView : function()
{
// If we have split the block, adds a temporary span at the
// range position and scroll relatively to it.
var start = this.getStartElement();
start.scrollIntoView();
}
};
})();
( function()
{
var notWhitespaces = CKEDITOR.dom.walker.whitespaces( true ),
fillerTextRegex = /\ufeff|\u00a0/,
nonCells = { table:1,tbody:1,tr:1 };
CKEDITOR.dom.range.prototype.select =
CKEDITOR.env.ie ?
// V2
function( forceExpand )
{
var collapsed = this.collapsed,
isStartMarkerAlone, dummySpan, ieRange;
// Try to make a object selection.
var selected = this.getEnclosedNode();
if ( selected )
{
try
{
ieRange = this.document.$.body.createControlRange();
ieRange.addElement( selected.$ );
ieRange.select();
return;
}
catch( er ) {}
}
// IE doesn't support selecting the entire table row/cell, move the selection into cells, e.g.
// <table><tbody><tr>[<td>cell</b></td>... => <table><tbody><tr><td>[cell</td>...
if ( this.startContainer.type == CKEDITOR.NODE_ELEMENT && this.startContainer.getName() in nonCells
|| this.endContainer.type == CKEDITOR.NODE_ELEMENT && this.endContainer.getName() in nonCells )
{
this.shrink( CKEDITOR.NODE_ELEMENT, true );
}
var bookmark = this.createBookmark();
// Create marker tags for the start and end boundaries.
var startNode = bookmark.startNode;
var endNode;
if ( !collapsed )
endNode = bookmark.endNode;
// Create the main range which will be used for the selection.
ieRange = this.document.$.body.createTextRange();
// Position the range at the start boundary.
ieRange.moveToElementText( startNode.$ );
ieRange.moveStart( 'character', 1 );
if ( endNode )
{
// Create a tool range for the end.
var ieRangeEnd = this.document.$.body.createTextRange();
// Position the tool range at the end.
ieRangeEnd.moveToElementText( endNode.$ );
// Move the end boundary of the main range to match the tool range.
ieRange.setEndPoint( 'EndToEnd', ieRangeEnd );
ieRange.moveEnd( 'character', -1 );
}
else
{
// The isStartMarkerAlone logic comes from V2. It guarantees that the lines
// will expand and that the cursor will be blinking on the right place.
// Actually, we are using this flag just to avoid using this hack in all
// situations, but just on those needed.
var next = startNode.getNext( notWhitespaces );
isStartMarkerAlone = ( !( next && next.getText && next.getText().match( fillerTextRegex ) ) // already a filler there?
&& ( forceExpand || !startNode.hasPrevious() || ( startNode.getPrevious().is && startNode.getPrevious().is( 'br' ) ) ) );
// Append a temporary <span></span> before the selection.
// This is needed to avoid IE destroying selections inside empty
// inline elements, like <b></b> (#253).
// It is also needed when placing the selection right after an inline
// element to avoid the selection moving inside of it.
dummySpan = this.document.createElement( 'span' );
dummySpan.setHtml( '' ); // Zero Width No-Break Space (U+FEFF). See #1359.
dummySpan.insertBefore( startNode );
if ( isStartMarkerAlone )
{
// To expand empty blocks or line spaces after <br>, we need
// instead to have any char, which will be later deleted using the
// selection.
// \ufeff = Zero Width No-Break Space (U+FEFF). (#1359)
this.document.createText( '\ufeff' ).insertBefore( startNode );
}
}
// Remove the markers (reset the position, because of the changes in the DOM tree).
this.setStartBefore( startNode );
startNode.remove();
if ( collapsed )
{
if ( isStartMarkerAlone )
{
// Move the selection start to include the temporary \ufeff.
ieRange.moveStart( 'character', -1 );
ieRange.select();
// Remove our temporary stuff.
this.document.$.selection.clear();
}
else
ieRange.select();
this.moveToPosition( dummySpan, CKEDITOR.POSITION_BEFORE_START );
dummySpan.remove();
}
else
{
this.setEndBefore( endNode );
endNode.remove();
ieRange.select();
}
this.document.fire( 'selectionchange' );
}
:
function()
{
this.document.getSelection().selectRanges( [ this ] );
};
} )();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview The "colorbutton" plugin that makes it possible to assign
* text and background colors to editor contents.
*
*/
CKEDITOR.plugins.add( 'colorbutton',
{
requires : [ 'panelbutton', 'floatpanel', 'styles' ],
init : function( editor )
{
var config = editor.config,
lang = editor.lang.colorButton;
var clickFn;
if ( !CKEDITOR.env.hc )
{
addButton( 'TextColor', 'fore', lang.textColorTitle );
addButton( 'BGColor', 'back', lang.bgColorTitle );
}
function addButton( name, type, title )
{
var colorBoxId = CKEDITOR.tools.getNextId() + '_colorBox';
editor.ui.add( name, CKEDITOR.UI_PANELBUTTON,
{
label : title,
title : title,
className : 'cke_button_' + name.toLowerCase(),
modes : { wysiwyg : 1 },
panel :
{
css : editor.skin.editor.css,
attributes : { role : 'listbox', 'aria-label' : lang.panelTitle }
},
onBlock : function( panel, block )
{
block.autoSize = true;
block.element.addClass( 'cke_colorblock' );
block.element.setHtml( renderColors( panel, type, colorBoxId ) );
// The block should not have scrollbars (#5933, #6056)
block.element.getDocument().getBody().setStyle( 'overflow', 'hidden' );
CKEDITOR.ui.fire( 'ready', this );
var keys = block.keys;
var rtl = editor.lang.dir == 'rtl';
keys[ rtl ? 37 : 39 ] = 'next'; // ARROW-RIGHT
keys[ 40 ] = 'next'; // ARROW-DOWN
keys[ 9 ] = 'next'; // TAB
keys[ rtl ? 39 : 37 ] = 'prev'; // ARROW-LEFT
keys[ 38 ] = 'prev'; // ARROW-UP
keys[ CKEDITOR.SHIFT + 9 ] = 'prev'; // SHIFT + TAB
keys[ 32 ] = 'click'; // SPACE
},
// The automatic colorbox should represent the real color (#6010)
onOpen : function()
{
var selection = editor.getSelection(),
block = selection && selection.getStartElement(),
path = new CKEDITOR.dom.elementPath( block ),
color;
// Find the closest block element.
block = path.block || path.blockLimit || editor.document.getBody();
// The background color might be transparent. In that case, look up the color in the DOM tree.
do
{
color = block && block.getComputedStyle( type == 'back' ? 'background-color' : 'color' ) || 'transparent';
}
while ( type == 'back' && color == 'transparent' && block && ( block = block.getParent() ) );
// The box should never be transparent.
if ( !color || color == 'transparent' )
color = '#ffffff';
this._.panel._.iframe.getFrameDocument().getById( colorBoxId ).setStyle( 'background-color', color );
}
});
}
function renderColors( panel, type, colorBoxId )
{
var output = [],
colors = config.colorButton_colors.split( ',' );
var clickFn = CKEDITOR.tools.addFunction( function( color, type )
{
if ( color == '?' )
{
var applyColorStyle = arguments.callee;
function onColorDialogClose( evt )
{
this.removeListener( 'ok', onColorDialogClose );
this.removeListener( 'cancel', onColorDialogClose );
evt.name == 'ok' && applyColorStyle( this.getContentElement( 'picker', 'selectedColor' ).getValue(), type );
}
editor.openDialog( 'colordialog', function()
{
this.on( 'ok', onColorDialogClose );
this.on( 'cancel', onColorDialogClose );
} );
return;
}
editor.focus();
panel.hide( false );
editor.fire( 'saveSnapshot' );
// Clean up any conflicting style within the range.
new CKEDITOR.style( config['colorButton_' + type + 'Style'], { color : 'inherit' } ).remove( editor.document );
if ( color )
{
var colorStyle = config['colorButton_' + type + 'Style'];
colorStyle.childRule = type == 'back' ?
function( element )
{
// It's better to apply background color as the innermost style. (#3599)
// Except for "unstylable elements". (#6103)
return isUnstylable( element );
}
:
function( element )
{
// Fore color style must be applied inside links instead of around it. (#4772,#6908)
return !( element.is( 'a' ) || element.getElementsByTag( 'a' ).count() ) || isUnstylable( element );
};
new CKEDITOR.style( colorStyle, { color : color } ).apply( editor.document );
}
editor.fire( 'saveSnapshot' );
});
// Render the "Automatic" button.
output.push(
'<a class="cke_colorauto" _cke_focus=1 hidefocus=true' +
' title="', lang.auto, '"' +
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',null,\'', type, '\');return false;"' +
' href="javascript:void(\'', lang.auto, '\')"' +
' role="option">' +
'<table role="presentation" cellspacing=0 cellpadding=0 width="100%">' +
'<tr>' +
'<td>' +
'<span class="cke_colorbox" id="', colorBoxId, '"></span>' +
'</td>' +
'<td colspan=7 align=center>',
lang.auto,
'</td>' +
'</tr>' +
'</table>' +
'</a>' +
'<table role="presentation" cellspacing=0 cellpadding=0 width="100%">' );
// Render the color boxes.
for ( var i = 0 ; i < colors.length ; i++ )
{
if ( ( i % 8 ) === 0 )
output.push( '</tr><tr>' );
var parts = colors[ i ].split( '/' ),
colorName = parts[ 0 ],
colorCode = parts[ 1 ] || colorName;
// The data can be only a color code (without #) or colorName + color code
// If only a color code is provided, then the colorName is the color with the hash
// Convert the color from RGB to RRGGBB for better compatibility with IE and <font>. See #5676
if (!parts[1])
colorName = '#' + colorName.replace( /^(.)(.)(.)$/, '$1$1$2$2$3$3' );
var colorLabel = editor.lang.colors[ colorCode ] || colorCode;
output.push(
'<td>' +
'<a class="cke_colorbox" _cke_focus=1 hidefocus=true' +
' title="', colorLabel, '"' +
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'', colorName, '\',\'', type, '\'); return false;"' +
' href="javascript:void(\'', colorLabel, '\')"' +
' role="option">' +
'<span class="cke_colorbox" style="background-color:#', colorCode, '"></span>' +
'</a>' +
'</td>' );
}
// Render the "More Colors" button.
if ( config.colorButton_enableMore === undefined || config.colorButton_enableMore )
{
output.push(
'</tr>' +
'<tr>' +
'<td colspan=8 align=center>' +
'<a class="cke_colormore" _cke_focus=1 hidefocus=true' +
' title="', lang.more, '"' +
' onclick="CKEDITOR.tools.callFunction(', clickFn, ',\'?\',\'', type, '\');return false;"' +
' href="javascript:void(\'', lang.more, '\')"',
' role="option">',
lang.more,
'</a>' +
'</td>' ); // tr is later in the code.
}
output.push( '</tr></table>' );
return output.join( '' );
}
function isUnstylable( ele )
{
return ( ele.getAttribute( 'contentEditable' ) == 'false' ) || ele.getAttribute( 'data-nostyle' );
}
}
});
/**
* Whether to enable the <strong>More Colors</strong> button in the color selectors.
* @name CKEDITOR.config.colorButton_enableMore
* @default <code>true</code>
* @type Boolean
* @example
* config.colorButton_enableMore = false;
*/
/**
* Defines the colors to be displayed in the color selectors. This is a string
* containing hexadecimal notation for HTML colors, without the "#" prefix.
* <br /><br />
* Since 3.3: A color name may optionally be defined by prefixing the entries with
* a name and the slash character. For example, "FontColor1/FF9900" will be
* displayed as the color #FF9900 in the selector, but will be output as "FontColor1".
* @name CKEDITOR.config.colorButton_colors
* @type String
* @default <code>'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF'</code>
* @example
* // Brazil colors only.
* config.colorButton_colors = '00923E,F8C100,28166F';
* @example
* config.colorButton_colors = 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00'
*/
CKEDITOR.config.colorButton_colors =
'000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,' +
'B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,' +
'F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,' +
'FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,' +
'FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';
/**
* Stores the style definition that applies the text foreground color.
* @name CKEDITOR.config.colorButton_foreStyle
* @type Object
* @default (see example)
* @example
* // This is actually the default value.
* config.colorButton_foreStyle =
* {
* element : 'span',
* styles : { 'color' : '#(color)' }
* };
*/
CKEDITOR.config.colorButton_foreStyle =
{
element : 'span',
styles : { 'color' : '#(color)' },
overrides : [ { element : 'font', attributes : { 'color' : null } } ]
};
/**
* Stores the style definition that applies the text background color.
* @name CKEDITOR.config.colorButton_backStyle
* @type Object
* @default (see example)
* @example
* // This is actually the default value.
* config.colorButton_backStyle =
* {
* element : 'span',
* styles : { 'background-color' : '#(color)' }
* };
*/
CKEDITOR.config.colorButton_backStyle =
{
element : 'span',
styles : { 'background-color' : '#(color)' }
};
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'uicolor',
{
requires : [ 'dialog' ],
lang : [ 'bg', 'cs', 'cy', 'da', 'de', 'el', 'en', 'eo', 'et', 'fa', 'fi', 'fr', 'he', 'hr', 'it', 'mk', 'nb', 'nl', 'no', 'pl', 'pt-br', 'tr', 'ug', 'uk', 'vi', 'zh-cn' ],
init : function( editor )
{
if ( CKEDITOR.env.ie6Compat )
return;
editor.addCommand( 'uicolor', new CKEDITOR.dialogCommand( 'uicolor' ) );
editor.ui.addButton( 'UIColor',
{
label : editor.lang.uicolor.title,
command : 'uicolor',
icon : this.path + 'uicolor.gif'
});
CKEDITOR.dialog.add( 'uicolor', this.path + 'dialogs/uicolor.js' );
// Load YUI js files.
CKEDITOR.scriptLoader.load( CKEDITOR.getUrl(
'_source/' + // @Packager.RemoveLine
'plugins/uicolor/yui/yui.js'
));
// Load YUI css files.
editor.element.getDocument().appendStyleSheet( CKEDITOR.getUrl(
'_source/' + // @Packager.RemoveLine
'plugins/uicolor/yui/assets/yui.css'
));
}
} );
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'nl',
{
uicolor :
{
title : 'UI Kleurenkiezer',
preview : 'Live voorbeeld',
config : 'Plak deze tekst in jouw config.js bestand',
predefined : 'Voorgedefinieerde kleurensets'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'ug',
{
uicolor :
{
title : 'ئىشلەتكۈچى ئارايۈزى رەڭ تاللىغۇچ',
preview : 'شۇئان ئالدىن كۆزىتىش',
config : 'بۇ ھەرپ تىزىقىنى config.js ھۆججەتكە چاپلايدۇ',
predefined : 'ئالدىن بەلگىلەنگەن رەڭلەر'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'it',
{
uicolor :
{
title : 'Selettore Colore UI',
preview : 'Anteprima Live',
config : 'Incolla questa stringa nel tuo file config.js',
predefined : 'Set di colori predefiniti'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'de',
{
uicolor :
{
title : 'UI Pipette',
preview : 'Live-Vorschau',
config : 'Fügen Sie diese Zeichenfolge in die \'config.js\' Datei.',
predefined : 'Vordefinierte Farbsätze'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'pl',
{
uicolor :
{
title : 'Wybór koloru interfejsu',
preview : 'Podgląd na żywo',
config : 'Wklej poniższy łańcuch znaków do pliku config.js:',
predefined : 'Predefiniowane zestawy kolorów'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'vi',
{
uicolor :
{
title : 'Giao diện người dùng Color Picker',
preview : 'Xem trước trực tiếp',
config : 'Dán chuỗi này vào tập tin config.js của bạn',
predefined : 'Tập màu định nghĩa sẵn'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'hr',
{
uicolor :
{
title : 'UI odabir boja',
preview : 'Pregled uživo',
config : 'Zalijepite ovaj tekst u Vašu config.js datoteku.',
predefined : 'Već postavljeni setovi boja'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'tr',
{
uicolor :
{
title : 'UI Renk Seçicisi',
preview : 'Canlı önizleme',
config : 'Bu dizeyi config.js dosyasının içine yapıştırın',
predefined : 'Önceden tanımlanmış renk kümeleri'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'fr',
{
uicolor :
{
title : 'UI Sélecteur de couleur',
preview : 'Aperçu',
config : 'Collez cette chaîne de caractères dans votre fichier config.js',
predefined : 'Palettes de couleurs prédéfinies'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'zh-cn',
{
uicolor :
{
title : '用户界面颜色选择器',
preview : '即时预览',
config : '粘贴此字符串到你的 config.js 文件',
predefined : '预定义颜色集'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'eo',
{
uicolor :
{
title : 'UI Kolorselektilo',
preview : 'Vidigi la aspekton',
config : 'Gluu tiun signoĉenon en vian dosieron config.js',
predefined : 'Antaŭdifinita koloraro'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'en',
{
uicolor :
{
title : 'UI Color Picker',
preview : 'Live preview',
config : 'Paste this string into your config.js file',
predefined : 'Predefined color sets'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'da',
{
uicolor :
{
title : 'Brugerflade på farvevælger',
preview : 'Vis liveeksempel',
config : 'Indsæt denne streng i din config.js fil',
predefined : 'Prædefinerede farveskemaer'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'nb',
{
uicolor :
{
title : 'Fargevelger for brukergrensesnitt',
preview : 'Forhåndsvisning i sanntid',
config : 'Lim inn følgende tekst i din config.js-fil',
predefined : 'Forhåndsdefinerte fargesett'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'bg',
{
uicolor :
{
title : 'ПИ избор на цвят',
preview : 'Преглед',
config : 'Вмъкнете този низ във Вашия config.js fajl',
predefined : 'Предефинирани цветови палитри'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'el',
{
uicolor :
{
title : 'Διεπαφή Επιλογέα Χρωμάτων',
preview : 'Ζωντανή Προεπισκόπηση',
config : 'Επικολλήστε αυτό το κείμενο στο αρχείο config.js',
predefined : 'Προκαθορισμένα σύνολα χρωμάτων'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'fi',
{
uicolor :
{
title : 'Käyttöliittymän värivalitsin',
preview : 'Esikatsele',
config : 'Liitä tämä merkkijono config.js tiedostoosi',
predefined : 'Esimääritellyt värijoukot'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'cy',
{
uicolor :
{
title : 'Dewisydd Lliwiau\'r UI',
preview : 'Rhagolwg Byw',
config : 'Gludwch y llinyn hwn i\'ch ffeil config.js',
predefined : 'Setiau lliw wedi\'u cyn-ddiffinio'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'no',
{
uicolor :
{
title : 'Fargevelger for brukergrensesnitt',
preview : 'Forhåndsvisning i sanntid',
config : 'Lim inn følgende tekst i din config.js-fil',
predefined : 'Forhåndsdefinerte fargesett'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'mk',
{
uicolor :
{
title : 'Палета со бои',
preview : 'Преглед',
config : 'Залепи го овој текст во config.js датотеката',
predefined : 'Предефинирани множества на бои'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'fa',
{
uicolor :
{
title : 'انتخاب رنگ UI',
preview : 'پیشنمایش زنده',
config : 'این رشته را در فایل config.js خود بچسبانید.',
predefined : 'مجموعه رنگ از پیش تعریف شده'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'et',
{
uicolor :
{
title : 'Värvivalija kasutajaliides',
preview : 'Automaatne eelvaade',
config : 'Aseta see sõne oma config.js faili.',
predefined : 'Eelmääratud värvikomplektid'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'he',
{
uicolor :
{
title : 'בחירת צבע ממשק משתמש',
preview : 'תצוגה מקדימה',
config : 'הדבק את הטקסט הבא לתוך הקובץ config.js',
predefined : 'קבוצות צבעים מוגדרות מראש'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'uk',
{
uicolor :
{
title : 'Color Picker Інтерфейс',
preview : 'Перегляд наживо',
config : 'Вставте цей рядок у файл config.js',
predefined : 'Стандартний набір кольорів'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'cs',
{
uicolor :
{
title : 'Výběr barvy rozhraní',
preview : 'Živý náhled',
config : 'Vložte tento řetězec do Vašeho souboru config.js',
predefined : 'Přednastavené sady barev'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'uicolor', 'pt-br',
{
uicolor :
{
title : 'Paleta de Cores',
preview : 'Visualização ao vivo',
config : 'Cole o texto no seu arquivo config.js',
predefined : 'Conjuntos de cores predefinidos'
}
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.dialog.add( 'uicolor', function( editor )
{
var dialog, picker, pickerContents,
// Actual UI color value.
uiColor = editor.getUiColor(),
pickerId = 'cke_uicolor_picker' + CKEDITOR.tools.getNextNumber();
function setNewPickerColor( color )
{
// Convert HEX representation to RGB, stripping # char.
if ( /^#/.test( color ) )
color = window.YAHOO.util.Color.hex2rgb( color.substr( 1 ) );
picker.setValue( color, true );
// Refresh picker UI.
picker.refresh( pickerId );
}
function setNewUiColor( color, force )
{
if ( force || dialog._.contents.tab1.livePeview.getValue() )
editor.setUiColor( color );
// Write new config string into textbox.
dialog._.contents.tab1.configBox.setValue(
'config.uiColor = "#' + picker.get( "hex" ) + '"'
);
}
pickerContents =
{
id : 'yuiColorPicker',
type : 'html',
html : "<div id='" + pickerId + "' class='cke_uicolor_picker' style='width: 360px; height: 200px; position: relative;'></div>",
onLoad : function( event )
{
var url = CKEDITOR.getUrl(
'_source/' + // @Packager.RemoveLine
'plugins/uicolor/yui/'
);
// Create new color picker widget.
picker = new window.YAHOO.widget.ColorPicker( pickerId,
{
showhsvcontrols : true,
showhexcontrols : true,
images :
{
PICKER_THUMB : url + "assets/picker_thumb.png",
HUE_THUMB : url + "assets/hue_thumb.png"
}
});
// Set actual UI color to the picker.
if ( uiColor )
setNewPickerColor( uiColor );
// Subscribe to the rgbChange event.
picker.on( "rgbChange", function()
{
// Reset predefined box.
dialog._.contents.tab1.predefined.setValue( '' );
setNewUiColor( '#' + picker.get( 'hex' ) );
});
// Fix input class names.
var inputs = new CKEDITOR.dom.nodeList( picker.getElementsByTagName( 'input' ) );
for ( var i = 0; i < inputs.count() ; i++ )
inputs.getItem( i ).addClass( 'cke_dialog_ui_input_text' );
}
};
var skipPreviewChange = true;
return {
title : editor.lang.uicolor.title,
minWidth : 360,
minHeight : 320,
onLoad : function()
{
dialog = this;
this.setupContent();
// #3808
if ( CKEDITOR.env.ie7Compat )
dialog.parts.contents.setStyle( 'overflow', 'hidden' );
},
contents : [
{
id : 'tab1',
label : '',
title : '',
expand : true,
padding : 0,
elements : [
pickerContents,
{
id : 'tab1',
type : 'vbox',
children :
[
{
id : 'livePeview',
type : 'checkbox',
label : editor.lang.uicolor.preview,
'default' : 1,
onLoad : function()
{
skipPreviewChange = true;
},
onChange : function()
{
if ( skipPreviewChange )
return;
var on = this.getValue(),
color = on ? '#' + picker.get( 'hex' ) : uiColor;
setNewUiColor( color, true );
}
},
{
type : 'hbox',
children :
[
{
id : 'predefined',
type : 'select',
'default' : '',
label : editor.lang.uicolor.predefined,
items :
[
[ '' ],
[ 'Light blue', '#9AB8F3' ],
[ 'Sand', '#D2B48C' ],
[ 'Metallic', '#949AAA' ],
[ 'Purple', '#C2A3C7' ],
[ 'Olive', '#A2C980' ],
[ 'Happy green', '#9BD446' ],
[ 'Jezebel Blue', '#14B8C4' ],
[ 'Burn', '#FF893A' ],
[ 'Easy red', '#FF6969' ],
[ 'Pisces 3', '#48B4F2' ],
[ 'Aquarius 5', '#487ED4' ],
[ 'Absinthe', '#A8CF76' ],
[ 'Scrambled Egg', '#C7A622' ],
[ 'Hello monday', '#8E8D80' ],
[ 'Lovely sunshine', '#F1E8B1' ],
[ 'Recycled air', '#B3C593' ],
[ 'Down', '#BCBCA4' ],
[ 'Mark Twain', '#CFE91D' ],
[ 'Specks of dust', '#D1B596' ],
[ 'Lollipop', '#F6CE23' ]
],
onChange : function()
{
var color = this.getValue();
if ( color )
{
setNewPickerColor( color );
setNewUiColor( color );
// Refresh predefined preview box.
CKEDITOR.document.getById( 'predefinedPreview' ).setStyle( 'background', color );
}
else
CKEDITOR.document.getById( 'predefinedPreview' ).setStyle( 'background', '' );
},
onShow : function()
{
var color = editor.getUiColor();
if ( color )
this.setValue( color );
}
},
{
id : 'predefinedPreview',
type : 'html',
html : '<div id="cke_uicolor_preview" style="border: 1px solid black; padding: 3px; width: 30px;">' +
'<div id="predefinedPreview" style="width: 30px; height: 30px;"> </div>' +
'</div>'
}
]
},
{
id : 'configBox',
type : 'text',
label : editor.lang.uicolor.config,
onShow : function()
{
var color = editor.getUiColor();
if ( color )
this.setValue(
'config.uiColor = "' + color + '"'
);
}
}
]
}
]
}
],
buttons : [ CKEDITOR.dialog.okButton ]
};
} );
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @file Blockquote.
*/
(function()
{
function getState( editor, path )
{
var firstBlock = path.block || path.blockLimit;
if ( !firstBlock || firstBlock.getName() == 'body' )
return CKEDITOR.TRISTATE_OFF;
// See if the first block has a blockquote parent.
if ( firstBlock.getAscendant( 'blockquote', true ) )
return CKEDITOR.TRISTATE_ON;
return CKEDITOR.TRISTATE_OFF;
}
function onSelectionChange( evt )
{
var editor = evt.editor;
if ( editor.readOnly )
return;
var command = editor.getCommand( 'blockquote' );
command.state = getState( editor, evt.data.path );
command.fire( 'state' );
}
function noBlockLeft( bqBlock )
{
for ( var i = 0, length = bqBlock.getChildCount(), child ; i < length && ( child = bqBlock.getChild( i ) ) ; i++ )
{
if ( child.type == CKEDITOR.NODE_ELEMENT && child.isBlockBoundary() )
return false;
}
return true;
}
var commandObject =
{
exec : function( editor )
{
var state = editor.getCommand( 'blockquote' ).state,
selection = editor.getSelection(),
range = selection && selection.getRanges( true )[0];
if ( !range )
return;
var bookmarks = selection.createBookmarks();
// Kludge for #1592: if the bookmark nodes are in the beginning of
// blockquote, then move them to the nearest block element in the
// blockquote.
if ( CKEDITOR.env.ie )
{
var bookmarkStart = bookmarks[0].startNode,
bookmarkEnd = bookmarks[0].endNode,
cursor;
if ( bookmarkStart && bookmarkStart.getParent().getName() == 'blockquote' )
{
cursor = bookmarkStart;
while ( ( cursor = cursor.getNext() ) )
{
if ( cursor.type == CKEDITOR.NODE_ELEMENT &&
cursor.isBlockBoundary() )
{
bookmarkStart.move( cursor, true );
break;
}
}
}
if ( bookmarkEnd
&& bookmarkEnd.getParent().getName() == 'blockquote' )
{
cursor = bookmarkEnd;
while ( ( cursor = cursor.getPrevious() ) )
{
if ( cursor.type == CKEDITOR.NODE_ELEMENT &&
cursor.isBlockBoundary() )
{
bookmarkEnd.move( cursor );
break;
}
}
}
}
var iterator = range.createIterator(),
block;
iterator.enlargeBr = editor.config.enterMode != CKEDITOR.ENTER_BR;
if ( state == CKEDITOR.TRISTATE_OFF )
{
var paragraphs = [];
while ( ( block = iterator.getNextParagraph() ) )
paragraphs.push( block );
// If no paragraphs, create one from the current selection position.
if ( paragraphs.length < 1 )
{
var para = editor.document.createElement( editor.config.enterMode == CKEDITOR.ENTER_P ? 'p' : 'div' ),
firstBookmark = bookmarks.shift();
range.insertNode( para );
para.append( new CKEDITOR.dom.text( '\ufeff', editor.document ) );
range.moveToBookmark( firstBookmark );
range.selectNodeContents( para );
range.collapse( true );
firstBookmark = range.createBookmark();
paragraphs.push( para );
bookmarks.unshift( firstBookmark );
}
// Make sure all paragraphs have the same parent.
var commonParent = paragraphs[0].getParent(),
tmp = [];
for ( var i = 0 ; i < paragraphs.length ; i++ )
{
block = paragraphs[i];
commonParent = commonParent.getCommonAncestor( block.getParent() );
}
// The common parent must not be the following tags: table, tbody, tr, ol, ul.
var denyTags = { table : 1, tbody : 1, tr : 1, ol : 1, ul : 1 };
while ( denyTags[ commonParent.getName() ] )
commonParent = commonParent.getParent();
// Reconstruct the block list to be processed such that all resulting blocks
// satisfy parentNode.equals( commonParent ).
var lastBlock = null;
while ( paragraphs.length > 0 )
{
block = paragraphs.shift();
while ( !block.getParent().equals( commonParent ) )
block = block.getParent();
if ( !block.equals( lastBlock ) )
tmp.push( block );
lastBlock = block;
}
// If any of the selected blocks is a blockquote, remove it to prevent
// nested blockquotes.
while ( tmp.length > 0 )
{
block = tmp.shift();
if ( block.getName() == 'blockquote' )
{
var docFrag = new CKEDITOR.dom.documentFragment( editor.document );
while ( block.getFirst() )
{
docFrag.append( block.getFirst().remove() );
paragraphs.push( docFrag.getLast() );
}
docFrag.replace( block );
}
else
paragraphs.push( block );
}
// Now we have all the blocks to be included in a new blockquote node.
var bqBlock = editor.document.createElement( 'blockquote' );
bqBlock.insertBefore( paragraphs[0] );
while ( paragraphs.length > 0 )
{
block = paragraphs.shift();
bqBlock.append( block );
}
}
else if ( state == CKEDITOR.TRISTATE_ON )
{
var moveOutNodes = [],
database = {};
while ( ( block = iterator.getNextParagraph() ) )
{
var bqParent = null,
bqChild = null;
while ( block.getParent() )
{
if ( block.getParent().getName() == 'blockquote' )
{
bqParent = block.getParent();
bqChild = block;
break;
}
block = block.getParent();
}
// Remember the blocks that were recorded down in the moveOutNodes array
// to prevent duplicates.
if ( bqParent && bqChild && !bqChild.getCustomData( 'blockquote_moveout' ) )
{
moveOutNodes.push( bqChild );
CKEDITOR.dom.element.setMarker( database, bqChild, 'blockquote_moveout', true );
}
}
CKEDITOR.dom.element.clearAllMarkers( database );
var movedNodes = [],
processedBlockquoteBlocks = [];
database = {};
while ( moveOutNodes.length > 0 )
{
var node = moveOutNodes.shift();
bqBlock = node.getParent();
// If the node is located at the beginning or the end, just take it out
// without splitting. Otherwise, split the blockquote node and move the
// paragraph in between the two blockquote nodes.
if ( !node.getPrevious() )
node.remove().insertBefore( bqBlock );
else if ( !node.getNext() )
node.remove().insertAfter( bqBlock );
else
{
node.breakParent( node.getParent() );
processedBlockquoteBlocks.push( node.getNext() );
}
// Remember the blockquote node so we can clear it later (if it becomes empty).
if ( !bqBlock.getCustomData( 'blockquote_processed' ) )
{
processedBlockquoteBlocks.push( bqBlock );
CKEDITOR.dom.element.setMarker( database, bqBlock, 'blockquote_processed', true );
}
movedNodes.push( node );
}
CKEDITOR.dom.element.clearAllMarkers( database );
// Clear blockquote nodes that have become empty.
for ( i = processedBlockquoteBlocks.length - 1 ; i >= 0 ; i-- )
{
bqBlock = processedBlockquoteBlocks[i];
if ( noBlockLeft( bqBlock ) )
bqBlock.remove();
}
if ( editor.config.enterMode == CKEDITOR.ENTER_BR )
{
var firstTime = true;
while ( movedNodes.length )
{
node = movedNodes.shift();
if ( node.getName() == 'div' )
{
docFrag = new CKEDITOR.dom.documentFragment( editor.document );
var needBeginBr = firstTime && node.getPrevious() &&
!( node.getPrevious().type == CKEDITOR.NODE_ELEMENT && node.getPrevious().isBlockBoundary() );
if ( needBeginBr )
docFrag.append( editor.document.createElement( 'br' ) );
var needEndBr = node.getNext() &&
!( node.getNext().type == CKEDITOR.NODE_ELEMENT && node.getNext().isBlockBoundary() );
while ( node.getFirst() )
node.getFirst().remove().appendTo( docFrag );
if ( needEndBr )
docFrag.append( editor.document.createElement( 'br' ) );
docFrag.replace( node );
firstTime = false;
}
}
}
}
selection.selectBookmarks( bookmarks );
editor.focus();
}
};
CKEDITOR.plugins.add( 'blockquote',
{
init : function( editor )
{
editor.addCommand( 'blockquote', commandObject );
editor.ui.addButton( 'Blockquote',
{
label : editor.lang.blockquote,
command : 'blockquote'
} );
editor.on( 'selectionChange', onSelectionChange );
},
requires : [ 'domiterator' ]
} );
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
// Register a templates definition set named "default".
CKEDITOR.addTemplates( 'default',
{
// The name of sub folder which hold the shortcut preview images of the
// templates.
imagesPath : CKEDITOR.getUrl( CKEDITOR.plugins.getPath( 'templates' ) + 'templates/images/' ),
// The templates definitions.
templates :
[
{
title: 'Image and Title',
image: 'template1.gif',
description: 'One main image with a title and text that surround the image.',
html:
'<h3>' +
'<img style="margin-right: 10px" height="100" width="100" align="left"/>' +
'Type the title here'+
'</h3>' +
'<p>' +
'Type the text here' +
'</p>'
},
{
title: 'Strange Template',
image: 'template2.gif',
description: 'A template that defines two colums, each one with a title, and some text.',
html:
'<table cellspacing="0" cellpadding="0" style="width:100%" border="0">' +
'<tr>' +
'<td style="width:50%">' +
'<h3>Title 1</h3>' +
'</td>' +
'<td></td>' +
'<td style="width:50%">' +
'<h3>Title 2</h3>' +
'</td>' +
'</tr>' +
'<tr>' +
'<td>' +
'Text 1' +
'</td>' +
'<td></td>' +
'<td>' +
'Text 2' +
'</td>' +
'</tr>' +
'</table>' +
'<p>' +
'More text goes here.' +
'</p>'
},
{
title: 'Text and Table',
image: 'template3.gif',
description: 'A title with some text and a table.',
html:
'<div style="width: 80%">' +
'<h3>' +
'Title goes here' +
'</h3>' +
'<table style="width:150px;float: right" cellspacing="0" cellpadding="0" border="1">' +
'<caption style="border:solid 1px black">' +
'<strong>Table title</strong>' +
'</caption>' +
'</tr>' +
'<tr>' +
'<td> </td>' +
'<td> </td>' +
'<td> </td>' +
'</tr>' +
'<tr>' +
'<td> </td>' +
'<td> </td>' +
'<td> </td>' +
'</tr>' +
'<tr>' +
'<td> </td>' +
'<td> </td>' +
'<td> </td>' +
'</tr>' +
'</table>' +
'<p>' +
'Type the text here' +
'</p>' +
'</div>'
}
]
});
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
CKEDITOR.plugins.add( 'templates',
{
requires : [ 'dialog' ],
init : function( editor )
{
CKEDITOR.dialog.add( 'templates', CKEDITOR.getUrl( this.path + 'dialogs/templates.js' ) );
editor.addCommand( 'templates', new CKEDITOR.dialogCommand( 'templates' ) );
editor.ui.addButton( 'Templates',
{
label : editor.lang.templates.button,
command : 'templates'
});
}
});
var templates = {},
loadedTemplatesFiles = {};
CKEDITOR.addTemplates = function( name, definition )
{
templates[ name ] = definition;
};
CKEDITOR.getTemplates = function( name )
{
return templates[ name ];
};
CKEDITOR.loadTemplates = function( templateFiles, callback )
{
// Holds the templates files to be loaded.
var toLoad = [];
// Look for pending template files to get loaded.
for ( var i = 0, count = templateFiles.length ; i < count ; i++ )
{
if ( !loadedTemplatesFiles[ templateFiles[ i ] ] )
{
toLoad.push( templateFiles[ i ] );
loadedTemplatesFiles[ templateFiles[ i ] ] = 1;
}
}
if ( toLoad.length )
CKEDITOR.scriptLoader.load( toLoad, callback );
else
setTimeout( callback, 0 );
};
})();
/**
* The templates definition set to use. It accepts a list of names separated by
* comma. It must match definitions loaded with the templates_files setting.
* @type String
* @default 'default'
* @name CKEDITOR.config.templates
* @example
* config.templates = 'my_templates';
*/
/**
* The list of templates definition files to load.
* @type (String) Array
* @default [ 'plugins/templates/templates/default.js' ]
* @example
* config.templates_files =
* [
* '/editor_templates/site_default.js',
* 'http://www.example.com/user_templates.js
* ];
*
*/
CKEDITOR.config.templates_files =
[
CKEDITOR.getUrl(
'_source/' + // @Packager.RemoveLine
'plugins/templates/templates/default.js' )
];
/**
* Whether the "Replace actual contents" checkbox is checked by default in the
* Templates dialog.
* @type Boolean
* @default true
* @example
* config.templates_replaceContent = false;
*/
CKEDITOR.config.templates_replaceContent = true;
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
var doc = CKEDITOR.document;
CKEDITOR.dialog.add( 'templates', function( editor )
{
// Constructs the HTML view of the specified templates data.
function renderTemplatesList( container, templatesDefinitions )
{
// clear loading wait text.
container.setHtml( '' );
for ( var i = 0, totalDefs = templatesDefinitions.length ; i < totalDefs ; i++ )
{
var definition = CKEDITOR.getTemplates( templatesDefinitions[ i ] ),
imagesPath = definition.imagesPath,
templates = definition.templates,
count = templates.length;
for ( var j = 0 ; j < count ; j++ )
{
var template = templates[ j ],
item = createTemplateItem( template, imagesPath );
item.setAttribute( 'aria-posinset', j + 1 );
item.setAttribute( 'aria-setsize', count );
container.append( item );
}
}
}
function createTemplateItem( template, imagesPath )
{
var item = CKEDITOR.dom.element.createFromHtml(
'<a href="javascript:void(0)" tabIndex="-1" role="option" >' +
'<div class="cke_tpl_item"></div>' +
'</a>' );
// Build the inner HTML of our new item DIV.
var html = '<table style="width:350px;" class="cke_tpl_preview" role="presentation"><tr>';
if ( template.image && imagesPath )
html += '<td class="cke_tpl_preview_img"><img src="' + CKEDITOR.getUrl( imagesPath + template.image ) + '"' + ( CKEDITOR.env.ie6Compat ? ' onload="this.width=this.width"' : '' ) + ' alt="" title=""></td>';
html += '<td style="white-space:normal;"><span class="cke_tpl_title">' + template.title + '</span><br/>';
if ( template.description )
html += '<span>' + template.description + '</span>';
html += '</td></tr></table>';
item.getFirst().setHtml( html );
item.on( 'click', function() { insertTemplate( template.html ); } );
return item;
}
/**
* Insert the specified template content into editor.
* @param {Number} index
*/
function insertTemplate( html )
{
var dialog = CKEDITOR.dialog.getCurrent(),
isInsert = dialog.getValueOf( 'selectTpl', 'chkInsertOpt' );
if ( isInsert )
{
// Everything should happen after the document is loaded (#4073).
editor.on( 'contentDom', function( evt )
{
evt.removeListener();
dialog.hide();
// Place the cursor at the first editable place.
var range = new CKEDITOR.dom.range( editor.document );
range.moveToElementEditStart( editor.document.getBody() );
range.select( 1 );
setTimeout( function()
{
editor.fire( 'saveSnapshot' );
}, 0 );
});
editor.fire( 'saveSnapshot' );
editor.setData( html );
}
else
{
editor.insertHtml( html );
dialog.hide();
}
}
function keyNavigation( evt )
{
var target = evt.data.getTarget(),
onList = listContainer.equals( target );
// Keyboard navigation for template list.
if ( onList || listContainer.contains( target ) )
{
var keystroke = evt.data.getKeystroke(),
items = listContainer.getElementsByTag( 'a' ),
focusItem;
if ( items )
{
// Focus not yet onto list items?
if ( onList )
focusItem = items.getItem( 0 );
else
{
switch ( keystroke )
{
case 40 : // ARROW-DOWN
focusItem = target.getNext();
break;
case 38 : // ARROW-UP
focusItem = target.getPrevious();
break;
case 13 : // ENTER
case 32 : // SPACE
target.fire( 'click' );
}
}
if ( focusItem )
{
focusItem.focus();
evt.data.preventDefault();
}
}
}
}
// Load skin at first.
CKEDITOR.skins.load( editor, 'templates' );
var listContainer;
var templateListLabelId = 'cke_tpl_list_label_' + CKEDITOR.tools.getNextNumber(),
lang = editor.lang.templates,
config = editor.config;
return {
title :editor.lang.templates.title,
minWidth : CKEDITOR.env.ie ? 440 : 400,
minHeight : 340,
contents :
[
{
id :'selectTpl',
label : lang.title,
elements :
[
{
type : 'vbox',
padding : 5,
children :
[
{
id : 'selectTplText',
type : 'html',
html :
'<span>' +
lang.selectPromptMsg +
'</span>'
},
{
id : 'templatesList',
type : 'html',
focus: true,
html :
'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="' + templateListLabelId+ '">' +
'<div class="cke_tpl_loading"><span></span></div>' +
'</div>' +
'<span class="cke_voice_label" id="' + templateListLabelId + '">' + lang.options+ '</span>'
},
{
id : 'chkInsertOpt',
type : 'checkbox',
label : lang.insertOption,
'default' : config.templates_replaceContent
}
]
}
]
}
],
buttons : [ CKEDITOR.dialog.cancelButton ],
onShow : function()
{
var templatesListField = this.getContentElement( 'selectTpl' , 'templatesList' );
listContainer = templatesListField.getElement();
CKEDITOR.loadTemplates( config.templates_files, function()
{
var templates = ( config.templates || 'default' ).split( ',' );
if ( templates.length )
{
renderTemplatesList( listContainer, templates );
templatesListField.focus();
}
else
{
listContainer.setHtml(
'<div class="cke_tpl_empty">' +
'<span>' + lang.emptyListMsg + '</span>' +
'</div>' );
}
});
this._.element.on( 'keydown', keyNavigation );
},
onHide : function()
{
this._.element.removeListener( 'keydown', keyNavigation );
}
};
});
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
// Regex to scan for at the end of blocks, which are actually placeholders.
// Safari transforms the to \xa0. (#4172)
var tailNbspRegex = /^[\t\r\n ]*(?: |\xa0)$/;
var protectedSourceMarker = '{cke_protected}';
// Return the last non-space child node of the block (#4344).
function lastNoneSpaceChild( block )
{
var lastIndex = block.children.length,
last = block.children[ lastIndex - 1 ];
while ( last && last.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.trim( last.value ) )
last = block.children[ --lastIndex ];
return last;
}
function trimFillers( block, fromSource )
{
// If the current node is a block, and if we're converting from source or
// we're not in IE then search for and remove any tailing BR node.
//
// Also, any at the end of blocks are fillers, remove them as well.
// (#2886)
var children = block.children, lastChild = lastNoneSpaceChild( block );
if ( lastChild )
{
if ( ( fromSource || !CKEDITOR.env.ie ) && lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br' )
children.pop();
if ( lastChild.type == CKEDITOR.NODE_TEXT && tailNbspRegex.test( lastChild.value ) )
children.pop();
}
}
function blockNeedsExtension( block, fromSource, extendEmptyBlock )
{
if( !fromSource && ( !extendEmptyBlock ||
typeof extendEmptyBlock == 'function' && ( extendEmptyBlock( block ) === false ) ) )
return false;
// 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg;
// 2. For the rest, at least table cell and list item need no filler space.
// (#6248)
if ( fromSource && CKEDITOR.env.ie &&
( document.documentMode > 7
|| block.name in CKEDITOR.dtd.tr
|| block.name in CKEDITOR.dtd.$listItem ) )
return false;
var lastChild = lastNoneSpaceChild( block );
return !lastChild || lastChild &&
( lastChild.type == CKEDITOR.NODE_ELEMENT && lastChild.name == 'br'
// Some of the controls in form needs extension too,
// to move cursor at the end of the form. (#4791)
|| block.name == 'form' && lastChild.name == 'input' );
}
function getBlockExtension( isOutput, emptyBlockFiller )
{
return function( node )
{
trimFillers( node, !isOutput );
if ( blockNeedsExtension( node, !isOutput, emptyBlockFiller ) )
{
if ( isOutput || CKEDITOR.env.ie )
node.add( new CKEDITOR.htmlParser.text( '\xa0' ) );
else
node.add( new CKEDITOR.htmlParser.element( 'br', {} ) );
}
};
}
var dtd = CKEDITOR.dtd;
// Define orders of table elements.
var tableOrder = [ 'caption', 'colgroup', 'col', 'thead', 'tfoot', 'tbody' ];
// Find out the list of block-like tags that can contain <br>.
var blockLikeTags = CKEDITOR.tools.extend( {}, dtd.$block, dtd.$listItem, dtd.$tableContent );
for ( var i in blockLikeTags )
{
if ( ! ( 'br' in dtd[i] ) )
delete blockLikeTags[i];
}
// We just avoid filler in <pre> right now.
// TODO: Support filler for <pre>, line break is also occupy line height.
delete blockLikeTags.pre;
var defaultDataFilterRules =
{
elements : {},
attributeNames :
[
// Event attributes (onXYZ) must not be directly set. They can become
// active in the editing area (IE|WebKit).
[ ( /^on/ ), 'data-cke-pa-on' ]
]
};
var defaultDataBlockFilterRules = { elements : {} };
for ( i in blockLikeTags )
defaultDataBlockFilterRules.elements[ i ] = getBlockExtension();
var defaultHtmlFilterRules =
{
elementNames :
[
// Remove the "cke:" namespace prefix.
[ ( /^cke:/ ), '' ],
// Ignore <?xml:namespace> tags.
[ ( /^\?xml:namespace$/ ), '' ]
],
attributeNames :
[
// Attributes saved for changes and protected attributes.
[ ( /^data-cke-(saved|pa)-/ ), '' ],
// All "data-cke-" attributes are to be ignored.
[ ( /^data-cke-.*/ ), '' ],
[ 'hidefocus', '' ]
],
elements :
{
$ : function( element )
{
var attribs = element.attributes;
if ( attribs )
{
// Elements marked as temporary are to be ignored.
if ( attribs[ 'data-cke-temp' ] )
return false;
// Remove duplicated attributes - #3789.
var attributeNames = [ 'name', 'href', 'src' ],
savedAttributeName;
for ( var i = 0 ; i < attributeNames.length ; i++ )
{
savedAttributeName = 'data-cke-saved-' + attributeNames[ i ];
savedAttributeName in attribs && ( delete attribs[ attributeNames[ i ] ] );
}
}
return element;
},
// The contents of table should be in correct order (#4809).
table : function( element )
{
var children = element.children;
children.sort( function ( node1, node2 )
{
return node1.type == CKEDITOR.NODE_ELEMENT && node2.type == node1.type ?
CKEDITOR.tools.indexOf( tableOrder, node1.name ) > CKEDITOR.tools.indexOf( tableOrder, node2.name ) ? 1 : -1 : 0;
} );
},
embed : function( element )
{
var parent = element.parent;
// If the <embed> is child of a <object>, copy the width
// and height attributes from it.
if ( parent && parent.name == 'object' )
{
var parentWidth = parent.attributes.width,
parentHeight = parent.attributes.height;
parentWidth && ( element.attributes.width = parentWidth );
parentHeight && ( element.attributes.height = parentHeight );
}
},
// Restore param elements into self-closing.
param : function( param )
{
param.children = [];
param.isEmpty = true;
return param;
},
// Remove empty link but not empty anchor.(#3829)
a : function( element )
{
if ( !( element.children.length ||
element.attributes.name ||
element.attributes[ 'data-cke-saved-name' ] ) )
{
return false;
}
},
// Remove dummy span in webkit.
span: function( element )
{
if ( element.attributes[ 'class' ] == 'Apple-style-span' )
delete element.name;
},
// Empty <pre> in IE is reported with filler node ( ).
pre : function( element ) { CKEDITOR.env.ie && trimFillers( element ); },
html : function( element )
{
delete element.attributes.contenteditable;
delete element.attributes[ 'class' ];
},
body : function( element )
{
delete element.attributes.spellcheck;
delete element.attributes.contenteditable;
},
style : function( element )
{
var child = element.children[ 0 ];
child && child.value && ( child.value = CKEDITOR.tools.trim( child.value ));
if ( !element.attributes.type )
element.attributes.type = 'text/css';
},
title : function( element )
{
var titleText = element.children[ 0 ];
titleText && ( titleText.value = element.attributes[ 'data-cke-title' ] || '' );
}
},
attributes :
{
'class' : function( value, element )
{
// Remove all class names starting with "cke_".
return CKEDITOR.tools.ltrim( value.replace( /(?:^|\s+)cke_[^\s]*/g, '' ) ) || false;
}
}
};
if ( CKEDITOR.env.ie )
{
// IE outputs style attribute in capital letters. We should convert
// them back to lower case, while not hurting the values (#5930)
defaultHtmlFilterRules.attributes.style = function( value, element )
{
return value.replace( /(^|;)([^\:]+)/g, function( match )
{
return match.toLowerCase();
});
};
}
function protectReadOnly( element )
{
var attrs = element.attributes;
// We should flag that the element was locked by our code so
// it'll be editable by the editor functions (#6046).
if ( attrs.contenteditable != "false" )
attrs[ 'data-cke-editable' ] = attrs.contenteditable ? 'true' : 1;
attrs.contenteditable = "false";
}
function unprotectReadyOnly( element )
{
var attrs = element.attributes;
switch( attrs[ 'data-cke-editable' ] )
{
case 'true': attrs.contenteditable = 'true'; break;
case '1': delete attrs.contenteditable; break;
}
}
// Disable form elements editing mode provided by some browers. (#5746)
for ( i in { input : 1, textarea : 1 } )
{
defaultDataFilterRules.elements[ i ] = protectReadOnly;
defaultHtmlFilterRules.elements[ i ] = unprotectReadyOnly;
}
var protectElementRegex = /<(a|area|img|input)\b([^>]*)>/gi,
protectAttributeRegex = /\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;
var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
encodedElementsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi;
var protectElementNamesRegex = /(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,
unprotectElementNamesRegex = /(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi;
var protectSelfClosingRegex = /<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;
function protectAttributes( html )
{
return html.replace( protectElementRegex, function( element, tag, attributes )
{
return '<' + tag + attributes.replace( protectAttributeRegex, function( fullAttr, attrName )
{
// Avoid corrupting the inline event attributes (#7243).
// We should not rewrite the existed protected attributes, e.g. clipboard content from editor. (#5218)
if ( !( /^on/ ).test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 )
return ' data-cke-saved-' + fullAttr + ' data-cke-' + CKEDITOR.rnd + '-' + fullAttr;
return fullAttr;
}) + '>';
});
}
function protectElements( html )
{
return html.replace( protectElementsRegex, function( match )
{
return '<cke:encoded>' + encodeURIComponent( match ) + '</cke:encoded>';
});
}
function unprotectElements( html )
{
return html.replace( encodedElementsRegex, function( match, encoded )
{
return decodeURIComponent( encoded );
});
}
function protectElementsNames( html )
{
return html.replace( protectElementNamesRegex, '$1cke:$2');
}
function unprotectElementNames( html )
{
return html.replace( unprotectElementNamesRegex, '$1$2' );
}
function protectSelfClosingElements( html )
{
return html.replace( protectSelfClosingRegex, '<cke:$1$2></cke:$1>' );
}
function protectPreFormatted( html )
{
return html.replace( /(<pre\b[^>]*>)(\r\n|\n)/g, '$1$2$2' );
}
function protectRealComments( html )
{
return html.replace( /<!--(?!{cke_protected})[\s\S]+?-->/g, function( match )
{
return '<!--' + protectedSourceMarker +
'{C}' +
encodeURIComponent( match ).replace( /--/g, '%2D%2D' ) +
'-->';
});
}
function unprotectRealComments( html )
{
return html.replace( /<!--\{cke_protected\}\{C\}([\s\S]+?)-->/g, function( match, data )
{
return decodeURIComponent( data );
});
}
function unprotectSource( html, editor )
{
var store = editor._.dataStore;
return html.replace( /<!--\{cke_protected\}([\s\S]+?)-->/g, function( match, data )
{
return decodeURIComponent( data );
}).replace( /\{cke_protected_(\d+)\}/g, function( match, id )
{
return store && store[ id ] || '';
});
}
function protectSource( data, editor )
{
var protectedHtml = [],
protectRegexes = editor.config.protectedSource,
store = editor._.dataStore || ( editor._.dataStore = { id : 1 } ),
tempRegex = /<\!--\{cke_temp(comment)?\}(\d*?)-->/g;
var regexes =
[
// Script tags will also be forced to be protected, otherwise
// IE will execute them.
( /<script[\s\S]*?<\/script>/gi ),
// <noscript> tags (get lost in IE and messed up in FF).
/<noscript[\s\S]*?<\/noscript>/gi
]
.concat( protectRegexes );
// First of any other protection, we must protect all comments
// to avoid loosing them (of course, IE related).
// Note that we use a different tag for comments, as we need to
// transform them when applying filters.
data = data.replace( (/<!--[\s\S]*?-->/g), function( match )
{
return '<!--{cke_tempcomment}' + ( protectedHtml.push( match ) - 1 ) + '-->';
});
for ( var i = 0 ; i < regexes.length ; i++ )
{
data = data.replace( regexes[i], function( match )
{
match = match.replace( tempRegex, // There could be protected source inside another one. (#3869).
function( $, isComment, id )
{
return protectedHtml[ id ];
}
);
// Avoid protecting over protected, e.g. /\{.*?\}/
return ( /cke_temp(comment)?/ ).test( match ) ? match
: '<!--{cke_temp}' + ( protectedHtml.push( match ) - 1 ) + '-->';
});
}
data = data.replace( tempRegex, function( $, isComment, id )
{
return '<!--' + protectedSourceMarker +
( isComment ? '{C}' : '' ) +
encodeURIComponent( protectedHtml[ id ] ).replace( /--/g, '%2D%2D' ) +
'-->';
}
);
// Different protection pattern is used for those that
// live in attributes to avoid from being HTML encoded.
return data.replace( /(['"]).*?\1/g, function ( match )
{
return match.replace( /<!--\{cke_protected\}([\s\S]+?)-->/g, function( match, data )
{
store[ store.id ] = decodeURIComponent( data );
return '{cke_protected_'+ ( store.id++ ) + '}';
});
});
}
CKEDITOR.plugins.add( 'htmldataprocessor',
{
requires : [ 'htmlwriter' ],
init : function( editor )
{
var dataProcessor = editor.dataProcessor = new CKEDITOR.htmlDataProcessor( editor );
dataProcessor.writer.forceSimpleAmpersand = editor.config.forceSimpleAmpersand;
dataProcessor.dataFilter.addRules( defaultDataFilterRules );
dataProcessor.dataFilter.addRules( defaultDataBlockFilterRules );
dataProcessor.htmlFilter.addRules( defaultHtmlFilterRules );
var defaultHtmlBlockFilterRules = { elements : {} };
for ( i in blockLikeTags )
defaultHtmlBlockFilterRules.elements[ i ] = getBlockExtension( true, editor.config.fillEmptyBlocks );
dataProcessor.htmlFilter.addRules( defaultHtmlBlockFilterRules );
},
onLoad : function()
{
! ( 'fillEmptyBlocks' in CKEDITOR.config ) && ( CKEDITOR.config.fillEmptyBlocks = 1 );
}
});
CKEDITOR.htmlDataProcessor = function( editor )
{
this.editor = editor;
this.writer = new CKEDITOR.htmlWriter();
this.dataFilter = new CKEDITOR.htmlParser.filter();
this.htmlFilter = new CKEDITOR.htmlParser.filter();
};
CKEDITOR.htmlDataProcessor.prototype =
{
toHtml : function( data, fixForBody )
{
// The source data is already HTML, but we need to clean
// it up and apply the filter.
data = protectSource( data, this.editor );
// Before anything, we must protect the URL attributes as the
// browser may changing them when setting the innerHTML later in
// the code.
data = protectAttributes( data );
// Protect elements than can't be set inside a DIV. E.g. IE removes
// style tags from innerHTML. (#3710)
data = protectElements( data );
// Certain elements has problem to go through DOM operation, protect
// them by prefixing 'cke' namespace. (#3591)
data = protectElementsNames( data );
// All none-IE browsers ignore self-closed custom elements,
// protecting them into open-close. (#3591)
data = protectSelfClosingElements( data );
// Compensate one leading line break after <pre> open as browsers
// eat it up. (#5789)
data = protectPreFormatted( data );
// Call the browser to help us fixing a possibly invalid HTML
// structure.
var div = new CKEDITOR.dom.element( 'div' );
// Add fake character to workaround IE comments bug. (#3801)
div.setHtml( 'a' + data );
data = div.getHtml().substr( 1 );
// Restore shortly protected attribute names.
data = data.replace( new RegExp( ' data-cke-' + CKEDITOR.rnd + '-', 'ig' ), ' ' );
// Unprotect "some" of the protected elements at this point.
data = unprotectElementNames( data );
data = unprotectElements( data );
// Restore the comments that have been protected, in this way they
// can be properly filtered.
data = unprotectRealComments( data );
// Now use our parser to make further fixes to the structure, as
// well as apply the filter.
var fragment = CKEDITOR.htmlParser.fragment.fromHtml( data, fixForBody ),
writer = new CKEDITOR.htmlParser.basicWriter();
fragment.writeHtml( writer, this.dataFilter );
data = writer.getHtml( true );
// Protect the real comments again.
data = protectRealComments( data );
return data;
},
toDataFormat : function( html, fixForBody )
{
var writer = this.writer,
fragment = CKEDITOR.htmlParser.fragment.fromHtml( html, fixForBody );
writer.reset();
fragment.writeHtml( writer, this.htmlFilter );
var data = writer.getHtml( true );
// Restore those non-HTML protected source. (#4475,#4880)
data = unprotectRealComments( data );
data = unprotectSource( data, this.editor );
return data;
}
};
})();
/**
* Whether to force using "&" instead of "&amp;" in elements attributes
* values, it's not recommended to change this setting for compliance with the
* W3C XHTML 1.0 standards (<a href="http://www.w3.org/TR/xhtml1/#C_12">C.12, XHTML 1.0</a>).
* @name CKEDITOR.config.forceSimpleAmpersand
* @name CKEDITOR.config.forceSimpleAmpersand
* @type Boolean
* @default false
* @example
* config.forceSimpleAmpersand = false;
*/
/**
* Whether a filler text (non-breaking space entity - ) will be inserted into empty block elements in HTML output,
* this is used to render block elements properly with line-height; When a function is instead specified,
* it'll be passed a {@link CKEDITOR.htmlParser.element} to decide whether adding the filler text
* by expecting a boolean return value.
* @name CKEDITOR.config.fillEmptyBlocks
* @since 3.5
* @type Boolean
* @default true
* @example
* config.fillEmptyBlocks = false; // Prevent filler nodes in all empty blocks.
*
* // Prevent filler node only in float cleaners.
* config.fillEmptyBlocks = function( element )
* {
* if ( element.attributes[ 'class' ].indexOf ( 'clear-both' ) != -1 )
* return false;
* }
*/
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.ajax} object, which holds ajax methods for
* data loading.
*/
(function()
{
CKEDITOR.plugins.add( 'ajax',
{
requires : [ 'xml' ]
});
/**
* Ajax methods for data loading.
* @namespace
* @example
*/
CKEDITOR.ajax = (function()
{
var createXMLHttpRequest = function()
{
// In IE, using the native XMLHttpRequest for local files may throw
// "Access is Denied" errors.
if ( !CKEDITOR.env.ie || location.protocol != 'file:' )
try { return new XMLHttpRequest(); } catch(e) {}
try { return new ActiveXObject( 'Msxml2.XMLHTTP' ); } catch (e) {}
try { return new ActiveXObject( 'Microsoft.XMLHTTP' ); } catch (e) {}
return null;
};
var checkStatus = function( xhr )
{
// HTTP Status Codes:
// 2xx : Success
// 304 : Not Modified
// 0 : Returned when running locally (file://)
// 1223 : IE may change 204 to 1223 (see http://dev.jquery.com/ticket/1450)
return ( xhr.readyState == 4 &&
( ( xhr.status >= 200 && xhr.status < 300 ) ||
xhr.status == 304 ||
xhr.status === 0 ||
xhr.status == 1223 ) );
};
var getResponseText = function( xhr )
{
if ( checkStatus( xhr ) )
return xhr.responseText;
return null;
};
var getResponseXml = function( xhr )
{
if ( checkStatus( xhr ) )
{
var xml = xhr.responseXML;
return new CKEDITOR.xml( xml && xml.firstChild ? xml : xhr.responseText );
}
return null;
};
var load = function( url, callback, getResponseFn )
{
var async = !!callback;
var xhr = createXMLHttpRequest();
if ( !xhr )
return null;
xhr.open( 'GET', url, async );
if ( async )
{
// TODO: perform leak checks on this closure.
/** @ignore */
xhr.onreadystatechange = function()
{
if ( xhr.readyState == 4 )
{
callback( getResponseFn( xhr ) );
xhr = null;
}
};
}
xhr.send(null);
return async ? '' : getResponseFn( xhr );
};
return /** @lends CKEDITOR.ajax */ {
/**
* Loads data from an URL as plain text.
* @param {String} url The URL from which load data.
* @param {Function} [callback] A callback function to be called on
* data load. If not provided, the data will be loaded
* synchronously.
* @returns {String} The loaded data. For asynchronous requests, an
* empty string. For invalid requests, null.
* @example
* // Load data synchronously.
* var data = CKEDITOR.ajax.load( 'somedata.txt' );
* alert( data );
* @example
* // Load data asynchronously.
* var data = CKEDITOR.ajax.load( 'somedata.txt', function( data )
* {
* alert( data );
* } );
*/
load : function( url, callback )
{
return load( url, callback, getResponseText );
},
/**
* Loads data from an URL as XML.
* @param {String} url The URL from which load data.
* @param {Function} [callback] A callback function to be called on
* data load. If not provided, the data will be loaded
* synchronously.
* @returns {CKEDITOR.xml} An XML object holding the loaded data. For asynchronous requests, an
* empty string. For invalid requests, null.
* @example
* // Load XML synchronously.
* var xml = CKEDITOR.ajax.loadXml( 'somedata.xml' );
* alert( xml.getInnerXml( '//' ) );
* @example
* // Load XML asynchronously.
* var data = CKEDITOR.ajax.loadXml( 'somedata.xml', function( xml )
* {
* alert( xml.getInnerXml( '//' ) );
* } );
*/
loadXml : function( url, callback )
{
return load( url, callback, getResponseXml );
}
};
})();
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @file Preview plugin.
*/
(function()
{
var pluginPath;
var previewCmd =
{
modes : { wysiwyg:1, source:1 },
canUndo : false,
readOnly : 1,
exec : function( editor )
{
var sHTML,
config = editor.config,
baseTag = config.baseHref ? '<base href="' + config.baseHref + '"/>' : '',
isCustomDomain = CKEDITOR.env.isCustomDomain();
if ( config.fullPage )
{
sHTML = editor.getData()
.replace( /<head>/, '$&' + baseTag )
.replace( /[^>]*(?=<\/title>)/, '$& — ' + editor.lang.preview );
}
else
{
var bodyHtml = '<body ',
body = editor.document && editor.document.getBody();
if ( body )
{
if ( body.getAttribute( 'id' ) )
bodyHtml += 'id="' + body.getAttribute( 'id' ) + '" ';
if ( body.getAttribute( 'class' ) )
bodyHtml += 'class="' + body.getAttribute( 'class' ) + '" ';
}
bodyHtml += '>';
sHTML =
editor.config.docType +
'<html dir="' + editor.config.contentsLangDirection + '">' +
'<head>' +
baseTag +
'<title>' + editor.lang.preview + '</title>' +
CKEDITOR.tools.buildStyleHtml( editor.config.contentsCss ) +
'</head>' + bodyHtml +
editor.getData() +
'</body></html>';
}
var iWidth = 640, // 800 * 0.8,
iHeight = 420, // 600 * 0.7,
iLeft = 80; // (800 - 0.8 * 800) /2 = 800 * 0.1.
try
{
var screen = window.screen;
iWidth = Math.round( screen.width * 0.8 );
iHeight = Math.round( screen.height * 0.7 );
iLeft = Math.round( screen.width * 0.1 );
}
catch ( e ){}
var sOpenUrl = '';
if ( isCustomDomain )
{
window._cke_htmlToLoad = sHTML;
sOpenUrl = 'javascript:void( (function(){' +
'document.open();' +
'document.domain="' + document.domain + '";' +
'document.write( window.opener._cke_htmlToLoad );' +
'document.close();' +
'window.opener._cke_htmlToLoad = null;' +
'})() )';
}
// With Firefox only, we need to open a special preview page, so
// anchors will work properly on it. (#9047)
if ( CKEDITOR.env.gecko )
{
window._cke_htmlToLoad = sHTML;
sOpenUrl = pluginPath + 'preview.html';
}
var oWindow = window.open( sOpenUrl, null, 'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' +
iWidth + ',height=' + iHeight + ',left=' + iLeft );
if ( !isCustomDomain && !CKEDITOR.env.gecko )
{
var doc = oWindow.document;
doc.open();
doc.write( sHTML );
doc.close();
// Chrome will need this to show the embedded. (#8016)
CKEDITOR.env.webkit && setTimeout( function() { doc.body.innerHTML += ''; }, 0 );
}
}
};
var pluginName = 'preview';
// Register a plugin named "preview".
CKEDITOR.plugins.add( pluginName,
{
init : function( editor )
{
pluginPath = this.path;
editor.addCommand( pluginName, previewCmd );
editor.ui.addButton( 'Preview',
{
label : editor.lang.preview,
command : pluginName
});
}
});
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
var meta =
{
editorFocus : false,
modes : { wysiwyg:1, source:1 }
};
var blurCommand =
{
exec : function( editor )
{
editor.container.focusNext( true, editor.tabIndex );
}
};
var blurBackCommand =
{
exec : function( editor )
{
editor.container.focusPrevious( true, editor.tabIndex );
}
};
function selectNextCellCommand( backward )
{
return {
editorFocus : false,
canUndo : false,
modes : { wysiwyg : 1 },
exec : function( editor )
{
if ( editor.focusManager.hasFocus )
{
var sel = editor.getSelection(),
ancestor = sel.getCommonAncestor(),
cell;
if ( ( cell = ( ancestor.getAscendant( 'td', true ) || ancestor.getAscendant( 'th', true ) ) ) )
{
var resultRange = new CKEDITOR.dom.range( editor.document ),
next = CKEDITOR.tools.tryThese( function()
{
var row = cell.getParent(),
next = row.$.cells[ cell.$.cellIndex + ( backward ? - 1 : 1 ) ];
// Invalid any empty value.
next.parentNode.parentNode;
return next;
},
function()
{
var row = cell.getParent(),
table = row.getAscendant( 'table' ),
nextRow = table.$.rows[ row.$.rowIndex + ( backward ? - 1 : 1 ) ];
return nextRow.cells[ backward? nextRow.cells.length -1 : 0 ];
});
// Clone one more row at the end of table and select the first newly established cell.
if ( ! ( next || backward ) )
{
var table = cell.getAscendant( 'table' ).$,
cells = cell.getParent().$.cells;
var newRow = new CKEDITOR.dom.element( table.insertRow( -1 ), editor.document );
for ( var i = 0, count = cells.length ; i < count; i++ )
{
var newCell = newRow.append( new CKEDITOR.dom.element(
cells[ i ], editor.document ).clone( false, false ) );
!CKEDITOR.env.ie && newCell.appendBogus();
}
resultRange.moveToElementEditStart( newRow );
}
else if ( next )
{
next = new CKEDITOR.dom.element( next );
resultRange.moveToElementEditStart( next );
// Avoid selecting empty block makes the cursor blind.
if ( !( resultRange.checkStartOfBlock() && resultRange.checkEndOfBlock() ) )
resultRange.selectNodeContents( next );
}
else
return true;
resultRange.select( true );
return true;
}
}
return false;
}
};
}
CKEDITOR.plugins.add( 'tab',
{
requires : [ 'keystrokes' ],
init : function( editor )
{
var tabTools = editor.config.enableTabKeyTools !== false,
tabSpaces = editor.config.tabSpaces || 0,
tabText = '';
while ( tabSpaces-- )
tabText += '\xa0';
if ( tabText )
{
editor.on( 'key', function( ev )
{
if ( ev.data.keyCode == 9 ) // TAB
{
editor.insertHtml( tabText );
ev.cancel();
}
});
}
if ( tabTools )
{
editor.on( 'key', function( ev )
{
if ( ev.data.keyCode == 9 && editor.execCommand( 'selectNextCell' ) || // TAB
ev.data.keyCode == ( CKEDITOR.SHIFT + 9 ) && editor.execCommand( 'selectPreviousCell' ) ) // SHIFT+TAB
ev.cancel();
});
}
if ( CKEDITOR.env.webkit || CKEDITOR.env.gecko )
{
editor.on( 'key', function( ev )
{
var keyCode = ev.data.keyCode;
if ( keyCode == 9 && !tabText ) // TAB
{
ev.cancel();
editor.execCommand( 'blur' );
}
if ( keyCode == ( CKEDITOR.SHIFT + 9 ) ) // SHIFT+TAB
{
editor.execCommand( 'blurBack' );
ev.cancel();
}
});
}
editor.addCommand( 'blur', CKEDITOR.tools.extend( blurCommand, meta ) );
editor.addCommand( 'blurBack', CKEDITOR.tools.extend( blurBackCommand, meta ) );
editor.addCommand( 'selectNextCell', selectNextCellCommand() );
editor.addCommand( 'selectPreviousCell', selectNextCellCommand( true ) );
}
});
})();
/**
* Moves the UI focus to the element following this element in the tabindex
* order.
* @example
* var element = CKEDITOR.document.getById( 'example' );
* element.focusNext();
*/
CKEDITOR.dom.element.prototype.focusNext = function( ignoreChildren, indexToUse )
{
var $ = this.$,
curTabIndex = ( indexToUse === undefined ? this.getTabIndex() : indexToUse ),
passedCurrent, enteredCurrent,
elected, electedTabIndex,
element, elementTabIndex;
if ( curTabIndex <= 0 )
{
// If this element has tabindex <= 0 then we must simply look for any
// element following it containing tabindex=0.
element = this.getNextSourceNode( ignoreChildren, CKEDITOR.NODE_ELEMENT );
while ( element )
{
if ( element.isVisible() && element.getTabIndex() === 0 )
{
elected = element;
break;
}
element = element.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT );
}
}
else
{
// If this element has tabindex > 0 then we must look for:
// 1. An element following this element with the same tabindex.
// 2. The first element in source other with the lowest tabindex
// that is higher than this element tabindex.
// 3. The first element with tabindex=0.
element = this.getDocument().getBody().getFirst();
while ( ( element = element.getNextSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) )
{
if ( !passedCurrent )
{
if ( !enteredCurrent && element.equals( this ) )
{
enteredCurrent = true;
// Ignore this element, if required.
if ( ignoreChildren )
{
if ( !( element = element.getNextSourceNode( true, CKEDITOR.NODE_ELEMENT ) ) )
break;
passedCurrent = 1;
}
}
else if ( enteredCurrent && !this.contains( element ) )
passedCurrent = 1;
}
if ( !element.isVisible() || ( elementTabIndex = element.getTabIndex() ) < 0 )
continue;
if ( passedCurrent && elementTabIndex == curTabIndex )
{
elected = element;
break;
}
if ( elementTabIndex > curTabIndex && ( !elected || !electedTabIndex || elementTabIndex < electedTabIndex ) )
{
elected = element;
electedTabIndex = elementTabIndex;
}
else if ( !elected && elementTabIndex === 0 )
{
elected = element;
electedTabIndex = elementTabIndex;
}
}
}
if ( elected )
elected.focus();
};
/**
* Moves the UI focus to the element before this element in the tabindex order.
* @example
* var element = CKEDITOR.document.getById( 'example' );
* element.focusPrevious();
*/
CKEDITOR.dom.element.prototype.focusPrevious = function( ignoreChildren, indexToUse )
{
var $ = this.$,
curTabIndex = ( indexToUse === undefined ? this.getTabIndex() : indexToUse ),
passedCurrent, enteredCurrent,
elected,
electedTabIndex = 0,
elementTabIndex;
var element = this.getDocument().getBody().getLast();
while ( ( element = element.getPreviousSourceNode( false, CKEDITOR.NODE_ELEMENT ) ) )
{
if ( !passedCurrent )
{
if ( !enteredCurrent && element.equals( this ) )
{
enteredCurrent = true;
// Ignore this element, if required.
if ( ignoreChildren )
{
if ( !( element = element.getPreviousSourceNode( true, CKEDITOR.NODE_ELEMENT ) ) )
break;
passedCurrent = 1;
}
}
else if ( enteredCurrent && !this.contains( element ) )
passedCurrent = 1;
}
if ( !element.isVisible() || ( elementTabIndex = element.getTabIndex() ) < 0 )
continue;
if ( curTabIndex <= 0 )
{
// If this element has tabindex <= 0 then we must look for:
// 1. An element before this one containing tabindex=0.
// 2. The last element with the highest tabindex.
if ( passedCurrent && elementTabIndex === 0 )
{
elected = element;
break;
}
if ( elementTabIndex > electedTabIndex )
{
elected = element;
electedTabIndex = elementTabIndex;
}
}
else
{
// If this element has tabindex > 0 we must look for:
// 1. An element preceeding this one, with the same tabindex.
// 2. The last element in source other with the highest tabindex
// that is lower than this element tabindex.
if ( passedCurrent && elementTabIndex == curTabIndex )
{
elected = element;
break;
}
if ( elementTabIndex < curTabIndex && ( !elected || elementTabIndex > electedTabIndex ) )
{
elected = element;
electedTabIndex = elementTabIndex;
}
}
}
if ( elected )
elected.focus();
};
/**
* Intructs the editor to add a number of spaces (&nbsp;) to the text when
* hitting the TAB key. If set to zero, the TAB key will be used to move the
* cursor focus to the next element in the page, out of the editor focus.
* @name CKEDITOR.config.tabSpaces
* @type Number
* @default 0
* @example
* config.tabSpaces = 4;
*/
/**
* Allow context-sensitive tab key behaviors, including the following scenarios:
* <h5>When selection is anchored inside <b>table cells</b>:</h5>
* <ul>
* <li>If TAB is pressed, select the contents of the "next" cell. If in the last cell in the table, add a new row to it and focus its first cell.</li>
* <li>If SHIFT+TAB is pressed, select the contents of the "previous" cell. Do nothing when it's in the first cell.</li>
* </ul>
* @name CKEDITOR.config.enableTabKeyTools
* @type Boolean
* @default true
* @example
* config.enableTabKeyTools = false;
*/
// If the TAB key is not supposed to be enabled for navigation, the following
// settings could be used alternatively:
// config.keystrokes.push(
// [ CKEDITOR.ALT + 38 /*Arrow Up*/, 'selectPreviousCell' ],
// [ CKEDITOR.ALT + 40 /*Arrow Down*/, 'selectNextCell' ]
// );
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'menubutton',
{
requires : [ 'button', 'menu' ],
beforeInit : function( editor )
{
editor.ui.addHandler( CKEDITOR.UI_MENUBUTTON, CKEDITOR.ui.menuButton.handler );
}
});
/**
* Button UI element.
* @constant
* @example
*/
CKEDITOR.UI_MENUBUTTON = 'menubutton';
(function()
{
var clickFn = function( editor )
{
var _ = this._;
// Do nothing if this button is disabled.
if ( _.state === CKEDITOR.TRISTATE_DISABLED )
return;
_.previousState = _.state;
// Check if we already have a menu for it, otherwise just create it.
var menu = _.menu;
if ( !menu )
{
menu = _.menu = new CKEDITOR.menu( editor,
{
panel:
{
className : editor.skinClass + ' cke_contextmenu',
attributes : { 'aria-label' : editor.lang.common.options }
}
});
menu.onHide = CKEDITOR.tools.bind( function()
{
this.setState( this.modes && this.modes[ editor.mode ] ? _.previousState : CKEDITOR.TRISTATE_DISABLED );
},
this );
// Initialize the menu items at this point.
if ( this.onMenu )
menu.addListener( this.onMenu );
}
if ( _.on )
{
menu.hide();
return;
}
this.setState( CKEDITOR.TRISTATE_ON );
menu.show( CKEDITOR.document.getById( this._.id ), 4 );
};
CKEDITOR.ui.menuButton = CKEDITOR.tools.createClass(
{
base : CKEDITOR.ui.button,
$ : function( definition )
{
// We don't want the panel definition in this object.
var panelDefinition = definition.panel;
delete definition.panel;
this.base( definition );
this.hasArrow = true;
this.click = clickFn;
},
statics :
{
handler :
{
create : function( definition )
{
return new CKEDITOR.ui.menuButton( definition );
}
}
}
});
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
(function()
{
CKEDITOR.plugins.add( 'enterkey',
{
requires : [ 'keystrokes', 'indent' ],
init : function( editor )
{
editor.addCommand( 'enter', {
modes : { wysiwyg:1 },
editorFocus : false,
exec : function( editor ){ enter( editor ); }
});
editor.addCommand( 'shiftEnter', {
modes : { wysiwyg:1 },
editorFocus : false,
exec : function( editor ){ shiftEnter( editor ); }
});
var keystrokes = editor.keystrokeHandler.keystrokes;
keystrokes[ 13 ] = 'enter';
keystrokes[ CKEDITOR.SHIFT + 13 ] = 'shiftEnter';
}
});
CKEDITOR.plugins.enterkey =
{
enterBlock : function( editor, mode, range, forceMode )
{
// Get the range for the current selection.
range = range || getRange( editor );
// We may not have valid ranges to work on, like when inside a
// contenteditable=false element.
if ( !range )
return;
var doc = range.document;
var atBlockStart = range.checkStartOfBlock(),
atBlockEnd = range.checkEndOfBlock(),
path = new CKEDITOR.dom.elementPath( range.startContainer ),
block = path.block;
if ( atBlockStart && atBlockEnd )
{
// Exit the list when we're inside an empty list item block. (#5376)
if ( block && ( block.is( 'li' ) || block.getParent().is( 'li' ) ) )
{
editor.execCommand( 'outdent' );
return;
}
if ( block && block.getParent().is( 'blockquote' ) )
{
block.breakParent( block.getParent() );
// If we were at the start of <blockquote>, there will be an empty element before it now.
if ( !block.getPrevious().getFirst( CKEDITOR.dom.walker.invisible(1) ) )
block.getPrevious().remove();
// If we were at the end of <blockquote>, there will be an empty element after it now.
if ( !block.getNext().getFirst( CKEDITOR.dom.walker.invisible(1) ) )
block.getNext().remove();
range.moveToElementEditStart( block );
range.select();
return;
}
}
// Don't split <pre> if we're in the middle of it, act as shift enter key.
else if ( block && block.is( 'pre' ) )
{
if ( !atBlockEnd )
{
enterBr( editor, mode, range, forceMode );
return;
}
}
// Don't split caption blocks. (#7944)
else if ( block && CKEDITOR.dtd.$captionBlock[ block.getName() ] )
{
enterBr( editor, mode, range, forceMode );
return;
}
// Determine the block element to be used.
var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
// Split the range.
var splitInfo = range.splitBlock( blockTag );
if ( !splitInfo )
return;
// Get the current blocks.
var previousBlock = splitInfo.previousBlock,
nextBlock = splitInfo.nextBlock;
var isStartOfBlock = splitInfo.wasStartOfBlock,
isEndOfBlock = splitInfo.wasEndOfBlock;
var node;
// If this is a block under a list item, split it as well. (#1647)
if ( nextBlock )
{
node = nextBlock.getParent();
if ( node.is( 'li' ) )
{
nextBlock.breakParent( node );
nextBlock.move( nextBlock.getNext(), 1 );
}
}
else if ( previousBlock && ( node = previousBlock.getParent() ) && node.is( 'li' ) )
{
previousBlock.breakParent( node );
node = previousBlock.getNext();
range.moveToElementEditStart( node );
previousBlock.move( previousBlock.getPrevious() );
}
// If we have both the previous and next blocks, it means that the
// boundaries were on separated blocks, or none of them where on the
// block limits (start/end).
if ( !isStartOfBlock && !isEndOfBlock )
{
// If the next block is an <li> with another list tree as the first
// child, we'll need to append a filler (<br>/NBSP) or the list item
// wouldn't be editable. (#1420)
if ( nextBlock.is( 'li' )
&& ( node = nextBlock.getFirst( CKEDITOR.dom.walker.invisible( true ) ) )
&& node.is && node.is( 'ul', 'ol' ) )
( CKEDITOR.env.ie ? doc.createText( '\xa0' ) : doc.createElement( 'br' ) ).insertBefore( node );
// Move the selection to the end block.
if ( nextBlock )
range.moveToElementEditStart( nextBlock );
}
else
{
var newBlock,
newBlockDir;
if ( previousBlock )
{
// Do not enter this block if it's a header tag, or we are in
// a Shift+Enter (#77). Create a new block element instead
// (later in the code).
if ( previousBlock.is( 'li' ) ||
! ( headerTagRegex.test( previousBlock.getName() ) || previousBlock.is( 'pre' ) ) )
{
// Otherwise, duplicate the previous block.
newBlock = previousBlock.clone();
}
}
else if ( nextBlock )
newBlock = nextBlock.clone();
if ( !newBlock )
{
// We have already created a new list item. (#6849)
if ( node && node.is( 'li' ) )
newBlock = node;
else
{
newBlock = doc.createElement( blockTag );
if ( previousBlock && ( newBlockDir = previousBlock.getDirection() ) )
newBlock.setAttribute( 'dir', newBlockDir );
}
}
// Force the enter block unless we're talking of a list item.
else if ( forceMode && !newBlock.is( 'li' ) )
newBlock.renameNode( blockTag );
// Recreate the inline elements tree, which was available
// before hitting enter, so the same styles will be available in
// the new block.
var elementPath = splitInfo.elementPath;
if ( elementPath )
{
for ( var i = 0, len = elementPath.elements.length ; i < len ; i++ )
{
var element = elementPath.elements[ i ];
if ( element.equals( elementPath.block ) || element.equals( elementPath.blockLimit ) )
break;
if ( CKEDITOR.dtd.$removeEmpty[ element.getName() ] )
{
element = element.clone();
newBlock.moveChildren( element );
newBlock.append( element );
}
}
}
if ( !CKEDITOR.env.ie )
newBlock.appendBogus();
if ( !newBlock.getParent() )
range.insertNode( newBlock );
// list item start number should not be duplicated (#7330), but we need
// to remove the attribute after it's onto the DOM tree because of old IEs (#7581).
newBlock.is( 'li' ) && newBlock.removeAttribute( 'value' );
// This is tricky, but to make the new block visible correctly
// we must select it.
// The previousBlock check has been included because it may be
// empty if we have fixed a block-less space (like ENTER into an
// empty table cell).
if ( CKEDITOR.env.ie && isStartOfBlock && ( !isEndOfBlock || !previousBlock.getChildCount() ) )
{
// Move the selection to the new block.
range.moveToElementEditStart( isEndOfBlock ? previousBlock : newBlock );
range.select();
}
// Move the selection to the new block.
range.moveToElementEditStart( isStartOfBlock && !isEndOfBlock ? nextBlock : newBlock );
}
if ( !CKEDITOR.env.ie )
{
if ( nextBlock )
{
// If we have split the block, adds a temporary span at the
// range position and scroll relatively to it.
var tmpNode = doc.createElement( 'span' );
// We need some content for Safari.
tmpNode.setHtml( ' ' );
range.insertNode( tmpNode );
tmpNode.scrollIntoView();
range.deleteContents();
}
else
{
// We may use the above scroll logic for the new block case
// too, but it gives some weird result with Opera.
newBlock.scrollIntoView();
}
}
range.select();
},
enterBr : function( editor, mode, range, forceMode )
{
// Get the range for the current selection.
range = range || getRange( editor );
// We may not have valid ranges to work on, like when inside a
// contenteditable=false element.
if ( !range )
return;
var doc = range.document;
// Determine the block element to be used.
var blockTag = ( mode == CKEDITOR.ENTER_DIV ? 'div' : 'p' );
var isEndOfBlock = range.checkEndOfBlock();
var elementPath = new CKEDITOR.dom.elementPath( editor.getSelection().getStartElement() );
var startBlock = elementPath.block,
startBlockTag = startBlock && elementPath.block.getName();
var isPre = false;
if ( !forceMode && startBlockTag == 'li' )
{
enterBlock( editor, mode, range, forceMode );
return;
}
// If we are at the end of a header block.
if ( !forceMode && isEndOfBlock && headerTagRegex.test( startBlockTag ) )
{
var newBlock,
newBlockDir;
if ( ( newBlockDir = startBlock.getDirection() ) )
{
newBlock = doc.createElement( 'div' );
newBlock.setAttribute( 'dir', newBlockDir );
newBlock.insertAfter( startBlock );
range.setStart( newBlock, 0 );
}
else
{
// Insert a <br> after the current paragraph.
doc.createElement( 'br' ).insertAfter( startBlock );
// A text node is required by Gecko only to make the cursor blink.
if ( CKEDITOR.env.gecko )
doc.createText( '' ).insertAfter( startBlock );
// IE has different behaviors regarding position.
range.setStartAt( startBlock.getNext(), CKEDITOR.env.ie ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_START );
}
}
else
{
var lineBreak;
isPre = ( startBlockTag == 'pre' );
// Gecko prefers <br> as line-break inside <pre> (#4711).
if ( isPre && !CKEDITOR.env.gecko )
lineBreak = doc.createText( CKEDITOR.env.ie ? '\r' : '\n' );
else
lineBreak = doc.createElement( 'br' );
range.deleteContents();
range.insertNode( lineBreak );
// IE has different behavior regarding position.
if ( CKEDITOR.env.ie )
range.setStartAt( lineBreak, CKEDITOR.POSITION_AFTER_END );
else
{
// A text node is required by Gecko only to make the cursor blink.
// We need some text inside of it, so the bogus <br> is properly
// created.
doc.createText( '\ufeff' ).insertAfter( lineBreak );
// If we are at the end of a block, we must be sure the bogus node is available in that block.
if ( isEndOfBlock )
lineBreak.getParent().appendBogus();
// Now we can remove the text node contents, so the caret doesn't
// stop on it.
lineBreak.getNext().$.nodeValue = '';
range.setStartAt( lineBreak.getNext(), CKEDITOR.POSITION_AFTER_START );
// Scroll into view, for non IE.
var dummy = null;
// BR is not positioned in Opera and Webkit.
if ( !CKEDITOR.env.gecko )
{
dummy = doc.createElement( 'span' );
// We need have some contents for Webkit to position it
// under parent node. ( #3681)
dummy.setHtml(' ');
}
else
dummy = doc.createElement( 'br' );
dummy.insertBefore( lineBreak.getNext() );
dummy.scrollIntoView();
dummy.remove();
}
}
// This collapse guarantees the cursor will be blinking.
range.collapse( true );
range.select( isPre );
}
};
var plugin = CKEDITOR.plugins.enterkey,
enterBr = plugin.enterBr,
enterBlock = plugin.enterBlock,
headerTagRegex = /^h[1-6]$/;
function shiftEnter( editor )
{
// Only effective within document.
if ( editor.mode != 'wysiwyg' )
return false;
// On SHIFT+ENTER:
// 1. We want to enforce the mode to be respected, instead
// of cloning the current block. (#77)
return enter( editor, editor.config.shiftEnterMode, 1 );
}
function enter( editor, mode, forceMode )
{
forceMode = editor.config.forceEnterMode || forceMode;
// Only effective within document.
if ( editor.mode != 'wysiwyg' )
return false;
if ( !mode )
mode = editor.config.enterMode;
// Use setTimout so the keys get cancelled immediatelly.
setTimeout( function()
{
editor.fire( 'saveSnapshot' ); // Save undo step.
if ( mode == CKEDITOR.ENTER_BR )
enterBr( editor, mode, null, forceMode );
else
enterBlock( editor, mode, null, forceMode );
editor.fire( 'saveSnapshot' );
}, 0 );
return true;
}
function getRange( editor )
{
// Get the selection ranges.
var ranges = editor.getSelection().getRanges( true );
// Delete the contents of all ranges except the first one.
for ( var i = ranges.length - 1 ; i > 0 ; i-- )
{
ranges[ i ].deleteContents();
}
// Return the first range.
return ranges[ 0 ];
}
})();
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @fileOverview The "elementspath" plugin. It shows all elements in the DOM
* parent tree relative to the current selection in the editing area.
*/
(function()
{
var commands =
{
toolbarFocus :
{
editorFocus : false,
readOnly : 1,
exec : function( editor )
{
var idBase = editor._.elementsPath.idBase;
var element = CKEDITOR.document.getById( idBase + '0' );
// Make the first button focus accessible for IE. (#3417)
// Adobe AIR instead need while of delay.
element && element.focus( CKEDITOR.env.ie || CKEDITOR.env.air );
}
}
};
var emptyHtml = '<span class="cke_empty"> </span>';
CKEDITOR.plugins.add( 'elementspath',
{
requires : [ 'selection' ],
init : function( editor )
{
var spaceId = 'cke_path_' + editor.name;
var spaceElement;
var getSpaceElement = function()
{
if ( !spaceElement )
spaceElement = CKEDITOR.document.getById( spaceId );
return spaceElement;
};
var idBase = 'cke_elementspath_' + CKEDITOR.tools.getNextNumber() + '_';
editor._.elementsPath = { idBase : idBase, filters : [] };
editor.on( 'themeSpace', function( event )
{
if ( event.data.space == 'bottom' )
{
event.data.html +=
'<span id="' + spaceId + '_label" class="cke_voice_label">' + editor.lang.elementsPath.eleLabel + '</span>' +
'<div id="' + spaceId + '" class="cke_path" role="group" aria-labelledby="' + spaceId + '_label">' + emptyHtml + '</div>';
}
});
function onClick( elementIndex )
{
editor.focus();
var element = editor._.elementsPath.list[ elementIndex ];
if ( element.is( 'body' ) )
{
var range = new CKEDITOR.dom.range( editor.document );
range.selectNodeContents( element );
range.select();
}
else
editor.getSelection().selectElement( element );
}
var onClickHanlder = CKEDITOR.tools.addFunction( onClick );
var onKeyDownHandler = CKEDITOR.tools.addFunction( function( elementIndex, ev )
{
var idBase = editor._.elementsPath.idBase,
element;
ev = new CKEDITOR.dom.event( ev );
var rtl = editor.lang.dir == 'rtl';
switch ( ev.getKeystroke() )
{
case rtl ? 39 : 37 : // LEFT-ARROW
case 9 : // TAB
element = CKEDITOR.document.getById( idBase + ( elementIndex + 1 ) );
if ( !element )
element = CKEDITOR.document.getById( idBase + '0' );
element.focus();
return false;
case rtl ? 37 : 39 : // RIGHT-ARROW
case CKEDITOR.SHIFT + 9 : // SHIFT + TAB
element = CKEDITOR.document.getById( idBase + ( elementIndex - 1 ) );
if ( !element )
element = CKEDITOR.document.getById( idBase + ( editor._.elementsPath.list.length - 1 ) );
element.focus();
return false;
case 27 : // ESC
editor.focus();
return false;
case 13 : // ENTER // Opera
case 32 : // SPACE
onClick( elementIndex );
return false;
}
return true;
});
editor.on( 'selectionChange', function( ev )
{
var env = CKEDITOR.env,
selection = ev.data.selection,
element = selection.getStartElement(),
html = [],
editor = ev.editor,
elementsList = editor._.elementsPath.list = [],
filters = editor._.elementsPath.filters;
while ( element )
{
var ignore = 0,
name;
if ( element.data( 'cke-display-name' ) )
name = element.data( 'cke-display-name' );
else if ( element.data( 'cke-real-element-type' ) )
name = element.data( 'cke-real-element-type' );
else
name = element.getName();
for ( var i = 0; i < filters.length; i++ )
{
var ret = filters[ i ]( element, name );
if ( ret === false )
{
ignore = 1;
break;
}
name = ret || name;
}
if ( !ignore )
{
var index = elementsList.push( element ) - 1;
// Use this variable to add conditional stuff to the
// HTML (because we are doing it in reverse order... unshift).
var extra = '';
// Some browsers don't cancel key events in the keydown but in the
// keypress.
// TODO: Check if really needed for Gecko+Mac.
if ( env.opera || ( env.gecko && env.mac ) )
extra += ' onkeypress="return false;"';
// With Firefox, we need to force the button to redraw, otherwise it
// will remain in the focus state.
if ( env.gecko )
extra += ' onblur="this.style.cssText = this.style.cssText;"';
var label = editor.lang.elementsPath.eleTitle.replace( /%1/, name );
html.unshift(
'<a' +
' id="', idBase, index, '"' +
' href="javascript:void(\'', name, '\')"' +
' tabindex="-1"' +
' title="', label, '"' +
( ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 ) ?
' onfocus="event.preventBubble();"' : '' ) +
' hidefocus="true" ' +
' onkeydown="return CKEDITOR.tools.callFunction(', onKeyDownHandler, ',', index, ', event );"' +
extra ,
' onclick="CKEDITOR.tools.callFunction('+ onClickHanlder, ',', index, '); return false;"',
' role="button" aria-labelledby="' + idBase + index + '_label">',
name,
'<span id="', idBase, index, '_label" class="cke_label">' + label + '</span>',
'</a>' );
}
if ( name == 'body' )
break;
element = element.getParent();
}
var space = getSpaceElement();
space.setHtml( html.join('') + emptyHtml );
editor.fire( 'elementsPathUpdate', { space : space } );
});
function empty()
{
spaceElement && spaceElement.setHtml( emptyHtml );
delete editor._.elementsPath.list;
}
editor.on( 'readOnly', empty );
editor.on( 'contentDomUnload', empty );
editor.addCommand( 'elementsPathFocus', commands.toolbarFocus );
}
});
})();
/**
* Fired when the contents of the elementsPath are changed
* @name CKEDITOR.editor#elementsPathUpdate
* @event
* @param {Object} eventData.space The elementsPath container
*/
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'contextmenu',
{
requires : [ 'menu' ],
// Make sure the base class (CKEDITOR.menu) is loaded before it (#3318).
onLoad : function()
{
CKEDITOR.plugins.contextMenu = CKEDITOR.tools.createClass(
{
base : CKEDITOR.menu,
$ : function( editor )
{
this.base.call( this, editor,
{
panel:
{
className : editor.skinClass + ' cke_contextmenu',
attributes :
{
'aria-label' : editor.lang.contextmenu.options
}
}
});
},
proto :
{
addTarget : function( element, nativeContextMenuOnCtrl )
{
// Opera doesn't support 'contextmenu' event, we have duo approaches employed here:
// 1. Inherit the 'button override' hack we introduced in v2 (#4530), while this require the Opera browser
// option 'Allow script to detect context menu/right click events' to be always turned on.
// 2. Considering the fact that ctrl/meta key is not been occupied
// for multiple range selecting (like Gecko), we use this key
// combination as a fallback for triggering context-menu. (#4530)
if ( CKEDITOR.env.opera && !( 'oncontextmenu' in document.body ))
{
var contextMenuOverrideButton;
element.on( 'mousedown', function( evt )
{
evt = evt.data;
if ( evt.$.button != 2 )
{
if ( evt.getKeystroke() == CKEDITOR.CTRL + 1 )
element.fire( 'contextmenu', evt );
return;
}
if ( nativeContextMenuOnCtrl
&& ( CKEDITOR.env.mac ? evt.$.metaKey : evt.$.ctrlKey ) )
return;
var target = evt.getTarget();
if ( !contextMenuOverrideButton )
{
var ownerDoc = target.getDocument();
contextMenuOverrideButton = ownerDoc.createElement( 'input' ) ;
contextMenuOverrideButton.$.type = 'button' ;
ownerDoc.getBody().append( contextMenuOverrideButton ) ;
}
contextMenuOverrideButton.setAttribute( 'style', 'position:absolute;top:' + ( evt.$.clientY - 2 ) +
'px;left:' + ( evt.$.clientX - 2 ) +
'px;width:5px;height:5px;opacity:0.01' );
} );
element.on( 'mouseup', function ( evt )
{
if ( contextMenuOverrideButton )
{
contextMenuOverrideButton.remove();
contextMenuOverrideButton = undefined;
// Simulate 'contextmenu' event.
element.fire( 'contextmenu', evt.data );
}
} );
}
element.on( 'contextmenu', function( event )
{
var domEvent = event.data;
if ( nativeContextMenuOnCtrl &&
// Safari on Windows always show 'ctrlKey' as true in 'contextmenu' event,
// which make this property unreliable. (#4826)
( CKEDITOR.env.webkit ? holdCtrlKey : ( CKEDITOR.env.mac ? domEvent.$.metaKey : domEvent.$.ctrlKey ) ) )
return;
// Cancel the browser context menu.
domEvent.preventDefault();
var offsetParent = domEvent.getTarget().getDocument().getDocumentElement(),
offsetX = domEvent.$.clientX,
offsetY = domEvent.$.clientY;
CKEDITOR.tools.setTimeout( function()
{
this.open( offsetParent, null, offsetX, offsetY );
// IE needs a short while to allow selection change before opening menu. (#7908)
}, CKEDITOR.env.ie? 200 : 0, this );
},
this );
if ( CKEDITOR.env.opera )
{
// 'contextmenu' event triggered by Windows menu key is unpreventable,
// cancel the key event itself. (#6534)
element.on( 'keypress' , function ( evt )
{
var domEvent = evt.data;
if ( domEvent.$.keyCode === 0 )
domEvent.preventDefault();
});
}
if ( CKEDITOR.env.webkit )
{
var holdCtrlKey,
onKeyDown = function( event )
{
holdCtrlKey = CKEDITOR.env.mac ? event.data.$.metaKey : event.data.$.ctrlKey ;
},
resetOnKeyUp = function()
{
holdCtrlKey = 0;
};
element.on( 'keydown', onKeyDown );
element.on( 'keyup', resetOnKeyUp );
element.on( 'contextmenu', resetOnKeyUp );
}
},
open : function( offsetParent, corner, offsetX, offsetY )
{
this.editor.focus();
offsetParent = offsetParent || CKEDITOR.document.getDocumentElement();
this.show( offsetParent, corner, offsetX, offsetY );
}
}
});
},
beforeInit : function( editor )
{
editor.contextMenu = new CKEDITOR.plugins.contextMenu( editor );
editor.addCommand( 'contextMenu',
{
exec : function()
{
editor.contextMenu.open( editor.document.getBody() );
}
});
}
});
/**
* Whether to show the browser native context menu when the <em>Ctrl</em> or
* <em>Meta</em> (Mac) key is pressed on opening the context menu with the
* right mouse button click or the <em>Menu</em> key.
* @name CKEDITOR.config.browserContextMenuOnCtrl
* @since 3.0.2
* @type Boolean
* @default <code>true</code>
* @example
* config.browserContextMenuOnCtrl = false;
*/
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.add( 'link',
{
requires : [ 'fakeobjects', 'dialog' ],
init : function( editor )
{
// Add the link and unlink buttons.
editor.addCommand( 'link', new CKEDITOR.dialogCommand( 'link' ) );
editor.addCommand( 'anchor', new CKEDITOR.dialogCommand( 'anchor' ) );
editor.addCommand( 'unlink', new CKEDITOR.unlinkCommand() );
editor.addCommand( 'removeAnchor', new CKEDITOR.removeAnchorCommand() );
editor.ui.addButton( 'Link',
{
label : editor.lang.link.toolbar,
command : 'link'
} );
editor.ui.addButton( 'Unlink',
{
label : editor.lang.unlink,
command : 'unlink'
} );
editor.ui.addButton( 'Anchor',
{
label : editor.lang.anchor.toolbar,
command : 'anchor'
} );
CKEDITOR.dialog.add( 'link', this.path + 'dialogs/link.js' );
CKEDITOR.dialog.add( 'anchor', this.path + 'dialogs/anchor.js' );
// Add the CSS styles for anchor placeholders.
var side = ( editor.lang.dir == 'rtl' ? 'right' : 'left' );
var basicCss =
'background:url(' + CKEDITOR.getUrl( this.path + 'images/anchor.gif' ) + ') no-repeat ' + side + ' center;' +
'border:1px dotted #00f;';
editor.addCss(
'a.cke_anchor,a.cke_anchor_empty' +
// IE6 breaks with the following selectors.
( ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) ? '' :
',a[name],a[data-cke-saved-name]' ) +
'{' +
basicCss +
'padding-' + side + ':18px;' +
// Show the arrow cursor for the anchor image (FF at least).
'cursor:auto;' +
'}' +
( CKEDITOR.env.ie ? (
'a.cke_anchor_empty' +
'{' +
// Make empty anchor selectable on IE.
'display:inline-block;' +
'}'
) : '' ) +
'img.cke_anchor' +
'{' +
basicCss +
'width:16px;' +
'min-height:15px;' +
// The default line-height on IE.
'height:1.15em;' +
// Opera works better with "middle" (even if not perfect)
'vertical-align:' + ( CKEDITOR.env.opera ? 'middle' : 'text-bottom' ) + ';' +
'}');
// Register selection change handler for the unlink button.
editor.on( 'selectionChange', function( evt )
{
if ( editor.readOnly )
return;
/*
* Despite our initial hope, document.queryCommandEnabled() does not work
* for this in Firefox. So we must detect the state by element paths.
*/
var command = editor.getCommand( 'unlink' ),
element = evt.data.path.lastElement && evt.data.path.lastElement.getAscendant( 'a', true );
if ( element && element.getName() == 'a' && element.getAttribute( 'href' ) && element.getChildCount() )
command.setState( CKEDITOR.TRISTATE_OFF );
else
command.setState( CKEDITOR.TRISTATE_DISABLED );
} );
editor.on( 'doubleclick', function( evt )
{
var element = CKEDITOR.plugins.link.getSelectedLink( editor ) || evt.data.element;
if ( !element.isReadOnly() )
{
if ( element.is( 'a' ) )
{
evt.data.dialog = ( element.getAttribute( 'name' ) && ( !element.getAttribute( 'href' ) || !element.getChildCount() ) ) ? 'anchor' : 'link';
editor.getSelection().selectElement( element );
}
else if ( CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, element ) )
evt.data.dialog = 'anchor';
}
});
// If the "menu" plugin is loaded, register the menu items.
if ( editor.addMenuItems )
{
editor.addMenuItems(
{
anchor :
{
label : editor.lang.anchor.menu,
command : 'anchor',
group : 'anchor',
order : 1
},
removeAnchor :
{
label : editor.lang.anchor.remove,
command : 'removeAnchor',
group : 'anchor',
order : 5
},
link :
{
label : editor.lang.link.menu,
command : 'link',
group : 'link',
order : 1
},
unlink :
{
label : editor.lang.unlink,
command : 'unlink',
group : 'link',
order : 5
}
});
}
// If the "contextmenu" plugin is loaded, register the listeners.
if ( editor.contextMenu )
{
editor.contextMenu.addListener( function( element, selection )
{
if ( !element || element.isReadOnly() )
return null;
var anchor = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, element );
if ( !anchor && !( anchor = CKEDITOR.plugins.link.getSelectedLink( editor ) ) )
return null;
var menu = {};
if ( anchor.getAttribute( 'href' ) && anchor.getChildCount() )
menu = { link : CKEDITOR.TRISTATE_OFF, unlink : CKEDITOR.TRISTATE_OFF };
if ( anchor && anchor.hasAttribute( 'name' ) )
menu.anchor = menu.removeAnchor = CKEDITOR.TRISTATE_OFF;
return menu;
});
}
},
afterInit : function( editor )
{
// Register a filter to displaying placeholders after mode change.
var dataProcessor = editor.dataProcessor,
dataFilter = dataProcessor && dataProcessor.dataFilter,
htmlFilter = dataProcessor && dataProcessor.htmlFilter,
pathFilters = editor._.elementsPath && editor._.elementsPath.filters;
if ( dataFilter )
{
dataFilter.addRules(
{
elements :
{
a : function( element )
{
var attributes = element.attributes;
if ( !attributes.name )
return null;
var isEmpty = !element.children.length;
if ( CKEDITOR.plugins.link.synAnchorSelector )
{
// IE needs a specific class name to be applied
// to the anchors, for appropriate styling.
var ieClass = isEmpty ? 'cke_anchor_empty' : 'cke_anchor';
var cls = attributes[ 'class' ];
if ( attributes.name && ( !cls || cls.indexOf( ieClass ) < 0 ) )
attributes[ 'class' ] = ( cls || '' ) + ' ' + ieClass;
if ( isEmpty && CKEDITOR.plugins.link.emptyAnchorFix )
{
attributes.contenteditable = 'false';
attributes[ 'data-cke-editable' ] = 1;
}
}
else if ( CKEDITOR.plugins.link.fakeAnchor && isEmpty )
return editor.createFakeParserElement( element, 'cke_anchor', 'anchor' );
return null;
}
}
});
}
if ( CKEDITOR.plugins.link.emptyAnchorFix && htmlFilter )
{
htmlFilter.addRules(
{
elements :
{
a : function( element )
{
delete element.attributes.contenteditable;
}
}
});
}
if ( pathFilters )
{
pathFilters.push( function( element, name )
{
if ( name == 'a' )
{
if ( CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, element ) ||
( element.getAttribute( 'name' ) && ( !element.getAttribute( 'href' ) || !element.getChildCount() ) ) )
{
return 'anchor';
}
}
});
}
}
} );
CKEDITOR.plugins.link =
{
/**
* Get the surrounding link element of current selection.
* @param editor
* @example CKEDITOR.plugins.link.getSelectedLink( editor );
* @since 3.2.1
* The following selection will all return the link element.
* <pre>
* <a href="#">li^nk</a>
* <a href="#">[link]</a>
* text[<a href="#">link]</a>
* <a href="#">li[nk</a>]
* [<b><a href="#">li]nk</a></b>]
* [<a href="#"><b>li]nk</b></a>
* </pre>
*/
getSelectedLink : function( editor )
{
try
{
var selection = editor.getSelection();
if ( selection.getType() == CKEDITOR.SELECTION_ELEMENT )
{
var selectedElement = selection.getSelectedElement();
if ( selectedElement.is( 'a' ) )
return selectedElement;
}
var range = selection.getRanges( true )[ 0 ];
range.shrink( CKEDITOR.SHRINK_TEXT );
var root = range.getCommonAncestor();
return root.getAscendant( 'a', true );
}
catch( e ) { return null; }
},
// Opera and WebKit don't make it possible to select empty anchors. Fake
// elements must be used for them.
fakeAnchor : CKEDITOR.env.opera || CKEDITOR.env.webkit,
// For browsers that don't support CSS3 a[name]:empty(), note IE9 is included because of #7783.
synAnchorSelector : CKEDITOR.env.ie,
// For browsers that have editing issue with empty anchor.
emptyAnchorFix : CKEDITOR.env.ie && CKEDITOR.env.version < 8,
tryRestoreFakeAnchor : function( editor, element )
{
if ( element && element.data( 'cke-real-element-type' ) && element.data( 'cke-real-element-type' ) == 'anchor' )
{
var link = editor.restoreRealElement( element );
if ( link.data( 'cke-saved-name' ) )
return link;
}
}
};
CKEDITOR.unlinkCommand = function(){};
CKEDITOR.unlinkCommand.prototype =
{
/** @ignore */
exec : function( editor )
{
/*
* execCommand( 'unlink', ... ) in Firefox leaves behind <span> tags at where
* the <a> was, so again we have to remove the link ourselves. (See #430)
*
* TODO: Use the style system when it's complete. Let's use execCommand()
* as a stopgap solution for now.
*/
var selection = editor.getSelection(),
bookmarks = selection.createBookmarks(),
ranges = selection.getRanges(),
rangeRoot,
element;
for ( var i = 0 ; i < ranges.length ; i++ )
{
rangeRoot = ranges[i].getCommonAncestor( true );
element = rangeRoot.getAscendant( 'a', true );
if ( !element )
continue;
ranges[i].selectNodeContents( element );
}
selection.selectRanges( ranges );
editor.document.$.execCommand( 'unlink', false, null );
selection.selectBookmarks( bookmarks );
},
startDisabled : true
};
CKEDITOR.removeAnchorCommand = function(){};
CKEDITOR.removeAnchorCommand.prototype =
{
/** @ignore */
exec : function( editor )
{
var sel = editor.getSelection(),
bms = sel.createBookmarks(),
anchor;
if ( sel && ( anchor = sel.getSelectedElement() ) && ( CKEDITOR.plugins.link.fakeAnchor && !anchor.getChildCount() ? CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, anchor ) : anchor.is( 'a' ) ) )
anchor.remove( 1 );
else
{
if ( ( anchor = CKEDITOR.plugins.link.getSelectedLink( editor ) ) )
{
if ( anchor.hasAttribute( 'href' ) )
{
anchor.removeAttributes( { name : 1, 'data-cke-saved-name' : 1 } );
anchor.removeClass( 'cke_anchor' );
}
else
anchor.remove( 1 );
}
}
sel.selectBookmarks( bms );
}
};
CKEDITOR.tools.extend( CKEDITOR.config,
{
linkShowAdvancedTab : true,
linkShowTargetTab : true
} );
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.dialog.add( 'anchor', function( editor )
{
// Function called in onShow to load selected element.
var loadElements = function( element )
{
this._.selectedElement = element;
var attributeValue = element.data( 'cke-saved-name' );
this.setValueOf( 'info','txtName', attributeValue || '' );
};
function createFakeAnchor( editor, anchor )
{
return editor.createFakeElement( anchor, 'cke_anchor', 'anchor' );
}
return {
title : editor.lang.anchor.title,
minWidth : 300,
minHeight : 60,
onOk : function()
{
var name = CKEDITOR.tools.trim( this.getValueOf( 'info', 'txtName' ) );
var attributes =
{
name : name,
'data-cke-saved-name' : name
};
if ( this._.selectedElement )
{
if ( this._.selectedElement.data( 'cke-realelement' ) )
{
var newFake = createFakeAnchor( editor, editor.document.createElement( 'a', { attributes: attributes } ) );
newFake.replace( this._.selectedElement );
}
else
this._.selectedElement.setAttributes( attributes );
}
else
{
var sel = editor.getSelection(),
range = sel && sel.getRanges()[ 0 ];
// Empty anchor
if ( range.collapsed )
{
if ( CKEDITOR.plugins.link.synAnchorSelector )
attributes[ 'class' ] = 'cke_anchor_empty';
if ( CKEDITOR.plugins.link.emptyAnchorFix )
{
attributes[ 'contenteditable' ] = 'false';
attributes[ 'data-cke-editable' ] = 1;
}
var anchor = editor.document.createElement( 'a', { attributes: attributes } );
// Transform the anchor into a fake element for browsers that need it.
if ( CKEDITOR.plugins.link.fakeAnchor )
anchor = createFakeAnchor( editor, anchor );
range.insertNode( anchor );
}
else
{
if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
attributes['class'] = 'cke_anchor';
// Apply style.
var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
style.type = CKEDITOR.STYLE_INLINE;
style.apply( editor.document );
}
}
},
onHide : function()
{
delete this._.selectedElement;
},
onShow : function()
{
var selection = editor.getSelection(),
fullySelected = selection.getSelectedElement(),
partialSelected;
// Detect the anchor under selection.
if ( fullySelected )
{
if ( CKEDITOR.plugins.link.fakeAnchor )
{
var realElement = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, fullySelected );
realElement && loadElements.call( this, realElement );
this._.selectedElement = fullySelected;
}
else if ( fullySelected.is( 'a' ) && fullySelected.hasAttribute( 'name' ) )
loadElements.call( this, fullySelected );
}
else
{
partialSelected = CKEDITOR.plugins.link.getSelectedLink( editor );
if ( partialSelected )
{
loadElements.call( this, partialSelected );
selection.selectElement( partialSelected );
}
}
this.getContentElement( 'info', 'txtName' ).focus();
},
contents : [
{
id : 'info',
label : editor.lang.anchor.title,
accessKey : 'I',
elements :
[
{
type : 'text',
id : 'txtName',
label : editor.lang.anchor.name,
required: true,
validate : function()
{
if ( !this.getValue() )
{
alert( editor.lang.anchor.errorName );
return false;
}
return true;
}
}
]
}
]
};
} );
| JavaScript |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.dialog.add( 'link', function( editor )
{
var plugin = CKEDITOR.plugins.link;
// Handles the event when the "Target" selection box is changed.
var targetChanged = function()
{
var dialog = this.getDialog(),
popupFeatures = dialog.getContentElement( 'target', 'popupFeatures' ),
targetName = dialog.getContentElement( 'target', 'linkTargetName' ),
value = this.getValue();
if ( !popupFeatures || !targetName )
return;
popupFeatures = popupFeatures.getElement();
popupFeatures.hide();
targetName.setValue( '' );
switch ( value )
{
case 'frame' :
targetName.setLabel( editor.lang.link.targetFrameName );
targetName.getElement().show();
break;
case 'popup' :
popupFeatures.show();
targetName.setLabel( editor.lang.link.targetPopupName );
targetName.getElement().show();
break;
default :
targetName.setValue( value );
targetName.getElement().hide();
break;
}
};
// Handles the event when the "Type" selection box is changed.
var linkTypeChanged = function()
{
var dialog = this.getDialog(),
partIds = [ 'urlOptions', 'anchorOptions', 'emailOptions' ],
typeValue = this.getValue(),
uploadTab = dialog.definition.getContents( 'upload' ),
uploadInitiallyHidden = uploadTab && uploadTab.hidden;
if ( typeValue == 'url' )
{
if ( editor.config.linkShowTargetTab )
dialog.showPage( 'target' );
if ( !uploadInitiallyHidden )
dialog.showPage( 'upload' );
}
else
{
dialog.hidePage( 'target' );
if ( !uploadInitiallyHidden )
dialog.hidePage( 'upload' );
}
for ( var i = 0 ; i < partIds.length ; i++ )
{
var element = dialog.getContentElement( 'info', partIds[i] );
if ( !element )
continue;
element = element.getElement().getParent().getParent();
if ( partIds[i] == typeValue + 'Options' )
element.show();
else
element.hide();
}
dialog.layout();
};
// Loads the parameters in a selected link to the link dialog fields.
var javascriptProtocolRegex = /^javascript:/,
emailRegex = /^mailto:([^?]+)(?:\?(.+))?$/,
emailSubjectRegex = /subject=([^;?:@&=$,\/]*)/,
emailBodyRegex = /body=([^;?:@&=$,\/]*)/,
anchorRegex = /^#(.*)$/,
urlRegex = /^((?:http|https|ftp|news):\/\/)?(.*)$/,
selectableTargets = /^(_(?:self|top|parent|blank))$/,
encodedEmailLinkRegex = /^javascript:void\(location\.href='mailto:'\+String\.fromCharCode\(([^)]+)\)(?:\+'(.*)')?\)$/,
functionCallProtectedEmailLinkRegex = /^javascript:([^(]+)\(([^)]+)\)$/;
var popupRegex =
/\s*window.open\(\s*this\.href\s*,\s*(?:'([^']*)'|null)\s*,\s*'([^']*)'\s*\)\s*;\s*return\s*false;*\s*/;
var popupFeaturesRegex = /(?:^|,)([^=]+)=(\d+|yes|no)/gi;
var parseLink = function( editor, element )
{
var href = ( element && ( element.data( 'cke-saved-href' ) || element.getAttribute( 'href' ) ) ) || '',
javascriptMatch,
emailMatch,
anchorMatch,
urlMatch,
retval = {};
if ( ( javascriptMatch = href.match( javascriptProtocolRegex ) ) )
{
if ( emailProtection == 'encode' )
{
href = href.replace( encodedEmailLinkRegex,
function ( match, protectedAddress, rest )
{
return 'mailto:' +
String.fromCharCode.apply( String, protectedAddress.split( ',' ) ) +
( rest && unescapeSingleQuote( rest ) );
});
}
// Protected email link as function call.
else if ( emailProtection )
{
href.replace( functionCallProtectedEmailLinkRegex, function( match, funcName, funcArgs )
{
if ( funcName == compiledProtectionFunction.name )
{
retval.type = 'email';
var email = retval.email = {};
var paramRegex = /[^,\s]+/g,
paramQuoteRegex = /(^')|('$)/g,
paramsMatch = funcArgs.match( paramRegex ),
paramsMatchLength = paramsMatch.length,
paramName,
paramVal;
for ( var i = 0; i < paramsMatchLength; i++ )
{
paramVal = decodeURIComponent( unescapeSingleQuote( paramsMatch[ i ].replace( paramQuoteRegex, '' ) ) );
paramName = compiledProtectionFunction.params[ i ].toLowerCase();
email[ paramName ] = paramVal;
}
email.address = [ email.name, email.domain ].join( '@' );
}
} );
}
}
if ( !retval.type )
{
if ( ( anchorMatch = href.match( anchorRegex ) ) )
{
retval.type = 'anchor';
retval.anchor = {};
retval.anchor.name = retval.anchor.id = anchorMatch[1];
}
// Protected email link as encoded string.
else if ( ( emailMatch = href.match( emailRegex ) ) )
{
var subjectMatch = href.match( emailSubjectRegex ),
bodyMatch = href.match( emailBodyRegex );
retval.type = 'email';
var email = ( retval.email = {} );
email.address = emailMatch[ 1 ];
subjectMatch && ( email.subject = decodeURIComponent( subjectMatch[ 1 ] ) );
bodyMatch && ( email.body = decodeURIComponent( bodyMatch[ 1 ] ) );
}
// urlRegex matches empty strings, so need to check for href as well.
else if ( href && ( urlMatch = href.match( urlRegex ) ) )
{
retval.type = 'url';
retval.url = {};
retval.url.protocol = urlMatch[1];
retval.url.url = urlMatch[2];
}
else
retval.type = 'url';
}
// Load target and popup settings.
if ( element )
{
var target = element.getAttribute( 'target' );
retval.target = {};
retval.adv = {};
// IE BUG: target attribute is an empty string instead of null in IE if it's not set.
if ( !target )
{
var onclick = element.data( 'cke-pa-onclick' ) || element.getAttribute( 'onclick' ),
onclickMatch = onclick && onclick.match( popupRegex );
if ( onclickMatch )
{
retval.target.type = 'popup';
retval.target.name = onclickMatch[1];
var featureMatch;
while ( ( featureMatch = popupFeaturesRegex.exec( onclickMatch[2] ) ) )
{
// Some values should remain numbers (#7300)
if ( ( featureMatch[2] == 'yes' || featureMatch[2] == '1' ) && !( featureMatch[1] in { height:1, width:1, top:1, left:1 } ) )
retval.target[ featureMatch[1] ] = true;
else if ( isFinite( featureMatch[2] ) )
retval.target[ featureMatch[1] ] = featureMatch[2];
}
}
}
else
{
var targetMatch = target.match( selectableTargets );
if ( targetMatch )
retval.target.type = retval.target.name = target;
else
{
retval.target.type = 'frame';
retval.target.name = target;
}
}
var me = this;
var advAttr = function( inputName, attrName )
{
var value = element.getAttribute( attrName );
if ( value !== null )
retval.adv[ inputName ] = value || '';
};
advAttr( 'advId', 'id' );
advAttr( 'advLangDir', 'dir' );
advAttr( 'advAccessKey', 'accessKey' );
retval.adv.advName =
element.data( 'cke-saved-name' )
|| element.getAttribute( 'name' )
|| '';
advAttr( 'advLangCode', 'lang' );
advAttr( 'advTabIndex', 'tabindex' );
advAttr( 'advTitle', 'title' );
advAttr( 'advContentType', 'type' );
CKEDITOR.plugins.link.synAnchorSelector ?
retval.adv.advCSSClasses = getLinkClass( element )
: advAttr( 'advCSSClasses', 'class' );
advAttr( 'advCharset', 'charset' );
advAttr( 'advStyles', 'style' );
advAttr( 'advRel', 'rel' );
}
// Find out whether we have any anchors in the editor.
var anchors = retval.anchors = [],
i, count, item;
// For some browsers we set contenteditable="false" on anchors, making document.anchors not to include them, so we must traverse the links manually (#7893).
if ( CKEDITOR.plugins.link.emptyAnchorFix )
{
var links = editor.document.getElementsByTag( 'a' );
for ( i = 0, count = links.count(); i < count; i++ )
{
item = links.getItem( i );
if ( item.data( 'cke-saved-name' ) || item.hasAttribute( 'name' ) )
anchors.push( { name : item.data( 'cke-saved-name' ) || item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) } );
}
}
else
{
var anchorList = new CKEDITOR.dom.nodeList( editor.document.$.anchors );
for ( i = 0, count = anchorList.count(); i < count; i++ )
{
item = anchorList.getItem( i );
anchors[ i ] = { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) };
}
}
if ( CKEDITOR.plugins.link.fakeAnchor )
{
var imgs = editor.document.getElementsByTag( 'img' );
for ( i = 0, count = imgs.count(); i < count; i++ )
{
if ( ( item = CKEDITOR.plugins.link.tryRestoreFakeAnchor( editor, imgs.getItem( i ) ) ) )
anchors.push( { name : item.getAttribute( 'name' ), id : item.getAttribute( 'id' ) } );
}
}
// Record down the selected element in the dialog.
this._.selectedElement = element;
return retval;
};
var setupParams = function( page, data )
{
if ( data[page] )
this.setValue( data[page][this.id] || '' );
};
var setupPopupParams = function( data )
{
return setupParams.call( this, 'target', data );
};
var setupAdvParams = function( data )
{
return setupParams.call( this, 'adv', data );
};
var commitParams = function( page, data )
{
if ( !data[page] )
data[page] = {};
data[page][this.id] = this.getValue() || '';
};
var commitPopupParams = function( data )
{
return commitParams.call( this, 'target', data );
};
var commitAdvParams = function( data )
{
return commitParams.call( this, 'adv', data );
};
function unescapeSingleQuote( str )
{
return str.replace( /\\'/g, '\'' );
}
function escapeSingleQuote( str )
{
return str.replace( /'/g, '\\$&' );
}
var emailProtection = editor.config.emailProtection || '';
// Compile the protection function pattern.
if ( emailProtection && emailProtection != 'encode' )
{
var compiledProtectionFunction = {};
emailProtection.replace( /^([^(]+)\(([^)]+)\)$/, function( match, funcName, params )
{
compiledProtectionFunction.name = funcName;
compiledProtectionFunction.params = [];
params.replace( /[^,\s]+/g, function( param )
{
compiledProtectionFunction.params.push( param );
} );
} );
}
function protectEmailLinkAsFunction( email )
{
var retval,
name = compiledProtectionFunction.name,
params = compiledProtectionFunction.params,
paramName,
paramValue;
retval = [ name, '(' ];
for ( var i = 0; i < params.length; i++ )
{
paramName = params[ i ].toLowerCase();
paramValue = email[ paramName ];
i > 0 && retval.push( ',' );
retval.push( '\'',
paramValue ?
escapeSingleQuote( encodeURIComponent( email[ paramName ] ) )
: '',
'\'');
}
retval.push( ')' );
return retval.join( '' );
}
function protectEmailAddressAsEncodedString( address )
{
var charCode,
length = address.length,
encodedChars = [];
for ( var i = 0; i < length; i++ )
{
charCode = address.charCodeAt( i );
encodedChars.push( charCode );
}
return 'String.fromCharCode(' + encodedChars.join( ',' ) + ')';
}
function getLinkClass( ele )
{
var className = ele.getAttribute( 'class' );
return className ? className.replace( /\s*(?:cke_anchor_empty|cke_anchor)(?:\s*$)?/g, '' ) : '';
}
var commonLang = editor.lang.common,
linkLang = editor.lang.link;
return {
title : linkLang.title,
minWidth : 350,
minHeight : 230,
contents : [
{
id : 'info',
label : linkLang.info,
title : linkLang.info,
elements :
[
{
id : 'linkType',
type : 'select',
label : linkLang.type,
'default' : 'url',
items :
[
[ linkLang.toUrl, 'url' ],
[ linkLang.toAnchor, 'anchor' ],
[ linkLang.toEmail, 'email' ]
],
onChange : linkTypeChanged,
setup : function( data )
{
if ( data.type )
this.setValue( data.type );
},
commit : function( data )
{
data.type = this.getValue();
}
},
{
type : 'vbox',
id : 'urlOptions',
children :
[
{
type : 'hbox',
widths : [ '25%', '75%' ],
children :
[
{
id : 'protocol',
type : 'select',
label : commonLang.protocol,
'default' : 'http://',
items :
[
// Force 'ltr' for protocol names in BIDI. (#5433)
[ 'http://\u200E', 'http://' ],
[ 'https://\u200E', 'https://' ],
[ 'ftp://\u200E', 'ftp://' ],
[ 'news://\u200E', 'news://' ],
[ linkLang.other , '' ]
],
setup : function( data )
{
if ( data.url )
this.setValue( data.url.protocol || '' );
},
commit : function( data )
{
if ( !data.url )
data.url = {};
data.url.protocol = this.getValue();
}
},
{
type : 'text',
id : 'url',
label : commonLang.url,
required: true,
onLoad : function ()
{
this.allowOnChange = true;
},
onKeyUp : function()
{
this.allowOnChange = false;
var protocolCmb = this.getDialog().getContentElement( 'info', 'protocol' ),
url = this.getValue(),
urlOnChangeProtocol = /^(http|https|ftp|news):\/\/(?=.)/i,
urlOnChangeTestOther = /^((javascript:)|[#\/\.\?])/i;
var protocol = urlOnChangeProtocol.exec( url );
if ( protocol )
{
this.setValue( url.substr( protocol[ 0 ].length ) );
protocolCmb.setValue( protocol[ 0 ].toLowerCase() );
}
else if ( urlOnChangeTestOther.test( url ) )
protocolCmb.setValue( '' );
this.allowOnChange = true;
},
onChange : function()
{
if ( this.allowOnChange ) // Dont't call on dialog load.
this.onKeyUp();
},
validate : function()
{
var dialog = this.getDialog();
if ( dialog.getContentElement( 'info', 'linkType' ) &&
dialog.getValueOf( 'info', 'linkType' ) != 'url' )
return true;
if ( this.getDialog().fakeObj ) // Edit Anchor.
return true;
var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noUrl );
return func.apply( this );
},
setup : function( data )
{
this.allowOnChange = false;
if ( data.url )
this.setValue( data.url.url );
this.allowOnChange = true;
},
commit : function( data )
{
// IE will not trigger the onChange event if the mouse has been used
// to carry all the operations #4724
this.onChange();
if ( !data.url )
data.url = {};
data.url.url = this.getValue();
this.allowOnChange = false;
}
}
],
setup : function( data )
{
if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
this.getElement().show();
}
},
{
type : 'button',
id : 'browse',
hidden : 'true',
filebrowser : 'info:url',
label : commonLang.browseServer
}
]
},
{
type : 'vbox',
id : 'anchorOptions',
width : 260,
align : 'center',
padding : 0,
children :
[
{
type : 'fieldset',
id : 'selectAnchorText',
label : linkLang.selectAnchor,
setup : function( data )
{
if ( data.anchors.length > 0 )
this.getElement().show();
else
this.getElement().hide();
},
children :
[
{
type : 'hbox',
id : 'selectAnchor',
children :
[
{
type : 'select',
id : 'anchorName',
'default' : '',
label : linkLang.anchorName,
style : 'width: 100%;',
items :
[
[ '' ]
],
setup : function( data )
{
this.clear();
this.add( '' );
for ( var i = 0 ; i < data.anchors.length ; i++ )
{
if ( data.anchors[i].name )
this.add( data.anchors[i].name );
}
if ( data.anchor )
this.setValue( data.anchor.name );
var linkType = this.getDialog().getContentElement( 'info', 'linkType' );
if ( linkType && linkType.getValue() == 'email' )
this.focus();
},
commit : function( data )
{
if ( !data.anchor )
data.anchor = {};
data.anchor.name = this.getValue();
}
},
{
type : 'select',
id : 'anchorId',
'default' : '',
label : linkLang.anchorId,
style : 'width: 100%;',
items :
[
[ '' ]
],
setup : function( data )
{
this.clear();
this.add( '' );
for ( var i = 0 ; i < data.anchors.length ; i++ )
{
if ( data.anchors[i].id )
this.add( data.anchors[i].id );
}
if ( data.anchor )
this.setValue( data.anchor.id );
},
commit : function( data )
{
if ( !data.anchor )
data.anchor = {};
data.anchor.id = this.getValue();
}
}
],
setup : function( data )
{
if ( data.anchors.length > 0 )
this.getElement().show();
else
this.getElement().hide();
}
}
]
},
{
type : 'html',
id : 'noAnchors',
style : 'text-align: center;',
html : '<div role="note" tabIndex="-1">' + CKEDITOR.tools.htmlEncode( linkLang.noAnchors ) + '</div>',
// Focus the first element defined in above html.
focus : true,
setup : function( data )
{
if ( data.anchors.length < 1 )
this.getElement().show();
else
this.getElement().hide();
}
}
],
setup : function( data )
{
if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
this.getElement().hide();
}
},
{
type : 'vbox',
id : 'emailOptions',
padding : 1,
children :
[
{
type : 'text',
id : 'emailAddress',
label : linkLang.emailAddress,
required : true,
validate : function()
{
var dialog = this.getDialog();
if ( !dialog.getContentElement( 'info', 'linkType' ) ||
dialog.getValueOf( 'info', 'linkType' ) != 'email' )
return true;
var func = CKEDITOR.dialog.validate.notEmpty( linkLang.noEmail );
return func.apply( this );
},
setup : function( data )
{
if ( data.email )
this.setValue( data.email.address );
var linkType = this.getDialog().getContentElement( 'info', 'linkType' );
if ( linkType && linkType.getValue() == 'email' )
this.select();
},
commit : function( data )
{
if ( !data.email )
data.email = {};
data.email.address = this.getValue();
}
},
{
type : 'text',
id : 'emailSubject',
label : linkLang.emailSubject,
setup : function( data )
{
if ( data.email )
this.setValue( data.email.subject );
},
commit : function( data )
{
if ( !data.email )
data.email = {};
data.email.subject = this.getValue();
}
},
{
type : 'textarea',
id : 'emailBody',
label : linkLang.emailBody,
rows : 3,
'default' : '',
setup : function( data )
{
if ( data.email )
this.setValue( data.email.body );
},
commit : function( data )
{
if ( !data.email )
data.email = {};
data.email.body = this.getValue();
}
}
],
setup : function( data )
{
if ( !this.getDialog().getContentElement( 'info', 'linkType' ) )
this.getElement().hide();
}
}
]
},
{
id : 'target',
label : linkLang.target,
title : linkLang.target,
elements :
[
{
type : 'hbox',
widths : [ '50%', '50%' ],
children :
[
{
type : 'select',
id : 'linkTargetType',
label : commonLang.target,
'default' : 'notSet',
style : 'width : 100%;',
'items' :
[
[ commonLang.notSet, 'notSet' ],
[ linkLang.targetFrame, 'frame' ],
[ linkLang.targetPopup, 'popup' ],
[ commonLang.targetNew, '_blank' ],
[ commonLang.targetTop, '_top' ],
[ commonLang.targetSelf, '_self' ],
[ commonLang.targetParent, '_parent' ]
],
onChange : targetChanged,
setup : function( data )
{
if ( data.target )
this.setValue( data.target.type || 'notSet' );
targetChanged.call( this );
},
commit : function( data )
{
if ( !data.target )
data.target = {};
data.target.type = this.getValue();
}
},
{
type : 'text',
id : 'linkTargetName',
label : linkLang.targetFrameName,
'default' : '',
setup : function( data )
{
if ( data.target )
this.setValue( data.target.name );
},
commit : function( data )
{
if ( !data.target )
data.target = {};
data.target.name = this.getValue().replace(/\W/gi, '');
}
}
]
},
{
type : 'vbox',
width : '100%',
align : 'center',
padding : 2,
id : 'popupFeatures',
children :
[
{
type : 'fieldset',
label : linkLang.popupFeatures,
children :
[
{
type : 'hbox',
children :
[
{
type : 'checkbox',
id : 'resizable',
label : linkLang.popupResizable,
setup : setupPopupParams,
commit : commitPopupParams
},
{
type : 'checkbox',
id : 'status',
label : linkLang.popupStatusBar,
setup : setupPopupParams,
commit : commitPopupParams
}
]
},
{
type : 'hbox',
children :
[
{
type : 'checkbox',
id : 'location',
label : linkLang.popupLocationBar,
setup : setupPopupParams,
commit : commitPopupParams
},
{
type : 'checkbox',
id : 'toolbar',
label : linkLang.popupToolbar,
setup : setupPopupParams,
commit : commitPopupParams
}
]
},
{
type : 'hbox',
children :
[
{
type : 'checkbox',
id : 'menubar',
label : linkLang.popupMenuBar,
setup : setupPopupParams,
commit : commitPopupParams
},
{
type : 'checkbox',
id : 'fullscreen',
label : linkLang.popupFullScreen,
setup : setupPopupParams,
commit : commitPopupParams
}
]
},
{
type : 'hbox',
children :
[
{
type : 'checkbox',
id : 'scrollbars',
label : linkLang.popupScrollBars,
setup : setupPopupParams,
commit : commitPopupParams
},
{
type : 'checkbox',
id : 'dependent',
label : linkLang.popupDependent,
setup : setupPopupParams,
commit : commitPopupParams
}
]
},
{
type : 'hbox',
children :
[
{
type : 'text',
widths : [ '50%', '50%' ],
labelLayout : 'horizontal',
label : commonLang.width,
id : 'width',
setup : setupPopupParams,
commit : commitPopupParams
},
{
type : 'text',
labelLayout : 'horizontal',
widths : [ '50%', '50%' ],
label : linkLang.popupLeft,
id : 'left',
setup : setupPopupParams,
commit : commitPopupParams
}
]
},
{
type : 'hbox',
children :
[
{
type : 'text',
labelLayout : 'horizontal',
widths : [ '50%', '50%' ],
label : commonLang.height,
id : 'height',
setup : setupPopupParams,
commit : commitPopupParams
},
{
type : 'text',
labelLayout : 'horizontal',
label : linkLang.popupTop,
widths : [ '50%', '50%' ],
id : 'top',
setup : setupPopupParams,
commit : commitPopupParams
}
]
}
]
}
]
}
]
},
{
id : 'upload',
label : linkLang.upload,
title : linkLang.upload,
hidden : true,
filebrowser : 'uploadButton',
elements :
[
{
type : 'file',
id : 'upload',
label : commonLang.upload,
style: 'height:40px',
size : 29
},
{
type : 'fileButton',
id : 'uploadButton',
label : commonLang.uploadSubmit,
filebrowser : 'info:url',
'for' : [ 'upload', 'upload' ]
}
]
},
{
id : 'advanced',
label : linkLang.advanced,
title : linkLang.advanced,
elements :
[
{
type : 'vbox',
padding : 1,
children :
[
{
type : 'hbox',
widths : [ '45%', '35%', '20%' ],
children :
[
{
type : 'text',
id : 'advId',
label : linkLang.id,
setup : setupAdvParams,
commit : commitAdvParams
},
{
type : 'select',
id : 'advLangDir',
label : linkLang.langDir,
'default' : '',
style : 'width:110px',
items :
[
[ commonLang.notSet, '' ],
[ linkLang.langDirLTR, 'ltr' ],
[ linkLang.langDirRTL, 'rtl' ]
],
setup : setupAdvParams,
commit : commitAdvParams
},
{
type : 'text',
id : 'advAccessKey',
width : '80px',
label : linkLang.acccessKey,
maxLength : 1,
setup : setupAdvParams,
commit : commitAdvParams
}
]
},
{
type : 'hbox',
widths : [ '45%', '35%', '20%' ],
children :
[
{
type : 'text',
label : linkLang.name,
id : 'advName',
setup : setupAdvParams,
commit : commitAdvParams
},
{
type : 'text',
label : linkLang.langCode,
id : 'advLangCode',
width : '110px',
'default' : '',
setup : setupAdvParams,
commit : commitAdvParams
},
{
type : 'text',
label : linkLang.tabIndex,
id : 'advTabIndex',
width : '80px',
maxLength : 5,
setup : setupAdvParams,
commit : commitAdvParams
}
]
}
]
},
{
type : 'vbox',
padding : 1,
children :
[
{
type : 'hbox',
widths : [ '45%', '55%' ],
children :
[
{
type : 'text',
label : linkLang.advisoryTitle,
'default' : '',
id : 'advTitle',
setup : setupAdvParams,
commit : commitAdvParams
},
{
type : 'text',
label : linkLang.advisoryContentType,
'default' : '',
id : 'advContentType',
setup : setupAdvParams,
commit : commitAdvParams
}
]
},
{
type : 'hbox',
widths : [ '45%', '55%' ],
children :
[
{
type : 'text',
label : linkLang.cssClasses,
'default' : '',
id : 'advCSSClasses',
setup : setupAdvParams,
commit : commitAdvParams
},
{
type : 'text',
label : linkLang.charset,
'default' : '',
id : 'advCharset',
setup : setupAdvParams,
commit : commitAdvParams
}
]
},
{
type : 'hbox',
widths : [ '45%', '55%' ],
children :
[
{
type : 'text',
label : linkLang.rel,
'default' : '',
id : 'advRel',
setup : setupAdvParams,
commit : commitAdvParams
},
{
type : 'text',
label : linkLang.styles,
'default' : '',
id : 'advStyles',
validate : CKEDITOR.dialog.validate.inlineStyle( editor.lang.common.invalidInlineStyle ),
setup : setupAdvParams,
commit : commitAdvParams
}
]
}
]
}
]
}
],
onShow : function()
{
var editor = this.getParentEditor(),
selection = editor.getSelection(),
element = null;
// Fill in all the relevant fields if there's already one link selected.
if ( ( element = plugin.getSelectedLink( editor ) ) && element.hasAttribute( 'href' ) )
selection.selectElement( element );
else
element = null;
this.setupContent( parseLink.apply( this, [ editor, element ] ) );
},
onOk : function()
{
var attributes = {},
removeAttributes = [],
data = {},
me = this,
editor = this.getParentEditor();
this.commitContent( data );
// Compose the URL.
switch ( data.type || 'url' )
{
case 'url':
var protocol = ( data.url && data.url.protocol != undefined ) ? data.url.protocol : 'http://',
url = ( data.url && CKEDITOR.tools.trim( data.url.url ) ) || '';
attributes[ 'data-cke-saved-href' ] = ( url.indexOf( '/' ) === 0 ) ? url : protocol + url;
break;
case 'anchor':
var name = ( data.anchor && data.anchor.name ),
id = ( data.anchor && data.anchor.id );
attributes[ 'data-cke-saved-href' ] = '#' + ( name || id || '' );
break;
case 'email':
var linkHref,
email = data.email,
address = email.address;
switch( emailProtection )
{
case '' :
case 'encode' :
{
var subject = encodeURIComponent( email.subject || '' ),
body = encodeURIComponent( email.body || '' );
// Build the e-mail parameters first.
var argList = [];
subject && argList.push( 'subject=' + subject );
body && argList.push( 'body=' + body );
argList = argList.length ? '?' + argList.join( '&' ) : '';
if ( emailProtection == 'encode' )
{
linkHref = [ 'javascript:void(location.href=\'mailto:\'+',
protectEmailAddressAsEncodedString( address ) ];
// parameters are optional.
argList && linkHref.push( '+\'', escapeSingleQuote( argList ), '\'' );
linkHref.push( ')' );
}
else
linkHref = [ 'mailto:', address, argList ];
break;
}
default :
{
// Separating name and domain.
var nameAndDomain = address.split( '@', 2 );
email.name = nameAndDomain[ 0 ];
email.domain = nameAndDomain[ 1 ];
linkHref = [ 'javascript:', protectEmailLinkAsFunction( email ) ];
}
}
attributes[ 'data-cke-saved-href' ] = linkHref.join( '' );
break;
}
// Popups and target.
if ( data.target )
{
if ( data.target.type == 'popup' )
{
var onclickList = [ 'window.open(this.href, \'',
data.target.name || '', '\', \'' ];
var featureList = [ 'resizable', 'status', 'location', 'toolbar', 'menubar', 'fullscreen',
'scrollbars', 'dependent' ];
var featureLength = featureList.length;
var addFeature = function( featureName )
{
if ( data.target[ featureName ] )
featureList.push( featureName + '=' + data.target[ featureName ] );
};
for ( var i = 0 ; i < featureLength ; i++ )
featureList[i] = featureList[i] + ( data.target[ featureList[i] ] ? '=yes' : '=no' ) ;
addFeature( 'width' );
addFeature( 'left' );
addFeature( 'height' );
addFeature( 'top' );
onclickList.push( featureList.join( ',' ), '\'); return false;' );
attributes[ 'data-cke-pa-onclick' ] = onclickList.join( '' );
// Add the "target" attribute. (#5074)
removeAttributes.push( 'target' );
}
else
{
if ( data.target.type != 'notSet' && data.target.name )
attributes.target = data.target.name;
else
removeAttributes.push( 'target' );
removeAttributes.push( 'data-cke-pa-onclick', 'onclick' );
}
}
// Advanced attributes.
if ( data.adv )
{
var advAttr = function( inputName, attrName )
{
var value = data.adv[ inputName ];
if ( value )
attributes[attrName] = value;
else
removeAttributes.push( attrName );
};
advAttr( 'advId', 'id' );
advAttr( 'advLangDir', 'dir' );
advAttr( 'advAccessKey', 'accessKey' );
if ( data.adv[ 'advName' ] )
attributes[ 'name' ] = attributes[ 'data-cke-saved-name' ] = data.adv[ 'advName' ];
else
removeAttributes = removeAttributes.concat( [ 'data-cke-saved-name', 'name' ] );
advAttr( 'advLangCode', 'lang' );
advAttr( 'advTabIndex', 'tabindex' );
advAttr( 'advTitle', 'title' );
advAttr( 'advContentType', 'type' );
advAttr( 'advCSSClasses', 'class' );
advAttr( 'advCharset', 'charset' );
advAttr( 'advStyles', 'style' );
advAttr( 'advRel', 'rel' );
}
var selection = editor.getSelection();
// Browser need the "href" fro copy/paste link to work. (#6641)
attributes.href = attributes[ 'data-cke-saved-href' ];
if ( !this._.selectedElement )
{
// Create element if current selection is collapsed.
var ranges = selection.getRanges( true );
if ( ranges.length == 1 && ranges[0].collapsed )
{
// Short mailto link text view (#5736).
var text = new CKEDITOR.dom.text( data.type == 'email' ?
data.email.address : attributes[ 'data-cke-saved-href' ], editor.document );
ranges[0].insertNode( text );
ranges[0].selectNodeContents( text );
selection.selectRanges( ranges );
}
// Apply style.
var style = new CKEDITOR.style( { element : 'a', attributes : attributes } );
style.type = CKEDITOR.STYLE_INLINE; // need to override... dunno why.
style.apply( editor.document );
}
else
{
// We're only editing an existing link, so just overwrite the attributes.
var element = this._.selectedElement,
href = element.data( 'cke-saved-href' ),
textView = element.getHtml();
element.setAttributes( attributes );
element.removeAttributes( removeAttributes );
if ( data.adv && data.adv.advName && CKEDITOR.plugins.link.synAnchorSelector )
element.addClass( element.getChildCount() ? 'cke_anchor' : 'cke_anchor_empty' );
// Update text view when user changes protocol (#4612).
if ( href == textView || data.type == 'email' && textView.indexOf( '@' ) != -1 )
{
// Short mailto link text view (#5736).
element.setHtml( data.type == 'email' ?
data.email.address : attributes[ 'data-cke-saved-href' ] );
}
selection.selectElement( element );
delete this._.selectedElement;
}
},
onLoad : function()
{
if ( !editor.config.linkShowAdvancedTab )
this.hidePage( 'advanced' ); //Hide Advanded tab.
if ( !editor.config.linkShowTargetTab )
this.hidePage( 'target' ); //Hide Target tab.
},
// Inital focus on 'url' field if link is of type URL.
onFocus : function()
{
var linkType = this.getContentElement( 'info', 'linkType' ),
urlField;
if ( linkType && linkType.getValue() == 'url' )
{
urlField = this.getContentElement( 'info', 'url' );
urlField.select();
}
}
};
});
/**
* The e-mail address anti-spam protection option. The protection will be
* applied when creating or modifying e-mail links through the editor interface.<br>
* Two methods of protection can be choosed:
* <ol> <li>The e-mail parts (name, domain and any other query string) are
* assembled into a function call pattern. Such function must be
* provided by the developer in the pages that will use the contents.
* <li>Only the e-mail address is obfuscated into a special string that
* has no meaning for humans or spam bots, but which is properly
* rendered and accepted by the browser.</li></ol>
* Both approaches require JavaScript to be enabled.
* @name CKEDITOR.config.emailProtection
* @since 3.1
* @type String
* @default '' (empty string = disabled)
* @example
* // href="mailto:tester@ckeditor.com?subject=subject&body=body"
* config.emailProtection = '';
* @example
* // href="<a href=\"javascript:void(location.href=\'mailto:\'+String.fromCharCode(116,101,115,116,101,114,64,99,107,101,100,105,116,111,114,46,99,111,109)+\'?subject=subject&body=body\')\">e-mail</a>"
* config.emailProtection = 'encode';
* @example
* // href="javascript:mt('tester','ckeditor.com','subject','body')"
* config.emailProtection = 'mt(NAME,DOMAIN,SUBJECT,BODY)';
*/
| JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.