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 * Icelandic language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['is'] = { /** * 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, press ALT 0 for help.', // MISSING // ARIA descriptions. toolbars : 'Editor toolbars', // MISSING editor : 'Rich Text Editor', // MISSING // Toolbar buttons without dialogs. source : 'Kóði', newPage : 'Ný síða', save : 'Vista', preview : 'Forskoða', cut : 'Klippa', copy : 'Afrita', paste : 'Líma', print : 'Prenta', underline : 'Undirstrikað', bold : 'Feitletrað', italic : 'Skáletrað', selectAll : 'Velja allt', removeFormat : 'Fjarlægja snið', strike : 'Yfirstrikað', subscript : 'Niðurskrifað', superscript : 'Uppskrifað', horizontalrule : 'Lóðrétt lína', pagebreak : 'Setja inn síðuskil', pagebreakAlt : 'Page Break', // MISSING unlink : 'Fjarlægja stiklu', undo : 'Afturkalla', redo : 'Hætta við afturköllun', // Common messages and labels. common : { browseServer : 'Fletta í skjalasafni', url : 'Vefslóð', protocol : 'Samskiptastaðall', upload : 'Senda upp', uploadSubmit : 'Hlaða upp', image : 'Setja inn mynd', flash : 'Flash', form : 'Setja inn innsláttarform', checkbox : 'Setja inn hökunarreit', radio : 'Setja inn valhnapp', textField : 'Setja inn textareit', textarea : 'Setja inn textasvæði', hiddenField : 'Setja inn falið svæði', button : 'Setja inn hnapp', select : 'Setja inn lista', imageButton : 'Setja inn myndahnapp', notSet : '<ekkert valið>', id : 'Auðkenni', name : 'Nafn', langDir : 'Lesstefna', langDirLtr : 'Frá vinstri til hægri (LTR)', langDirRtl : 'Frá hægri til vinstri (RTL)', langCode : 'Tungumálakóði', longDescr : 'Nánari lýsing', cssClass : 'Stílsniðsflokkur', advisoryTitle : 'Titill', cssStyle : 'Stíll', ok : 'Í lagi', cancel : 'Hætta við', close : 'Close', // MISSING preview : 'Preview', // MISSING generalTab : 'Almennt', advancedTab : 'Tæknilegt', 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 : 'Breidd', height : 'Hæð', align : 'Jöfnun', alignLeft : 'Vinstri', alignRight : 'Hægri', alignCenter : 'Miðjað', alignTop : 'Efst', alignMiddle : 'Miðjuð', alignBottom : 'Neðst', 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 : 'Setja inn merki', title : 'Velja tákn', options : 'Special Character Options' // MISSING }, // Link dialog. link : { toolbar : 'Stofna/breyta stiklu', other : '<annar>', menu : 'Breyta stiklu', title : 'Stikla', info : 'Almennt', target : 'Mark', upload : 'Senda upp', advanced : 'Tæknilegt', type : 'Stikluflokkur', toUrl : 'URL', // MISSING toAnchor : 'Bókamerki á þessari síðu', toEmail : 'Netfang', targetFrame : '<rammi>', targetPopup : '<sprettigluggi>', targetFrameName : 'Nafn markglugga', targetPopupName : 'Nafn sprettiglugga', popupFeatures : 'Eigindi sprettiglugga', popupResizable : 'Resizable', // MISSING popupStatusBar : 'Stöðustika', popupLocationBar: 'Fanglína', popupToolbar : 'Verkfærastika', popupMenuBar : 'Vallína', popupFullScreen : 'Heilskjár (IE)', popupScrollBars : 'Skrunstikur', popupDependent : 'Háð venslum (Netscape)', popupLeft : 'Fjarlægð frá vinstri', popupTop : 'Fjarlægð frá efri brún', id : 'Id', // MISSING langDir : 'Lesstefna', langDirLTR : 'Frá vinstri til hægri (LTR)', langDirRTL : 'Frá hægri til vinstri (RTL)', acccessKey : 'Skammvalshnappur', name : 'Nafn', langCode : 'Lesstefna', tabIndex : 'Raðnúmer innsláttarreits', advisoryTitle : 'Titill', advisoryContentType : 'Tegund innihalds', cssClasses : 'Stílsniðsflokkur', charset : 'Táknróf', styles : 'Stíll', rel : 'Relationship', // MISSING selectAnchor : 'Veldu akkeri', anchorName : 'Eftir akkerisnafni', anchorId : 'Eftir auðkenni einingar', emailAddress : 'Netfang', emailSubject : 'Efni', emailBody : 'Meginmál', noAnchors : '<Engin bókamerki á skrá>', noUrl : 'Sláðu inn veffang stiklunnar!', noEmail : 'Sláðu inn netfang!' }, // Anchor dialog anchor : { toolbar : 'Stofna/breyta kaflamerki', menu : 'Eigindi kaflamerkis', title : 'Eigindi kaflamerkis', name : 'Nafn bókamerkis', errorName : 'Sláðu inn nafn bókamerkis!', 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 : 'Finna og skipta', find : 'Leita', replace : 'Skipta út', findWhat : 'Leita að:', replaceWith : 'Skipta út fyrir:', notFoundMsg : 'Leitartexti fannst ekki!', findOptions : 'Find Options', // MISSING matchCase : 'Gera greinarmun á¡ há¡- og lágstöfum', matchWord : 'Aðeins heil orð', matchCyclic : 'Match cyclic', // MISSING replaceAll : 'Skipta út allsstaðar', replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING }, // Table Dialog table : { toolbar : 'Tafla', title : 'Eigindi töflu', menu : 'Eigindi töflu', deleteTable : 'Fella töflu', rows : 'Raðir', columns : 'Dálkar', border : 'Breidd ramma', widthPx : 'myndeindir', widthPc : 'prósent', widthUnit : 'width unit', // MISSING cellSpace : 'Bil milli reita', cellPad : 'Reitaspássía', caption : 'Titill', summary : 'Áfram', headers : 'Fyrirsagnir', headersNone : 'Engar', headersColumn : 'Fyrsti dálkur', headersRow : 'Fyrsta röð', headersBoth : 'Hvort tveggja', 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 : 'Reitur', insertBefore : 'Skjóta inn reiti fyrir aftan', insertAfter : 'Skjóta inn reiti fyrir framan', deleteCell : 'Fella reit', merge : 'Sameina reiti', mergeRight : 'Sameina til hægri', mergeDown : 'Sameina niður á við', splitHorizontal : 'Kljúfa reit lárétt', splitVertical : 'Kljúfa reit lóðrétt', 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 : 'Röð', insertBefore : 'Skjóta inn röð fyrir ofan', insertAfter : 'Skjóta inn röð fyrir neðan', deleteRow : 'Eyða röð' }, column : { menu : 'Dálkur', insertBefore : 'Skjóta inn dálki vinstra megin', insertAfter : 'Skjóta inn dálki hægra megin', deleteColumn : 'Fella dálk' } }, // Button Dialog. button : { title : 'Eigindi hnapps', text : 'Texti', type : 'Gerð', typeBtn : 'Hnappur', typeSbm : 'Staðfesta', typeRst : 'Hreinsa' }, // Checkbox and Radio Button Dialogs. checkboxAndRadio : { checkboxTitle : 'Eigindi markreits', radioTitle : 'Eigindi valhnapps', value : 'Gildi', selected : 'Valið' }, // Form Dialog. form : { title : 'Eigindi innsláttarforms', menu : 'Eigindi innsláttarforms', action : 'Aðgerð', method : 'Aðferð', encoding : 'Encoding' // MISSING }, // Select Field Dialog. select : { title : 'Eigindi lista', selectInfo : 'Upplýsingar', opAvail : 'Kostir', value : 'Gildi', size : 'Stærð', lines : 'línur', chkMulti : 'Leyfa fleiri kosti', opText : 'Texti', opValue : 'Gildi', btnAdd : 'Bæta við', btnModify : 'Breyta', btnUp : 'Upp', btnDown : 'Niður', btnSetValue : 'Merkja sem valið', btnDelete : 'Eyða' }, // Textarea Dialog. textarea : { title : 'Eigindi textasvæðis', cols : 'Dálkar', rows : 'Línur' }, // Text Field Dialog. textfield : { title : 'Eigindi textareits', name : 'Nafn', value : 'Gildi', charWidth : 'Breidd (leturtákn)', maxChars : 'Hámarksfjöldi leturtákna', type : 'Gerð', typeText : 'Texti', typePass : 'Lykilorð' }, // Hidden Field Dialog. hidden : { title : 'Eigindi falins svæðis', name : 'Nafn', value : 'Gildi' }, // Image Dialog. image : { title : 'Eigindi myndar', titleButton : 'Eigindi myndahnapps', menu : 'Eigindi myndar', infoTab : 'Almennt', btnUpload : 'Hlaða upp', upload : 'Hlaða upp', alt : 'Baklægur texti', lockRatio : 'Festa stærðarhlutfall', resetSize : 'Reikna stærð', border : 'Rammi', hSpace : 'Vinstri bil', vSpace : 'Hægri bil', alertUrl : 'Sláðu inn slóðina að myndinni', linkTab : 'Stikla', 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 : 'Eigindi Flash', propertiesTab : 'Properties', // MISSING title : 'Eigindi Flash', chkPlay : 'Sjálfvirk spilun', chkLoop : 'Endurtekning', chkMenu : 'Sýna Flash-valmynd', chkFull : 'Allow Fullscreen', // MISSING scale : 'Skali', scaleAll : 'Sýna allt', scaleNoBorder : 'Án ramma', scaleFit : 'Fella skala að stærð', access : 'Script Access', // MISSING accessAlways : 'Always', // MISSING accessSameDomain: 'Same domain', // MISSING accessNever : 'Never', // MISSING alignAbsBottom : 'Abs neðst', alignAbsMiddle : 'Abs miðjuð', alignBaseline : 'Grunnlína', alignTextTop : 'Efri brún texta', 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 : 'Bakgrunnslitur', hSpace : 'Vinstri bil', vSpace : 'Hægri bil', validateSrc : 'Sláðu inn veffang stiklunnar!', validateHSpace : 'HSpace must be a number.', // MISSING validateVSpace : 'VSpace must be a number.' // MISSING }, // Speller Pages Dialog spellCheck : { toolbar : 'Villuleit', title : 'Spell Check', // MISSING notAvailable : 'Sorry, but service is unavailable now.', // MISSING errorLoading : 'Error loading application service host: %s.', // MISSING notInDic : 'Ekki í orðabókinni', changeTo : 'Tillaga', btnIgnore : 'Hunsa', btnIgnoreAll : 'Hunsa allt', btnReplace : 'Skipta', btnReplaceAll : 'Skipta öllu', btnUndo : 'Til baka', noSuggestions : '- engar tillögur -', progress : 'Villuleit í gangi...', noMispell : 'Villuleit lokið: Engin villa fannst', noChanges : 'Villuleit lokið: Engu orði breytt', oneChange : 'Villuleit lokið: Einu orði breytt', manyChanges : 'Villuleit lokið: %1 orðum breytt', ieSpellDownload : 'Villuleit ekki sett upp.<br>Viltu setja hana upp?' }, smiley : { toolbar : 'Svipur', title : 'Velja svip', options : 'Smiley Options' // MISSING }, elementsPath : { eleLabel : 'Elements path', // MISSING eleTitle : '%1 element' // MISSING }, numberedlist : 'Númeraður listi', bulletedlist : 'Punktalisti', indent : 'Minnka inndrátt', outdent : 'Auka inndrátt', justify : { left : 'Vinstrijöfnun', center : 'Miðja texta', right : 'Hægrijöfnun', block : 'Jafna báðum megin' }, blockquote : 'Inndráttur', clipboard : { title : 'Líma', cutError : 'Öryggisstillingar vafrans þíns leyfa ekki klippingu texta með músaraðgerð. Notaðu lyklaborðið í klippa (Ctrl/Cmd+X).', copyError : 'Öryggisstillingar vafrans þíns leyfa ekki afritun texta með músaraðgerð. Notaðu lyklaborðið í afrita (Ctrl/Cmd+C).', pasteMsg : 'Límdu í svæðið hér að neðan og (<STRONG>Ctrl/Cmd+V</STRONG>) og smelltu á <STRONG>OK</STRONG>.', securityMsg : 'Vegna öryggisstillinga í vafranum þínum fær ritillinn ekki beinan aðgang að klippuborðinu. Þú verður að líma innihaldið aftur inn í þennan glugga.', 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 : 'Líma úr Word', title : 'Líma úr Word', error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING }, pasteText : { button : 'Líma sem ósniðinn texta', title : 'Líma sem ósniðinn texta' }, templates : { button : 'Sniðmát', title : 'Innihaldssniðmát', options : 'Template Options', // MISSING insertOption : 'Skipta út raunverulegu innihaldi', selectPromptMsg : 'Veldu sniðmát til að opna í ritlinum.<br>(Núverandi innihald víkur fyrir því!):', emptyListMsg : '(Ekkert sniðmát er skilgreint!)' }, showBlocks : 'Sýna blokkir', stylesCombo : { label : 'Stílflokkur', panelTitle : 'Formatting Styles', // MISSING panelTitle1 : 'Block Styles', // MISSING panelTitle2 : 'Inline Styles', // MISSING panelTitle3 : 'Object Styles' // MISSING }, format : { label : 'Stílsnið', panelTitle : 'Stílsnið', tag_p : 'Venjulegt letur', tag_pre : 'Forsniðið', tag_address : 'Vistfang', tag_h1 : 'Fyrirsögn 1', tag_h2 : 'Fyrirsögn 2', tag_h3 : 'Fyrirsögn 3', tag_h4 : 'Fyrirsögn 4', tag_h5 : 'Fyrirsögn 5', tag_h6 : 'Fyrirsögn 6', tag_div : 'Venjulegt (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 : 'Leturgerð ', voiceLabel : 'Font', // MISSING panelTitle : 'Leturgerð ' }, fontSize : { label : 'Leturstærð ', voiceLabel : 'Font Size', // MISSING panelTitle : 'Leturstærð ' }, colorButton : { textColorTitle : 'Litur texta', bgColorTitle : 'Bakgrunnslitur', panelTitle : 'Colors', // MISSING auto : 'Sjálfval', more : 'Fleiri liti...' }, 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 &copy; $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 : 'Eigindi skjals', title : 'Eigindi skjals', design : 'Design', // MISSING meta : 'Lýsigögn', chooseColor : 'Choose', // MISSING other : '<annar>', docTitle : 'Titill síðu', charset : 'Letursett', charsetOther : 'Annað letursett', charsetASCII : 'ASCII', // MISSING charsetCE : 'Mið-evrópskt', charsetCT : 'Kínverskt, hefðbundið (Big5)', charsetCR : 'Kýrilskt', charsetGR : 'Grískt', charsetJP : 'Japanskt', charsetKR : 'Kóreskt', charsetTR : 'Tyrkneskt', charsetUN : 'Unicode (UTF-8)', // MISSING charsetWE : 'Vestur-evrópst', docType : 'Flokkur skjalategunda', docTypeOther : 'Annar flokkur skjalategunda', xhtmlDec : 'Fella inn XHTML lýsingu', bgColor : 'Bakgrunnslitur', bgImage : 'Slóð bakgrunnsmyndar', bgFixed : 'Læstur bakgrunnur', txtColor : 'Litur texta', margin : 'Hliðarspássía', marginTop : 'Efst', marginLeft : 'Vinstri', marginRight : 'Hægri', marginBottom : 'Neðst', metaKeywords : 'Lykilorð efnisorðaskrár (aðgreind með kommum)', metaDescription : 'Lýsing skjals', metaAuthor : 'Höfundur', metaCopyright : 'Höfundarréttur', 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 * 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, nápovědu zobrazíte stiskem ALT 0.', // 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 : 'Orientace jazyka', langDirLtr : 'Zleva do prava (LTR)', langDirRtl : 'Zprava do leva (RTL)', langCode : 'Kód jazyka', longDescr : 'Dlouhý popis URL', cssClass : 'Třída stylu', advisoryTitle : 'Pomocný titulek', cssStyle : 'Styl', ok : 'OK', cancel : 'Storno', 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ě chete otevrít novou stránku?', confirmCancel : 'Některá z nastavení byla změněna. Skutečně chete 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é onko (_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 : 'Zadaná šíř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 : 'Vložit/změnit 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 : 'Orientace jazyka', langDirLTR : 'Zleva do prava (LTR)', langDirRTL : 'Zprava do leva (RTL)', acccessKey : 'Přístupový klíč', name : 'Jméno', langCode : 'Orientace 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 : 'Vložít/změnit záložku', 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 : 'Zadaná šířka tabulky musí být číselná.', 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 : 'Zadaná šířka buňky musí být číslená.', 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 : 'H-mezera', vSpace : 'V-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 : 'H-mezera musí být nastavena v celých číslech.', validateVSpace : 'V-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 : 'H-mezera', vSpace : 'V-mezera', validateSrc : 'Zadejte prosím URL odkazu', validateHSpace : 'Zadaná H-mezera musí být číslo.', validateVSpace : 'Zadaná V-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 vlká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 : 'Orientace textu', 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' : 'Kyanidová', '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' : 'Lavendulová', '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 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 &copy; $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 : 'Orientace textu zleva doprava', rtl : 'Orientace textu zprava do leva' }, 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 : 'Zahrnou deklarace XHTML', bgColor : 'Barva pozadí', bgImage : 'URL obrázku na pozadí', bgFixed : 'Nerolovatelné 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 * Croatian language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['hr'] = { /** * 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 : 'Bogati uređivač teksta, %1, pritisni ALT 0 za pomoć.', // ARIA descriptions. toolbars : 'Alatne trake uređivača teksta', editor : 'Bogati uređivač teksta', // Toolbar buttons without dialogs. source : 'Kôd', newPage : 'Nova stranica', save : 'Snimi', preview : 'Pregledaj', cut : 'Izreži', copy : 'Kopiraj', paste : 'Zalijepi', print : 'Ispiši', underline : 'Potcrtano', bold : 'Podebljaj', italic : 'Ukosi', selectAll : 'Odaberi sve', removeFormat : 'Ukloni formatiranje', strike : 'Precrtano', subscript : 'Subscript', superscript : 'Superscript', horizontalrule : 'Ubaci vodoravnu liniju', pagebreak : 'Ubaci prijelom stranice', pagebreakAlt : 'Prijelom stranice', unlink : 'Ukloni link', undo : 'Poništi', redo : 'Ponovi', // Common messages and labels. common : { browseServer : 'Pretraži server', url : 'URL', protocol : 'Protokol', upload : 'Pošalji', uploadSubmit : 'Pošalji na server', image : 'Slika', 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 : '<nije postavljeno>', id : 'Id', name : 'Naziv', langDir : 'Smjer jezika', langDirLtr : 'S lijeva na desno (LTR)', langDirRtl : 'S desna na lijevo (RTL)', langCode : 'Kôd jezika', longDescr : 'Dugački opis URL', cssClass : 'Stylesheet klase', advisoryTitle : 'Advisory naslov', cssStyle : 'Stil', ok : 'OK', cancel : 'Poništi', close : 'Zatvori', preview : 'Pregledaj', generalTab : 'Općenito', advancedTab : 'Napredno', validateNumberFailed : 'Ova vrijednost nije broj.', confirmNewPage : 'Sve napravljene promjene će biti izgubljene ukoliko ih niste snimili. Sigurno želite učitati novu stranicu?', confirmCancel : 'Neke od opcija su promjenjene. Sigurno želite zatvoriti ovaj prozor?', options : 'Opcije', target : 'Odredište', targetNew : 'Novi prozor (_blank)', targetTop : 'Vršni prozor (_top)', targetSelf : 'Isti prozor (_self)', targetParent : 'Roditeljski prozor (_parent)', langDirLTR : 'S lijeva na desno (LTR)', langDirRTL : 'S desna na lijevo (RTL)', styles : 'Stil', cssClasses : 'Klase stilova', width : 'Širina', height : 'Visina', align : 'Poravnaj', alignLeft : 'Lijevo', alignRight : 'Desno', alignCenter : 'Središnje', alignTop : 'Vrh', alignMiddle : 'Sredina', alignBottom : 'Dolje', invalidHeight : 'Visina mora biti broj.', invalidWidth : 'Širina mora biti broj.', invalidCssLength : 'Vrijednost određena za "%1" polje mora biti pozitivni broj sa ili bez važećih CSS mjernih jedinica (px, %, in, cm, mm, em, ex, pt ili pc).', invalidHtmlLength : 'Vrijednost određena za "%1" polje mora biti pozitivni broj sa ili bez važećih HTML mjernih jedinica (px ili %).', invalidInlineStyle : 'Vrijednost za linijski stil mora sadržavati jednu ili više definicija s formatom "naziv:vrijednost", odvojenih točka-zarezom.', cssLengthTooltip : 'Unesite broj za vrijednost u pikselima ili broj s važećim CSS mjernim jedinicama (px, %, in, cm, mm, em, ex, pt ili pc).', // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, nedostupno</span>' }, contextmenu : { options : 'Opcije izbornika' }, // Special char dialog. specialChar : { toolbar : 'Ubaci posebne znakove', title : 'Odaberite posebni karakter', options : 'Opcije specijalnih znakova' }, // Link dialog. link : { toolbar : 'Ubaci/promijeni link', other : '<drugi>', menu : 'Promijeni link', title : 'Link', info : 'Link Info', target : 'Meta', upload : 'Pošalji', advanced : 'Napredno', type : 'Link vrsta', toUrl : 'URL', toAnchor : 'Sidro na ovoj stranici', toEmail : 'E-Mail', targetFrame : '<okvir>', targetPopup : '<popup prozor>', targetFrameName : 'Ime ciljnog okvira', targetPopupName : 'Naziv popup prozora', popupFeatures : 'Mogućnosti popup prozora', popupResizable : 'Promjenjiva veličina', popupStatusBar : 'Statusna traka', popupLocationBar: 'Traka za lokaciju', popupToolbar : 'Traka s alatima', popupMenuBar : 'Izborna traka', popupFullScreen : 'Cijeli ekran (IE)', popupScrollBars : 'Scroll traka', popupDependent : 'Ovisno (Netscape)', popupLeft : 'Lijeva pozicija', popupTop : 'Gornja pozicija', id : 'Id', langDir : 'Smjer jezika', langDirLTR : 'S lijeva na desno (LTR)', langDirRTL : 'S desna na lijevo (RTL)', acccessKey : 'Pristupna tipka', name : 'Naziv', langCode : 'Smjer jezika', tabIndex : 'Tab Indeks', advisoryTitle : 'Advisory naslov', advisoryContentType : 'Advisory vrsta sadržaja', cssClasses : 'Stylesheet klase', charset : 'Kodna stranica povezanih resursa', styles : 'Stil', rel : 'Veza', selectAnchor : 'Odaberi sidro', anchorName : 'Po nazivu sidra', anchorId : 'Po Id elementa', emailAddress : 'E-Mail adresa', emailSubject : 'Naslov', emailBody : 'Sadržaj poruke', noAnchors : '(Nema dostupnih sidra)', noUrl : 'Molimo upišite URL link', noEmail : 'Molimo upišite e-mail adresu' }, // Anchor dialog anchor : { toolbar : 'Ubaci/promijeni sidro', menu : 'Svojstva sidra', title : 'Svojstva sidra', name : 'Ime sidra', errorName : 'Molimo unesite ime sidra', remove : 'Ukloni sidro' }, // List style dialog list: { numberedTitle : 'Svojstva brojčane liste', bulletedTitle : 'Svojstva liste', type : 'Vrsta', start : 'Početak', validateStartNumber :'Početak brojčane liste mora biti cijeli broj.', circle : 'Krug', disc : 'Disk', square : 'Kvadrat', none : 'Bez', notset : '<nije određen>', armenian : 'Armenijska numeracija', georgian : 'Gruzijska numeracija(an, ban, gan, etc.)', lowerRoman : 'Romanska numeracija mala slova (i, ii, iii, iv, v, itd.)', upperRoman : 'Romanska numeracija velika slova (I, II, III, IV, V, itd.)', lowerAlpha : 'Znakovi mala slova (a, b, c, d, e, itd.)', upperAlpha : 'Znakovi velika slova (A, B, C, D, E, itd.)', lowerGreek : 'Grčka numeracija mala slova (alfa, beta, gama, itd).', decimal : 'Decimalna numeracija (1, 2, 3, itd.)', decimalLeadingZero : 'Decimalna s vodećom nulom (01, 02, 03, itd)' }, // Find And Replace Dialog findAndReplace : { title : 'Pronađi i zamijeni', find : 'Pronađi', replace : 'Zamijeni', findWhat : 'Pronađi:', replaceWith : 'Zamijeni s:', notFoundMsg : 'Traženi tekst nije pronađen.', findOptions : 'Opcije traženja', matchCase : 'Usporedi mala/velika slova', matchWord : 'Usporedi cijele riječi', matchCyclic : 'Usporedi kružno', replaceAll : 'Zamijeni sve', replaceSuccessMsg : 'Zamijenjeno %1 pojmova.' }, // Table Dialog table : { toolbar : 'Tablica', title : 'Svojstva tablice', menu : 'Svojstva tablice', deleteTable : 'Izbriši tablicu', rows : 'Redova', columns : 'Kolona', border : 'Veličina okvira', widthPx : 'piksela', widthPc : 'postotaka', widthUnit : 'jedinica širine', cellSpace : 'Prostornost ćelija', cellPad : 'Razmak ćelija', caption : 'Naslov', summary : 'Sažetak', headers : 'Zaglavlje', headersNone : 'Ništa', headersColumn : 'Prva kolona', headersRow : 'Prvi red', headersBoth : 'Oba', invalidRows : 'Broj redova mora biti broj veći od 0.', invalidCols : 'Broj kolona mora biti broj veći od 0.', invalidBorder : 'Debljina ruba mora biti broj.', invalidWidth : 'Širina tablice mora biti broj.', invalidHeight : 'Visina tablice mora biti broj.', invalidCellSpacing : 'Prostornost ćelija mora biti broj.', invalidCellPadding : 'Razmak ćelija mora biti broj.', cell : { menu : 'Ćelija', insertBefore : 'Ubaci ćeliju prije', insertAfter : 'Ubaci ćeliju poslije', deleteCell : 'Izbriši ćelije', merge : 'Spoji ćelije', mergeRight : 'Spoji desno', mergeDown : 'Spoji dolje', splitHorizontal : 'Podijeli ćeliju vodoravno', splitVertical : 'Podijeli ćeliju okomito', title : 'Svojstva ćelije', cellType : 'Vrsta ćelije', rowSpan : 'Rows Span', colSpan : 'Columns Span', wordWrap : 'Prelazak u novi red', hAlign : 'Vodoravno poravnanje', vAlign : 'Okomito poravnanje', alignBaseline : 'Osnovna linija', bgColor : 'Boja pozadine', borderColor : 'Boja ruba', data : 'Podatak', header : 'Zaglavlje', yes : 'Da', no : 'ne', invalidWidth : 'Širina ćelije mora biti broj.', invalidHeight : 'Visina ćelije mora biti broj.', invalidRowSpan : 'Rows span mora biti cijeli broj.', invalidColSpan : 'Columns span mora biti cijeli broj.', chooseColor : 'Odaberi' }, row : { menu : 'Red', insertBefore : 'Ubaci red prije', insertAfter : 'Ubaci red poslije', deleteRow : 'Izbriši redove' }, column : { menu : 'Kolona', insertBefore : 'Ubaci kolonu prije', insertAfter : 'Ubaci kolonu poslije', deleteColumn : 'Izbriši kolone' } }, // Button Dialog. button : { title : 'Image Button svojstva', text : 'Tekst (vrijednost)', type : 'Vrsta', typeBtn : 'Gumb', typeSbm : 'Pošalji', typeRst : 'Poništi' }, // Checkbox and Radio Button Dialogs. checkboxAndRadio : { checkboxTitle : 'Checkbox svojstva', radioTitle : 'Radio Button svojstva', value : 'Vrijednost', selected : 'Odabrano' }, // Form Dialog. form : { title : 'Form svojstva', menu : 'Form svojstva', action : 'Akcija', method : 'Metoda', encoding : 'Encoding' }, // Select Field Dialog. select : { title : 'Selection svojstva', selectInfo : 'Info', opAvail : 'Dostupne opcije', value : 'Vrijednost', size : 'Veličina', lines : 'linija', chkMulti : 'Dozvoli višestruki odabir', opText : 'Tekst', opValue : 'Vrijednost', btnAdd : 'Dodaj', btnModify : 'Promijeni', btnUp : 'Gore', btnDown : 'Dolje', btnSetValue : 'Postavi kao odabranu vrijednost', btnDelete : 'Obriši' }, // Textarea Dialog. textarea : { title : 'Textarea svojstva', cols : 'Kolona', rows : 'Redova' }, // Text Field Dialog. textfield : { title : 'Text Field svojstva', name : 'Ime', value : 'Vrijednost', charWidth : 'Širina', maxChars : 'Najviše karaktera', type : 'Vrsta', typeText : 'Tekst', typePass : 'Šifra' }, // Hidden Field Dialog. hidden : { title : 'Hidden Field svojstva', name : 'Ime', value : 'Vrijednost' }, // Image Dialog. image : { title : 'Svojstva slika', titleButton : 'Image Button svojstva', menu : 'Svojstva slika', infoTab : 'Info slike', btnUpload : 'Pošalji na server', upload : 'Pošalji', alt : 'Alternativni tekst', lockRatio : 'Zaključaj odnos', resetSize : 'Obriši veličinu', border : 'Okvir', hSpace : 'HSpace', vSpace : 'VSpace', alertUrl : 'Unesite URL slike', linkTab : 'Link', button2Img : 'Želite li promijeniti odabrani gumb u jednostavnu sliku?', img2Button : 'Želite li promijeniti odabranu sliku u gumb?', urlMissing : 'Nedostaje URL slike.', validateBorder : 'Okvir mora biti cijeli broj.', validateHSpace : 'HSpace mora biti cijeli broj', validateVSpace : 'VSpace mora biti cijeli broj.' }, // Flash Dialog flash : { properties : 'Flash svojstva', propertiesTab : 'Svojstva', title : 'Flash svojstva', chkPlay : 'Auto Play', chkLoop : 'Ponavljaj', chkMenu : 'Omogući Flash izbornik', chkFull : 'Omogući Fullscreen', scale : 'Omjer', scaleAll : 'Prikaži sve', scaleNoBorder : 'Bez okvira', scaleFit : 'Točna veličina', access : 'Script Access', accessAlways : 'Uvijek', accessSameDomain: 'Ista domena', accessNever : 'Nikad', alignAbsBottom : 'Abs dolje', alignAbsMiddle : 'Abs sredina', alignBaseline : 'Bazno', alignTextTop : 'Vrh teksta', quality : 'Kvaliteta', qualityBest : 'Best', qualityHigh : 'High', qualityAutoHigh : 'Auto High', qualityMedium : 'Medium', qualityAutoLow : 'Auto Low', qualityLow : 'Low', windowModeWindow: 'Window', windowModeOpaque: 'Opaque', windowModeTransparent : 'Transparent', windowMode : 'Vrsta prozora', flashvars : 'Varijable za Flash', bgcolor : 'Boja pozadine', hSpace : 'HSpace', vSpace : 'VSpace', validateSrc : 'Molimo upišite URL link', validateHSpace : 'HSpace mora biti broj.', validateVSpace : 'VSpace mora biti broj.' }, // Speller Pages Dialog spellCheck : { toolbar : 'Provjeri pravopis', title : 'Provjera pravopisa', notAvailable : 'Žao nam je, ali usluga trenutno nije dostupna.', errorLoading : 'Greška učitavanja aplikacije: %s.', notInDic : 'Nije u rječniku', changeTo : 'Promijeni u', btnIgnore : 'Zanemari', btnIgnoreAll : 'Zanemari sve', btnReplace : 'Zamijeni', btnReplaceAll : 'Zamijeni sve', btnUndo : 'Vrati', noSuggestions : '-Nema preporuke-', progress : 'Provjera u tijeku...', noMispell : 'Provjera završena: Nema grešaka', noChanges : 'Provjera završena: Nije napravljena promjena', oneChange : 'Provjera završena: Jedna riječ promjenjena', manyChanges : 'Provjera završena: Promijenjeno %1 riječi', ieSpellDownload : 'Provjera pravopisa nije instalirana. Želite li skinuti provjeru pravopisa?' }, smiley : { toolbar : 'Smješko', title : 'Ubaci smješka', options : 'Opcije smješka' }, elementsPath : { eleLabel : 'Putanja elemenata', eleTitle : '%1 element' }, numberedlist : 'Brojčana lista', bulletedlist : 'Obična lista', indent : 'Pomakni udesno', outdent : 'Pomakni ulijevo', justify : { left : 'Lijevo poravnanje', center : 'Središnje poravnanje', right : 'Desno poravnanje', block : 'Blok poravnanje' }, blockquote : 'Blockquote', clipboard : { title : 'Zalijepi', cutError : 'Sigurnosne postavke Vašeg pretraživača ne dozvoljavaju operacije automatskog izrezivanja. Molimo koristite kraticu na tipkovnici (Ctrl/Cmd+X).', copyError : 'Sigurnosne postavke Vašeg pretraživača ne dozvoljavaju operacije automatskog kopiranja. Molimo koristite kraticu na tipkovnici (Ctrl/Cmd+C).', pasteMsg : 'Molimo zaljepite unutar doljnjeg okvira koristeći tipkovnicu (<STRONG>Ctrl/Cmd+V</STRONG>) i kliknite <STRONG>OK</STRONG>.', securityMsg : 'Zbog sigurnosnih postavki Vašeg pretraživača, editor nema direktan pristup Vašem međuspremniku. Potrebno je ponovno zalijepiti tekst u ovaj prozor.', pasteArea : 'Prostor za ljepljenje' }, pastefromword : { confirmCleanup : 'Tekst koji želite zalijepiti čini se da je kopiran iz Worda. Želite li prije očistiti tekst?', toolbar : 'Zalijepi iz Worda', title : 'Zalijepi iz Worda', error : 'Nije moguće očistiti podatke za ljepljenje zbog interne greške' }, pasteText : { button : 'Zalijepi kao čisti tekst', title : 'Zalijepi kao čisti tekst' }, templates : { button : 'Predlošci', title : 'Predlošci sadržaja', options : 'Opcije predložaka', insertOption : 'Zamijeni trenutne sadržaje', selectPromptMsg : 'Molimo odaberite predložak koji želite otvoriti<br>(stvarni sadržaj će biti izgubljen):', emptyListMsg : '(Nema definiranih predložaka)' }, showBlocks : 'Prikaži blokove', stylesCombo : { label : 'Stil', panelTitle : 'Stilovi formatiranja', panelTitle1 : 'Block stilovi', panelTitle2 : 'Inline stilovi', panelTitle3 : 'Object stilovi' }, format : { label : 'Format', panelTitle : 'Format', tag_p : 'Normal', tag_pre : 'Formatirano', 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 : 'Napravi DIV kontejner', toolbar : 'Napravi DIV kontejner', cssClassInputLabel : 'Klase stilova', styleSelectLabel : 'Stil', IdInputLabel : 'Id', languageCodeInputLabel : 'Jezični kod', inlineStyleInputLabel : 'Stil u liniji', advisoryTitleInputLabel : 'Savjetodavni naslov', langDirLabel : 'Smjer jezika', langDirLTRLabel : 'S lijeva na desno (LTR)', langDirRTLLabel : 'S desna na lijevo (RTL)', edit : 'Uredi DIV', remove : 'Ukloni DIV' }, iframe : { title : 'IFrame svojstva', toolbar : 'IFrame', noUrl : 'Unesite URL iframe-a', scrolling : 'Omogući trake za skrolanje', border : 'Prikaži okvir IFrame-a' }, font : { label : 'Font', voiceLabel : 'Font', panelTitle : 'Font' }, fontSize : { label : 'Veličina', voiceLabel : 'Veličina slova', panelTitle : 'Veličina' }, colorButton : { textColorTitle : 'Boja teksta', bgColorTitle : 'Boja pozadine', panelTitle : 'Boje', auto : 'Automatski', more : 'Više boja...' }, colors : { '000' : 'Crna', '800000' : 'Kesten', '8B4513' : 'Smeđa', '2F4F4F' : 'Tamno siva', '008080' : 'Teal', '000080' : 'Mornarska', '4B0082' : 'Indigo', '696969' : 'Tamno siva', 'B22222' : 'Vatrena cigla', 'A52A2A' : 'Smeđa', 'DAA520' : 'Zlatna', '006400' : 'Tamno zelena', '40E0D0' : 'Tirkizna', '0000CD' : 'Srednje plava', '800080' : 'Ljubičasta', '808080' : 'Siva', 'F00' : 'Crvena', 'FF8C00' : 'Tamno naranđasta', 'FFD700' : 'Zlatna', '008000' : 'Zelena', '0FF' : 'Cijan', '00F' : 'Plava', 'EE82EE' : 'Ljubičasta', 'A9A9A9' : 'Mutno siva', 'FFA07A' : 'Svijetli losos', 'FFA500' : 'Naranđasto', 'FFFF00' : 'Žuto', '00FF00' : 'Limun', 'AFEEEE' : 'Blijedo tirkizna', 'ADD8E6' : 'Svijetlo plava', 'DDA0DD' : 'Šljiva', 'D3D3D3' : 'Svijetlo siva', 'FFF0F5' : 'Lavanda rumeno', 'FAEBD7' : 'Antikno bijela', 'FFFFE0' : 'Svijetlo žuta', 'F0FFF0' : 'Med', 'F0FFFF' : 'Azurna', 'F0F8FF' : 'Alice plava', 'E6E6FA' : 'Lavanda', 'FFF' : 'Bijela' }, scayt : { title : 'Provjeri pravopis tijekom tipkanja (SCAYT)', opera_title : 'Nije podržano u Operi', enable : 'Omogući SCAYT', disable : 'Onemogući SCAYT', about : 'O SCAYT', toggle : 'Omoguću/Onemogući SCAYT', options : 'Opcije', langs : 'Jezici', moreSuggestions : 'Više prijedloga', ignore : 'Zanemari', ignoreAll : 'Zanemari sve', addWord : 'Dodaj riječ', emptyDic : 'Naziv rječnika ne smije biti prazno.', optionsTab : 'Opcije', allCaps : 'Ignoriraj riječi s velikim slovima', ignoreDomainNames : 'Ignoriraj nazive domena', mixedCase : 'Ignoriraj riječi s miješanim slovima', mixedWithDigits : 'Ignoriraj riječi s brojevima', languagesTab : 'Jezici', dictionariesTab : 'Rječnici', dic_field_name : 'Naziv riječnika', dic_create : 'Napravi', dic_restore : 'Povrati', dic_delete : 'Obriši', dic_rename : 'Promijeni naziv', dic_info : 'Na početku se korisnički Riječnik sprema u Cookie. Nažalost, veličina im je ograničena. Kada korisnički Riječnik naraste preko te veličine, Riječnik će biti smješten na naš server. Kako bi se korisnički Riječnik spremio na naš server morate odabrati naziv Vašeg Riječnika. Ukoliko ste već prije spremali Riječnik na naše servere, unesite naziv Riječnika i pritisnite na Povrati.', aboutTab : 'O SCAYT' }, about : { title : 'O CKEditoru', dlgTitle : 'O CKEditoru', help : 'Provjeri $1 za pomoć.', userGuide : 'Vodič za CKEditor korisnike', moreInfo : 'Za informacije o licencama posjetite našu web stranicu:', copy : 'Copyright &copy; $1. All rights reserved.' }, maximize : 'Povećaj', minimize : 'Smanji', fakeobjects : { anchor : 'Sidro', flash : 'Flash animacija', iframe : 'IFrame', hiddenfield : 'Sakriveno polje', unknown : 'Nepoznati objekt' }, resize : 'Povuci za promjenu veličine', colordialog : { title : 'Odaberi boju', options : 'Opcije boje', highlight : 'Istaknuto', selected : 'Odabrana boja', clear : 'Očisti' }, toolbarCollapse : 'Smanji alatnu traku', toolbarExpand : 'Proširi alatnu traku', toolbarGroups : { document : 'Dokument', clipboard : 'Međuspremnik/Poništi', editing : 'Uređivanje', forms : 'Forme', basicstyles : 'Osnovni stilovi', paragraph : 'Paragraf', links : 'Veze', insert : 'Umetni', styles : 'Stilovi', colors : 'Boje', tools : 'Alatke' }, bidi : { ltr : 'Smjer teksta s lijeva na desno', rtl : 'Smjer teksta s desna na lijevo' }, docprops : { label : 'Svojstva dokumenta', title : 'Svojstva dokumenta', design : 'Dizajn', meta : 'Meta Data', chooseColor : 'Odaberi', other : '<drugi>', docTitle : 'Naslov stranice', charset : 'Enkodiranje znakova', charsetOther : 'Ostalo enkodiranje znakova', charsetASCII : 'ASCII', charsetCE : 'Središnja Europa', charsetCT : 'Tradicionalna kineska (Big5)', charsetCR : 'Ćirilica', charsetGR : 'Grčka', charsetJP : 'Japanska', charsetKR : 'Koreanska', charsetTR : 'Turska', charsetUN : 'Unicode (UTF-8)', charsetWE : 'Zapadna Europa', docType : 'Zaglavlje vrste dokumenta', docTypeOther : 'Ostalo zaglavlje vrste dokumenta', xhtmlDec : 'Ubaci XHTML deklaracije', bgColor : 'Boja pozadine', bgImage : 'URL slike pozadine', bgFixed : 'Pozadine se ne pomiče', txtColor : 'Boja teksta', margin : 'Margine stranice', marginTop : 'Vrh', marginLeft : 'Lijevo', marginRight : 'Desno', marginBottom : 'Dolje', metaKeywords : 'Ključne riječi dokumenta (odvojene zarezom)', metaDescription : 'Opis dokumenta', metaAuthor : 'Autor', metaCopyright : 'Autorska prava', previewHtml : '<p>Ovo je neki <strong>primjer teksta</strong>. Vi koristite <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 * Finnish language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['fi'] = { /** * 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 : 'Rikastekstieditori, %1, paina ALT 0 nähdäksesi ohjeen.', // ARIA descriptions. toolbars : 'Editorin työkalupalkit', editor : 'Rikastekstieditori', // Toolbar buttons without dialogs. source : 'Koodi', newPage : 'Tyhjennä', save : 'Tallenna', preview : 'Esikatsele', cut : 'Leikkaa', copy : 'Kopioi', paste : 'Liitä', print : 'Tulosta', underline : 'Alleviivattu', bold : 'Lihavoitu', italic : 'Kursivoitu', selectAll : 'Valitse kaikki', removeFormat : 'Poista muotoilu', strike : 'Yliviivattu', subscript : 'Alaindeksi', superscript : 'Yläindeksi', horizontalrule : 'Lisää murtoviiva', pagebreak : 'Lisää sivunvaihto', pagebreakAlt : 'Sivunvaihto', unlink : 'Poista linkki', undo : 'Kumoa', redo : 'Toista', // Common messages and labels. common : { browseServer : 'Selaa palvelinta', url : 'Osoite', protocol : 'Protokolla', upload : 'Lisää tiedosto', uploadSubmit : 'Lähetä palvelimelle', image : 'Kuva', flash : 'Flash-animaatio', form : 'Lomake', checkbox : 'Valintaruutu', radio : 'Radiopainike', textField : 'Tekstikenttä', textarea : 'Tekstilaatikko', hiddenField : 'Piilokenttä', button : 'Painike', select : 'Valintakenttä', imageButton : 'Kuvapainike', notSet : '<ei asetettu>', id : 'Tunniste', name : 'Nimi', langDir : 'Kielen suunta', langDirLtr : 'Vasemmalta oikealle (LTR)', langDirRtl : 'Oikealta vasemmalle (RTL)', langCode : 'Kielikoodi', longDescr : 'Pitkän kuvauksen URL', cssClass : 'Tyyliluokat', advisoryTitle : 'Avustava otsikko', cssStyle : 'Tyyli', ok : 'OK', cancel : 'Peruuta', close : 'Sulje', preview : 'Esikatselu', generalTab : 'Yleinen', advancedTab : 'Lisäominaisuudet', validateNumberFailed : 'Arvon pitää olla numero.', confirmNewPage : 'Kaikki tallentamattomat muutokset tähän sisältöön menetetään. Oletko varma, että haluat ladata uuden sivun?', confirmCancel : 'Jotkut asetuksista on muuttuneet. Oletko varma, että haluat sulkea valintaikkunan?', options : 'Asetukset', target : 'Kohde', targetNew : 'Uusi ikkuna (_blank)', targetTop : 'Päällimmäinen ikkuna (_top)', targetSelf : 'Sama ikkuna (_self)', targetParent : 'Ylemmän tason ikkuna (_parent)', langDirLTR : 'Vasemmalta oikealle (LTR)', langDirRTL : 'Oikealta vasemmalle (RTL)', styles : 'Tyyli', cssClasses : 'Tyylitiedoston luokat', width : 'Leveys', height : 'Korkeus', align : 'Kohdistus', alignLeft : 'Vasemmalle', alignRight : 'Oikealle', alignCenter : 'Keskelle', alignTop : 'Ylös', alignMiddle : 'Keskelle', alignBottom : 'Alas', invalidHeight : 'Korkeuden täytyy olla numero.', invalidWidth : 'Leveyden täytyy olla numero.', invalidCssLength : 'Kentän "%1" arvon täytyy olla positiivinen luku CSS mittayksikön (px, %, in, cm, mm, em, ex, pt tai pc) kanssa tai ilman.', invalidHtmlLength : 'Kentän "%1" arvon täytyy olla positiivinen luku HTML mittayksikön (px tai %) kanssa tai ilman.', invalidInlineStyle : 'Tyylille annetun arvon täytyy koostua yhdestä tai useammasta "nimi : arvo" parista, jotka ovat eroteltuna toisistaan puolipisteillä.', cssLengthTooltip : 'Anna numeroarvo pikseleinä tai numeroarvo CSS mittayksikön kanssa (px, %, in, cm, mm, em, ex, pt, tai pc).', // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, ei saatavissa</span>' }, contextmenu : { options : 'Pikavalikon ominaisuudet' }, // Special char dialog. specialChar : { toolbar : 'Lisää erikoismerkki', title : 'Valitse erikoismerkki', options : 'Erikoismerkin ominaisuudet' }, // Link dialog. link : { toolbar : 'Lisää linkki/muokkaa linkkiä', other : '<muu>', menu : 'Muokkaa linkkiä', title : 'Linkki', info : 'Linkin tiedot', target : 'Kohde', upload : 'Lisää tiedosto', advanced : 'Lisäominaisuudet', type : 'Linkkityyppi', toUrl : 'Osoite', toAnchor : 'Ankkuri tässä sivussa', toEmail : 'Sähköposti', targetFrame : '<kehys>', targetPopup : '<popup ikkuna>', targetFrameName : 'Kohdekehyksen nimi', targetPopupName : 'Popup ikkunan nimi', popupFeatures : 'Popup ikkunan ominaisuudet', popupResizable : 'Venytettävä', popupStatusBar : 'Tilarivi', popupLocationBar: 'Osoiterivi', popupToolbar : 'Vakiopainikkeet', popupMenuBar : 'Valikkorivi', popupFullScreen : 'Täysi ikkuna (IE)', popupScrollBars : 'Vierityspalkit', popupDependent : 'Riippuva (Netscape)', popupLeft : 'Vasemmalta (px)', popupTop : 'Ylhäältä (px)', id : 'Tunniste', langDir : 'Kielen suunta', langDirLTR : 'Vasemmalta oikealle (LTR)', langDirRTL : 'Oikealta vasemmalle (RTL)', acccessKey : 'Pikanäppäin', name : 'Nimi', langCode : 'Kielen suunta', tabIndex : 'Tabulaattori indeksi', advisoryTitle : 'Avustava otsikko', advisoryContentType : 'Avustava sisällön tyyppi', cssClasses : 'Tyyliluokat', charset : 'Linkitetty kirjaimisto', styles : 'Tyyli', rel : 'Suhde', selectAnchor : 'Valitse ankkuri', anchorName : 'Ankkurin nimen mukaan', anchorId : 'Ankkurin ID:n mukaan', emailAddress : 'Sähköpostiosoite', emailSubject : 'Aihe', emailBody : 'Viesti', noAnchors : '(Ei ankkureita tässä dokumentissa)', noUrl : 'Linkille on kirjoitettava URL', noEmail : 'Kirjoita sähköpostiosoite' }, // Anchor dialog anchor : { toolbar : 'Lisää ankkuri/muokkaa ankkuria', menu : 'Ankkurin ominaisuudet', title : 'Ankkurin ominaisuudet', name : 'Nimi', errorName : 'Ankkurille on kirjoitettava nimi', remove : 'Poista ankkuri' }, // List style dialog list: { numberedTitle : 'Numeroidun listan ominaisuudet', bulletedTitle : 'Numeroimattoman listan ominaisuudet', type : 'Tyyppi', start : 'Alku', validateStartNumber :'Listan ensimmäisen numeron tulee olla kokonaisluku.', circle : 'Ympyrä', disc : 'Levy', square : 'Neliö', none : 'Ei mikään', notset : '<ei asetettu>', armenian : 'Armeenialainen numerointi', georgian : 'Georgialainen numerointi (an, ban, gan, etc.)', lowerRoman : 'Pienet roomalaiset (i, ii, iii, iv, v, jne.)', upperRoman : 'Isot roomalaiset (I, II, III, IV, V, jne.)', lowerAlpha : 'Pienet aakkoset (a, b, c, d, e, jne.)', upperAlpha : 'Isot aakkoset (A, B, C, D, E, jne.)', lowerGreek : 'Pienet kreikkalaiset (alpha, beta, gamma, jne.)', decimal : 'Desimaalit (1, 2, 3, jne.)', decimalLeadingZero : 'Desimaalit, alussa nolla (01, 02, 03, jne.)' }, // Find And Replace Dialog findAndReplace : { title : 'Etsi ja korvaa', find : 'Etsi', replace : 'Korvaa', findWhat : 'Etsi mitä:', replaceWith : 'Korvaa tällä:', notFoundMsg : 'Etsittyä tekstiä ei löytynyt.', findOptions : 'Hakuasetukset', matchCase : 'Sama kirjainkoko', matchWord : 'Koko sana', matchCyclic : 'Kierrä ympäri', replaceAll : 'Korvaa kaikki', replaceSuccessMsg : '%1 esiintymä(ä) korvattu.' }, // Table Dialog table : { toolbar : 'Taulu', title : 'Taulun ominaisuudet', menu : 'Taulun ominaisuudet', deleteTable : 'Poista taulu', rows : 'Rivit', columns : 'Sarakkeet', border : 'Rajan paksuus', widthPx : 'pikseliä', widthPc : 'prosenttia', widthUnit : 'leveysyksikkö', cellSpace : 'Solujen väli', cellPad : 'Solujen sisennys', caption : 'Otsikko', summary : 'Yhteenveto', headers : 'Ylätunnisteet', headersNone : 'Ei', headersColumn : 'Ensimmäinen sarake', headersRow : 'Ensimmäinen rivi', headersBoth : 'Molemmat', invalidRows : 'Rivien määrän täytyy olla suurempi kuin 0.', invalidCols : 'Sarakkeiden määrän täytyy olla suurempi kuin 0.', invalidBorder : 'Reunan koon täytyy olla numero.', invalidWidth : 'Taulun leveyden täytyy olla numero.', invalidHeight : 'Taulun korkeuden täytyy olla numero.', invalidCellSpacing : 'Solujen välin täytyy olla numero.', invalidCellPadding : 'Solujen sisennyksen täytyy olla numero.', cell : { menu : 'Solu', insertBefore : 'Lisää solu eteen', insertAfter : 'Lisää solu perään', deleteCell : 'Poista solut', merge : 'Yhdistä solut', mergeRight : 'Yhdistä oikealla olevan kanssa', mergeDown : 'Yhdistä alla olevan kanssa', splitHorizontal : 'Jaa solu vaakasuunnassa', splitVertical : 'Jaa solu pystysuunnassa', title : 'Solun ominaisuudet', cellType : 'Solun tyyppi', rowSpan : 'Rivin jatkuvuus', colSpan : 'Solun jatkuvuus', wordWrap : 'Rivitys', hAlign : 'Horisontaali kohdistus', vAlign : 'Vertikaali kohdistus', alignBaseline : 'Alas (teksti)', bgColor : 'Taustan väri', borderColor : 'Reunan väri', data : 'Data', header : 'Ylätunniste', yes : 'Kyllä', no : 'Ei', invalidWidth : 'Solun leveyden täytyy olla numero.', invalidHeight : 'Solun korkeuden täytyy olla numero.', invalidRowSpan : 'Rivin jatkuvuuden täytyy olla kokonaisluku.', invalidColSpan : 'Solun jatkuvuuden täytyy olla kokonaisluku.', chooseColor : 'Valitse' }, row : { menu : 'Rivi', insertBefore : 'Lisää rivi yläpuolelle', insertAfter : 'Lisää rivi alapuolelle', deleteRow : 'Poista rivit' }, column : { menu : 'Sarake', insertBefore : 'Lisää sarake vasemmalle', insertAfter : 'Lisää sarake oikealle', deleteColumn : 'Poista sarakkeet' } }, // Button Dialog. button : { title : 'Painikkeen ominaisuudet', text : 'Teksti (arvo)', type : 'Tyyppi', typeBtn : 'Painike', typeSbm : 'Lähetä', typeRst : 'Tyhjennä' }, // Checkbox and Radio Button Dialogs. checkboxAndRadio : { checkboxTitle : 'Valintaruudun ominaisuudet', radioTitle : 'Radiopainikkeen ominaisuudet', value : 'Arvo', selected : 'Valittu' }, // Form Dialog. form : { title : 'Lomakkeen ominaisuudet', menu : 'Lomakkeen ominaisuudet', action : 'Toiminto', method : 'Tapa', encoding : 'Enkoodaus' }, // Select Field Dialog. select : { title : 'Valintakentän ominaisuudet', selectInfo : 'Info', opAvail : 'Ominaisuudet', value : 'Arvo', size : 'Koko', lines : 'Rivit', chkMulti : 'Salli usea valinta', opText : 'Teksti', opValue : 'Arvo', btnAdd : 'Lisää', btnModify : 'Muuta', btnUp : 'Ylös', btnDown : 'Alas', btnSetValue : 'Aseta valituksi', btnDelete : 'Poista' }, // Textarea Dialog. textarea : { title : 'Tekstilaatikon ominaisuudet', cols : 'Sarakkeita', rows : 'Rivejä' }, // Text Field Dialog. textfield : { title : 'Tekstikentän ominaisuudet', name : 'Nimi', value : 'Arvo', charWidth : 'Leveys', maxChars : 'Maksimi merkkimäärä', type : 'Tyyppi', typeText : 'Teksti', typePass : 'Salasana' }, // Hidden Field Dialog. hidden : { title : 'Piilokentän ominaisuudet', name : 'Nimi', value : 'Arvo' }, // Image Dialog. image : { title : 'Kuvan ominaisuudet', titleButton : 'Kuvapainikkeen ominaisuudet', menu : 'Kuvan ominaisuudet', infoTab : 'Kuvan tiedot', btnUpload : 'Lähetä palvelimelle', upload : 'Lisää kuva', alt : 'Vaihtoehtoinen teksti', lockRatio : 'Lukitse suhteet', resetSize : 'Alkuperäinen koko', border : 'Kehys', hSpace : 'Vaakatila', vSpace : 'Pystytila', alertUrl : 'Kirjoita kuvan osoite (URL)', linkTab : 'Linkki', button2Img : 'Haluatko muuntaa valitun kuvanäppäimen kuvaksi?', img2Button : 'Haluatko muuntaa valitun kuvan kuvanäppäimeksi?', urlMissing : 'Kuvan lähdeosoite puuttuu.', validateBorder : 'Kehyksen täytyy olla kokonaisluku.', validateHSpace : 'HSpace-määrityksen täytyy olla kokonaisluku.', validateVSpace : 'VSpace-määrityksen täytyy olla kokonaisluku.' }, // Flash Dialog flash : { properties : 'Flash-ominaisuudet', propertiesTab : 'Ominaisuudet', title : 'Flash ominaisuudet', chkPlay : 'Automaattinen käynnistys', chkLoop : 'Toisto', chkMenu : 'Näytä Flash-valikko', chkFull : 'Salli kokoruututila', scale : 'Levitä', scaleAll : 'Näytä kaikki', scaleNoBorder : 'Ei rajaa', scaleFit : 'Tarkka koko', access : 'Skriptien pääsy', accessAlways : 'Aina', accessSameDomain: 'Sama verkkotunnus', accessNever : 'Ei koskaan', alignAbsBottom : 'Aivan alas', alignAbsMiddle : 'Aivan keskelle', alignBaseline : 'Alas (teksti)', alignTextTop : 'Ylös (teksti)', quality : 'Laatu', qualityBest : 'Paras', qualityHigh : 'Korkea', qualityAutoHigh : 'Automaattinen korkea', qualityMedium : 'Keskitaso', qualityAutoLow : 'Automaattinen matala', qualityLow : 'Matala', windowModeWindow: 'Ikkuna', windowModeOpaque: 'Läpinäkyvyys', windowModeTransparent : 'Läpinäkyvä', windowMode : 'Ikkuna tila', flashvars : 'Muuttujat Flash:lle', bgcolor : 'Taustaväri', hSpace : 'Vaakatila', vSpace : 'Pystytila', validateSrc : 'Linkille on kirjoitettava URL', validateHSpace : 'Vaakatilan täytyy olla numero.', validateVSpace : 'Pystytilan täytyy olla numero.' }, // Speller Pages Dialog spellCheck : { toolbar : 'Tarkista oikeinkirjoitus', title : 'Oikoluku', notAvailable : 'Valitettavasti oikoluku ei ole käytössä tällä hetkellä.', errorLoading : 'Virhe ladattaessa oikolukupalvelua isännältä: %s.', notInDic : 'Ei sanakirjassa', changeTo : 'Vaihda', btnIgnore : 'Jätä huomioimatta', btnIgnoreAll : 'Jätä kaikki huomioimatta', btnReplace : 'Korvaa', btnReplaceAll : 'Korvaa kaikki', btnUndo : 'Kumoa', noSuggestions : 'Ei ehdotuksia', progress : 'Tarkistus käynnissä...', noMispell : 'Tarkistus valmis: Ei virheitä', noChanges : 'Tarkistus valmis: Yhtään sanaa ei muutettu', oneChange : 'Tarkistus valmis: Yksi sana muutettiin', manyChanges : 'Tarkistus valmis: %1 sanaa muutettiin', ieSpellDownload : 'Oikeinkirjoituksen tarkistusta ei ole asennettu. Haluatko ladata sen nyt?' }, smiley : { toolbar : 'Hymiö', title : 'Lisää hymiö', options : 'Hymiön ominaisuudet' }, elementsPath : { eleLabel : 'Elementin polku', eleTitle : '%1 elementti' }, numberedlist : 'Numerointi', bulletedlist : 'Luottelomerkit', indent : 'Suurenna sisennystä', outdent : 'Pienennä sisennystä', justify : { left : 'Tasaa vasemmat reunat', center : 'Keskitä', right : 'Tasaa oikeat reunat', block : 'Tasaa molemmat reunat' }, blockquote : 'Lainaus', clipboard : { title : 'Liitä', cutError : 'Selaimesi turva-asetukset eivät salli editorin toteuttaa leikkaamista. Käytä näppäimistöä leikkaamiseen (Ctrl+X).', copyError : 'Selaimesi turva-asetukset eivät salli editorin toteuttaa kopioimista. Käytä näppäimistöä kopioimiseen (Ctrl+C).', pasteMsg : 'Liitä painamalla (<STRONG>Ctrl+V</STRONG>) ja painamalla <STRONG>OK</STRONG>.', securityMsg : 'Selaimesi turva-asetukset eivät salli editorin käyttää leikepöytää suoraan. Sinun pitää suorittaa liittäminen tässä ikkunassa.', pasteArea : 'Leikealue' }, pastefromword : { confirmCleanup : 'Liittämäsi teksti näyttäisi olevan Word-dokumentista. Haluatko siivota sen ennen liittämistä? (Suositus: Kyllä)', toolbar : 'Liitä Word-dokumentista', title : 'Liitä Word-dokumentista', error : 'Liitetyn tiedon siivoaminen ei onnistunut sisäisen virheen takia' }, pasteText : { button : 'Liitä tekstinä', title : 'Liitä tekstinä' }, templates : { button : 'Pohjat', title : 'Sisältöpohjat', options : 'Sisältöpohjan ominaisuudet', insertOption : 'Korvaa editorin koko sisältö', selectPromptMsg : 'Valitse pohja editoriin<br>(aiempi sisältö menetetään):', emptyListMsg : '(Ei määriteltyjä pohjia)' }, showBlocks : 'Näytä elementit', stylesCombo : { label : 'Tyyli', panelTitle : 'Muotoilujen tyylit', panelTitle1 : 'Lohkojen tyylit', panelTitle2 : 'Rivinsisäiset tyylit', panelTitle3 : 'Objektien tyylit' }, format : { label : 'Muotoilu', panelTitle : 'Muotoilu', tag_p : 'Normaali', tag_pre : 'Muotoiltu', tag_address : 'Osoite', tag_h1 : 'Otsikko 1', tag_h2 : 'Otsikko 2', tag_h3 : 'Otsikko 3', tag_h4 : 'Otsikko 4', tag_h5 : 'Otsikko 5', tag_h6 : 'Otsikko 6', tag_div : 'Normaali (DIV)' }, div : { title : 'Luo div-kehikko', toolbar : 'Luo div-kehikko', cssClassInputLabel : 'Tyylitiedoston luokat', styleSelectLabel : 'Tyyli', IdInputLabel : 'Id', languageCodeInputLabel : ' Kielen koodi', inlineStyleInputLabel : 'Sisätyyli', advisoryTitleInputLabel : 'Ohjeistava otsikko', langDirLabel : 'Kielen suunta', langDirLTRLabel : 'Vasemmalta oikealle (LTR)', langDirRTLLabel : 'Oikealta vasemmalle (RTL)', edit : 'Muokkaa Diviä', remove : 'Poista Div' }, iframe : { title : 'IFrame-kehyksen ominaisuudet', toolbar : 'IFrame-kehys', noUrl : 'Anna IFrame-kehykselle lähdeosoite (src)', scrolling : 'Näytä vierityspalkit', border : 'Näytä kehyksen reunat' }, font : { label : 'Kirjaisinlaji', voiceLabel : 'Kirjaisinlaji', panelTitle : 'Kirjaisinlaji' }, fontSize : { label : 'Koko', voiceLabel : 'Kirjaisimen koko', panelTitle : 'Koko' }, colorButton : { textColorTitle : 'Tekstiväri', bgColorTitle : 'Taustaväri', panelTitle : 'Värit', auto : 'Automaattinen', more : 'Lisää värejä...' }, colors : { '000' : 'Musta', '800000' : 'Kastanjanruskea', '8B4513' : 'Satulanruskea', '2F4F4F' : 'Tumma liuskekivenharmaa', '008080' : 'Sinivihreä', '000080' : 'Laivastonsininen', '4B0082' : 'Indigonsininen', '696969' : 'Tummanharmaa', 'B22222' : 'Tiili', 'A52A2A' : 'Ruskea', 'DAA520' : 'Kultapiisku', '006400' : 'Tummanvihreä', '40E0D0' : 'Turkoosi', '0000CD' : 'Keskisininen', '800080' : 'Purppura', '808080' : 'Harmaa', 'F00' : 'Punainen', 'FF8C00' : 'Tumma oranssi', 'FFD700' : 'Kulta', '008000' : 'Vihreä', '0FF' : 'Syaani', '00F' : 'Sininen', 'EE82EE' : 'Violetti', 'A9A9A9' : 'Tummanharmaa', 'FFA07A' : 'Vaaleanlohenpunainen', 'FFA500' : 'Oranssi', 'FFFF00' : 'Keltainen', '00FF00' : 'Limetin vihreä', 'AFEEEE' : 'Haalea turkoosi', 'ADD8E6' : 'Vaaleansininen', 'DDA0DD' : 'Luumu', 'D3D3D3' : 'Vaaleanharmaa', 'FFF0F5' : 'Laventelinpunainen', 'FAEBD7' : 'Antiikinvalkoinen', 'FFFFE0' : 'Vaaleankeltainen', 'F0FFF0' : 'Hunajameloni', 'F0FFFF' : 'Asurinsininen', 'F0F8FF' : 'Alice Blue -sininen', 'E6E6FA' : 'Lavanteli', 'FFF' : 'Valkoinen' }, scayt : { title : 'Oikolue kirjoitettaessa', opera_title : 'Opera ei tue tätä ominaisuutta', enable : 'Ota käyttöön oikoluku kirjoitettaessa', disable : 'Poista käytöstä oikoluku kirjoitetaessa', about : 'Tietoja oikoluvusta kirjoitetaessa', toggle : 'Vaihda oikoluku kirjoittaessa tilaa', options : 'Asetukset', langs : 'Kielet', moreSuggestions : 'Lisää ehdotuksia', ignore : 'Ohita', ignoreAll : 'Ohita kaikki', addWord : 'Lisää sana', emptyDic : 'Sanakirjan nimi on annettava.', optionsTab : 'Asetukset', allCaps : 'Ohita sanat, jotka on kirjoitettu kokonaan isoilla kirjaimilla', ignoreDomainNames : 'Ohita verkkotunnukset', mixedCase : 'Ohita sanat, joissa on sekoitettu isoja ja pieniä kirjaimia', mixedWithDigits : 'Ohita sanat, joissa on numeroita', languagesTab : 'Kielet', dictionariesTab : 'Sanakirjat', dic_field_name : 'Sanakirjan nimi', dic_create : 'Luo', dic_restore : 'Palauta', dic_delete : 'Poista', dic_rename : 'Nimeä uudelleen', dic_info : 'Oletuksena sanakirjat tallennetaan evästeeseen, mutta evästeiden koko on kuitenkin rajallinen. Sanakirjan kasvaessa niin suureksi, ettei se enää mahdu evästeeseen, sanakirja täytyy tallentaa palvelimellemme. Tallentaaksesi sanakirjasi palvelimellemme tulee sinun antaa sille nimi. Jos olet jo tallentanut sanakirjan, anna sen nimi ja klikkaa Palauta-painiketta', aboutTab : 'Tietoa' }, about : { title : 'Tietoa CKEditorista', dlgTitle : 'Tietoa CKEditorista', help : 'Katso ohjeet: $1.', userGuide : 'CKEditorin käyttäjäopas', moreInfo : 'Lisenssitiedot löytyvät kotisivuiltamme:', copy : 'Copyright &copy; $1. Kaikki oikeuden pidätetään.' }, maximize : 'Suurenna', minimize : 'Pienennä', fakeobjects : { anchor : 'Ankkuri', flash : 'Flash animaatio', iframe : 'IFrame-kehys', hiddenfield : 'Piilokenttä', unknown : 'Tuntematon objekti' }, resize : 'Raahaa muuttaaksesi kokoa', colordialog : { title : 'Valitse väri', options : 'Värin ominaisuudet', highlight : 'Korostus', selected : 'Valittu', clear : 'Poista' }, toolbarCollapse : 'Kutista työkalupalkki', toolbarExpand : 'Laajenna työkalupalkki', toolbarGroups : { document : 'Dokumentti', clipboard : 'Leikepöytä/Kumoa', editing : 'Muokkaus', forms : 'Lomakkeet', basicstyles : 'Perustyylit', paragraph : 'Kappale', links : 'Linkit', insert : 'Lisää', styles : 'Tyylit', colors : 'Värit', tools : 'Työkalut' }, bidi : { ltr : 'Tekstin suunta vasemmalta oikealle', rtl : 'Tekstin suunta oikealta vasemmalle' }, docprops : { label : 'Dokumentin ominaisuudet', title : 'Dokumentin ominaisuudet', design : 'Sommittelu', meta : 'Metatieto', chooseColor : 'Valitse', other : '<muu>', docTitle : 'Sivun nimi', charset : 'Merkistökoodaus', charsetOther : 'Muu merkistökoodaus', charsetASCII : 'ASCII', charsetCE : 'Keskieurooppalainen', charsetCT : 'Kiina, perinteinen (Big5)', charsetCR : 'Kyrillinen', charsetGR : 'Kreikka', charsetJP : 'Japani', charsetKR : 'Korealainen', charsetTR : 'Turkkilainen', charsetUN : 'Unicode (UTF-8)', charsetWE : 'Länsieurooppalainen', docType : 'Dokumentin tyyppi', docTypeOther : 'Muu dokumentin tyyppi', xhtmlDec : 'Lisää XHTML julistukset', bgColor : 'Taustaväri', bgImage : 'Taustakuva', bgFixed : 'Paikallaanpysyvä tausta', txtColor : 'Tekstiväri', margin : 'Sivun marginaalit', marginTop : 'Ylä', marginLeft : 'Vasen', marginRight : 'Oikea', marginBottom : 'Ala', metaKeywords : 'Hakusanat (pilkulla erotettuna)', metaDescription : 'Kuvaus', metaAuthor : 'Tekijä', metaCopyright : 'Tekijänoikeudet', previewHtml : '<p>Tämä on <strong>esimerkkitekstiä</strong>. Käytät juuri <a href="javascript:void(0)">CKEditoria</a>.</p>' } };
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['ug'] = { /** * 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 : 'كۆرۈنۈشچان تەھرىرلىگۈچ، %1، ALT+0 نى بېسىپ ياردەمنى كۆرۈڭ.', // 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 : 'ئەسلى ھۆججەت', 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 : 'تەپسىلىي چۈشەندۈرۈش ئادرېسى', 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 : 'بۇ سۆز بۆلىكى چوقۇم مۇۋاپىق بولغان CSS ئۇزۇنلۇق قىممىتى بولۇشى زۆرۈر، بىرلىكى (px, %, in, cm, mm, em, ex, pt ياكى pc)', invalidHtmlLength : 'بۇ سۆز بۆلىكى چوقۇم بىرىكمە HTML ئۇزۇنلۇق قىممىتى بولۇشى كېرەك. ئۆز ئىچىگە ئالىدىغان بىرلىك (px ياكى %)', invalidInlineStyle : 'ئىچكى باغلانما ئۇسلۇبى چوقۇم چېكىتلىك پەش بىلەن ئايرىلغان بىر ياكى كۆپ «خاسلىق ئاتى:خاسلىق قىممىتى» پىچىمىدا بولۇشى لازىم', cssLengthTooltip : 'بۇ سۆز بۆلىكى بىرىكمە CSS ئۇزۇنلۇق قىممىتى بولۇشى كېرەك. ئۆز ئىچىگە ئالىدىغان بىرلىك (px, %, in, cm, mm, em, ex, pt ياكى 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 : 'ئادرېس', toAnchor : 'بەت ئىچىدىكى لەڭگەرلىك نۇقتا ئۇلانمىسى', toEmail : 'ئېلخەت', targetFrame : '‹كاندۇك›', targetPopup : '‹قاڭقىش كۆزنەك›', targetFrameName : 'نىشان كاندۇك ئاتى', targetPopupName : 'قاڭقىش كۆزنەك ئاتى', popupFeatures : 'قاڭقىش كۆزنەك خاسلىقى', popupResizable : 'چوڭلۇقى ئۆزگەرتىشچان', popupStatusBar : 'ھالەت بالداق', popupLocationBar: 'ئادرېس بالداق', popupToolbar : 'قورال بالداق', popupMenuBar : 'تىزىملىك بالداق', popupFullScreen : 'پۈتۈن ئېكران (IE)', popupScrollBars : 'دومىلىما سۈرگۈچ', popupDependent : 'تەۋە (NS)', popupLeft : 'سول', popupTop : 'ئوڭ', id : 'ID', langDir : 'تىل يۆنىلىشى', langDirLTR : 'سولدىن ئوڭغا (LTR)', langDirRTL : 'ئوڭدىن سولغا (RTL)', acccessKey : 'زىيارەت كۇنۇپكا', name : 'ئات', langCode : 'تىل كودى', tabIndex : 'Tab تەرتىپى', advisoryTitle : 'ماۋزۇ', advisoryContentType : 'مەزمۇن تىپى', cssClasses : 'ئۇسلۇب خىلى ئاتى', charset : 'ھەرپ كودلىنىشى', styles : 'قۇر ئىچىدىكى ئۇسلۇبى', rel : 'باغلىنىش', selectAnchor : 'بىر لەڭگەرلىك نۇقتا تاللاڭ', anchorName : 'لەڭگەرلىك نۇقتا ئاتى بويىچە', anchorId : 'لەڭگەرلىك نۇقتا ID سى بويىچە', emailAddress : 'ئادرېس', emailSubject : 'ماۋزۇ', emailBody : 'مەزمۇن', noAnchors : '(بۇ پۈتۈكتە ئىشلەتكىلى بولىدىغان لەڭگەرلىك نۇقتا يوق)', noUrl : 'ئۇلانما ئادرېسىنى كىرگۈزۈڭ', 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 : 'گرېكچە كىچىك ھەرپ (alpha, beta, gamma قاتارلىق)', 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 : 'بەلگىلەنگەن ئىستون سانى چوقۇم نۆلدىن چوڭ بولىدۇ', 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 : 'گىرۋەك چوڭلۇقى چوقۇم سان بولىدۇ', validateHSpace : 'توغرىسىغا ئارىلىق چوقۇم پۈتۈن سان بولىدۇ', validateVSpace : 'بويىغا ئارىلىق چوقۇم پۈتۈن سان بولىدۇ' }, // Flash Dialog flash : { properties : 'Flash خاسلىق', propertiesTab : 'خاسلىق', title : 'ماۋزۇ', chkPlay : 'ئۆزلۈكىدىن چال', chkLoop : 'دەۋرىي', chkMenu : 'Flash تىزىملىكنى قوزغات', 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 : 'Flash ئۆزگەرگۈچى', bgcolor : 'تەگلىك رەڭگى', hSpace : 'توغرىسىغا ئارىلىق', vSpace : 'بويىغا ئارىلىق', validateSrc : 'ئەسلى ھۆججەت ئادرېسىنى كىرگۈزۈڭ', 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>جەزملە</STRONG>نى بېسىڭ', securityMsg : 'توركۆرگۈڭىزنىڭ بىخەتەرلىك تەڭشىكى سەۋەبىدىن بۇ تەھرىرلىگۈچ چاپلاش تاختىسىدىكى مەزمۇننى بىۋاستە زىيارەت قىلالمايدۇ، بۇ كۆزنەكتە قايتا بىر قېتىم چاپلىشىڭىز كېرەك.', pasteArea : 'چاپلاش دائىرىسى' }, pastefromword : { confirmCleanup : 'سىز چاپلىماقچى بولغان مەزمۇن MS Word تىن كەلگەندەك قىلىدۇ، MS Word پىچىمىنى تازىلىۋەتكەندىن كېيىن ئاندىن چاپلامدۇ؟', toolbar : 'MS Word تىن چاپلا', title : 'MS Word تىن چاپلا', error : 'ئىچكى خاتالىق سەۋەبىدىن چاپلايدىغان سانلىق مەلۇماتنى تازىلىيالمايدۇ' }, pasteText : { button : 'پىچىمى يوق تېكىست سۈپىتىدە چاپلا', title : 'پىچىمى يوق تېكىست سۈپىتىدە چاپلا' }, templates : { button : 'قېلىپ', title : 'مەزمۇن قېلىپى', options : 'قېلىپ تاللانمىسى', insertOption : 'نۆۋەتتىكى مەزمۇننى ئالماشتۇر', selectPromptMsg : 'تەھرىرلىگۈچنىڭ مەزمۇن قېلىپىنى تاللاڭ:', emptyListMsg : '(قېلىپ يوق)' }, showBlocks : 'بۆلەكنى كۆرسەت', stylesCombo : { label : 'ئۇسلۇب', panelTitle : 'ئۇسلۇب', panelTitle1 : 'بۆلەك دەرىجىسىدىكى ئېلېمېنت ئۇسلۇبى', panelTitle2 : 'ئىچكى باغلانما ئېلېمېنت ئۇسلۇبى', panelTitle3 : 'نەڭ (Object) ئېلېمېنت ئۇسلۇبى' }, 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 : 'DIV تەھرىر', remove : 'DIV چىقىرىۋەت' }, iframe : { title : 'IFrame خاسلىق', toolbar : 'IFrame ', noUrl : 'كاندۇكنىڭ ئادرېسى(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' : 'Lime', // MISSING 'AFEEEE' : 'سۇس ھاۋا رەڭ', 'ADD8E6' : 'ئوچۇق كۆك', 'DDA0DD' : 'قىزغۇچ بىنەپشە', 'D3D3D3' : 'سۇس كۆكۈچ كۈلرەڭ', 'FFF0F5' : 'سۇس قىزغۇچ بىنەپشە', 'FAEBD7' : 'Antique White', // MISSING 'FFFFE0' : 'سۇس سېرىق', 'F0FFF0' : 'Honeydew', // MISSING 'F0FFFF' : 'ئاسمان كۆكى', 'F0F8FF' : 'سۇس كۆك', 'E6E6FA' : 'سۇس بىنەپشە', 'FFF' : 'ئاق' }, scayt : { title : 'شۇئان ئىملا تەكشۈر', opera_title : 'Opera توركۆرگۈنى قوللىمايدۇ', enable : 'شۇئان ئىملا تەكشۈرۈشنى قوزغات', disable : 'شۇئان ئىملا تەكشۈرۈشنى چەكلە', about : 'شۇئان ئىملا تەكشۈرۈش ھەققىدە', toggle : 'شۇئان ئىملا تەكشۈرۈشنى ۋاقىتلىق توختات/قوزغات', 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 : 'ھەققىدە' }, about : { title : 'CKEditor ھەققىدە', dlgTitle : 'CKEditor ھەققىدە', help : '$1 نى زىيارەت قىلىپ ياردەمگە ئېرىشىڭ', userGuide : 'CKEditor ئىشلەتكۈچى قوللانمىسى', moreInfo : 'تور تۇرايىمىزنى زىيارەت قىلىپ كېلىشىمگە ئائىت تېخىمۇ كۆپ ئۇچۇرغا ئېرىشىڭ', copy : 'Copyright &copy; $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 : 'تەگلىك سۈرەت', 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 * Bengali/Bangla language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['bn'] = { /** * 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, 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 : 'ফ্লাশ লেবেল যুক্ত কর', form : 'ফর্ম', checkbox : 'চেক বাক্স', radio : 'রেডিও বাটন', textField : 'টেক্সট ফীল্ড', textarea : 'টেক্সট এরিয়া', hiddenField : 'গুপ্ত ফীল্ড', button : 'বাটন', select : 'বাছাই ফীল্ড', imageButton : 'ছবির বাটন', notSet : '<সেট নেই>', id : 'আইডি', name : 'নাম', langDir : 'ভাষা লেখার দিক', langDirLtr : 'বাম থেকে ডান (LTR)', langDirRtl : 'ডান থেকে বাম (RTL)', langCode : 'ভাষা কোড', longDescr : 'URL এর লম্বা বর্ণনা', cssClass : 'স্টাইল-শীট ক্লাস', 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 : 'ট্যাব ইন্ডেক্স', advisoryTitle : 'পরামর্শ শীর্ষক', advisoryContentType : 'পরামর্শ কন্টেন্টের প্রকার', cssClasses : 'স্টাইল-শীট ক্লাস', charset : 'লিংক রিসোর্স ক্যারেক্টর সেট', styles : 'স্টাইল', rel : 'Relationship', // MISSING selectAnchor : 'নোঙর বাছাই', anchorName : 'নোঙরের নাম দিয়ে', anchorId : 'নোঙরের আইডি দিয়ে', 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 : 'সেল', 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 : 'রো', insertBefore : 'Insert Row Before', // MISSING insertAfter : 'Insert Row After', // MISSING deleteRow : 'রো মুছে দাও' }, column : { menu : 'কলাম', 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 : 'বাছাই করা ভ্যালু হিসেবে সেট কর', 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 : '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 : 'ফ্লাশ প্রোপার্টি', propertiesTab : 'Properties', // MISSING title : 'ফ্ল্যাশ প্রোপার্টি', chkPlay : 'অটো প্লে', chkLoop : 'লূপ', chkMenu : 'ফ্ল্যাশ মেনু এনাবল কর', chkFull : 'Allow Fullscreen', // MISSING scale : 'স্কেল', scaleAll : 'সব দেখাও', scaleNoBorder : 'কোনো বর্ডার নেই', scaleFit : 'নিখুঁত ফিট', access : 'Script Access', // MISSING accessAlways : 'Always', // MISSING accessSameDomain: 'Same domain', // MISSING accessNever : 'Never', // MISSING alignAbsBottom : 'Abs নীচে', alignAbsMiddle : 'Abs উপর', 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 : 'আপনার ব্রাউজারের সুরক্ষা সেটিংস এডিটরকে অটোমেটিক কাট করার অনুমতি দেয়নি। দয়া করে এই কাজের জন্য কিবোর্ড ব্যবহার করুন (Ctrl/Cmd+X)।', copyError : 'আপনার ব্রাউজারের সুরক্ষা সেটিংস এডিটরকে অটোমেটিক কপি করার অনুমতি দেয়নি। দয়া করে এই কাজের জন্য কিবোর্ড ব্যবহার করুন (Ctrl/Cmd+C)।', pasteMsg : 'অনুগ্রহ করে নীচের বাক্সে কিবোর্ড ব্যবহার করে (<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 : 'পেস্ট (শব্দ)', 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 : '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 : 'সাধারণ', tag_pre : 'ফর্মেটেড', tag_address : 'ঠিকানা', tag_h1 : 'শীর্ষক ১', tag_h2 : 'শীর্ষক ২', tag_h3 : 'শীর্ষক ৩', tag_h4 : 'শীর্ষক ৪', tag_h5 : 'শীর্ষক ৫', tag_h6 : 'শীর্ষক ৬', 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 : '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 &copy; $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 * Chinese Simplified language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['zh-cn'] = { /** * 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 : '所见即所得编辑器, %1, 按 ALT+0 查看帮助。', // 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 : '源文件', 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 : '详细说明地址', 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 : '该字段必须为合式的CSS长度值,包括单位(px, %, in, cm, mm, em, ex, pt 或 pc)', invalidHtmlLength : '该字段必须为合式的HTML长度值,包括单位(px 或 %)', invalidInlineStyle : '内联样式必须为格式是以分号分隔的一个或多个“属性名 : 属性值”', cssLengthTooltip : '该字段必须为合式的CSS长度值,包括单位(px, %, in, cm, mm, em, ex, pt 或 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 : '地址', toAnchor : '页内锚点链接', toEmail : '电子邮件', targetFrame : '<框架>', targetPopup : '<弹出窗口>', targetFrameName : '目标框架名称', targetPopupName : '弹出窗口名称', popupFeatures : '弹出窗口属性', popupResizable : '可缩放', popupStatusBar : '状态栏', popupLocationBar: '地址栏', popupToolbar : '工具栏', popupMenuBar : '菜单栏', popupFullScreen : '全屏 (IE)', popupScrollBars : '滚动条', popupDependent : '依附 (NS)', popupLeft : '左', popupTop : '右', id : 'ID', langDir : '语言方向', langDirLTR : '从左到右 (LTR)', langDirRTL : '从右到左 (RTL)', acccessKey : '访问键', name : '名称', langCode : '语言代码', tabIndex : 'Tab 键次序', advisoryTitle : '标题', advisoryContentType : '内容类型', cssClasses : '样式类名称', charset : '字符编码', styles : '行内样式', rel : '关联', selectAnchor : '选择一个锚点', anchorName : '按锚点名称', anchorId : '按锚点 ID', emailAddress : '地址', emailSubject : '主题', emailBody : '内容', noAnchors : '(此文档没有可用的锚点)', noUrl : '请输入超链接地址', 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 : '小写希腊字母(alpha, beta, gamma, 等)', decimal : '数字 (1, 2, 3, 等)', decimalLeadingZero : '0开头的数字标记(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 : '指定的列数必须大于零', 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 : '边框大小必须为整数格式', validateHSpace : '水平间距必须为整数格式', validateVSpace : '垂直间距必须为整数格式' }, // Flash Dialog flash : { properties : 'Flash 属性', propertiesTab : '属性', title : '标题', chkPlay : '自动播放', chkLoop : '循环', chkMenu : '启用 Flash 菜单', 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 : 'Flash 变量', bgcolor : '背景颜色', hSpace : '水平间距', vSpace : '垂直间距', validateSrc : '请输入源文件地址', 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>确定</STRONG>', securityMsg : '因为你的浏览器的安全设置原因, 本编辑器不能直接访问你的剪贴板内容, 你需要在本窗口重新粘贴一次', pasteArea : '粘贴区域' }, pastefromword : { confirmCleanup : '您要粘贴的内容好像是来自 MS Word, 是否要清除 MS Word 格式后再粘贴?', toolbar : '从 MS Word 粘贴', title : '从 MS Word 粘贴', 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 : '编辑 DIV', remove : '移除 DIV' }, iframe : { title : 'IFrame 属性', toolbar : 'IFrame', noUrl : '请输入框架的 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 : '不支持 Opera 浏览器', enable : '启用即时拼写检查', disable : '禁用即时拼写检查', about : '关于即时拼写检查', toggle : '暂停/启用即时拼写检查', 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 中, 但是 Cookies 的容量是有限的, 当用户词典增长到超出 Cookie 限制时就无法再储存了, 这时您可以将词典储存到我们的服务器上. 要把您的个人词典到储存到我们的服务器上的话, 需要为您的词典指定一个名称, 如果您在我们的服务器上已经有储存有一个词典, 请输入词典名称并按还原按钮.', aboutTab : '关于' }, about : { title : '关于CKEditor', dlgTitle : '关于CKEditor', help : '请访问 $1 以获取帮助.', userGuide : 'CKEditor 用户向导', moreInfo : '访问我们的网站以获取更多关于协议的信息', copy : 'Copyright &copy; $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 : 'Meta 数据', chooseColor : '选择', other : '<其他>', docTitle : '页面标题', charset : '字符编码', charsetOther : '其它字符编码', charsetASCII : 'ASCII', charsetCE : '中欧', charsetCT : '繁体中文 (Big5)', charsetCR : '西里尔文', charsetGR : '希腊文', charsetJP : '日文', charsetKR : '韩文', charsetTR : '土耳其文', charsetUN : 'Unicode (UTF-8)', charsetWE : '西欧', docType : '文档类型', docTypeOther : '其它文档类型', xhtmlDec : '包含 XHTML 声明', bgColor : '背景颜色', bgImage : '背景图像', 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 * Japanese language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['ja'] = { /** * 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 : 'リッチテキストエディタ, %1, ヘルプは ALT 0 を押してください', // ARIA descriptions. toolbars : 'Editor toolbars', // MISSING editor : 'リッチテキストエディタ', // 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 : '1行テキスト', textarea : 'テキストエリア', hiddenField : '不可視フィールド', button : 'ボタン', select : '選択フィールド', imageButton : '画像ボタン', notSet : '<なし>', id : 'Id', name : 'Name属性', langDir : '文字表記の方向', langDirLtr : '左から右 (LTR)', langDirRtl : '右から左 (RTL)', langCode : '言語コード', longDescr : 'longdesc属性(長文説明)', cssClass : 'スタイルシートクラス', advisoryTitle : 'Title属性', cssStyle : 'スタイルシート', ok : 'OK', cancel : 'キャンセル', close : '閉じる', preview : 'プレビュー', generalTab : '全般', advancedTab : '高度な設定', validateNumberFailed : '値が数ではありません', confirmNewPage : '変更内容を保存せず、 新しいページを開いてもよろしいでしょうか?', confirmCancel : 'オプション設定を変更しました。ダイアログを閉じてもよろしいでしょうか?', options : 'オプション', target : 'ターゲット', targetNew : '新しいウィンドウ (_空白)', targetTop : '最上部ウィンドウ (_トップ)', targetSelf : '同じウィンドウ (_同一)', targetParent : '親ウィンドウ (_親)', langDirLTR : '左から右 (LTR)', langDirRTL : '右から左 (RTL)', styles : 'スタイル', cssClasses : 'スタイルシートクラス', 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 : 'コンテキストメニューオプション' }, // Special char dialog. specialChar : { toolbar : '特殊文字挿入', title : '特殊文字選択', options : '特殊文字オプション' }, // Link dialog. link : { toolbar : 'リンク挿入/編集', other : '<その他の>', menu : 'リンク編集', title : 'ハイパーリンク', info : 'ハイパーリンク 情報', target : 'ターゲット', upload : 'アップロード', advanced : '高度な設定', type : 'リンクタイプ', toUrl : 'URL', // MISSING toAnchor : 'このページのアンカー', toEmail : 'E-Mail', 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 : 'Name属性', langCode : '言語コード', tabIndex : 'タブインデックス', advisoryTitle : 'Title属性', advisoryContentType : 'Content Type属性', cssClasses : 'スタイルシートクラス', charset : 'リンクcharset属性', styles : 'スタイルシート', rel : 'Relationship', // MISSING selectAnchor : 'アンカーを選択', anchorName : 'アンカー名', anchorId : 'エレメントID', emailAddress : 'E-Mail アドレス', emailSubject : '件名', emailBody : '本文', noAnchors : '(ドキュメントにおいて利用可能なアンカーはありません。)', noUrl : 'リンクURLを入力してください。', noEmail : 'メールアドレスを入力してください。' }, // Anchor dialog anchor : { toolbar : 'アンカー挿入/編集', menu : 'アンカー プロパティ', title : 'アンカー プロパティ', name : 'アンカー名', errorName : 'アンカー名を必ず入力してください。', remove : 'Remove Anchor' // MISSING }, // 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 : '上位桁に0をつけた数字 (01, 02, 03, etc.)' }, // 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 : 'ユニット', cellSpace : 'セル内余白', cellPad : 'セル内間隔', caption : 'キャプション', summary : 'テーブルの概要', headers : 'テーブルヘッダ(th)', 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 : 'テーブルデータ(td)', header : 'テーブルヘッダ(th)', yes : 'Yes', no : '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 : '1行テキスト プロパティ', 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 : 'スプリクトアクセス(AllowScriptAccess)', accessAlways : 'すべての場合に通信可能(Always)', accessSameDomain: '同一ドメインのみに通信可能(Same domain)', accessNever : 'すべての場合に通信不可能(Never)', alignAbsBottom : '下部(絶対的)', alignAbsMiddle : '中央(絶対的)', alignBaseline : 'ベースライン', alignTextTop : 'テキスト上部', quality : '画質', qualityBest : '品質優先', qualityHigh : '高', qualityAutoHigh : '自動/高', qualityMedium : '中', qualityAutoLow : '自動/低', qualityLow : '低', windowModeWindow: '標準', windowModeOpaque: '背景を不透明設定', windowModeTransparent : '背景を透過設定', windowMode : 'ウィンドウモード', flashvars : 'フラッシュに渡す変数(FlashVars)', 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 : 'スペルチェック完了: 1語句変更されました', 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 : '貼り付けを行うテキストは、ワード文章からコピーされようとしています。貼り付ける前にクリーニングを行いますか?', toolbar : 'ワード文章から貼り付け', title : 'ワード文章から貼り付け', 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 : 'Divコンテナ', toolbar : 'Divコンテナ', cssClassInputLabel : 'スタイルシートクラス', styleSelectLabel : 'スタイル', IdInputLabel : 'Id', // MISSING languageCodeInputLabel : ' 言語コード', inlineStyleInputLabel : 'インラインスタイル', advisoryTitleInputLabel : 'Title属性', langDirLabel : '文字表記の方向', langDirLTRLabel : '左から右 (LTR)', langDirRTLLabel : '右から左 (RTL)', edit : 'Divコンテナ 編集', remove : 'Divコンテナ 削除' }, 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 : '色', 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 : 'スペルチェック設定(SCAYT)', 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 : 'バージョン情報' }, about : { title : 'CKEditorバージョン情報', dlgTitle : 'CKEditorバージョン情報', help : 'Check $1 for help.', // MISSING userGuide : 'CKEditor User\'s Guide', // MISSING moreInfo : 'ライセンス情報の詳細はウェブサイトにて確認してください:', copy : 'Copyright &copy; $1. All rights reserved.' }, maximize : '最大化', minimize : '最小化', fakeobjects : { anchor : 'アンカー', flash : 'Flash Animation', iframe : 'IFrame', // MISSING hiddenfield : 'Hidden Field', // MISSING unknown : 'Unknown Object' }, resize : 'ドラッグしてリサイズ', colordialog : { title : '色選択', options : 'カラーオプション', highlight : 'ハイライト', selected : '選択された色', clear : 'クリア' }, toolbarCollapse : 'ツールバーを閉じる', toolbarExpand : 'ツールバーを開く', 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 : 'テキストの向き : 左から右へ', rtl : 'テキストの向き : 右から左へ' }, docprops : { label : '文書 プロパティ', title : '文書 プロパティ', design : 'Design', // MISSING meta : 'メタデータ', chooseColor : '色の選択', 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', 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 * Bosnian language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['bs'] = { /** * 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, press ALT 0 for help.', // MISSING // ARIA descriptions. toolbars : 'Editor toolbars', // MISSING editor : 'Rich Text Editor', // MISSING // Toolbar buttons without dialogs. source : 'HTML kôd', newPage : 'Novi dokument', save : 'Snimi', preview : 'Prikaži', cut : 'Izreži', copy : 'Kopiraj', paste : 'Zalijepi', print : 'Štampaj', underline : 'Podvuci', bold : 'Boldiraj', italic : 'Ukosi', selectAll : 'Selektuj sve', removeFormat : 'Poništi format', strike : 'Precrtaj', subscript : 'Subscript', superscript : 'Superscript', horizontalrule : 'Ubaci horizontalnu liniju', pagebreak : 'Insert Page Break for Printing', // MISSING pagebreakAlt : 'Page Break', // MISSING unlink : 'Izbriši link', undo : 'Vrati', redo : 'Ponovi', // Common messages and labels. common : { browseServer : 'Browse Server', // MISSING url : 'URL', protocol : 'Protokol', upload : 'Šalji', uploadSubmit : 'Šalji na server', image : 'Slika', 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 : '<nije podešeno>', id : 'Id', name : 'Naziv', langDir : 'Smjer pisanja', langDirLtr : 'S lijeva na desno (LTR)', langDirRtl : 'S desna na lijevo (RTL)', langCode : 'Jezièni kôd', longDescr : 'Dugaèki opis URL-a', cssClass : 'Klase CSS stilova', advisoryTitle : 'Advisory title', cssStyle : 'Stil', ok : 'OK', cancel : 'Odustani', close : 'Close', // MISSING preview : 'Preview', // MISSING generalTab : 'General', // MISSING advancedTab : 'Naprednije', 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 : 'Širina', height : 'Visina', align : 'Poravnanje', alignLeft : 'Lijevo', alignRight : 'Desno', alignCenter : 'Centar', alignTop : 'Vrh', alignMiddle : 'Sredina', alignBottom : 'Dno', 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 : 'Ubaci specijalni karater', title : 'Izaberi specijalni karakter', options : 'Special Character Options' // MISSING }, // Link dialog. link : { toolbar : 'Ubaci/Izmjeni link', other : '<other>', // MISSING menu : 'Izmjeni link', title : 'Link', info : 'Link info', target : 'Prozor', upload : 'Šalji', advanced : 'Naprednije', type : 'Tip linka', toUrl : 'URL', // MISSING toAnchor : 'Sidro na ovoj stranici', toEmail : 'E-Mail', targetFrame : '<frejm>', targetPopup : '<popup prozor>', targetFrameName : 'Target Frame Name', // MISSING targetPopupName : 'Naziv popup prozora', popupFeatures : 'Moguænosti popup prozora', popupResizable : 'Resizable', // MISSING popupStatusBar : 'Statusna traka', popupLocationBar: 'Traka za lokaciju', popupToolbar : 'Traka sa alatima', popupMenuBar : 'Izborna traka', popupFullScreen : 'Cijeli ekran (IE)', popupScrollBars : 'Scroll traka', popupDependent : 'Ovisno (Netscape)', popupLeft : 'Lijeva pozicija', popupTop : 'Gornja pozicija', id : 'Id', // MISSING langDir : 'Smjer pisanja', langDirLTR : 'S lijeva na desno (LTR)', langDirRTL : 'S desna na lijevo (RTL)', acccessKey : 'Pristupna tipka', name : 'Naziv', langCode : 'Smjer pisanja', tabIndex : 'Tab indeks', advisoryTitle : 'Advisory title', advisoryContentType : 'Advisory vrsta sadržaja', cssClasses : 'Klase CSS stilova', charset : 'Linked Resource Charset', styles : 'Stil', rel : 'Relationship', // MISSING selectAnchor : 'Izaberi sidro', anchorName : 'Po nazivu sidra', anchorId : 'Po Id-u elementa', emailAddress : 'E-Mail Adresa', emailSubject : 'Subjekt poruke', emailBody : 'Poruka', noAnchors : '(Nema dostupnih sidra na stranici)', noUrl : 'Molimo ukucajte URL link', noEmail : 'Molimo ukucajte e-mail adresu' }, // 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 : 'Naði', replace : 'Zamjeni', findWhat : 'Naði šta:', replaceWith : 'Zamjeni sa:', notFoundMsg : 'Traženi tekst nije pronaðen.', findOptions : 'Find Options', // MISSING matchCase : 'Uporeðuj velika/mala slova', matchWord : 'Uporeðuj samo cijelu rijeè', matchCyclic : 'Match cyclic', // MISSING replaceAll : 'Zamjeni sve', replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING }, // Table Dialog table : { toolbar : 'Tabela', title : 'Svojstva tabele', menu : 'Svojstva tabele', deleteTable : 'Delete Table', // MISSING rows : 'Redova', columns : 'Kolona', border : 'Okvir', widthPx : 'piksela', widthPc : 'posto', widthUnit : 'width unit', // MISSING cellSpace : 'Razmak æelija', cellPad : 'Uvod æelija', caption : 'Naslov', 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 : 'Briši æelije', merge : 'Spoji æelije', 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 : 'Briši redove' }, column : { menu : 'Column', // MISSING insertBefore : 'Insert Column Before', // MISSING insertAfter : 'Insert Column After', // MISSING deleteColumn : 'Briši kolone' } }, // 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 : 'Svojstva slike', titleButton : 'Image Button Properties', // MISSING menu : 'Svojstva slike', infoTab : 'Info slike', btnUpload : 'Šalji na server', upload : 'Šalji', alt : 'Tekst na slici', lockRatio : 'Zakljuèaj odnos', resetSize : 'Resetuj dimenzije', border : 'Okvir', hSpace : 'HSpace', vSpace : 'VSpace', alertUrl : 'Molimo ukucajte URL od slike.', 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 dole', alignAbsMiddle : 'Abs sredina', alignBaseline : 'Bazno', alignTextTop : 'Vrh teksta', 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 : 'Boja pozadine', hSpace : 'HSpace', vSpace : 'VSpace', validateSrc : 'Molimo ukucajte URL link', 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 : 'Smješko', title : 'Ubaci smješka', options : 'Smiley Options' // MISSING }, elementsPath : { eleLabel : 'Elements path', // MISSING eleTitle : '%1 element' // MISSING }, numberedlist : 'Numerisana lista', bulletedlist : 'Lista', indent : 'Poveæaj uvod', outdent : 'Smanji uvod', justify : { left : 'Lijevo poravnanje', center : 'Centralno poravnanje', right : 'Desno poravnanje', block : 'Puno poravnanje' }, blockquote : 'Block Quote', // MISSING clipboard : { title : 'Zalijepi', cutError : 'Sigurnosne postavke vašeg pretraživaèa ne dozvoljavaju operacije automatskog rezanja. Molimo koristite kraticu na tastaturi (Ctrl/Cmd+X).', copyError : 'Sigurnosne postavke Vašeg pretraživaèa ne dozvoljavaju operacije automatskog kopiranja. Molimo koristite kraticu na tastaturi (Ctrl/Cmd+C).', 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 : 'Zalijepi iz Word-a', title : 'Zalijepi iz Word-a', error : 'It was not possible to clean up the pasted data due to an internal error' // MISSING }, pasteText : { button : 'Zalijepi kao obièan tekst', title : 'Zalijepi kao obièan tekst' }, 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 : 'Stil', 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 : '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)' // 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', voiceLabel : 'Font', // MISSING panelTitle : 'Font' }, fontSize : { label : 'Velièina', voiceLabel : 'Font Size', // MISSING panelTitle : 'Velièina' }, colorButton : { textColorTitle : 'Boja teksta', bgColorTitle : 'Boja pozadine', panelTitle : 'Colors', // MISSING auto : 'Automatska', more : 'Više boja...' }, 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 &copy; $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 */ /** * @fileOverview Defines the {@link CKEDITOR.lang} object, for the * Bulgarian language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['bg'] = { /** * 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 : 'Текстов редактор за форматиран текст, %1, натиснете ALT 0 за помощ.', // 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 : 'Ляво на дясно (ЛнД)', langDirRtl : 'Дясно на ляво (ДнЛ)', langCode : 'Код на езика', longDescr : 'Уеб адрес за дълго описание', cssClass : 'Класове за CSS', advisoryTitle : 'Advisory Title', // MISSING cssStyle : 'Стил', ok : 'ОК', cancel : 'Отказ', close : 'Затвори', preview : 'Преглед', generalTab : 'Общо', advancedTab : 'Разширено', validateNumberFailed : 'Тази стойност не е число', 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 : 'Опции', target : 'Цел', targetNew : 'Нов прозорец (_blank)', targetTop : 'Горна позиция (_top)', targetSelf : 'Текущия прозорец (_self)', targetParent : 'Основен прозорец (_parent)', langDirLTR : 'Ляво на дясно (ЛнД)', langDirRTL : 'Дясно на ляво (ДнЛ)', styles : 'Стил', cssClasses : 'Класове за CSS', 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">, unavailable</span>' // MISSING }, contextmenu : { options : 'Опции на контекстното меню' }, // Special char dialog. specialChar : { toolbar : 'Вмъкване на специален знак', title : 'Избор на специален знак', options : 'Опции за специален знак' }, // Link dialog. link : { toolbar : 'Връзка', other : '<друго>', menu : 'Промяна на връзка', title : 'Връзка', info : 'Инфо за връзката', target : 'Цел', upload : 'Качване', advanced : 'Разширено', type : 'Тип на връзката', toUrl : 'Уеб адрес', toAnchor : 'Връзка към котва в текста', toEmail : 'E-mail', targetFrame : '<frame>', targetPopup : '<изкачащ прозорец>', targetFrameName : 'Име на целевият прозорец', targetPopupName : 'Име на изкачащ прозорец', popupFeatures : 'Функции на изкачащ прозорец', popupResizable : 'Оразмеряем', popupStatusBar : 'Статусна лента', popupLocationBar: 'Лента с локацията', popupToolbar : 'Лента с инструменти', popupMenuBar : 'Лента за меню', popupFullScreen : 'Цял екран (IE)', popupScrollBars : 'Скролери', popupDependent : 'Зависимост (Netscape)', popupLeft : 'Лява позиция', popupTop : 'Горна позиция', id : 'ID', langDir : 'Посока на езика', langDirLTR : 'Ляво на Дясно (ЛнД)', langDirRTL : 'Дясно на Ляво (ДнЛ)', acccessKey : 'Ключ за достъп', name : 'Име', langCode : 'Код за езика', tabIndex : 'Tab Index', // MISSING advisoryTitle : 'Advisory Title', // MISSING advisoryContentType : 'Advisory Content Type', // MISSING cssClasses : 'Класове за CSS', charset : 'Linked Resource Charset', // MISSING styles : 'Стил', rel : 'Връзка', selectAnchor : 'Изберете котва', anchorName : 'По име на котва', anchorId : 'По ID на елемент', emailAddress : 'E-mail aдрес', emailSubject : 'Тема', emailBody : 'Съдържание', noAnchors : '(No anchors available in the document)', // MISSING noUrl : 'Please type the link URL', // MISSING noEmail : 'Моля въведете e-mail aдрес' }, // Anchor dialog anchor : { toolbar : 'Котва', menu : 'Промяна на котва', title : 'Настройки на котва', name : 'Име на котва', errorName : 'Моля въведете име на котвата', remove : 'Премахване на котва' }, // List style dialog list: { numberedTitle : 'Numbered List Properties', // MISSING bulletedTitle : 'Bulleted List Properties', // MISSING type : 'Тип', start : 'Старт', validateStartNumber :'List start number must be a whole number.', // MISSING circle : 'Кръг', disc : 'Диск', square : 'Квадрат', none : 'Няма', notset : '<не е указано>', armenian : 'Арменско номериране', georgian : 'Грузинско номериране (an, ban, gan, и т.н.)', lowerRoman : 'Малки римски числа (i, ii, iii, iv, v и т.н.)', upperRoman : 'Големи римски числа (I, II, III, IV, V и т.н.)', lowerAlpha : 'Малки букви (а, б, в, г, д и т.н.)', upperAlpha : 'Големи букви (А, Б, В, Г, Д и т.н.)', lowerGreek : 'Малки гръцки букви (алфа, бета, гама и т.н.)', decimal : 'Числа (1, 2, 3 и др.)', decimalLeadingZero : 'Числа с водеща нула (01, 02, 03 и т.н.)' }, // Find And Replace Dialog findAndReplace : { title : 'Търсене и препокриване', find : 'Търсене', replace : 'Препокриване', findWhat : 'Търси за:', replaceWith : 'Препокрива с:', notFoundMsg : 'Указаният текст не е намерен.', findOptions : 'Find Options', // MISSING matchCase : 'Съвпадение', matchWord : 'Съвпадение с дума', matchCyclic : 'Циклично съвпадение', replaceAll : 'Препокрий всички', replaceSuccessMsg : '%1 occurrence(s) replaced.' // MISSING }, // 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 : '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 : 'Клетка', insertBefore : 'Вмъкване на клетка преди', insertAfter : 'Вмъкване на клетка след', deleteCell : 'Изтриване на клетки', merge : 'Сливане на клетки', mergeRight : 'Сливане в дясно', mergeDown : 'Merge Down', // MISSING splitHorizontal : 'Split Cell Horizontally', // MISSING splitVertical : 'Split Cell Vertically', // MISSING title : 'Настройки на клетката', cellType : 'Тип на клетката', rowSpan : 'Rows Span', // MISSING colSpan : 'Columns Span', // MISSING wordWrap : 'Авто. пренос', hAlign : 'Хоризонтално подравняване', vAlign : 'Вертикално подравняване', alignBaseline : 'Базова линия', bgColor : 'Фон', borderColor : 'Цвят на рамката', data : 'Данни', header : 'Хедър', yes : 'Да', no : 'Не', 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 : 'Изберете' }, row : { menu : 'Ред', insertBefore : 'Insert Row Before', // MISSING insertAfter : 'Вмъкване на ред след', deleteRow : 'Изтриване на редове' }, column : { menu : 'Колона', insertBefore : 'Вмъкване на колона преди', insertAfter : 'Вмъкване на колона след', deleteColumn : 'Изтриване на колони' } }, // Button Dialog. button : { title : 'Настройки на бутона', text : 'Текст (стойност)', type : 'Тип', typeBtn : 'Бутон', typeSbm : 'Добави', typeRst : 'Нулиране' }, // Checkbox and Radio Button Dialogs. checkboxAndRadio : { checkboxTitle : 'Checkbox Properties', // MISSING radioTitle : 'Настройки на радиобутон', value : 'Стойност', selected : 'Избрано' }, // Form Dialog. form : { title : 'Настройки на формата', menu : 'Настройки на формата', action : 'Действие', method : 'Метод', encoding : 'Кодиране' }, // Select Field Dialog. select : { title : 'Selection Field Properties', // MISSING selectInfo : 'Select Info', // MISSING opAvail : 'Налични опции', value : 'Стойност', size : 'Размер', lines : 'линии', chkMulti : 'Allow multiple selections', // MISSING 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 : 'HSpace', // MISSING vSpace : 'VSpace', // MISSING alertUrl : 'Please type the image URL', // MISSING 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 : 'Настройки за флаш', propertiesTab : 'Настройки', title : 'Настройки за флаш', chkPlay : 'Авто. пускане', chkLoop : 'Цикъл', chkMenu : 'Enable Flash Menu', // MISSING chkFull : 'Allow Fullscreen', // MISSING scale : 'Scale', // MISSING scaleAll : 'Показва всичко', scaleNoBorder : 'Без рамка', scaleFit : 'Exact Fit', // MISSING access : 'Script Access', // MISSING accessAlways : 'Винаги', accessSameDomain: 'Същият домейн', accessNever : 'Никога', alignAbsBottom : 'Abs Bottom', // MISSING alignAbsMiddle : 'Abs Middle', // MISSING alignBaseline : 'Baseline', // MISSING alignTextTop : 'Text Top', // MISSING quality : 'Качество', qualityBest : 'Отлично', qualityHigh : 'Високо', qualityAutoHigh : 'Авто. високо', qualityMedium : 'Средно', qualityAutoLow : 'Авто. ниско', qualityLow : 'Ниско', windowModeWindow: 'Прозорец', windowModeOpaque: 'Плътност', windowModeTransparent : 'Прозрачност', windowMode : 'Режим на прозореца', flashvars : 'Променливи за Флаш', bgcolor : 'Background color', // MISSING hSpace : 'HSpace', // MISSING vSpace : 'VSpace', // MISSING validateSrc : 'Уеб адреса не трябва да е празен.', validateHSpace : 'HSpace must be a number.', // MISSING validateVSpace : 'VSpace must be a number.' // MISSING }, // Speller Pages Dialog spellCheck : { toolbar : 'Проверка на правопис', title : 'Проверка на правопис', notAvailable : 'Съжаляваме, но услугата не е достъпна за момента', errorLoading : 'Error loading application service host: %s.', // MISSING notInDic : 'Не е в речника', changeTo : 'Промени на', btnIgnore : 'Игнорирай', btnIgnoreAll : 'Игнорирай всичко', btnReplace : 'Препокриване', btnReplaceAll : 'Препокрий всичко', btnUndo : 'Възтанови', noSuggestions : '- Няма препоръчани -', progress : 'Проверява се правописа...', 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 : 'Усмивка', title : 'Вмъкване на усмивка', options : 'Опции за усмивката' }, elementsPath : { eleLabel : 'Път за елементите', eleTitle : '%1 елемент' }, numberedlist : 'Вмъкване/Премахване на номериран списък', bulletedlist : 'Вмъкване/Премахване на точков списък', indent : 'Увеличаване на отстъпа', outdent : 'Намаляване на отстъпа', justify : { left : 'Подравни в ляво', center : 'Център', right : 'Подравни в дясно', block : 'Justify' // MISSING }, blockquote : 'Блок за цитат', clipboard : { title : 'Paste', // MISSING cutError : 'Настройките за сигурност на Вашия браузър не позволяват на редактора автоматично да изъплни действията за отрязване. Моля ползвайте клавиатурните команди за целта (ctrl+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).', // 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 : 'Показва блокове', 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 : 'Стил', IdInputLabel : 'ID', languageCodeInputLabel : ' Код на езика', 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 : 'Промяна на Div', remove : 'Премахване на Div' }, iframe : { title : 'IFrame настройки', toolbar : 'IFrame', 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 : 'Цветове', auto : 'Автоматично', more : 'Още цветове' }, colors : { '000' : 'Черно', '800000' : 'Кестеняво', '8B4513' : 'Светлокафяво', '2F4F4F' : 'Dark Slate Gray', // MISSING '008080' : 'Teal', // MISSING '000080' : 'Navy', // MISSING '4B0082' : 'Индиго', '696969' : 'Тъмно сиво', 'B22222' : 'Огнено червено', 'A52A2A' : 'Кафяво', 'DAA520' : 'Златисто', '006400' : 'Тъмно зелено', '40E0D0' : 'Тюркуазено', '0000CD' : 'Средно синьо', '800080' : 'Пурпурно', '808080' : 'Сиво', 'F00' : 'Червено', 'FF8C00' : 'Тъмно оранжево', 'FFD700' : 'Златно', '008000' : 'Зелено', '0FF' : 'Светло синьо', '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 : 'Игнорирани думи и цифри', languagesTab : 'Езици', dictionariesTab : 'Речници', dic_field_name : 'Име на речнк', dic_create : 'Нов', dic_restore : 'Възтановяване', dic_delete : 'Изтриване', dic_rename : 'Преименуване', 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 : 'Проверете $1 за помощ.', userGuide : 'CKEditor User\'s Guide', // MISSING moreInfo : 'За лицензионна информация моля посетете сайта ни:', copy : 'Copyright &copy; $1. All rights reserved.' }, maximize : 'Максимизиране', minimize : 'Минимизиране', fakeobjects : { anchor : 'Кука', flash : 'Флаш анимация', iframe : 'IFrame', hiddenfield : 'Скрито поле', unknown : 'Неизвестен обект' }, resize : 'Влачете за да оразмерите', colordialog : { title : 'Изберете цвят', options : 'Цветови опции', highlight : 'Осветяване', selected : 'Изберете цвят', clear : 'Изчистване' }, toolbarCollapse : 'Свиване на лентата с инструменти', toolbarExpand : 'Разширяване на лентата с инструменти', toolbarGroups : { document : 'Документ', clipboard : 'Clipboard/Undo', // MISSING editing : 'Промяна', forms : 'Форми', basicstyles : 'Базови стилове', paragraph : 'Параграф', links : 'Връзки', insert : 'Вмъкване', styles : 'Стилове', colors : 'Цветове', tools : 'Инструменти' }, bidi : { ltr : 'Text direction from left to right', // MISSING rtl : 'Text direction from right to left' // MISSING }, docprops : { label : 'Настройки на документа', title : 'Настройки на документа', design : 'Дизайн', meta : 'Мета етикети', chooseColor : 'Изберете', other : 'Други...', docTitle : 'Заглавие на страницата', charset : 'Кодова таблица', charsetOther : 'Друга кодова таблица', charsetASCII : 'ASCII', charsetCE : 'Централна европейска', charsetCT : 'Китайски традиционен', 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 Defines the {@link CKEDITOR.lang} object, for the * Hungarian language. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['hu'] = { /** * 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 : 'HTML szerkesztő', // ARIA descriptions. toolbars : 'Szerkesztő Eszköztár', editor : 'HTML szerkesztő', // Toolbar buttons without dialogs. source : 'Forráskód', newPage : 'Új oldal', save : 'Mentés', preview : 'Előnézet', cut : 'Kivágás', copy : 'Másolás', paste : 'Beillesztés', print : 'Nyomtatás', underline : 'Aláhúzott', bold : 'Félkövér', italic : 'Dőlt', selectAll : 'Mindent kijelöl', removeFormat : 'Formázás eltávolítása', strike : 'Áthúzott', subscript : 'Alsó index', superscript : 'Felső index', horizontalrule : 'Elválasztóvonal beillesztése', pagebreak : 'Oldaltörés beillesztése', pagebreakAlt : 'Oldaltörés', unlink : 'Hivatkozás törlése', undo : 'Visszavonás', redo : 'Ismétlés', // Common messages and labels. common : { browseServer : 'Böngészés a szerveren', url : 'Hivatkozás', protocol : 'Protokoll', upload : 'Feltöltés', uploadSubmit : 'Küldés a szerverre', image : 'Kép', flash : 'Flash', form : 'Űrlap', checkbox : 'Jelölőnégyzet', radio : 'Választógomb', textField : 'Szövegmező', textarea : 'Szövegterület', hiddenField : 'Rejtettmező', button : 'Gomb', select : 'Legördülő lista', imageButton : 'Képgomb', notSet : '<nincs beállítva>', id : 'Azonosító', name : 'Név', langDir : 'Írás iránya', langDirLtr : 'Balról jobbra', langDirRtl : 'Jobbról balra', langCode : 'Nyelv kódja', longDescr : 'Részletes leírás webcíme', cssClass : 'Stíluskészlet', advisoryTitle : 'Súgócimke', cssStyle : 'Stílus', ok : 'Rendben', cancel : 'Mégsem', close : 'Bezárás', preview : 'Előnézet', generalTab : 'Általános', advancedTab : 'További opciók', validateNumberFailed : 'A mezőbe csak számokat írhat.', confirmNewPage : 'Minden nem mentett változás el fog veszni! Biztosan be szeretné tölteni az oldalt?', confirmCancel : 'Az űrlap tartalma megváltozott, ám a változásokat nem rögzítette. Biztosan be szeretné zárni az űrlapot?', options : 'Beállítások', target : 'Cél', targetNew : 'Új ablak (_blank)', targetTop : 'Legfelső ablak (_top)', targetSelf : 'Aktuális ablakban (_self)', targetParent : 'Szülő ablak (_parent)', langDirLTR : 'Balról jobbra (LTR)', langDirRTL : 'Jobbról balra (RTL)', styles : 'Stílus', cssClasses : 'Stíluslap osztály', width : 'Szélesség', height : 'Magasság', align : 'Igazítás', alignLeft : 'Bal', alignRight : 'Jobbra', alignCenter : 'Középre', alignTop : 'Tetejére', alignMiddle : 'Középre', alignBottom : 'Aljára', invalidHeight : 'A magasság mezőbe csak számokat írhat.', invalidWidth : 'A szélesség mezőbe csak számokat írhat.', invalidCssLength : '"%1"-hez megadott érték csakis egy pozitív szám lehet, esetleg egy érvényes CSS egységgel megjelölve(px, %, in, cm, mm, em, ex, pt vagy pc).', invalidHtmlLength : '"%1"-hez megadott érték csakis egy pozitív szám lehet, esetleg egy érvényes HTML egységgel megjelölve(px vagy %).', 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">, nem elérhető</span>' }, contextmenu : { options : 'Helyi menü opciók' }, // Special char dialog. specialChar : { toolbar : 'Speciális karakter beillesztése', title : 'Speciális karakter választása', options : 'Speciális karakter opciók' }, // Link dialog. link : { toolbar : 'Hivatkozás beillesztése/módosítása', other : '<más>', menu : 'Hivatkozás módosítása', title : 'Hivatkozás tulajdonságai', info : 'Alaptulajdonságok', target : 'Tartalom megjelenítése', upload : 'Feltöltés', advanced : 'További opciók', type : 'Hivatkozás típusa', toUrl : 'URL', toAnchor : 'Horgony az oldalon', toEmail : 'E-Mail', targetFrame : '<keretben>', targetPopup : '<felugró ablakban>', targetFrameName : 'Keret neve', targetPopupName : 'Felugró ablak neve', popupFeatures : 'Felugró ablak jellemzői', popupResizable : 'Átméretezés', popupStatusBar : 'Állapotsor', popupLocationBar: 'Címsor', popupToolbar : 'Eszköztár', popupMenuBar : 'Menü sor', popupFullScreen : 'Teljes képernyő (csak IE)', popupScrollBars : 'Gördítősáv', popupDependent : 'Szülőhöz kapcsolt (csak Netscape)', popupLeft : 'Bal pozíció', popupTop : 'Felső pozíció', id : 'Id', langDir : 'Írás iránya', langDirLTR : 'Balról jobbra', langDirRTL : 'Jobbról balra', acccessKey : 'Billentyűkombináció', name : 'Név', langCode : 'Írás iránya', tabIndex : 'Tabulátor index', advisoryTitle : 'Súgócimke', advisoryContentType : 'Súgó tartalomtípusa', cssClasses : 'Stíluskészlet', charset : 'Hivatkozott tartalom kódlapja', styles : 'Stílus', rel : 'Kapcsolat típusa', selectAnchor : 'Horgony választása', anchorName : 'Horgony név szerint', anchorId : 'Azonosító szerint', emailAddress : 'E-Mail cím', emailSubject : 'Üzenet tárgya', emailBody : 'Üzenet', noAnchors : '(Nincs horgony a dokumentumban)', noUrl : 'Adja meg a hivatkozás webcímét', noEmail : 'Adja meg az E-Mail címet' }, // Anchor dialog anchor : { toolbar : 'Horgony beillesztése/szerkesztése', menu : 'Horgony tulajdonságai', title : 'Horgony tulajdonságai', name : 'Horgony neve', errorName : 'Kérem adja meg a horgony nevét', remove : 'Horgony eltávolítása' }, // List style dialog list: { numberedTitle : 'Sorszámozott lista tulajdonságai', bulletedTitle : 'Pontozott lista tulajdonságai', type : 'Típus', start : 'Kezdőszám', validateStartNumber :'A kezdőszám nem lehet tört érték.', circle : 'Kör', disc : 'Korong', square : 'Négyzet', none : 'Nincs', notset : '<Nincs beállítva>', armenian : 'Örmény számozás', georgian : 'Grúz számozás (an, ban, gan, stb.)', lowerRoman : 'Római kisbetűs (i, ii, iii, iv, v, stb.)', upperRoman : 'Római nagybetűs (I, II, III, IV, V, stb.)', lowerAlpha : 'Kisbetűs (a, b, c, d, e, stb.)', upperAlpha : 'Nagybetűs (A, B, C, D, E, stb.)', lowerGreek : 'Görög (alpha, beta, gamma, stb.)', decimal : 'Arab számozás (1, 2, 3, stb.)', decimalLeadingZero : 'Számozás bevezető nullákkal (01, 02, 03, stb.)' }, // Find And Replace Dialog findAndReplace : { title : 'Keresés és csere', find : 'Keresés', replace : 'Csere', findWhat : 'Keresett szöveg:', replaceWith : 'Csere erre:', notFoundMsg : 'A keresett szöveg nem található.', findOptions : 'Find Options', // MISSING matchCase : 'kis- és nagybetű megkülönböztetése', matchWord : 'csak ha ez a teljes szó', matchCyclic : 'Ciklikus keresés', replaceAll : 'Az összes cseréje', replaceSuccessMsg : '%1 egyezőség cserélve.' }, // Table Dialog table : { toolbar : 'Táblázat', title : 'Táblázat tulajdonságai', menu : 'Táblázat tulajdonságai', deleteTable : 'Táblázat törlése', rows : 'Sorok', columns : 'Oszlopok', border : 'Szegélyméret', widthPx : 'képpont', widthPc : 'százalék', widthUnit : 'Szélesség egység', cellSpace : 'Cella térköz', cellPad : 'Cella belső margó', caption : 'Felirat', summary : 'Leírás', headers : 'Fejlécek', headersNone : 'Nincsenek', headersColumn : 'Első oszlop', headersRow : 'Első sor', headersBoth : 'Mindkettő', invalidRows : 'A sorok számának nagyobbnak kell lenni mint 0.', invalidCols : 'Az oszlopok számának nagyobbnak kell lenni mint 0.', invalidBorder : 'A szegélyméret mezőbe csak számokat írhat.', invalidWidth : 'A szélesség mezőbe csak számokat írhat.', invalidHeight : 'A magasság mezőbe csak számokat írhat.', invalidCellSpacing : 'A cella térköz mezőbe csak számokat írhat.', invalidCellPadding : 'A cella belső margó mezőbe csak számokat írhat.', cell : { menu : 'Cella', insertBefore : 'Beszúrás balra', insertAfter : 'Beszúrás jobbra', deleteCell : 'Cellák törlése', merge : 'Cellák egyesítése', mergeRight : 'Cellák egyesítése jobbra', mergeDown : 'Cellák egyesítése lefelé', splitHorizontal : 'Cellák szétválasztása vízszintesen', splitVertical : 'Cellák szétválasztása függőlegesen', title : 'Cella tulajdonságai', cellType : 'Cella típusa', rowSpan : 'Függőleges egyesítés', colSpan : 'Vízszintes egyesítés', wordWrap : 'Hosszú sorok törése', hAlign : 'Vízszintes igazítás', vAlign : 'Függőleges igazítás', alignBaseline : 'Alapvonalra', bgColor : 'Háttér színe', borderColor : 'Keret színe', data : 'Adat', header : 'Fejléc', yes : 'Igen', no : 'Nem', invalidWidth : 'A szélesség mezőbe csak számokat írhat.', invalidHeight : 'A magasság mezőbe csak számokat írhat.', invalidRowSpan : 'A függőleges egyesítés mezőbe csak számokat írhat.', invalidColSpan : 'A vízszintes egyesítés mezőbe csak számokat írhat.', chooseColor : 'Válasszon' }, row : { menu : 'Sor', insertBefore : 'Beszúrás fölé', insertAfter : 'Beszúrás alá', deleteRow : 'Sorok törlése' }, column : { menu : 'Oszlop', insertBefore : 'Beszúrás balra', insertAfter : 'Beszúrás jobbra', deleteColumn : 'Oszlopok törlése' } }, // Button Dialog. button : { title : 'Gomb tulajdonságai', text : 'Szöveg (Érték)', type : 'Típus', typeBtn : 'Gomb', typeSbm : 'Küldés', typeRst : 'Alaphelyzet' }, // Checkbox and Radio Button Dialogs. checkboxAndRadio : { checkboxTitle : 'Jelölőnégyzet tulajdonságai', radioTitle : 'Választógomb tulajdonságai', value : 'Érték', selected : 'Kiválasztott' }, // Form Dialog. form : { title : 'Űrlap tulajdonságai', menu : 'Űrlap tulajdonságai', action : 'Adatfeldolgozást végző hivatkozás', method : 'Adatküldés módja', encoding : 'Kódolás' }, // Select Field Dialog. select : { title : 'Legördülő lista tulajdonságai', selectInfo : 'Alaptulajdonságok', opAvail : 'Elérhető opciók', value : 'Érték', size : 'Méret', lines : 'sor', chkMulti : 'több sor is kiválasztható', opText : 'Szöveg', opValue : 'Érték', btnAdd : 'Hozzáad', btnModify : 'Módosít', btnUp : 'Fel', btnDown : 'Le', btnSetValue : 'Legyen az alapértelmezett érték', btnDelete : 'Töröl' }, // Textarea Dialog. textarea : { title : 'Szövegterület tulajdonságai', cols : 'Karakterek száma egy sorban', rows : 'Sorok száma' }, // Text Field Dialog. textfield : { title : 'Szövegmező tulajdonságai', name : 'Név', value : 'Érték', charWidth : 'Megjelenített karakterek száma', maxChars : 'Maximális karakterszám', type : 'Típus', typeText : 'Szöveg', typePass : 'Jelszó' }, // Hidden Field Dialog. hidden : { title : 'Rejtett mező tulajdonságai', name : 'Név', value : 'Érték' }, // Image Dialog. image : { title : 'Kép tulajdonságai', titleButton : 'Képgomb tulajdonságai', menu : 'Kép tulajdonságai', infoTab : 'Alaptulajdonságok', btnUpload : 'Küldés a szerverre', upload : 'Feltöltés', alt : 'Buborék szöveg', lockRatio : 'Arány megtartása', resetSize : 'Eredeti méret', border : 'Keret', hSpace : 'Vízsz. táv', vSpace : 'Függ. táv', alertUrl : 'Töltse ki a kép webcímét', linkTab : 'Hivatkozás', button2Img : 'A kiválasztott képgombból sima képet szeretne csinálni?', img2Button : 'A kiválasztott képből képgombot szeretne csinálni?', urlMissing : 'Hiányzik a kép URL-je', validateBorder : 'A keret méretének egész számot kell beírni!', validateHSpace : 'Vízszintes távolságnak egész számot kell beírni!', validateVSpace : 'Függőleges távolságnak egész számot kell beírni!' }, // Flash Dialog flash : { properties : 'Flash tulajdonságai', propertiesTab : 'Tulajdonságok', title : 'Flash tulajdonságai', chkPlay : 'Automata lejátszás', chkLoop : 'Folyamatosan', chkMenu : 'Flash menü engedélyezése', chkFull : 'Teljes képernyő engedélyezése', scale : 'Méretezés', scaleAll : 'Mindent mutat', scaleNoBorder : 'Keret nélkül', scaleFit : 'Teljes kitöltés', access : 'Szkript hozzáférés', accessAlways : 'Mindig', accessSameDomain: 'Azonos domainről', accessNever : 'Soha', alignAbsBottom : 'Legaljára', alignAbsMiddle : 'Közepére', alignBaseline : 'Alapvonalhoz', alignTextTop : 'Szöveg tetejére', quality : 'Minőség', qualityBest : 'Legjobb', qualityHigh : 'Jó', qualityAutoHigh : 'Automata jó', qualityMedium : 'Közepes', qualityAutoLow : 'Automata gyenge', qualityLow : 'Gyenge', windowModeWindow: 'Window', windowModeOpaque: 'Opaque', windowModeTransparent : 'Transparent', windowMode : 'Ablak mód', flashvars : 'Flash változók', bgcolor : 'Háttérszín', hSpace : 'Vízsz. táv', vSpace : 'Függ. táv', validateSrc : 'Adja meg a hivatkozás webcímét', validateHSpace : 'A vízszintes távolsűág mezőbe csak számokat írhat.', validateVSpace : 'A függőleges távolsűág mezőbe csak számokat írhat.' }, // Speller Pages Dialog spellCheck : { toolbar : 'Helyesírás-ellenőrzés', title : 'Helyesírás ellenörző', notAvailable : 'Sajnálom, de a szolgáltatás jelenleg nem elérhető.', errorLoading : 'Hiba a szolgáltatás host betöltése közben: %s.', notInDic : 'Nincs a szótárban', changeTo : 'Módosítás', btnIgnore : 'Kihagyja', btnIgnoreAll : 'Mindet kihagyja', btnReplace : 'Csere', btnReplaceAll : 'Összes cseréje', btnUndo : 'Visszavonás', noSuggestions : 'Nincs javaslat', progress : 'Helyesírás-ellenőrzés folyamatban...', noMispell : 'Helyesírás-ellenőrzés kész: Nem találtam hibát', noChanges : 'Helyesírás-ellenőrzés kész: Nincs változtatott szó', oneChange : 'Helyesírás-ellenőrzés kész: Egy szó cserélve', manyChanges : 'Helyesírás-ellenőrzés kész: %1 szó cserélve', ieSpellDownload : 'A helyesírás-ellenőrző nincs telepítve. Szeretné letölteni most?' }, smiley : { toolbar : 'Hangulatjelek', title : 'Hangulatjel beszúrása', options : 'Hangulatjel opciók' }, elementsPath : { eleLabel : 'Elem utak', eleTitle : '%1 elem' }, numberedlist : 'Számozás', bulletedlist : 'Felsorolás', indent : 'Behúzás növelése', outdent : 'Behúzás csökkentése', justify : { left : 'Balra', center : 'Középre', right : 'Jobbra', block : 'Sorkizárt' }, blockquote : 'Idézet blokk', clipboard : { title : 'Beillesztés', cutError : 'A böngésző biztonsági beállításai nem engedélyezik a szerkesztőnek, hogy végrehajtsa a kivágás műveletet. Használja az alábbi billentyűkombinációt (Ctrl/Cmd+X).', copyError : 'A böngésző biztonsági beállításai nem engedélyezik a szerkesztőnek, hogy végrehajtsa a másolás műveletet. Használja az alábbi billentyűkombinációt (Ctrl/Cmd+X).', pasteMsg : 'Másolja be az alábbi mezőbe a <STRONG>Ctrl/Cmd+V</STRONG> billentyűk lenyomásával, majd nyomjon <STRONG>Rendben</STRONG>-t.', securityMsg : 'A böngésző biztonsági beállításai miatt a szerkesztő nem képes hozzáférni a vágólap adataihoz. Illeszd be újra ebben az ablakban.', pasteArea : 'Beszúrás mező' }, pastefromword : { confirmCleanup : 'Úgy tűnik a beillesztett szöveget Word-ből másolt át. Meg szeretné tisztítani a szöveget? (ajánlott)', toolbar : 'Beillesztés Word-ből', title : 'Beillesztés Word-ből', error : 'Egy belső hiba miatt nem sikerült megtisztítani a szöveget' }, pasteText : { button : 'Beillesztés formázatlan szövegként', title : 'Beillesztés formázatlan szövegként' }, templates : { button : 'Sablonok', title : 'Elérhető sablonok', options : 'Sablon opciók', insertOption : 'Kicseréli a jelenlegi tartalmat', selectPromptMsg : 'Válassza ki melyik sablon nyíljon meg a szerkesztőben<br>(a jelenlegi tartalom elveszik):', emptyListMsg : '(Nincs sablon megadva)' }, showBlocks : 'Blokkok megjelenítése', stylesCombo : { label : 'Stílus', panelTitle : 'Formázási stílusok', panelTitle1 : 'Blokk stílusok', panelTitle2 : 'Inline stílusok', panelTitle3 : 'Objektum stílusok' }, format : { label : 'Formátum', panelTitle : 'Formátum', tag_p : 'Normál', tag_pre : 'Formázott', tag_address : 'Címsor', tag_h1 : 'Fejléc 1', tag_h2 : 'Fejléc 2', tag_h3 : 'Fejléc 3', tag_h4 : 'Fejléc 4', tag_h5 : 'Fejléc 5', tag_h6 : 'Fejléc 6', tag_div : 'Bekezdés (DIV)' }, div : { title : 'DIV tároló létrehozása', toolbar : 'DIV tároló létrehozása', cssClassInputLabel : 'Stíluslap osztály', styleSelectLabel : 'Stílus', IdInputLabel : 'Azonosító', languageCodeInputLabel : ' Nyelv kódja', inlineStyleInputLabel : 'Inline stílus', advisoryTitleInputLabel : 'Tipp szöveg', langDirLabel : 'Nyelvi irány', langDirLTRLabel : 'Balról jobbra (LTR)', langDirRTLLabel : 'Jobbról balra (RTL)', edit : 'DIV szerkesztése', remove : 'DIV eltávolítása' }, iframe : { title : 'IFrame Tulajdonságok', toolbar : 'IFrame', noUrl : 'Kérem írja be a iframe URL-t', scrolling : 'Gördítősáv bekapcsolása', border : 'Legyen keret' }, font : { label : 'Betűtípus', voiceLabel : 'Betűtípus', panelTitle : 'Betűtípus' }, fontSize : { label : 'Méret', voiceLabel : 'Betűméret', panelTitle : 'Méret' }, colorButton : { textColorTitle : 'Betűszín', bgColorTitle : 'Háttérszín', panelTitle : 'Színek', auto : 'Automatikus', more : 'További színek...' }, colors : { '000' : 'Fekete', '800000' : 'Bordó', '8B4513' : 'Barna', '2F4F4F' : 'Sötét türkiz', '008080' : 'Türkiz', '000080' : 'Király kék', '4B0082' : 'Indigó kék', '696969' : 'Szürke', 'B22222' : 'Tégla vörös', 'A52A2A' : 'Vörös', 'DAA520' : 'Arany sárga', '006400' : 'Sötét zöld', '40E0D0' : 'Türkiz', '0000CD' : 'Kék', '800080' : 'Lila', '808080' : 'Szürke', 'F00' : 'Piros', 'FF8C00' : 'Sötét narancs', 'FFD700' : 'Arany', '008000' : 'Zöld', '0FF' : 'Türkiz', '00F' : 'Kék', 'EE82EE' : 'Rózsaszín', 'A9A9A9' : 'Sötét szürke', 'FFA07A' : 'Lazac', 'FFA500' : 'Narancs', 'FFFF00' : 'Citromsárga', '00FF00' : 'Neon zöld', 'AFEEEE' : 'Világos türkiz', 'ADD8E6' : 'Világos kék', 'DDA0DD' : 'Világos lila', 'D3D3D3' : 'Világos szürke', 'FFF0F5' : 'Lavender Blush', 'FAEBD7' : 'Törtfehér', 'FFFFE0' : 'Világos sárga', 'F0FFF0' : 'Menta', 'F0FFFF' : 'Azúr kék', 'F0F8FF' : 'Halvány kék', 'E6E6FA' : 'Lavender', 'FFF' : 'Fehér' }, scayt : { title : 'Helyesírás ellenőrzés gépelés közben', opera_title : 'Az Opera nem támogatja', enable : 'SCAYT engedélyezése', disable : 'SCAYT letiltása', about : 'SCAYT névjegy', toggle : 'SCAYT kapcsolása', options : 'Beállítások', langs : 'Nyelvek', moreSuggestions : 'További javaslatok', ignore : 'Kihagy', ignoreAll : 'Összes kihagyása', addWord : 'Szó hozzáadása', emptyDic : 'A szótár nevét meg kell adni.', optionsTab : 'Beállítások', allCaps : 'Nagybetűs szavak kihagyása', ignoreDomainNames : 'Domain nevek kihagyása', mixedCase : 'Kis és nagybetűt is tartalmazó szavak kihagyása', mixedWithDigits : 'Számokat tartalmazó szavak kihagyása', languagesTab : 'Nyelvek', dictionariesTab : 'Szótár', dic_field_name : 'Szótár neve', dic_create : 'Létrehozás', dic_restore : 'Visszaállítás', dic_delete : 'Törlés', dic_rename : 'Átnevezés', dic_info : 'Kezdetben a felhasználói szótár böngésző sütiben tárolódik. Azonban a sütik maximális mérete korlátozott. Amikora a szótár akkora lesz, hogy már sütiben nem lehet tárolni, akkor a szótárat tárolhatja a szerveren is. Ehhez egy nevet kell megadni a szótárhoz. Amennyiben már van szerveren tárolt szótára, adja meg a nevét és kattintson a visszaállítás gombra.', aboutTab : 'Névjegy' }, about : { title : 'CKEditor névjegy', dlgTitle : 'CKEditor névjegy', help : 'Itt találsz segítséget: $1', userGuide : 'CKEditor Felhasználói útmutató', moreInfo : 'Licenszelési információkért kérjük látogassa meg weboldalunkat:', copy : 'Copyright &copy; $1. Minden jog fenntartva.' }, maximize : 'Teljes méret', minimize : 'Kis méret', fakeobjects : { anchor : 'Horgony', flash : 'Flash animáció', iframe : 'IFrame', hiddenfield : 'Rejtett mezõ', unknown : 'Ismeretlen objektum' }, resize : 'Húzza az átméretezéshez', colordialog : { title : 'Válasszon színt', options : 'Szín opciók', highlight : 'Nagyítás', selected : 'Kiválasztott', clear : 'Ürítés' }, toolbarCollapse : 'Eszköztár összecsukása', toolbarExpand : 'Eszköztár szétnyitása', toolbarGroups : { document : 'Dokumentum', clipboard : 'Vágólap/Visszavonás', editing : 'Szerkesztés', forms : 'Űrlapok', basicstyles : 'Alapstílusok', paragraph : 'Bekezdés', links : 'Hivatkozások', insert : 'Beszúrás', styles : 'Stílusok', colors : 'Színek', tools : 'Eszközök' }, bidi : { ltr : 'Szöveg iránya balról jobbra', rtl : 'Szöveg iránya jobbról balra' }, docprops : { label : 'Dokumentum tulajdonságai', title : 'Dokumentum tulajdonságai', design : 'Design', meta : 'Meta adatok', chooseColor : 'Válasszon', other : '<más>', docTitle : 'Oldalcím', charset : 'Karakterkódolás', charsetOther : 'Más karakterkódolás', charsetASCII : 'ASCII', charsetCE : 'Közép-Európai', charsetCT : 'Kínai Tradicionális (Big5)', charsetCR : 'Cyrill', charsetGR : 'Görög', charsetJP : 'Japán', charsetKR : 'Koreai', charsetTR : 'Török', charsetUN : 'Unicode (UTF-8)', charsetWE : 'Nyugat-Európai', docType : 'Dokumentum típus fejléc', docTypeOther : 'Más dokumentum típus fejléc', xhtmlDec : 'XHTML deklarációk beillesztése', bgColor : 'Háttérszín', bgImage : 'Háttérkép cím', bgFixed : 'Nem gördíthető háttér', txtColor : 'Betűszín', margin : 'Oldal margók', marginTop : 'Felső', marginLeft : 'Bal', marginRight : 'Jobb', marginBottom : 'Alsó', metaKeywords : 'Dokumentum keresőszavak (vesszővel elválasztva)', metaDescription : 'Dokumentum leírás', metaAuthor : 'Szerző', metaCopyright : 'Szerzői jog', previewHtml : '<p>Ez itt egy <strong>példa</strong>. A <a href="javascript:void(0)">CKEditor</a>-t használod.</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 * 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, press ALT 0 for help.', // 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 &copy; $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 Defines the {@link CKEDITOR.lang} object for the English * language. This is the base file for all translations. */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang['en'] = { /** * 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, press ALT 0 for help.', // 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', 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', preview : 'Preview', 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', target : 'Target', targetNew : 'New Window (_blank)', targetTop : 'Topmost Window (_top)', targetSelf : 'Same Window (_self)', targetParent : 'Parent Window (_parent)', langDirLTR : 'Left to Right (LTR)', langDirRTL : 'Right to Left (RTL)', styles : 'Style', cssClasses : 'Stylesheet Classes', width : 'Width', height : 'Height', align : 'Alignment', alignLeft : 'Left', alignRight : 'Right', alignCenter : 'Center', alignTop : 'Top', alignMiddle : 'Middle', alignBottom : 'Bottom', invalidHeight : 'Height must be a number.', invalidWidth : 'Width must be a number.', 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).', invalidHtmlLength : 'Value specified for the "%1" field must be a positive number with or without a valid HTML measurement unit (px or %).', invalidInlineStyle : 'Value specified for the inline style must consist of one or more tuples with the format of "name : value", separated by semi-colons.', 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).', // Put the voice-only part of the label in the span. unavailable : '%1<span class="cke_accessibility">, unavailable</span>' }, contextmenu : { options : 'Context Menu Options' }, // Special char dialog. specialChar : { toolbar : 'Insert Special Character', title : 'Select Special Character', options : 'Special Character Options' }, // 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', 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', 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' }, // List style dialog list: { numberedTitle : 'Numbered List Properties', bulletedTitle : 'Bulleted List Properties', type : 'Type', start : 'Start', validateStartNumber :'List start number must be a whole number.', circle : 'Circle', disc : 'Disc', square : 'Square', none : 'None', notset : '<not set>', armenian : 'Armenian numbering', georgian : 'Georgian numbering (an, ban, gan, etc.)', lowerRoman : 'Lower Roman (i, ii, iii, iv, v, etc.)', upperRoman : 'Upper Roman (I, II, III, IV, V, etc.)', lowerAlpha : 'Lower Alpha (a, b, c, d, e, etc.)', upperAlpha : 'Upper Alpha (A, B, C, D, E, etc.)', lowerGreek : 'Lower Greek (alpha, beta, gamma, etc.)', decimal : 'Decimal (1, 2, 3, etc.)', decimalLeadingZero : 'Decimal leading zero (01, 02, 03, etc.)' }, // 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', 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', 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 positive number.', invalidCellPadding : 'Cell padding must be a positive 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' }, 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.', validateBorder : 'Border must be a whole number.', validateHSpace : 'HSpace must be a whole number.', validateVSpace : 'VSpace must be a whole number.' }, // 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', qualityHigh : 'High', qualityAutoHigh : 'Auto High', qualityMedium : 'Medium', qualityAutoLow : 'Auto Low', qualityLow : 'Low', windowModeWindow: 'Window', windowModeOpaque: 'Opaque', windowModeTransparent : 'Transparent', windowMode : 'Window mode', flashvars : 'Variables for Flash', bgcolor : 'Background color', 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' }, elementsPath : { eleLabel : 'Elements path', eleTitle : '%1 element' }, numberedlist : 'Insert/Remove Numbered List', bulletedlist : 'Insert/Remove Bulleted List', indent : 'Increase Indent', outdent : 'Decrease Indent', justify : { left : 'Align Left', center : 'Center', 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' }, pastefromword : { confirmCleanup : 'The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?', toolbar : 'Paste from Word', title : 'Paste from Word', error : 'It was not possible to clean up the pasted data due to an internal error' }, pasteText : { button : 'Paste as plain text', title : 'Paste as Plain Text' }, templates : { button : 'Templates', title : 'Content Templates', options : 'Template Options', 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', 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', toolbar : 'Create Div Container', cssClassInputLabel : 'Stylesheet Classes', styleSelectLabel : 'Style', IdInputLabel : 'Id', languageCodeInputLabel : ' Language Code', inlineStyleInputLabel : 'Inline Style', advisoryTitleInputLabel : 'Advisory Title', langDirLabel : 'Language Direction', langDirLTRLabel : 'Left to Right (LTR)', langDirRTLLabel : 'Right to Left (RTL)', edit : 'Edit Div', remove : 'Remove Div' }, iframe : { title : 'IFrame Properties', toolbar : 'IFrame', noUrl : 'Please type the iframe URL', scrolling : 'Enable scrollbars', border : 'Show frame border' }, font : { label : 'Font', voiceLabel : 'Font', panelTitle : 'Font Name' }, fontSize : { label : 'Size', voiceLabel : 'Font Size', panelTitle : 'Font Size' }, colorButton : { textColorTitle : 'Text Color', bgColorTitle : 'Background Color', panelTitle : 'Colors', auto : 'Automatic', more : 'More Colors...' }, colors : { '000' : 'Black', '800000' : 'Maroon', '8B4513' : 'Saddle Brown', '2F4F4F' : 'Dark Slate Gray', '008080' : 'Teal', '000080' : 'Navy', '4B0082' : 'Indigo', '696969' : 'Dark Gray', 'B22222' : 'Fire Brick', 'A52A2A' : 'Brown', 'DAA520' : 'Golden Rod', '006400' : 'Dark Green', '40E0D0' : 'Turquoise', '0000CD' : 'Medium Blue', '800080' : 'Purple', '808080' : 'Gray', 'F00' : 'Red', 'FF8C00' : 'Dark Orange', 'FFD700' : 'Gold', '008000' : 'Green', '0FF' : 'Cyan', '00F' : 'Blue', 'EE82EE' : 'Violet', 'A9A9A9' : 'Dim Gray', 'FFA07A' : 'Light Salmon', 'FFA500' : 'Orange', 'FFFF00' : 'Yellow', '00FF00' : 'Lime', 'AFEEEE' : 'Pale Turquoise', 'ADD8E6' : 'Light Blue', 'DDA0DD' : 'Plum', 'D3D3D3' : 'Light Grey', 'FFF0F5' : 'Lavender Blush', 'FAEBD7' : 'Antique White', 'FFFFE0' : 'Light Yellow', 'F0FFF0' : 'Honeydew', 'F0FFFF' : 'Azure', 'F0F8FF' : 'Alice Blue', 'E6E6FA' : 'Lavender', 'FFF' : 'White' }, scayt : { title : 'Spell Check As You Type', opera_title : 'Not supported by Opera', enable : 'Enable SCAYT', disable : 'Disable SCAYT', about : 'About SCAYT', toggle : 'Toggle SCAYT', options : 'Options', langs : 'Languages', moreSuggestions : 'More suggestions', ignore : 'Ignore', ignoreAll : 'Ignore All', addWord : 'Add Word', emptyDic : 'Dictionary name should not be empty.', optionsTab : 'Options', allCaps : 'Ignore All-Caps Words', ignoreDomainNames : 'Ignore Domain Names', mixedCase : 'Ignore Words with Mixed Case', mixedWithDigits : 'Ignore Words with Numbers', languagesTab : 'Languages', dictionariesTab : 'Dictionaries', dic_field_name : 'Dictionary name', dic_create : 'Create', dic_restore : 'Restore', dic_delete : 'Delete', dic_rename : 'Rename', 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.', aboutTab : 'About' }, about : { title : 'About CKEditor', dlgTitle : 'About CKEditor', help : 'Check $1 for help.', userGuide : 'CKEditor User\'s Guide', moreInfo : 'For licensing information please visit our web site:', copy : 'Copyright &copy; $1. All rights reserved.' }, maximize : 'Maximize', minimize : 'Minimize', fakeobjects : { anchor : 'Anchor', flash : 'Flash Animation', iframe : 'IFrame', hiddenfield : 'Hidden Field', unknown : 'Unknown Object' }, resize : 'Drag to resize', colordialog : { title : 'Select color', options : 'Color Options', highlight : 'Highlight', selected : 'Selected Color', clear : 'Clear' }, toolbarCollapse : 'Collapse Toolbar', toolbarExpand : 'Expand Toolbar', toolbarGroups : { document : 'Document', clipboard : 'Clipboard/Undo', editing : 'Editing', forms : 'Forms', basicstyles : 'Basic Styles', paragraph : 'Paragraph', links : 'Links', insert : 'Insert', styles : 'Styles', colors : 'Colors', tools : 'Tools' }, bidi : { ltr : 'Text direction from left to right', rtl : 'Text direction from right to left' }, docprops : { label : 'Document Properties', title : 'Document Properties', design : 'Design', meta : 'Meta Tags', chooseColor : 'Choose', other : 'Other...', docTitle : 'Page Title', charset : 'Character Set Encoding', charsetOther : 'Other Character Set Encoding', charsetASCII : 'ASCII', charsetCE : 'Central European', charsetCT : 'Chinese Traditional (Big5)', charsetCR : 'Cyrillic', charsetGR : 'Greek', charsetJP : 'Japanese', charsetKR : 'Korean', charsetTR : 'Turkish', charsetUN : 'Unicode (UTF-8)', charsetWE : 'Western European', docType : 'Document Type Heading', docTypeOther : 'Other Document Type Heading', xhtmlDec : 'Include XHTML Declarations', bgColor : 'Background Color', bgImage : 'Background Image URL', bgFixed : 'Non-scrolling (Fixed) Background', txtColor : 'Text Color', margin : 'Page Margins', marginTop : 'Top', marginLeft : 'Left', marginRight : 'Right', marginBottom : 'Bottom', metaKeywords : 'Document Indexing Keywords (comma separated)', metaDescription : 'Document Description', metaAuthor : 'Author', metaCopyright : 'Copyright', previewHtml : '<p>This is some <strong>sample text</strong>. You are using <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.scriptLoader} object, used to load scripts * asynchronously. */ /** * Load scripts asynchronously. * @namespace * @example */ CKEDITOR.scriptLoader = (function() { var uniqueScripts = {}, waitingList = {}; return /** @lends CKEDITOR.scriptLoader */ { /** * Loads one or more external script checking if not already loaded * previously by this function. * @param {String|Array} scriptUrl One or more URLs pointing to the * scripts to be loaded. * @param {Function} [callback] A function to be called when the script * is loaded and executed. If a string is passed to "scriptUrl", a * boolean parameter is passed to the callback, indicating the * success of the load. If an array is passed instead, two array * parameters are passed to the callback; the first contains the * URLs that have been properly loaded, and the second the failed * ones. * @param {Object} [scope] The scope ("this" reference) to be used for * the callback call. Default to {@link CKEDITOR}. * @param {Boolean} [showBusy] Changes the cursor of the document while + * the script is loaded. * @example * CKEDITOR.scriptLoader.load( '/myscript.js' ); * @example * CKEDITOR.scriptLoader.load( '/myscript.js', function( success ) * { * // Alerts "true" if the script has been properly loaded. * // HTTP error 404 should return "false". * alert( success ); * }); * @example * CKEDITOR.scriptLoader.load( [ '/myscript1.js', '/myscript2.js' ], function( completed, failed ) * { * alert( 'Number of scripts loaded: ' + completed.length ); * alert( 'Number of failures: ' + failed.length ); * }); */ load : function( scriptUrl, callback, scope, showBusy ) { var isString = ( typeof scriptUrl == 'string' ); if ( isString ) scriptUrl = [ scriptUrl ]; if ( !scope ) scope = CKEDITOR; var scriptCount = scriptUrl.length, completed = [], failed = []; var doCallback = function( success ) { if ( callback ) { if ( isString ) callback.call( scope, success ); else callback.call( scope, completed, failed ); } }; if ( scriptCount === 0 ) { doCallback( true ); return; } var checkLoaded = function( url, success ) { ( success ? completed : failed ).push( url ); if ( --scriptCount <= 0 ) { showBusy && CKEDITOR.document.getDocumentElement().removeStyle( 'cursor' ); doCallback( success ); } }; var onLoad = function( url, success ) { // Mark this script as loaded. uniqueScripts[ url ] = 1; // Get the list of callback checks waiting for this file. var waitingInfo = waitingList[ url ]; delete waitingList[ url ]; // Check all callbacks waiting for this file. for ( var i = 0 ; i < waitingInfo.length ; i++ ) waitingInfo[ i ]( url, success ); }; var loadScript = function( url ) { if ( uniqueScripts[ url ] ) { checkLoaded( url, true ); return; } var waitingInfo = waitingList[ url ] || ( waitingList[ url ] = [] ); waitingInfo.push( checkLoaded ); // Load it only for the first request. if ( waitingInfo.length > 1 ) return; // Create the <script> element. var script = new CKEDITOR.dom.element( 'script' ); script.setAttributes( { type : 'text/javascript', src : url } ); if ( callback ) { if ( CKEDITOR.env.ie ) { // FIXME: For IE, we are not able to return false on error (like 404). /** @ignore */ script.$.onreadystatechange = function () { if ( script.$.readyState == 'loaded' || script.$.readyState == 'complete' ) { script.$.onreadystatechange = null; onLoad( url, true ); } }; } else { /** @ignore */ script.$.onload = function() { // Some browsers, such as Safari, may call the onLoad function // immediately. Which will break the loading sequence. (#3661) setTimeout( function() { onLoad( url, true ); }, 0 ); }; // FIXME: Opera and Safari will not fire onerror. /** @ignore */ script.$.onerror = function() { onLoad( url, false ); }; } } // Append it to <head>. script.appendTo( CKEDITOR.document.getHead() ); CKEDITOR.fire( 'download', url ); // @Packager.RemoveLine }; showBusy && CKEDITOR.document.getDocumentElement().setStyle( 'cursor', 'wait' ); for ( var i = 0 ; i < scriptCount ; i++ ) { loadScript( scriptUrl[ i ] ); } } }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Contains the second part of the {@link CKEDITOR} object * definition, which defines the basic editor features to be available in * the root ckeditor_basic.js file. */ if ( CKEDITOR.status == 'unloaded' ) { (function() { CKEDITOR.event.implementOn( CKEDITOR ); /** * Forces the full CKEditor core code, in the case only the basic code has been * loaded (ckeditor_basic.js). This method self-destroys (becomes undefined) in * the first call or as soon as the full code is available. * @example * // Check if the full core code has been loaded and load it. * if ( CKEDITOR.loadFullCore ) * <b>CKEDITOR.loadFullCore()</b>; */ CKEDITOR.loadFullCore = function() { // If not the basic code is not ready it, just mark it to be loaded. if ( CKEDITOR.status != 'basic_ready' ) { CKEDITOR.loadFullCore._load = 1; return; } // Destroy this function. delete CKEDITOR.loadFullCore; // Append the script to the head. var script = document.createElement( 'script' ); script.type = 'text/javascript'; script.src = CKEDITOR.basePath + 'ckeditor.js'; document.getElementsByTagName( 'head' )[0].appendChild( script ); }; /** * The time to wait (in seconds) to load the full editor code after the * page load, if the "ckeditor_basic" file is used. If set to zero, the * editor is loaded on demand, as soon as an instance is created. * * This value must be set on the page before the page load completion. * @type Number * @default 0 (zero) * @example * // Loads the full source after five seconds. * CKEDITOR.loadFullCoreTimeout = 5; */ CKEDITOR.loadFullCoreTimeout = 0; /** * The class name used to identify &lt;textarea&gt; elements to be replace * by CKEditor instances. * @type String * @default 'ckeditor' * @example * <b>CKEDITOR.replaceClass</b> = 'rich_editor'; */ CKEDITOR.replaceClass = 'ckeditor'; /** * Enables the replacement of all textareas with class name matching * {@link CKEDITOR.replaceClass}. * @type Boolean * @default true * @example * // Disable the auto-replace feature. * <b>CKEDITOR.replaceByClassEnabled</b> = false; */ CKEDITOR.replaceByClassEnabled = 1; var createInstance = function( elementOrIdOrName, config, creationFunction, data ) { if ( CKEDITOR.env.isCompatible ) { // Load the full core. if ( CKEDITOR.loadFullCore ) CKEDITOR.loadFullCore(); var editor = creationFunction( elementOrIdOrName, config, data ); CKEDITOR.add( editor ); return editor; } return null; }; /** * Replaces a &lt;textarea&gt; or a DOM element (DIV) with a CKEditor * instance. For textareas, the initial value in the editor will be the * textarea value. For DOM elements, their innerHTML will be used * instead. We recommend using TEXTAREA and DIV elements only. * @param {Object|String} elementOrIdOrName The DOM element (textarea), its * ID or name. * @param {Object} [config] The specific configurations to apply to this * editor instance. Configurations set here will override global CKEditor * settings. * @returns {CKEDITOR.editor} The editor instance created. * @example * &lt;textarea id="myfield" name="myfield"&gt;&lt:/textarea&gt; * ... * <b>CKEDITOR.replace( 'myfield' )</b>; * @example * var textarea = document.body.appendChild( document.createElement( 'textarea' ) ); * <b>CKEDITOR.replace( textarea )</b>; */ CKEDITOR.replace = function( elementOrIdOrName, config ) { return createInstance( elementOrIdOrName, config, CKEDITOR.editor.replace ); }; /** * Creates a new editor instance inside a specific DOM element. * @param {Object|String} elementOrId The DOM element or its ID. * @param {Object} [config] The specific configurations to apply to this * editor instance. Configurations set here will override global CKEditor * settings. * @param {String} [data] Since 3.3. Initial value for the instance. * @returns {CKEDITOR.editor} The editor instance created. * @example * &lt;div id="editorSpace"&gt;&lt:/div&gt; * ... * <b>CKEDITOR.appendTo( 'editorSpace' )</b>; */ CKEDITOR.appendTo = function( elementOrId, config, data ) { return createInstance( elementOrId, config, CKEDITOR.editor.appendTo, data ); }; // Documented at ckeditor.js. CKEDITOR.add = function( editor ) { // For now, just put the editor in the pending list. It will be // processed as soon as the full code gets loaded. var pending = this._.pending || ( this._.pending = [] ); pending.push( editor ); }; /** * Replace all &lt;textarea&gt; elements available in the document with * editor instances. * @example * // Replace all &lt;textarea&gt; elements in the page. * CKEDITOR.replaceAll(); * @example * // Replace all &lt;textarea class="myClassName"&gt; elements in the page. * CKEDITOR.replaceAll( 'myClassName' ); * @example * // Selectively replace &lt;textarea&gt; elements, based on custom assertions. * CKEDITOR.replaceAll( function( textarea, config ) * { * // Custom code to evaluate the replace, returning false * // if it must not be done. * // It also passes the "config" parameter, so the * // developer can customize the instance. * } ); */ CKEDITOR.replaceAll = function() { var textareas = document.getElementsByTagName( 'textarea' ); for ( var i = 0 ; i < textareas.length ; i++ ) { var config = null, textarea = textareas[i]; // The "name" and/or "id" attribute must exist. if ( !textarea.name && !textarea.id ) continue; if ( typeof arguments[0] == 'string' ) { // The textarea class name could be passed as the function // parameter. var classRegex = new RegExp( '(?:^|\\s)' + arguments[0] + '(?:$|\\s)' ); if ( !classRegex.test( textarea.className ) ) continue; } else if ( typeof arguments[0] == 'function' ) { // An assertion function could be passed as the function parameter. // It must explicitly return "false" to ignore a specific <textarea>. config = {}; if ( arguments[0]( textarea, config ) === false ) continue; } this.replace( textarea, config ); } }; (function() { var onload = function() { var loadFullCore = CKEDITOR.loadFullCore, loadFullCoreTimeout = CKEDITOR.loadFullCoreTimeout; // Replace all textareas with the default class name. if ( CKEDITOR.replaceByClassEnabled ) CKEDITOR.replaceAll( CKEDITOR.replaceClass ); CKEDITOR.status = 'basic_ready'; if ( loadFullCore && loadFullCore._load ) loadFullCore(); else if ( loadFullCoreTimeout ) { setTimeout( function() { if ( CKEDITOR.loadFullCore ) CKEDITOR.loadFullCore(); } , loadFullCoreTimeout * 1000 ); } }; if ( window.addEventListener ) window.addEventListener( 'load', onload, false ); else if ( window.attachEvent ) window.attachEvent( 'onload', onload ); })(); CKEDITOR.status = 'basic_loaded'; })(); }
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.tools} object, which contains * utility functions. */ (function() { var functions = []; CKEDITOR.on( 'reset', function() { functions = []; }); /** * Utility functions. * @namespace * @example */ CKEDITOR.tools = { /** * Compare the elements of two arrays. * @param {Array} arrayA An array to be compared. * @param {Array} arrayB The other array to be compared. * @returns {Boolean} "true" is the arrays have the same lenght and * their elements match. * @example * var a = [ 1, 'a', 3 ]; * var b = [ 1, 3, 'a' ]; * var c = [ 1, 'a', 3 ]; * var d = [ 1, 'a', 3, 4 ]; * * alert( CKEDITOR.tools.arrayCompare( a, b ) ); // false * alert( CKEDITOR.tools.arrayCompare( a, c ) ); // true * alert( CKEDITOR.tools.arrayCompare( a, d ) ); // false */ arrayCompare : function( arrayA, arrayB ) { if ( !arrayA && !arrayB ) return true; if ( !arrayA || !arrayB || arrayA.length != arrayB.length ) return false; for ( var i = 0 ; i < arrayA.length ; i++ ) { if ( arrayA[ i ] != arrayB[ i ] ) return false; } return true; }, /** * Creates a deep copy of an object. * Attention: there is no support for recursive references. * @param {Object} object The object to be cloned. * @returns {Object} The object clone. * @example * var obj = * { * name : 'John', * cars : * { * Mercedes : { color : 'blue' }, * Porsche : { color : 'red' } * } * }; * var clone = CKEDITOR.tools.clone( obj ); * clone.name = 'Paul'; * clone.cars.Porsche.color = 'silver'; * alert( obj.name ); // John * alert( clone.name ); // Paul * alert( obj.cars.Porsche.color ); // red * alert( clone.cars.Porsche.color ); // silver */ clone : function( obj ) { var clone; // Array. if ( obj && ( obj instanceof Array ) ) { clone = []; for ( var i = 0 ; i < obj.length ; i++ ) clone[ i ] = this.clone( obj[ i ] ); return clone; } // "Static" types. if ( obj === null || ( typeof( obj ) != 'object' ) || ( obj instanceof String ) || ( obj instanceof Number ) || ( obj instanceof Boolean ) || ( obj instanceof Date ) || ( obj instanceof RegExp) ) { return obj; } // Objects. clone = new obj.constructor(); for ( var propertyName in obj ) { var property = obj[ propertyName ]; clone[ propertyName ] = this.clone( property ); } return clone; }, /** * Turn the first letter of string to upper-case. * @param {String} str */ capitalize: function( str ) { return str.charAt( 0 ).toUpperCase() + str.substring( 1 ).toLowerCase(); }, /** * Copy the properties from one object to another. By default, properties * already present in the target object <strong>are not</strong> overwritten. * @param {Object} target The object to be extended. * @param {Object} source[,souce(n)] The objects from which copy * properties. Any number of objects can be passed to this function. * @param {Boolean} [overwrite] If 'true' is specified it indicates that * properties already present in the target object could be * overwritten by subsequent objects. * @param {Object} [properties] Only properties within the specified names * list will be received from the source object. * @returns {Object} the extended object (target). * @example * // Create the sample object. * var myObject = * { * prop1 : true * }; * * // Extend the above object with two properties. * CKEDITOR.tools.extend( myObject, * { * prop2 : true, * prop3 : true * } ); * * // Alert "prop1", "prop2" and "prop3". * for ( var p in myObject ) * alert( p ); */ extend : function( target ) { var argsLength = arguments.length, overwrite, propertiesList; if ( typeof ( overwrite = arguments[ argsLength - 1 ] ) == 'boolean') argsLength--; else if ( typeof ( overwrite = arguments[ argsLength - 2 ] ) == 'boolean' ) { propertiesList = arguments [ argsLength -1 ]; argsLength-=2; } for ( var i = 1 ; i < argsLength ; i++ ) { var source = arguments[ i ]; for ( var propertyName in source ) { // Only copy existed fields if in overwrite mode. if ( overwrite === true || target[ propertyName ] == undefined ) { // Only copy specified fields if list is provided. if ( !propertiesList || ( propertyName in propertiesList ) ) target[ propertyName ] = source[ propertyName ]; } } } return target; }, /** * Creates an object which is an instance of a class which prototype is a * predefined object. All properties defined in the source object are * automatically inherited by the resulting object, including future * changes to it. * @param {Object} source The source object to be used as the prototype for * the final object. * @returns {Object} The resulting copy. */ prototypedCopy : function( source ) { var copy = function() {}; copy.prototype = source; return new copy(); }, /** * Checks if an object is an Array. * @param {Object} object The object to be checked. * @type Boolean * @returns <i>true</i> if the object is an Array, otherwise <i>false</i>. * @example * alert( CKEDITOR.tools.isArray( [] ) ); // "true" * alert( CKEDITOR.tools.isArray( 'Test' ) ); // "false" */ isArray : function( object ) { return ( !!object && object instanceof Array ); }, /** * Whether the object contains no properties of it's own. * @param object */ isEmpty : function ( object ) { for ( var i in object ) { if ( object.hasOwnProperty( i ) ) return false; } return true; }, /** * Transforms a CSS property name to its relative DOM style name. * @param {String} cssName The CSS property name. * @returns {String} The transformed name. * @example * alert( CKEDITOR.tools.cssStyleToDomStyle( 'background-color' ) ); // "backgroundColor" * alert( CKEDITOR.tools.cssStyleToDomStyle( 'float' ) ); // "cssFloat" */ cssStyleToDomStyle : ( function() { var test = document.createElement( 'div' ).style; var cssFloat = ( typeof test.cssFloat != 'undefined' ) ? 'cssFloat' : ( typeof test.styleFloat != 'undefined' ) ? 'styleFloat' : 'float'; return function( cssName ) { if ( cssName == 'float' ) return cssFloat; else { return cssName.replace( /-./g, function( match ) { return match.substr( 1 ).toUpperCase(); }); } }; } )(), /** * Build the HTML snippet of a set of &lt;style>/&lt;link>. * @param css {String|Array} Each of which are url (absolute) of a CSS file or * a trunk of style text. */ buildStyleHtml : function ( css ) { css = [].concat( css ); var item, retval = []; for ( var i = 0; i < css.length; i++ ) { item = css[ i ]; // Is CSS style text ? if ( /@import|[{}]/.test(item) ) retval.push('<style>' + item + '</style>'); else retval.push('<link type="text/css" rel=stylesheet href="' + item + '">'); } return retval.join( '' ); }, /** * Replace special HTML characters in a string with their relative HTML * entity values. * @param {String} text The string to be encoded. * @returns {String} The encode string. * @example * alert( CKEDITOR.tools.htmlEncode( 'A > B & C < D' ) ); // "A &amp;gt; B &amp;amp; C &amp;lt; D" */ htmlEncode : function( text ) { var standard = function( text ) { var span = new CKEDITOR.dom.element( 'span' ); span.setText( text ); return span.getHtml(); }; var fix1 = ( standard( '\n' ).toLowerCase() == '<br>' ) ? function( text ) { // #3874 IE and Safari encode line-break into <br> return standard( text ).replace( /<br>/gi, '\n' ); } : standard; var fix2 = ( standard( '>' ) == '>' ) ? function( text ) { // WebKit does't encode the ">" character, which makes sense, but // it's different than other browsers. return fix1( text ).replace( />/g, '&gt;' ); } : fix1; var fix3 = ( standard( ' ' ) == '&nbsp; ' ) ? function( text ) { // #3785 IE8 changes spaces (>= 2) to &nbsp; return fix2( text ).replace( /&nbsp;/g, ' ' ); } : fix2; this.htmlEncode = fix3; return this.htmlEncode( text ); }, /** * Replace special HTML characters in HTMLElement's attribute with their relative HTML entity values. * @param {String} The attribute's value to be encoded. * @returns {String} The encode value. * @example * element.setAttribute( 'title', '<a " b >' ); * alert( CKEDITOR.tools.htmlEncodeAttr( element.getAttribute( 'title' ) ); // "&gt;a &quot; b &lt;" */ htmlEncodeAttr : function( text ) { return text.replace( /"/g, '&quot;' ).replace( /</g, '&lt;' ).replace( />/g, '&gt;' ); }, /** * Gets a unique number for this CKEDITOR execution session. It returns * progressive numbers starting at 1. * @function * @returns {Number} A unique number. * @example * alert( CKEDITOR.tools.<b>getNextNumber()</b> ); // "1" (e.g.) * alert( CKEDITOR.tools.<b>getNextNumber()</b> ); // "2" */ getNextNumber : (function() { var last = 0; return function() { return ++last; }; })(), /** * Gets a unique ID for CKEditor's interface elements. It returns a * string with the "cke_" prefix and a progressive number. * @function * @returns {String} A unique ID. * @example * alert( CKEDITOR.tools.<b>getNextId()</b> ); // "cke_1" (e.g.) * alert( CKEDITOR.tools.<b>getNextId()</b> ); // "cke_2" */ getNextId : function() { return 'cke_' + this.getNextNumber(); }, /** * Creates a function override. * @param {Function} originalFunction The function to be overridden. * @param {Function} functionBuilder A function that returns the new * function. The original function reference will be passed to this * function. * @returns {Function} The new function. * @example * var example = * { * myFunction : function( name ) * { * alert( 'Name: ' + name ); * } * }; * * example.myFunction = CKEDITOR.tools.override( example.myFunction, function( myFunctionOriginal ) * { * return function( name ) * { * alert( 'Override Name: ' + name ); * myFunctionOriginal.call( this, name ); * }; * }); */ override : function( originalFunction, functionBuilder ) { return functionBuilder( originalFunction ); }, /** * Executes a function after specified delay. * @param {Function} func The function to be executed. * @param {Number} [milliseconds] The amount of time (millisecods) to wait * to fire the function execution. Defaults to zero. * @param {Object} [scope] The object to hold the function execution scope * (the "this" object). By default the "window" object. * @param {Object|Array} [args] A single object, or an array of objects, to * pass as arguments to the function. * @param {Object} [ownerWindow] The window that will be used to set the * timeout. By default the current "window". * @returns {Object} A value that can be used to cancel the function execution. * @example * CKEDITOR.tools.<b>setTimeout( * function() * { * alert( 'Executed after 2 seconds' ); * }, * 2000 )</b>; */ setTimeout : function( func, milliseconds, scope, args, ownerWindow ) { if ( !ownerWindow ) ownerWindow = window; if ( !scope ) scope = ownerWindow; return ownerWindow.setTimeout( function() { if ( args ) func.apply( scope, [].concat( args ) ) ; else func.apply( scope ) ; }, milliseconds || 0 ); }, /** * Remove spaces from the start and the end of a string. The following * characters are removed: space, tab, line break, line feed. * @function * @param {String} str The text from which remove the spaces. * @returns {String} The modified string without the boundary spaces. * @example * alert( CKEDITOR.tools.trim( ' example ' ); // "example" */ trim : (function() { // We are not using \s because we don't want "non-breaking spaces" to be caught. var trimRegex = /(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g; return function( str ) { return str.replace( trimRegex, '' ) ; }; })(), /** * Remove spaces from the start (left) of a string. The following * characters are removed: space, tab, line break, line feed. * @function * @param {String} str The text from which remove the spaces. * @returns {String} The modified string excluding the removed spaces. * @example * alert( CKEDITOR.tools.ltrim( ' example ' ); // "example " */ ltrim : (function() { // We are not using \s because we don't want "non-breaking spaces" to be caught. var trimRegex = /^[ \t\n\r]+/g; return function( str ) { return str.replace( trimRegex, '' ) ; }; })(), /** * Remove spaces from the end (right) of a string. The following * characters are removed: space, tab, line break, line feed. * @function * @param {String} str The text from which remove the spaces. * @returns {String} The modified string excluding the removed spaces. * @example * alert( CKEDITOR.tools.ltrim( ' example ' ); // " example" */ rtrim : (function() { // We are not using \s because we don't want "non-breaking spaces" to be caught. var trimRegex = /[ \t\n\r]+$/g; return function( str ) { return str.replace( trimRegex, '' ) ; }; })(), /** * Returns the index of an element in an array. * @param {Array} array The array to be searched. * @param {Object} entry The element to be found. * @returns {Number} The (zero based) index of the first entry that matches * the entry, or -1 if not found. * @example * var letters = [ 'a', 'b', 0, 'c', false ]; * alert( CKEDITOR.tools.indexOf( letters, '0' ) ); "-1" because 0 !== '0' * alert( CKEDITOR.tools.indexOf( letters, false ) ); "4" because 0 !== false */ indexOf : // #2514: We should try to use Array.indexOf if it does exist. ( Array.prototype.indexOf ) ? function( array, entry ) { return array.indexOf( entry ); } : function( array, entry ) { for ( var i = 0, len = array.length ; i < len ; i++ ) { if ( array[ i ] === entry ) return i; } return -1; }, /** * Creates a function that will always execute in the context of a * specified object. * @param {Function} func The function to be executed. * @param {Object} obj The object to which bind the execution context. * @returns {Function} The function that can be used to execute the * "func" function in the context of "obj". * @example * var obj = { text : 'My Object' }; * * function alertText() * { * alert( this.text ); * } * * var newFunc = <b>CKEDITOR.tools.bind( alertText, obj )</b>; * newFunc(); // Alerts "My Object". */ bind : function( func, obj ) { return function() { return func.apply( obj, arguments ); }; }, /** * Class creation based on prototype inheritance, with supports of the * following features: * <ul> * <li> Static fields </li> * <li> Private fields </li> * <li> Public (prototype) fields </li> * <li> Chainable base class constructor </li> * </ul> * @param {Object} definition The class definition object. * @returns {Function} A class-like JavaScript function. */ createClass : function( definition ) { var $ = definition.$, baseClass = definition.base, privates = definition.privates || definition._, proto = definition.proto, statics = definition.statics; if ( privates ) { var originalConstructor = $; $ = function() { // Create (and get) the private namespace. var _ = this._ || ( this._ = {} ); // Make some magic so "this" will refer to the main // instance when coding private functions. for ( var privateName in privates ) { var priv = privates[ privateName ]; _[ privateName ] = ( typeof priv == 'function' ) ? CKEDITOR.tools.bind( priv, this ) : priv; } originalConstructor.apply( this, arguments ); }; } if ( baseClass ) { $.prototype = this.prototypedCopy( baseClass.prototype ); $.prototype.constructor = $; $.prototype.base = function() { this.base = baseClass.prototype.base; baseClass.apply( this, arguments ); this.base = arguments.callee; }; } if ( proto ) this.extend( $.prototype, proto, true ); if ( statics ) this.extend( $, statics, true ); return $; }, /** * Creates a function reference that can be called later using * CKEDITOR.tools.callFunction. This approach is specially useful to * make DOM attribute function calls to JavaScript defined functions. * @param {Function} fn The function to be executed on call. * @param {Object} [scope] The object to have the context on "fn" execution. * @returns {Number} A unique reference to be used in conjuction with * CKEDITOR.tools.callFunction. * @example * var ref = <b>CKEDITOR.tools.addFunction</b>( * function() * { * alert( 'Hello!'); * }); * CKEDITOR.tools.callFunction( ref ); // Hello! */ addFunction : function( fn, scope ) { return functions.push( function() { return fn.apply( scope || this, arguments ); }) - 1; }, /** * Removes the function reference created with {@see CKEDITOR.tools.addFunction}. * @param {Number} ref The function reference created with * CKEDITOR.tools.addFunction. */ removeFunction : function( ref ) { functions[ ref ] = null; }, /** * Executes a function based on the reference created with * CKEDITOR.tools.addFunction. * @param {Number} ref The function reference created with * CKEDITOR.tools.addFunction. * @param {[Any,[Any,...]} params Any number of parameters to be passed * to the executed function. * @returns {Any} The return value of the function. * @example * var ref = CKEDITOR.tools.addFunction( * function() * { * alert( 'Hello!'); * }); * <b>CKEDITOR.tools.callFunction( ref )</b>; // Hello! */ callFunction : function( ref ) { var fn = functions[ ref ]; return fn && fn.apply( window, Array.prototype.slice.call( arguments, 1 ) ); }, /** * Append the 'px' length unit to the size if it's missing. * @param length */ cssLength : (function() { return function( length ) { return length + ( !length || isNaN( Number( length ) ) ? '' : 'px' ); }; })(), /** * Convert the specified CSS length value to the calculated pixel length inside this page. * <strong>Note:</strong> Percentage based value is left intact. * @param {String} cssLength CSS length value. */ convertToPx : ( function () { var calculator; return function( cssLength ) { if ( !calculator ) { calculator = CKEDITOR.dom.element.createFromHtml( '<div style="position:absolute;left:-9999px;' + 'top:-9999px;margin:0px;padding:0px;border:0px;"' + '></div>', CKEDITOR.document ); CKEDITOR.document.getBody().append( calculator ); } if ( !(/%$/).test( cssLength ) ) { calculator.setStyle( 'width', cssLength ); return calculator.$.clientWidth; } return cssLength; }; } )(), /** * String specified by {@param str} repeats {@param times} times. * @param str * @param times */ repeat : function( str, times ) { return new Array( times + 1 ).join( str ); }, /** * Return the first successfully executed function's return value that * doesn't throw any exception. */ tryThese : function() { var returnValue; for ( var i = 0, length = arguments.length; i < length; i++ ) { var lambda = arguments[i]; try { returnValue = lambda(); break; } catch (e) {} } return returnValue; }, /** * Generate a combined key from a series of params. * @param {String} subKey One or more string used as sub keys. * @example * var key = CKEDITOR.tools.genKey( 'key1', 'key2', 'key3' ); * alert( key ); // "key1-key2-key3". */ genKey : function() { return Array.prototype.slice.call( arguments ).join( '-' ); } }; })(); // PACKAGER_RENAME( CKEDITOR.tools )
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.focusManager} class, which is used * to handle the focus on editor instances.. */ /** * Creates a focusManager class instance. * @class Manages the focus activity in an editor instance. This class is to be * used mainly by UI elements coders when adding interface elements that need * to set the focus state of the editor. * @param {CKEDITOR.editor} editor The editor instance. * @example * var focusManager = <b>new CKEDITOR.focusManager( editor )</b>; * focusManager.focus(); */ CKEDITOR.focusManager = function( editor ) { if ( editor.focusManager ) return editor.focusManager; /** * Indicates that the editor instance has focus. * @type Boolean * @example * alert( CKEDITOR.instances.editor1.focusManager.hasFocus ); // e.g "true" */ this.hasFocus = false; /** * Object used to hold private stuff. * @private */ this._ = { editor : editor }; return this; }; CKEDITOR.focusManager.prototype = { /** * Used to indicate that the editor instance has the focus.<br /> * <br /> * Note that this function will not explicitelly set the focus in the * editor (for example, making the caret blinking on it). Use * {@link CKEDITOR.editor#focus} for it instead. * @example * var editor = CKEDITOR.instances.editor1; * <b>editor.focusManager.focus()</b>; */ focus : function() { if ( this._.timer ) clearTimeout( this._.timer ); if ( !this.hasFocus ) { // If another editor has the current focus, we first "blur" it. In // this way the events happen in a more logical sequence, like: // "focus 1" > "blur 1" > "focus 2" // ... instead of: // "focus 1" > "focus 2" > "blur 1" if ( CKEDITOR.currentInstance ) CKEDITOR.currentInstance.focusManager.forceBlur(); var editor = this._.editor; editor.container.getChild( 1 ).addClass( 'cke_focus' ); this.hasFocus = true; editor.fire( 'focus' ); } }, /** * Used to indicate that the editor instance has lost the focus.<br /> * <br /> * Note that this functions acts asynchronously with a delay of 100ms to * avoid subsequent blur/focus effects. If you want the "blur" to happen * immediately, use the {@link #forceBlur} function instead. * @example * var editor = CKEDITOR.instances.editor1; * <b>editor.focusManager.blur()</b>; */ blur : function() { var focusManager = this; if ( focusManager._.timer ) clearTimeout( focusManager._.timer ); focusManager._.timer = setTimeout( function() { delete focusManager._.timer; focusManager.forceBlur(); } , 100 ); }, /** * Used to indicate that the editor instance has lost the focus. Unlike * {@link #blur}, this function is synchronous, marking the instance as * "blured" immediately. * @example * var editor = CKEDITOR.instances.editor1; * <b>editor.focusManager.forceBlur()</b>; */ forceBlur : function() { if ( this.hasFocus ) { var editor = this._.editor; editor.container.getChild( 1 ).removeClass( 'cke_focus' ); this.hasFocus = false; editor.fire( 'blur' ); } } }; /** * Fired when the editor instance receives the input focus. * @name CKEDITOR.editor#focus * @event * @param {CKEDITOR.editor} editor The editor instance. * @example * editor.on( 'focus', function( e ) * { * alert( 'The editor named ' + e.editor.name + ' is now focused' ); * }); */ /** * Fired when the editor instance loses the input focus. * @name CKEDITOR.editor#blur * @event * @param {CKEDITOR.editor} editor The editor instance. * @example * editor.on( 'blur', function( e ) * { * alert( 'The editor named ' + e.editor.name + ' lost the focus' ); * }); */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Contains the first and essential part of the {@link CKEDITOR} * object definition. */ // #### Compressed Code // Must be updated on changes in the script as well as updated in the // ckeditor_source.js and ckeditor_basic_source.js files. // if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.6.3',revision:'7474',rnd:Math.floor(Math.random()*900)+100,_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':/')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf(':/')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/'&&!/[&?]t=/.test(d))d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})(); // #### Raw code // ATTENTION: read the above "Compressed Code" notes when changing this code. /* @Packager.RemoveLine // Avoid having the editor code initialized twice. (#7588) // Use CKEDITOR.dom to check whether the full ckeditor.js code has been loaded // or just ckeditor_basic.js. // Remove these lines when compressing manually. if ( window.CKEDITOR && window.CKEDITOR.dom ) return; @Packager.RemoveLine */ if ( !window.CKEDITOR ) { /** * @name CKEDITOR * @namespace This is the API entry point. The entire CKEditor code runs under this object. * @example */ window.CKEDITOR = (function() { var CKEDITOR = /** @lends CKEDITOR */ { /** * A constant string unique for each release of CKEditor. Its value * is used, by default, to build the URL for all resources loaded * by the editor code, guaranteeing clean cache results when * upgrading. * @type String * @example * alert( CKEDITOR.timestamp ); // e.g. '87dm' */ // The production implementation contains a fixed timestamp, unique // for each release and generated by the releaser. // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) timestamp : 'C3HA5RM', /** * Contains the CKEditor version number. * @type String * @example * alert( CKEDITOR.version ); // e.g. 'CKEditor 3.4.1' */ version : '3.6.3', /** * Contains the CKEditor revision number. * The revision number is incremented automatically, following each * modification to the CKEditor source code. * @type String * @example * alert( CKEDITOR.revision ); // e.g. '3975' */ revision : '7474', /** * A 3-digit random integer, valid for the entire life of the CKEDITOR object. * @type Number * @example * alert( CKEDITOR.rnd ); // e.g. '319' */ rnd : Math.floor( Math.random() * ( 999/*Max*/ - 100/*Min*/ + 1 ) ) + 100/*Min*/, /** * Private object used to hold core stuff. It should not be used outside of * the API code as properties defined here may change at any time * without notice. * @private */ _ : {}, /** * Indicates the API loading status. The following statuses are available: * <ul> * <li><b>unloaded</b>: the API is not yet loaded.</li> * <li><b>basic_loaded</b>: the basic API features are available.</li> * <li><b>basic_ready</b>: the basic API is ready to load the full core code.</li> * <li><b>loading</b>: the full API is being loaded.</li> * <li><b>loaded</b>: the API can be fully used.</li> * </ul> * @type String * @example * if ( <b>CKEDITOR.status</b> == 'loaded' ) * { * // The API can now be fully used. * } */ status : 'unloaded', /** * Contains the full URL for the CKEditor installation directory. * It is possible to manually provide the base path by setting a * global variable named CKEDITOR_BASEPATH. This global variable * must be set <strong>before</strong> the editor script loading. * @type String * @example * alert( <b>CKEDITOR.basePath</b> ); // "http://www.example.com/ckeditor/" (e.g.) */ basePath : (function() { // ATTENTION: fixes to this code must be ported to // var basePath in "core/loader.js". // Find out the editor directory path, based on its <script> tag. var path = window.CKEDITOR_BASEPATH || ''; if ( !path ) { var scripts = document.getElementsByTagName( 'script' ); for ( var i = 0 ; i < scripts.length ; i++ ) { var match = scripts[i].src.match( /(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i ); if ( match ) { path = match[1]; break; } } } // In IE (only) the script.src string is the raw value entered in the // HTML source. Other browsers return the full resolved URL instead. if ( path.indexOf(':/') == -1 ) { // Absolute path. if ( path.indexOf( '/' ) === 0 ) path = location.href.match( /^.*?:\/\/[^\/]*/ )[0] + path; // Relative path. else path = location.href.match( /^[^\?]*\/(?:)/ )[0] + path; } if ( !path ) throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.'; return path; })(), /** * Gets the full URL for CKEditor resources. By default, URLs * returned by this function contain a querystring parameter ("t") * set to the {@link CKEDITOR.timestamp} value.<br /> * <br /> * It is possible to provide a custom implementation of this * function by setting a global variable named CKEDITOR_GETURL. * This global variable must be set <strong>before</strong> the editor script * loading. If the custom implementation returns nothing (==null), the * default implementation is used. * @param {String} resource The resource whose full URL we want to get. * It may be a full, absolute, or relative URL. * @returns {String} The full URL. * @example * // e.g. http://www.example.com/ckeditor/skins/default/editor.css?t=87dm * alert( CKEDITOR.getUrl( 'skins/default/editor.css' ) ); * @example * // e.g. http://www.example.com/skins/default/editor.css?t=87dm * alert( CKEDITOR.getUrl( '/skins/default/editor.css' ) ); * @example * // e.g. http://www.somesite.com/skins/default/editor.css?t=87dm * alert( CKEDITOR.getUrl( 'http://www.somesite.com/skins/default/editor.css' ) ); */ getUrl : function( resource ) { // If this is not a full or absolute path. if ( resource.indexOf(':/') == -1 && resource.indexOf( '/' ) !== 0 ) resource = this.basePath + resource; // Add the timestamp, except for directories. if ( this.timestamp && resource.charAt( resource.length - 1 ) != '/' && !(/[&?]t=/).test( resource ) ) resource += ( resource.indexOf( '?' ) >= 0 ? '&' : '?' ) + 't=' + this.timestamp; return resource; } }; // Make it possible to override the getUrl function with a custom // implementation pointing to a global named CKEDITOR_GETURL. var newGetUrl = window.CKEDITOR_GETURL; if ( newGetUrl ) { var originalGetUrl = CKEDITOR.getUrl; CKEDITOR.getUrl = function ( resource ) { return newGetUrl.call( CKEDITOR, resource ) || originalGetUrl.call( CKEDITOR, resource ); }; } return CKEDITOR; })(); } /** * Function called upon loading a custom configuration file that can * modify the editor instance configuration ({@link CKEDITOR.editor#config }). * It is usually defined inside the custom configuration files that can * include developer defined settings. * @name CKEDITOR.editorConfig * @function * @param {CKEDITOR.config} config A configuration object containing the * settings defined for a {@link CKEDITOR.editor} instance up to this * function call. Note that not all settings may still be available. See * <a href="http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Setting_Configurations#Configuration_Loading_Order">Configuration Loading Order</a> * for details. * @example * // This is supposed to be placed in the config.js file. * CKEDITOR.editorConfig = function( config ) * { * // Define changes to default configuration here. For example: * config.language = 'fr'; * config.uiColor = '#AADC6E'; * }; */ // PACKAGER_RENAME( CKEDITOR )
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.themes} object, which is used to * manage themes registration and loading. */ /** * Manages themes registration and loading. * @namespace * @augments CKEDITOR.resourceManager * @example */ CKEDITOR.themes = new CKEDITOR.resourceManager( '_source/'+ // @Packager.RemoveLine 'themes/', 'theme' );
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.dtd} object, which holds the DTD * mapping for XHTML 1.0 Transitional. This file was automatically * generated from the file: xhtml1-transitional.dtd. */ /** * @namespace Holds and object representation of the HTML DTD to be used by the * editor in its internal operations.<br /> * <br /> * Each element in the DTD is represented by a property in this object. Each * property contains the list of elements that can be contained by the element. * Text is represented by the "#" property.<br /> * <br /> * Several special grouping properties are also available. Their names start * with the "$" character. * @example * // Check if "div" can be contained in a "p" element. * alert( !!CKEDITOR.dtd[ 'p' ][ 'div' ] ); "false" * @example * // Check if "p" can be contained in a "div" element. * alert( !!CKEDITOR.dtd[ 'div' ][ 'p' ] ); "true" * @example * // Check if "p" is a block element. * alert( !!CKEDITOR.dtd.$block[ 'p' ] ); "true" */ CKEDITOR.dtd = (function() { var X = CKEDITOR.tools.extend, A = {isindex:1,fieldset:1}, B = {input:1,button:1,select:1,textarea:1,label:1}, C = X({a:1},B), D = X({iframe:1},C), E = {hr:1,ul:1,menu:1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1}, F = {ins:1,del:1,script:1,style:1}, G = X({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1,wbr:1},F), H = X({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1,mark:1},G), I = X({p:1},H), J = X({iframe:1},H,B), K = {img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,section:1,header:1,footer:1,nav:1,article:1,aside:1,figure:1,dialog:1,hgroup:1,mark:1,time:1,meter:1,menu:1,command:1,keygen:1,output:1,progress:1,audio:1,video:1,details:1,datagrid:1,datalist:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1}, L = X({a:1},J), M = {tr:1}, N = {'#':1}, O = X({param:1},K), P = X({form:1},A,D,E,I), Q = {li:1}, R = {style:1,script:1}, S = {base:1,link:1,meta:1,title:1}, T = X(S,R), U = {head:1,body:1}, V = {html:1}; var block = {address:1,blockquote:1,center:1,dir:1,div: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,audio:1,video:1,details:1,datagrid:1,datalist:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1}; return /** @lends CKEDITOR.dtd */ { // The "$" items have been added manually. // List of elements living outside body. $nonBodyContent: X(V,U,S), /** * List of block elements, like "p" or "div". * @type Object * @example */ $block : block, /** * List of block limit elements. * @type Object * @example */ $blockLimit : { body:1,div: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,audio:1,video:1,details:1,datagrid:1,datalist:1,td:1,th:1,caption:1,form:1 }, /** * List of inline (&lt;span&gt; like) elements. */ $inline : L, // Just like span. /** * list of elements that can be children at &lt;body&gt;. */ $body : X({script:1,style:1}, block), $cdata : {script:1,style:1}, /** * List of empty (self-closing) elements, like "br" or "img". * @type Object * @example */ $empty : {area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1,wbr:1}, /** * List of list item elements, like "li" or "dd". * @type Object * @example */ $listItem : {dd:1,dt:1,li:1}, /** * List of list root elements. * @type Object * @example */ $list: {ul:1,ol:1,dl:1}, /** * Elements that accept text nodes, but are not possible to edit into * the browser. * @type Object * @example */ $nonEditable : {applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1,audio:1,video:1}, /** * List of block tags with each one a singleton element lives in the corresponding structure for description. */ $captionBlock : { caption:1, legend:1 }, /** * List of elements that can be ignored if empty, like "b" or "span". * @type Object * @example */ $removeEmpty : {abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1,mark:1}, /** * List of elements that have tabindex set to zero by default. * @type Object * @example */ $tabIndex : {a:1,area:1,button:1,input:1,object:1,select:1,textarea:1}, /** * List of elements used inside the "table" element, like "tbody" or "td". * @type Object * @example */ $tableContent : {caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1}, html: U, head: T, style: N, script: N, body: P, base: {}, link: {}, meta: {}, title: N, col : {}, tr : {td:1,th:1}, img : {}, colgroup : {col:1}, noscript : P, td : P, br : {}, wbr : {}, th : P, center : P, kbd : L, button : X(I,E), basefont : {}, h5 : L, h4 : L, samp : L, h6 : L, ol : Q, h1 : L, h3 : L, option : N, h2 : L, form : X(A,D,E,I), select : {optgroup:1,option:1}, font : L, ins : L, menu : Q, abbr : L, label : L, table : {thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1}, code : L, tfoot : M, cite : L, li : P, input : {}, iframe : P, strong : L, textarea : N, noframes : P, big : L, small : L, span : L, hr : {}, dt : L, sub : L, optgroup : {option:1}, param : {}, bdo : L, 'var' : L, div : P, object : O, sup : L, dd : P, strike : L, area : {}, dir : Q, map : X({area:1,form:1,p:1},A,F,E), applet : O, dl : {dt:1,dd:1}, del : L, isindex : {}, fieldset : X({legend:1},K), thead : M, ul : Q, acronym : L, b : L, a : J, blockquote : P, caption : L, i : L, u : L, tbody : M, s : L, address : X(D,I), tt : L, legend : L, q : L, pre : X(G,C), p : L, em : L, dfn : L, //HTML5 section : P, header : P, footer : P, nav : P, article : P, aside : P, figure: P, dialog : P, hgroup : P, mark : L, time : L, meter : L, menu : L, command : L, keygen : L, output : L, progress : O, audio : O, video : O, details : O, datagrid : O, datalist : O }; })(); // PACKAGER_RENAME( CKEDITOR.dtd )
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.dom} object, which contains DOM * manipulation objects and function. */ /** * @namespace DOM manipulation objects, classes and functions. * @see CKEDITOR.dom.element * @see CKEDITOR.dom.node * @example */ CKEDITOR.dom = {}; // PACKAGER_RENAME( CKEDITOR.dom )
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.loader} objects, which is used to * load core scripts and their dependencies from _source. */ if ( typeof CKEDITOR == 'undefined' ) CKEDITOR = {}; if ( !CKEDITOR.loader ) { /** * Load core scripts and their dependencies from _source. * @namespace * @example */ CKEDITOR.loader = (function() { // Table of script names and their dependencies. var scripts = { 'core/_bootstrap' : [ 'core/config', 'core/ckeditor', 'core/plugins', 'core/scriptloader', 'core/tools', /* The following are entries that we want to force loading at the end to avoid dependence recursion */ 'core/dom/comment', 'core/dom/elementpath', 'core/dom/text', 'core/dom/rangelist' ], 'core/ckeditor' : [ 'core/ckeditor_basic', 'core/dom', 'core/dtd', 'core/dom/document', 'core/dom/element', 'core/editor', 'core/event', 'core/htmlparser', 'core/htmlparser/element', 'core/htmlparser/fragment', 'core/htmlparser/filter', 'core/htmlparser/basicwriter', 'core/tools' ], 'core/ckeditor_base' : [], 'core/ckeditor_basic' : [ 'core/editor_basic', 'core/env', 'core/event' ], 'core/command' : [], 'core/config' : [ 'core/ckeditor_base' ], 'core/dom' : [], 'core/dom/comment' : [ 'core/dom/node' ], 'core/dom/document' : [ 'core/dom', 'core/dom/domobject', 'core/dom/window' ], 'core/dom/documentfragment' : [ 'core/dom/element' ], 'core/dom/element' : [ 'core/dom', 'core/dom/document', 'core/dom/domobject', 'core/dom/node', 'core/dom/nodelist', 'core/tools' ], 'core/dom/elementpath' : [ 'core/dom/element' ], 'core/dom/event' : [], 'core/dom/node' : [ 'core/dom/domobject', 'core/tools' ], 'core/dom/nodelist' : [ 'core/dom/node' ], 'core/dom/domobject' : [ 'core/dom/event' ], 'core/dom/range' : [ 'core/dom/document', 'core/dom/documentfragment', 'core/dom/element', 'core/dom/walker' ], 'core/dom/rangelist' : [ 'core/dom/range' ], 'core/dom/text' : [ 'core/dom/node', 'core/dom/domobject' ], 'core/dom/walker' : [ 'core/dom/node' ], 'core/dom/window' : [ 'core/dom/domobject' ], 'core/dtd' : [ 'core/tools' ], 'core/editor' : [ 'core/command', 'core/config', 'core/editor_basic', 'core/focusmanager', 'core/lang', 'core/plugins', 'core/skins', 'core/themes', 'core/tools', 'core/ui' ], 'core/editor_basic' : [ 'core/event' ], 'core/env' : [], 'core/event' : [], 'core/focusmanager' : [], 'core/htmlparser' : [], 'core/htmlparser/comment' : [ 'core/htmlparser' ], 'core/htmlparser/element' : [ 'core/htmlparser', 'core/htmlparser/fragment' ], 'core/htmlparser/fragment' : [ 'core/htmlparser', 'core/htmlparser/comment', 'core/htmlparser/text', 'core/htmlparser/cdata' ], 'core/htmlparser/text' : [ 'core/htmlparser' ], 'core/htmlparser/cdata' : [ 'core/htmlparser' ], 'core/htmlparser/filter' : [ 'core/htmlparser' ], 'core/htmlparser/basicwriter': [ 'core/htmlparser' ], 'core/lang' : [], 'core/plugins' : [ 'core/resourcemanager' ], 'core/resourcemanager' : [ 'core/scriptloader', 'core/tools' ], 'core/scriptloader' : [ 'core/dom/element', 'core/env' ], 'core/skins' : [ 'core/scriptloader' ], 'core/themes' : [ 'core/resourcemanager' ], 'core/tools' : [ 'core/env' ], 'core/ui' : [] }; var basePath = (function() { // This is a copy of CKEDITOR.basePath, but requires the script having // "_source/core/loader.js". if ( CKEDITOR && CKEDITOR.basePath ) return CKEDITOR.basePath; // Find out the editor directory path, based on its <script> tag. var path = ''; var scripts = document.getElementsByTagName( 'script' ); for ( var i = 0 ; i < scripts.length ; i++ ) { var match = scripts[i].src.match( /(^|.*?[\\\/])(?:_source\/)?core\/loader.js(?:\?.*)?$/i ); if ( match ) { path = match[1]; break; } } // In IE (only) the script.src string is the raw valued entered in the // HTML. Other browsers return the full resolved URL instead. if ( path.indexOf('://') == -1 ) { // Absolute path. if ( path.indexOf( '/' ) === 0 ) path = location.href.match( /^.*?:\/\/[^\/]*/ )[0] + path; // Relative path. else path = location.href.match( /^[^\?]*\// )[0] + path; } return path; })(); var timestamp = 'C3HA5RM'; var getUrl = function( resource ) { if ( CKEDITOR && CKEDITOR.getUrl ) return CKEDITOR.getUrl( resource ); return basePath + resource + ( resource.indexOf( '?' ) >= 0 ? '&' : '?' ) + 't=' + timestamp; }; var pendingLoad = []; /** @lends CKEDITOR.loader */ return { /** * The list of loaded scripts in their loading order. * @type Array * @example * // Alert the loaded script names. * alert( <b>CKEDITOR.loader.loadedScripts</b> ); */ loadedScripts : [], loadPending : function() { var scriptName = pendingLoad.shift(); if ( !scriptName ) return; var scriptSrc = getUrl( '_source/' + scriptName + '.js' ); var script = document.createElement( 'script' ); script.type = 'text/javascript'; script.src = scriptSrc; function onScriptLoaded() { // Append this script to the list of loaded scripts. CKEDITOR.loader.loadedScripts.push( scriptName ); // Load the next. CKEDITOR.loader.loadPending(); } // We must guarantee the execution order of the scripts, so we // need to load them one by one. (#4145) // The following if/else block has been taken from the scriptloader core code. if ( typeof(script.onreadystatechange) !== "undefined" ) { /** @ignore */ script.onreadystatechange = function() { if ( script.readyState == 'loaded' || script.readyState == 'complete' ) { script.onreadystatechange = null; onScriptLoaded(); } }; } else { /** @ignore */ script.onload = function() { // Some browsers, such as Safari, may call the onLoad function // immediately. Which will break the loading sequence. (#3661) setTimeout( function() { onScriptLoaded( scriptName ); }, 0 ); }; } document.body.appendChild( script ); }, /** * Loads a specific script, including its dependencies. This is not a * synchronous loading, which means that the code to be loaded will * not necessarily be available after this call. * @example * CKEDITOR.loader.load( 'core/dom/element' ); */ load : function( scriptName, defer ) { // Check if the script has already been loaded. if ( scriptName in this.loadedScripts ) return; // Get the script dependencies list. var dependencies = scripts[ scriptName ]; if ( !dependencies ) throw 'The script name"' + scriptName + '" is not defined.'; // Mark the script as loaded, even before really loading it, to // avoid cross references recursion. this.loadedScripts[ scriptName ] = true; // Load all dependencies first. for ( var i = 0 ; i < dependencies.length ; i++ ) this.load( dependencies[ i ], true ); var scriptSrc = getUrl( '_source/' + scriptName + '.js' ); // Append the <script> element to the DOM. // If the page is fully loaded, we can't use document.write // but if the script is run while the body is loading then it's safe to use it // Unfortunately, Firefox <3.6 doesn't support document.readyState, so it won't get this improvement if ( document.body && (!document.readyState || document.readyState == 'complete') ) { pendingLoad.push( scriptName ); if ( !defer ) this.loadPending(); } else { // Append this script to the list of loaded scripts. this.loadedScripts.push( scriptName ); document.write( '<script src="' + scriptSrc + '" type="text/javascript"><\/script>' ); } } }; })(); } // Check if any script has been defined for autoload. if ( CKEDITOR._autoLoad ) { CKEDITOR.loader.load( CKEDITOR._autoLoad ); delete CKEDITOR._autoLoad; }
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the "virtual" {@link CKEDITOR.pluginDefinition} class, which * contains the defintion of a plugin. This file is for documentation * purposes only. */ /** * (Virtual Class) Do not call this constructor. This class is not really part * of the API. It just illustrates the features of plugin objects to be * passed to the {@link CKEDITOR.plugins.add} function. * @name CKEDITOR.pluginDefinition * @constructor * @example */ /** * A list of plugins that are required by this plugin. Note that this property * doesn't guarantee the loading order of the plugins. * @name CKEDITOR.pluginDefinition.prototype.requires * @type Array * @example * CKEDITOR.plugins.add( 'sample', * { * requires : [ 'button', 'selection' ] * }); */ /** * A list of language files available for this plugin. These files are stored inside * the "lang" directory, which is inside the plugin directory, follow the name * pattern of "langCode.js", and contain a language definition created with {@link CKEDITOR.pluginDefinition#setLang}. * While the plugin is being loaded, the editor checks this list to see if * a language file of the current editor language ({@link CKEDITOR.editor#langCode}) * is available, and if so, loads it. Otherwise, the file represented by the first list item * in the list is loaded. * @name CKEDITOR.pluginDefinition.prototype.lang * @type Array * @example * CKEDITOR.plugins.add( 'sample', * { * lang : [ 'en', 'fr' ] * }); */ /** * Function called on initialization of every editor instance created in the * page before the init() call task. The beforeInit function will be called for * all plugins, after that the init function is called for all of them. This * feature makes it possible to initialize things that could be used in the * init function of other plugins. * @name CKEDITOR.pluginDefinition.prototype.beforeInit * @function * @param {CKEDITOR.editor} editor The editor instance being initialized. * @example * CKEDITOR.plugins.add( 'sample', * { * beforeInit : function( editor ) * { * alert( 'Editor "' + editor.name + '" is to be initialized!' ); * } * }); */ /** * Function called on initialization of every editor instance created in the * page. * @name CKEDITOR.pluginDefinition.prototype.init * @function * @param {CKEDITOR.editor} editor The editor instance being initialized. * @example * CKEDITOR.plugins.add( 'sample', * { * init : function( editor ) * { * alert( 'Editor "' + editor.name + '" is being initialized!' ); * } * }); */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the <code>{@link CKEDITOR.config}</code> object that stores the * default configuration settings. */ /** * Used in conjunction with <code>{@link CKEDITOR.config.enterMode}</code> * and <code>{@link CKEDITOR.config.shiftEnterMode}</code> configuration * settings to make the editor produce <code>&lt;p&gt;</code> tags when * using the <em>Enter</em> key. * @constant */ CKEDITOR.ENTER_P = 1; /** * Used in conjunction with <code>{@link CKEDITOR.config.enterMode}</code> * and <code>{@link CKEDITOR.config.shiftEnterMode}</code> configuration * settings to make the editor produce <code>&lt;br&gt;</code> tags when * using the <em>Enter</em> key. * @constant */ CKEDITOR.ENTER_BR = 2; /** * Used in conjunction with <code>{@link CKEDITOR.config.enterMode}</code> * and <code>{@link CKEDITOR.config.shiftEnterMode}</code> configuration * settings to make the editor produce <code>&lt;div&gt;</code> tags when * using the <em>Enter</em> key. * @constant */ CKEDITOR.ENTER_DIV = 3; /** * @namespace Stores default configuration settings. Changes to this object are * reflected in all editor instances, if not specified otherwise for a particular * instance. */ CKEDITOR.config = { /** * The URL path for the custom configuration file to be loaded. If not * overloaded with inline configuration, it defaults to the <code>config.js</code> * file present in the root of the CKEditor installation directory.<br /><br /> * * CKEditor will recursively load custom configuration files defined inside * other custom configuration files. * @type String * @default <code>'<em>&lt;CKEditor folder&gt;</em>/config.js'</code> * @example * // Load a specific configuration file. * CKEDITOR.replace( 'myfield', { customConfig : '/myconfig.js' } ); * @example * // Do not load any custom configuration file. * CKEDITOR.replace( 'myfield', { customConfig : '' } ); */ customConfig : 'config.js', /** * Whether the replaced element (usually a <code>&lt;textarea&gt;</code>) * is to be updated automatically when posting the form containing the editor. * @type Boolean * @default <code>true</code> * @example * config.autoUpdateElement = true; */ autoUpdateElement : true, /** * The base href URL used to resolve relative and absolute URLs in the * editor content. * @type String * @default <code>''</code> (empty) * @example * config.baseHref = 'http://www.example.com/path/'; */ baseHref : '', /** * The CSS file(s) to be used to apply style to editor contents. It should * reflect the CSS used in the final pages where the contents are to be * used. * @type String|Array * @default <code>'<em>&lt;CKEditor folder&gt;</em>/contents.css'</code> * @example * config.contentsCss = '/css/mysitestyles.css'; * config.contentsCss = ['/css/mysitestyles.css', '/css/anotherfile.css']; */ contentsCss : CKEDITOR.basePath + 'contents.css', /** * The writing direction of the language used to create the editor * contents. Allowed values are: * <ul> * <li><code>'ui'</code> &ndash; indicates that content direction will be the same as the user interface language direction;</li> * <li><code>'ltr'</code> &ndash; for Left-To-Right language (like English);</li> * <li><code>'rtl'</code> &ndash; for Right-To-Left languages (like Arabic).</li> * </ul> * @default <code>'ui'</code> * @type String * @example * config.contentsLangDirection = 'rtl'; */ contentsLangDirection : 'ui', /** * Language code of the writing language which is used to create the editor * contents. * @default Same value as editor UI language. * @type String * @example * config.contentsLanguage = 'fr'; */ contentsLanguage : '', /** * The user interface language localization to use. If left empty, the editor * will automatically be localized to the user language. If the user language is not supported, * the language specified in the <code>{@link CKEDITOR.config.defaultLanguage}</code> * configuration setting is used. * @default <code>''</code> (empty) * @type String * @example * // Load the German interface. * config.language = 'de'; */ language : '', /** * The language to be used if the <code>{@link CKEDITOR.config.language}</code> * setting is left empty and it is not possible to localize the editor to the user language. * @default <code>'en'</code> * @type String * @example * config.defaultLanguage = 'it'; */ defaultLanguage : 'en', /** * Sets the behavior of the <em>Enter</em> key. It also determines other behavior * rules of the editor, like whether the <code>&lt;br&gt;</code> element is to be used * as a paragraph separator when indenting text. * The allowed values are the following constants that cause the behavior outlined below: * <ul> * <li><code>{@link CKEDITOR.ENTER_P}</code> (1) &ndash; new <code>&lt;p&gt;</code> paragraphs are created;</li> * <li><code>{@link CKEDITOR.ENTER_BR}</code> (2) &ndash; lines are broken with <code>&lt;br&gt;</code> elements;</li> * <li><code>{@link CKEDITOR.ENTER_DIV}</code> (3) &ndash; new <code>&lt;div&gt;</code> blocks are created.</li> * </ul> * <strong>Note</strong>: It is recommended to use the * <code>{@link CKEDITOR.ENTER_P}</code> setting because of its semantic value and * correctness. The editor is optimized for this setting. * @type Number * @default <code>{@link CKEDITOR.ENTER_P}</code> * @example * // Not recommended. * config.enterMode = CKEDITOR.ENTER_BR; */ enterMode : CKEDITOR.ENTER_P, /** * Force the use of <code>{@link CKEDITOR.config.enterMode}</code> as line break regardless * of the context. If, for example, <code>{@link CKEDITOR.config.enterMode}</code> is set * to <code>{@link CKEDITOR.ENTER_P}</code>, pressing the <em>Enter</em> key inside a * <code>&lt;div&gt;</code> element will create a new paragraph with <code>&lt;p&gt;</code> * instead of a <code>&lt;div&gt;</code>. * @since 3.2.1 * @type Boolean * @default <code>false</code> * @example * // Not recommended. * config.forceEnterMode = true; */ forceEnterMode : false, /** * Similarly to the <code>{@link CKEDITOR.config.enterMode}</code> setting, it defines the behavior * of the <em>Shift+Enter</em> key combination. * The allowed values are the following constants the behavior outlined below: * <ul> * <li><code>{@link CKEDITOR.ENTER_P}</code> (1) &ndash; new <code>&lt;p&gt;</code> paragraphs are created;</li> * <li><code>{@link CKEDITOR.ENTER_BR}</code> (2) &ndash; lines are broken with <code>&lt;br&gt;</code> elements;</li> * <li><code>{@link CKEDITOR.ENTER_DIV}</code> (3) &ndash; new <code>&lt;div&gt;</code> blocks are created.</li> * </ul> * @type Number * @default <code>{@link CKEDITOR.ENTER_BR}</code> * @example * config.shiftEnterMode = CKEDITOR.ENTER_P; */ shiftEnterMode : CKEDITOR.ENTER_BR, /** * A comma separated list of plugins that are not related to editor * instances. Reserved for plugins that extend the core code only.<br /><br /> * * There are no ways to override this setting except by editing the source * code of CKEditor (<code>_source/core/config.js</code>). * @type String * @example */ corePlugins : '', /** * Sets the <code>DOCTYPE</code> to be used when loading the editor content as HTML. * @type String * @default <code>'&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;'</code> * @example * // Set the DOCTYPE to the HTML 4 (Quirks) mode. * config.docType = '&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;'; */ docType : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', /** * Sets the <code>id</code> attribute to be used on the <code>body</code> element * of the editing area. This can be useful when you intend to reuse the original CSS * file you are using on your live website and want to assign the editor the same ID * as the section that will include the contents. In this way ID-specific CSS rules will * be enabled. * @since 3.1 * @type String * @default <code>''</code> (empty) * @example * config.bodyId = 'contents_id'; */ bodyId : '', /** * Sets the <code>class</code> attribute to be used on the <code>body</code> element * of the editing area. This can be useful when you intend to reuse the original CSS * file you are using on your live website and want to assign the editor the same class * as the section that will include the contents. In this way class-specific CSS rules will * be enabled. * @since 3.1 * @type String * @default <code>''</code> (empty) * @example * config.bodyClass = 'contents'; */ bodyClass : '', /** * Indicates whether the contents to be edited are being input as a full * HTML page. A full page includes the <code>&lt;html&gt;</code>, * <code>&lt;head&gt;</code>, and <code>&lt;body&gt;</code> elements. * The final output will also reflect this setting, including the * <code>&lt;body&gt;</code> contents only if this setting is disabled. * @since 3.1 * @type Boolean * @default <code>false</code> * @example * config.fullPage = true; */ fullPage : false, /** * The height of the editing area (that includes the editor content). This * can be an integer, for pixel sizes, or any CSS-defined length unit.<br> * <br> * <strong>Note:</strong> Percent units (%) are not supported. * @type Number|String * @default <code>200</code> * @example * config.height = 500; // 500 pixels. * @example * config.height = '25em'; // CSS length. * @example * config.height = '300px'; // CSS length. */ height : 200, /** * Comma separated list of plugins to be loaded and initialized for an editor * instance. This setting should rarely be changed. It is recommended to use the * <code>{@link CKEDITOR.config.extraPlugins}</code> and * <code>{@link CKEDITOR.config.removePlugins}</code> for customization purposes instead. * @type String * @example */ plugins : 'about,' + 'a11yhelp,' + 'basicstyles,' + 'bidi,' + 'blockquote,' + 'button,' + 'clipboard,' + 'colorbutton,' + 'colordialog,' + 'contextmenu,' + 'dialogadvtab,' + 'div,' + 'elementspath,' + 'enterkey,' + 'entities,' + 'filebrowser,' + 'find,' + 'flash,' + 'font,' + 'format,' + 'forms,' + 'horizontalrule,' + 'htmldataprocessor,' + 'iframe,' + 'image,' + 'indent,' + 'justify,' + 'keystrokes,' + 'link,' + 'list,' + 'liststyle,' + 'maximize,' + 'newpage,' + 'pagebreak,' + 'pastefromword,' + 'pastetext,' + 'popup,' + 'preview,' + 'print,' + 'removeformat,' + 'resize,' + 'save,' + 'scayt,' + 'smiley,' + 'showblocks,' + 'showborders,' + 'sourcearea,' + 'stylescombo,' + 'table,' + 'tabletools,' + 'specialchar,' + 'tab,' + 'templates,' + 'toolbar,' + 'undo,' + 'wysiwygarea,' + 'wsc', /** * A list of additional plugins to be loaded. This setting makes it easier * to add new plugins without having to touch and potentially break the * <code>{@link CKEDITOR.config.plugins}</code> setting. * @type String * @example * config.extraPlugins = 'myplugin,anotherplugin'; */ extraPlugins : '', /** * A list of plugins that must not be loaded. This setting makes it possible * to avoid loading some plugins defined in the <code>{@link CKEDITOR.config.plugins}</code> * setting, without having to touch it and potentially break it. * @type String * @example * config.removePlugins = 'elementspath,save,font'; */ removePlugins : '', /** * List of regular expressions to be executed on input HTML, * indicating HTML source code that when matched, must <strong>not</strong> be available in the WYSIWYG * mode for editing. * @type Array * @default <code>[]</code> (empty array) * @example * config.protectedSource.push( /<\?[\s\S]*?\?>/g ); // PHP code * config.protectedSource.push( /<%[\s\S]*?%>/g ); // ASP code * config.protectedSource.push( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ); // ASP.Net code */ protectedSource : [], /** * The editor <code>tabindex</code> value. * @type Number * @default <code>0</code> (zero) * @example * config.tabIndex = 1; */ tabIndex : 0, /** * The theme to be used to build the user interface. * @type String * @default <code>'default'</code> * @see CKEDITOR.config.skin * @example * config.theme = 'default'; */ theme : 'default', /** * The skin to load. It may be the name of the skin folder inside the * editor installation path, or the name and the path separated by a comma. * @type String * @default <code>'default'</code> * @example * config.skin = 'v2'; * @example * config.skin = 'myskin,/customstuff/myskin/'; */ skin : 'kama', /** * The editor UI outer width. This can be an integer, for pixel sizes, or * any CSS-defined unit.<br> * <br> * Unlike the <code>{@link CKEDITOR.config.height}</code> setting, this * one will set the outer width of the entire editor UI, not for the * editing area only. * @type String|Number * @default <code>''</code> (empty) * @example * config.width = 850; // 850 pixels wide. * @example * config.width = '75%'; // CSS unit. */ width : '', /** * The base Z-index for floating dialog windows and popups. * @type Number * @default <code>10000</code> * @example * config.baseFloatZIndex = 2000 */ baseFloatZIndex : 10000 }; /** * Indicates that some of the editor features, like alignment and text * direction, should use the "computed value" of the feature to indicate its * on/off state instead of using the "real value".<br /> * <br /> * If enabled in a Left-To-Right written document, the "Left Justify" * alignment button will be shown as active, even if the alignment style is not * explicitly applied to the current paragraph in the editor. * @name CKEDITOR.config.useComputedState * @type Boolean * @default <code>true</code> * @since 3.4 * @example * config.useComputedState = false; */ // PACKAGER_RENAME( CKEDITOR.config )
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.plugins} object, which is used to * manage plugins registration and loading. */ /** * Manages plugins registration and loading. * @namespace * @augments CKEDITOR.resourceManager * @example */ CKEDITOR.plugins = new CKEDITOR.resourceManager( '_source/' + // @Packager.RemoveLine 'plugins/', 'plugin' ); // PACKAGER_RENAME( CKEDITOR.plugins ) CKEDITOR.plugins.load = CKEDITOR.tools.override( CKEDITOR.plugins.load, function( originalLoad ) { return function( name, callback, scope ) { var allPlugins = {}; var loadPlugins = function( names ) { originalLoad.call( this, names, function( plugins ) { CKEDITOR.tools.extend( allPlugins, plugins ); var requiredPlugins = []; for ( var pluginName in plugins ) { var plugin = plugins[ pluginName ], requires = plugin && plugin.requires; if ( requires ) { for ( var i = 0 ; i < requires.length ; i++ ) { if ( !allPlugins[ requires[ i ] ] ) requiredPlugins.push( requires[ i ] ); } } } if ( requiredPlugins.length ) loadPlugins.call( this, requiredPlugins ); else { // Call the "onLoad" function for all plugins. for ( pluginName in allPlugins ) { plugin = allPlugins[ pluginName ]; if ( plugin.onLoad && !plugin.onLoad._called ) { plugin.onLoad(); plugin.onLoad._called = 1; } } // Call the callback. if ( callback ) callback.call( scope || window, allPlugins ); } } , this); }; loadPlugins.call( this, name ); }; }); /** * Loads a specific language file, or auto detect it. A callback is * then called when the file gets loaded. * @param {String} pluginName The name of the plugin to which the provided translation * should be attached. * @param {String} languageCode The code of the language translation provided. * @param {Object} languageEntries An object that contains pairs of label and * the respective translation. * @example * CKEDITOR.plugins.setLang( 'myPlugin', 'en', { * title : 'My plugin', * selectOption : 'Please select an option' * } ); */ CKEDITOR.plugins.setLang = function( pluginName, languageCode, languageEntries ) { var plugin = this.get( pluginName ), pluginLangEntries = plugin.langEntries || ( plugin.langEntries = {} ), pluginLang = plugin.lang || ( plugin.lang = [] ); if ( CKEDITOR.tools.indexOf( pluginLang, languageCode ) == -1 ) pluginLang.push( languageCode ); pluginLangEntries[ languageCode ] = languageEntries; };
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.env} object, which constains * environment and browser information. */ if ( !CKEDITOR.env ) { /** * @namespace Environment and browser information. */ CKEDITOR.env = (function() { var agent = navigator.userAgent.toLowerCase(); var opera = window.opera; var env = /** @lends CKEDITOR.env */ { /** * Indicates that CKEditor is running on Internet Explorer. * @type Boolean * @example * if ( CKEDITOR.env.ie ) * alert( "I'm on IE!" ); */ ie : /*@cc_on!@*/false, /** * Indicates that CKEditor is running on Opera. * @type Boolean * @example * if ( CKEDITOR.env.opera ) * alert( "I'm on Opera!" ); */ opera : ( !!opera && opera.version ), /** * Indicates that CKEditor is running on a WebKit based browser, like * Safari. * @type Boolean * @example * if ( CKEDITOR.env.webkit ) * alert( "I'm on WebKit!" ); */ webkit : ( agent.indexOf( ' applewebkit/' ) > -1 ), /** * Indicates that CKEditor is running on Adobe AIR. * @type Boolean * @example * if ( CKEDITOR.env.air ) * alert( "I'm on AIR!" ); */ air : ( agent.indexOf( ' adobeair/' ) > -1 ), /** * Indicates that CKEditor is running on Macintosh. * @type Boolean * @example * if ( CKEDITOR.env.mac ) * alert( "I love apples!" ); */ mac : ( agent.indexOf( 'macintosh' ) > -1 ), /** * Indicates that CKEditor is running on a quirks mode environemnt. * @type Boolean * @example * if ( CKEDITOR.env.quirks ) * alert( "Nooooo!" ); */ quirks : ( document.compatMode == 'BackCompat' ), /** * Indicates that CKEditor is running on a mobile like environemnt. * @type Boolean * @example * if ( CKEDITOR.env.mobile ) * alert( "I'm running with CKEditor today!" ); */ mobile : ( agent.indexOf( 'mobile' ) > -1 ), /** * Indicates that CKEditor is running on Apple iPhone/iPad/iPod devices. * @type Boolean * @example * if ( CKEDITOR.env.iOS ) * alert( "I like little apples!" ); */ iOS : /(ipad|iphone|ipod)/.test(agent), /** * Indicates that the browser has a custom domain enabled. This has * been set with "document.domain". * @returns {Boolean} "true" if a custom domain is enabled. * @example * if ( CKEDITOR.env.isCustomDomain() ) * alert( "I'm in a custom domain!" ); */ isCustomDomain : function() { if ( !this.ie ) return false; var domain = document.domain, hostname = window.location.hostname; return domain != hostname && domain != ( '[' + hostname + ']' ); // IPv6 IP support (#5434) }, /** * Indicates that page is running under an encrypted connection. * @returns {Boolean} "true" if the page has an encrypted connection. * @example * if ( CKEDITOR.env.secure ) * alert( "I'm in SSL!" ); */ secure : location.protocol == 'https:' }; /** * Indicates that CKEditor is running on a Gecko based browser, like * Firefox. * @name CKEDITOR.env.gecko * @type Boolean * @example * if ( CKEDITOR.env.gecko ) * alert( "I'm riding a gecko!" ); */ env.gecko = ( navigator.product == 'Gecko' && !env.webkit && !env.opera ); var version = 0; // Internet Explorer 6.0+ if ( env.ie ) { version = parseFloat( agent.match( /msie (\d+)/ )[1] ); /** * Indicates that CKEditor is running on Internet Explorer 8. * @name CKEDITOR.env.ie8 * @type Boolean * @example * if ( CKEDITOR.env.ie8 ) * alert( "I'm on IE8!" ); */ env.ie8 = !!document.documentMode; /** * Indicates that CKEditor is running on Internet Explorer 8 on * standards mode. * @name CKEDITOR.env.ie8Compat * @type Boolean * @example * if ( CKEDITOR.env.ie8Compat ) * alert( "Now I'm on IE8, for real!" ); */ env.ie8Compat = document.documentMode == 8; /** * Indicates that CKEditor is running on Internet Explorer 9's standards mode. * @name CKEDITOR.env.ie9Compat * @type Boolean * @example * if ( CKEDITOR.env.ie9Compat ) * alert( "IE9, the beauty of the web!" ); */ env.ie9Compat = document.documentMode == 9; /** * Indicates that CKEditor is running on an IE7-like environment, which * includes IE7 itself and IE8's IE7 document mode. * @name CKEDITOR.env.ie7Compat * @type Boolean * @example * if ( CKEDITOR.env.ie8Compat ) * alert( "I'm on IE7 or on an IE7 like IE8!" ); */ env.ie7Compat = ( ( version == 7 && !document.documentMode ) || document.documentMode == 7 ); /** * Indicates that CKEditor is running on an IE6-like environment, which * includes IE6 itself and IE7 and IE8 quirks mode. * @name CKEDITOR.env.ie6Compat * @type Boolean * @example * if ( CKEDITOR.env.ie6Compat ) * alert( "I'm on IE6 or quirks mode!" ); */ env.ie6Compat = ( version < 7 || env.quirks ); } // Gecko. if ( env.gecko ) { var geckoRelease = agent.match( /rv:([\d\.]+)/ ); if ( geckoRelease ) { geckoRelease = geckoRelease[1].split( '.' ); version = geckoRelease[0] * 10000 + ( geckoRelease[1] || 0 ) * 100 + ( geckoRelease[2] || 0 ) * 1; } } // Opera 9.50+ if ( env.opera ) version = parseFloat( opera.version() ); // Adobe AIR 1.0+ // Checked before Safari because AIR have the WebKit rich text editor // features from Safari 3.0.4, but the version reported is 420. if ( env.air ) version = parseFloat( agent.match( / adobeair\/(\d+)/ )[1] ); // WebKit 522+ (Safari 3+) if ( env.webkit ) version = parseFloat( agent.match( / applewebkit\/(\d+)/ )[1] ); /** * Contains the browser version.<br /> * <br /> * For gecko based browsers (like Firefox) it contains the revision * number with first three parts concatenated with a padding zero * (e.g. for revision 1.9.0.2 we have 10900).<br /> * <br /> * For webkit based browser (like Safari and Chrome) it contains the * WebKit build version (e.g. 522). * @name CKEDITOR.env.version * @type Boolean * @example * if ( CKEDITOR.env.ie && <b>CKEDITOR.env.version</b> <= 6 ) * alert( "Ouch!" ); */ env.version = version; /** * Indicates that CKEditor is running on a compatible browser. * @name CKEDITOR.env.isCompatible * @type Boolean * @example * if ( CKEDITOR.env.isCompatible ) * alert( "Your browser is pretty cool!" ); */ env.isCompatible = // White list of mobile devices that supports. env.iOS && version >= 534 || !env.mobile && ( ( env.ie && version >= 6 ) || ( env.gecko && version >= 10801 ) || ( env.opera && version >= 9.5 ) || ( env.air && version >= 1 ) || ( env.webkit && version >= 522 ) || false ); /** * The CSS class to be appended on the main UI containers, making it * easy to apply browser specific styles to it. * @name CKEDITOR.env.cssClass * @type String * @example * myDiv.className = CKEDITOR.env.cssClass; */ env.cssClass = 'cke_browser_' + ( env.ie ? 'ie' : env.gecko ? 'gecko' : env.opera ? 'opera' : env.webkit ? 'webkit' : 'unknown' ); if ( env.quirks ) env.cssClass += ' cke_browser_quirks'; if ( env.ie ) { env.cssClass += ' cke_browser_ie' + ( env.version < 7 ? '6' : env.version >= 8 ? document.documentMode: '7' ); if ( env.quirks ) env.cssClass += ' cke_browser_iequirks'; } if ( env.gecko && version < 10900 ) env.cssClass += ' cke_browser_gecko18'; if ( env.air ) env.cssClass += ' cke_browser_air'; return env; })(); } // PACKAGER_RENAME( CKEDITOR.env ) // PACKAGER_RENAME( CKEDITOR.env.ie )
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.skins} object, which is used to * manage skins loading. */ /** * Manages skins loading. * @namespace * @example */ CKEDITOR.skins = (function() { // Holds the list of loaded skins. var loaded = {}, paths = {}; var loadPart = function( editor, skinName, part, callback ) { // Get the skin definition. var skinDefinition = loaded[ skinName ]; if ( !editor.skin ) { editor.skin = skinDefinition; // Trigger init function if any. if ( skinDefinition.init ) skinDefinition.init( editor ); } var appendSkinPath = function( fileNames ) { for ( var n = 0 ; n < fileNames.length ; n++ ) { fileNames[ n ] = CKEDITOR.getUrl( paths[ skinName ] + fileNames[ n ] ); } }; function fixCSSTextRelativePath( cssStyleText, baseUrl ) { return cssStyleText.replace( /url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g, function( match, opener, path, closer ) { if ( /^\/|^\w?:/.test( path ) ) return match; else return 'url(' + baseUrl + opener + path + closer + ')'; } ); } // Get the part definition. part = skinDefinition[ part ]; var partIsLoaded = !part || !!part._isLoaded; // Call the callback immediately if already loaded. if ( partIsLoaded ) callback && callback(); else { // Put the callback in a queue. var pending = part._pending || ( part._pending = [] ); pending.push( callback ); // We may have more than one skin part load request. Just the first // one must do the loading job. if ( pending.length > 1 ) return; // Check whether the "css" and "js" properties have been defined // for that part. var cssIsLoaded = !part.css || !part.css.length, jsIsLoaded = !part.js || !part.js.length; // This is the function that will trigger the callback calls on // load. var checkIsLoaded = function() { if ( cssIsLoaded && jsIsLoaded ) { // Mark the part as loaded. part._isLoaded = 1; // Call all pending callbacks. for ( var i = 0 ; i < pending.length ; i++ ) { if ( pending[ i ] ) pending[ i ](); } } }; // Load the "css" pieces. if ( !cssIsLoaded ) { var cssPart = part.css; if ( CKEDITOR.tools.isArray( cssPart ) ) { appendSkinPath( cssPart ); for ( var c = 0 ; c < cssPart.length ; c++ ) CKEDITOR.document.appendStyleSheet( cssPart[ c ] ); } else { cssPart = fixCSSTextRelativePath( cssPart, CKEDITOR.getUrl( paths[ skinName ] ) ); // Processing Inline CSS part. CKEDITOR.document.appendStyleText( cssPart ); } part.css = cssPart; cssIsLoaded = 1; } // Load the "js" pieces. if ( !jsIsLoaded ) { appendSkinPath( part.js ); CKEDITOR.scriptLoader.load( part.js, function() { jsIsLoaded = 1; checkIsLoaded(); }); } // We may have nothing to load, so check it immediately. checkIsLoaded(); } }; return /** @lends CKEDITOR.skins */ { /** * Registers a skin definition. * @param {String} skinName The skin name. * @param {Object} skinDefinition The skin definition. * @example */ add : function( skinName, skinDefinition ) { loaded[ skinName ] = skinDefinition; skinDefinition.skinPath = paths[ skinName ] || ( paths[ skinName ] = CKEDITOR.getUrl( '_source/' + // @Packager.RemoveLine 'skins/' + skinName + '/' ) ); }, /** * Loads a skin part. Skins are defined in parts, which are basically * separated CSS files. This function is mainly used by the core code and * should not have much use out of it. * @param {String} skinName The name of the skin to be loaded. * @param {String} skinPart The skin part to be loaded. Common skin parts * are "editor" and "dialog". * @param {Function} [callback] A function to be called once the skin * part files are loaded. * @example */ load : function( editor, skinPart, callback ) { var skinName = editor.skinName, skinPath = editor.skinPath; if ( loaded[ skinName ] ) loadPart( editor, skinName, skinPart, callback ); else { paths[ skinName ] = skinPath; CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( skinPath + 'skin.js' ), function() { loadPart( editor, skinName, skinPart, callback ); }); } } }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ if ( !CKEDITOR.editor ) { /** * No element is linked to the editor instance. * @constant * @example */ CKEDITOR.ELEMENT_MODE_NONE = 0; /** * The element is to be replaced by the editor instance. * @constant * @example */ CKEDITOR.ELEMENT_MODE_REPLACE = 1; /** * The editor is to be created inside the element. * @constant * @example */ CKEDITOR.ELEMENT_MODE_APPENDTO = 2; /** * Creates an editor class instance. This constructor should be rarely * used, in favor of the {@link CKEDITOR} editor creation functions. * @ class Represents an editor instance. * @param {Object} instanceConfig Configuration values for this specific * instance. * @param {CKEDITOR.dom.element} [element] The element linked to this * instance. * @param {Number} [mode] The mode in which the element is linked to this * instance. See {@link #elementMode}. * @param {String} [data] Since 3.3. Initial value for the instance. * @augments CKEDITOR.event * @example */ CKEDITOR.editor = function( instanceConfig, element, mode, data ) { this._ = { // Save the config to be processed later by the full core code. instanceConfig : instanceConfig, element : element, data : data }; /** * The mode in which the {@link #element} is linked to this editor * instance. It can be any of the following values: * <ul> * <li>{@link CKEDITOR.ELEMENT_MODE_NONE}: No element is linked to the * editor instance.</li> * <li>{@link CKEDITOR.ELEMENT_MODE_REPLACE}: The element is to be * replaced by the editor instance.</li> * <li>{@link CKEDITOR.ELEMENT_MODE_APPENDTO}: The editor is to be * created inside the element.</li> * </ul> * @name CKEDITOR.editor.prototype.elementMode * @type Number * @example * var editor = CKEDITOR.replace( 'editor1' ); * alert( <b>editor.elementMode</b> ); "1" */ this.elementMode = mode || CKEDITOR.ELEMENT_MODE_NONE; // Call the CKEDITOR.event constructor to initialize this instance. CKEDITOR.event.call( this ); this._init(); }; /** * Replaces a &lt;textarea&gt; or a DOM element (DIV) with a CKEditor * instance. For textareas, the initial value in the editor will be the * textarea value. For DOM elements, their innerHTML will be used * instead. We recommend using TEXTAREA and DIV elements only. Do not use * this function directly. Use {@link CKEDITOR.replace} instead. * @param {Object|String} elementOrIdOrName The DOM element (textarea), its * ID or name. * @param {Object} [config] The specific configurations to apply to this * editor instance. Configurations set here will override global CKEditor * settings. * @returns {CKEDITOR.editor} The editor instance created. * @example */ CKEDITOR.editor.replace = function( elementOrIdOrName, config ) { var element = elementOrIdOrName; if ( typeof element != 'object' ) { // Look for the element by id. We accept any kind of element here. element = document.getElementById( elementOrIdOrName ); // Elements that should go into head are unacceptable (#6791). if ( element && element.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1} ) element = null; // If not found, look for elements by name. In this case we accept only // textareas. if ( !element ) { var i = 0, textareasByName = document.getElementsByName( elementOrIdOrName ); while ( ( element = textareasByName[ i++ ] ) && element.tagName.toLowerCase() != 'textarea' ) { /*jsl:pass*/ } } if ( !element ) throw '[CKEDITOR.editor.replace] The element with id or name "' + elementOrIdOrName + '" was not found.'; } // Do not replace the textarea right now, just hide it. The effective // replacement will be done by the _init function. element.style.visibility = 'hidden'; // Create the editor instance. return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_REPLACE ); }; /** * Creates a new editor instance inside a specific DOM element. Do not use * this function directly. Use {@link CKEDITOR.appendTo} instead. * @param {Object|String} elementOrId The DOM element or its ID. * @param {Object} [config] The specific configurations to apply to this * editor instance. Configurations set here will override global CKEditor * settings. * @param {String} [data] Since 3.3. Initial value for the instance. * @returns {CKEDITOR.editor} The editor instance created. * @example */ CKEDITOR.editor.appendTo = function( elementOrId, config, data ) { var element = elementOrId; if ( typeof element != 'object' ) { element = document.getElementById( elementOrId ); if ( !element ) throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.'; } // Create the editor instance. return new CKEDITOR.editor( config, element, CKEDITOR.ELEMENT_MODE_APPENDTO, data ); }; CKEDITOR.editor.prototype = { /** * Initializes the editor instance. This function will be overriden by the * full CKEDITOR.editor implementation (editor.js). * @private */ _init : function() { var pending = CKEDITOR.editor._pending || ( CKEDITOR.editor._pending = [] ); pending.push( this ); }, // Both fire and fireOnce will always pass this editor instance as the // "editor" param in CKEDITOR.event.fire. So, we override it to do that // automaticaly. /** @ignore */ fire : function( eventName, data ) { return CKEDITOR.event.prototype.fire.call( this, eventName, data, this ); }, /** @ignore */ fireOnce : function( eventName, data ) { return CKEDITOR.event.prototype.fireOnce.call( this, eventName, data, this ); } }; // "Inherit" (copy actually) from CKEDITOR.event. CKEDITOR.event.implementOn( CKEDITOR.editor.prototype, true ); }
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the "virtual" {@link CKEDITOR.eventInfo} class, which * contains the defintions of the event object passed to event listeners. * This file is for documentation purposes only. */ /** * (Virtual Class) Do not call this constructor. This class is not really part * of the API. * @class Virtual class that illustrates the features of the event object to be * passed to event listeners by a {@link CKEDITOR.event} based object. * @name CKEDITOR.eventInfo * @example * // Do not do this. * var myEvent = new CKEDITOR.eventInfo(); // Error: CKEDITOR.eventInfo is undefined */ /** * The event name. * @name CKEDITOR.eventInfo.prototype.name * @field * @type String * @example * someObject.on( 'someEvent', function( event ) * { * alert( <b>event.name</b> ); // "someEvent" * }); * someObject.fire( 'someEvent' ); */ /** * The object that publishes (sends) the event. * @name CKEDITOR.eventInfo.prototype.sender * @field * @type Object * @example * someObject.on( 'someEvent', function( event ) * { * alert( <b>event.sender</b> == someObject ); // "true" * }); * someObject.fire( 'someEvent' ); */ /** * The editor instance that holds the sender. May be the same as sender. May be * null if the sender is not part of an editor instance, like a component * running in standalone mode. * @name CKEDITOR.eventInfo.prototype.editor * @field * @type CKEDITOR.editor * @example * myButton.on( 'someEvent', function( event ) * { * alert( <b>event.editor</b> == myEditor ); // "true" * }); * myButton.fire( 'someEvent', null, <b>myEditor</b> ); */ /** * Any kind of additional data. Its format and usage is event dependent. * @name CKEDITOR.eventInfo.prototype.data * @field * @type Object * @example * someObject.on( 'someEvent', function( event ) * { * alert( <b>event.data</b> ); // "Example" * }); * someObject.fire( 'someEvent', <b>'Example'</b> ); */ /** * Any extra data appended during the listener registration. * @name CKEDITOR.eventInfo.prototype.listenerData * @field * @type Object * @example * someObject.on( 'someEvent', function( event ) * { * alert( <b>event.listenerData</b> ); // "Example" * } * , null, <b>'Example'</b> ); */ /** * Indicates that no further listeners are to be called. * @name CKEDITOR.eventInfo.prototype.stop * @function * @example * someObject.on( 'someEvent', function( event ) * { * <b>event.stop()</b>; * }); * someObject.on( 'someEvent', function( event ) * { * // This one will not be called. * }); * alert( someObject.fire( 'someEvent' ) ); // "false" */ /** * Indicates that the event is to be cancelled (if cancelable). * @name CKEDITOR.eventInfo.prototype.cancel * @function * @example * someObject.on( 'someEvent', function( event ) * { * <b>event.cancel()</b>; * }); * someObject.on( 'someEvent', function( event ) * { * // This one will not be called. * }); * alert( someObject.fire( 'someEvent' ) ); // "true" */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * Contains UI features related to an editor instance. * @constructor * @param {CKEDITOR.editor} editor The editor instance. * @example */ CKEDITOR.ui = function( editor ) { if ( editor.ui ) return editor.ui; /** * Object used to hold private stuff. * @private */ this._ = { handlers : {}, items : {}, editor : editor }; return this; }; // PACKAGER_RENAME( CKEDITOR.ui ) CKEDITOR.ui.prototype = { /** * Adds a UI item to the items collection. These items can be later used in * the interface. * @param {String} name The UI item name. * @param {Object} type The item type. * @param {Object} definition The item definition. The properties of this * object depend on the item type. * @example * // Add a new button named "MyBold". * editorInstance.ui.add( 'MyBold', CKEDITOR.UI_BUTTON, * { * label : 'My Bold', * command : 'bold' * }); */ add : function( name, type, definition ) { this._.items[ name ] = { type : type, // The name of {@link CKEDITOR.command} which associate with this UI. command : definition.command || null, args : Array.prototype.slice.call( arguments, 2 ) }; }, /** * Gets a UI object. * @param {String} name The UI item hame. * @example */ create : function( name ) { var item = this._.items[ name ], handler = item && this._.handlers[ item.type ], command = item && item.command && this._.editor.getCommand( item.command ); var result = handler && handler.create.apply( this, item.args ); // Allow overrides from skin ui definitions.. item && ( result = CKEDITOR.tools.extend( result, this._.editor.skin[ item.type ], true ) ); // Add reference inside command object. if ( command ) command.uiItems.push( result ); return result; }, /** * Adds a handler for a UI item type. The handler is responsible for * transforming UI item definitions in UI objects. * @param {Object} type The item type. * @param {Object} handler The handler definition. * @example */ addHandler : function( type, handler ) { this._.handlers[ type ] = handler; } }; CKEDITOR.event.implementOn( CKEDITOR.ui ); /** * (Virtual Class) Do not call this constructor. This class is not really part * of the API. It just illustrates the features of hanlder objects to be * passed to the {@link CKEDITOR.ui.prototype.addHandler} function. * @name CKEDITOR.ui.handlerDefinition * @constructor * @example */ /** * Transforms an item definition into an UI item object. * @name CKEDITOR.handlerDefinition.prototype.create * @function * @param {Object} definition The item definition. * @example * editorInstance.ui.addHandler( CKEDITOR.UI_BUTTON, * { * create : function( definition ) * { * return new CKEDITOR.ui.button( definition ); * } * }); */ /** * Internal event fired when a new UI element is ready * @name CKEDITOR.ui#ready * @event * @param {Object} element The new element */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * Creates a command class instance. * @class Represents a command that can be executed on an editor instance. * @param {CKEDITOR.editor} editor The editor instance this command will be * related to. * @param {CKEDITOR.commandDefinition} commandDefinition The command * definition. * @augments CKEDITOR.event * @example * var command = new CKEDITOR.command( editor, * { * exec : function( editor ) * { * alert( editor.document.getBody().getHtml() ); * } * }); */ CKEDITOR.command = function( editor, commandDefinition ) { /** * Lists UI items that are associated to this command. This list can be * used to interact with the UI on command execution (by the execution code * itself, for example). * @type Array * @example * alert( 'Number of UI items associated to this command: ' + command.<b>uiItems</b>.length ); */ this.uiItems = []; /** * Executes the command. * @param {Object} [data] Any data to pass to the command. Depends on the * command implementation and requirements. * @returns {Boolean} A boolean indicating that the command has been * successfully executed. * @example * command.<b>exec()</b>; // The command gets executed. */ this.exec = function( data ) { if ( this.state == CKEDITOR.TRISTATE_DISABLED ) return false; if ( this.editorFocus ) // Give editor focus if necessary (#4355). editor.focus(); if ( this.fire( 'exec' ) === true ) return true; return ( commandDefinition.exec.call( this, editor, data ) !== false ); }; /** * Explicitly update the status of the command, by firing the {@link CKEDITOR.command#event:refresh} event, * as well as invoke the {@link CKEDITOR.commandDefinition.prototype.refresh} method if defined, this method * is to allow different parts of the editor code to contribute in command status resolution. */ this.refresh = function() { if ( this.fire( 'refresh' ) === true ) return true; return ( commandDefinition.refresh && commandDefinition.refresh.apply( this, arguments ) !== false ); }; CKEDITOR.tools.extend( this, commandDefinition, // Defaults /** @lends CKEDITOR.command.prototype */ { /** * The editor modes within which the command can be executed. The * execution will have no action if the current mode is not listed * in this property. * @type Object * @default { wysiwyg : 1 } * @see CKEDITOR.editor.prototype.mode * @example * // Enable the command in both WYSIWYG and Source modes. * command.<b>modes</b> = { wysiwyg : 1, source : 1 }; * @example * // Enable the command in Source mode only. * command.<b>modes</b> = { source : 1 }; */ modes : { wysiwyg : 1 }, /** * Indicates that the editor will get the focus before executing * the command. * @type Boolean * @default true * @example * // Do not force the editor to have focus when executing the command. * command.<b>editorFocus</b> = false; */ editorFocus : 1, /** * Indicates the editor state. Possible values are: * <ul> * <li>{@link CKEDITOR.TRISTATE_DISABLED}: the command is * disabled. It's execution will have no effect. Same as * {@link disable}.</li> * <li>{@link CKEDITOR.TRISTATE_ON}: the command is enabled * and currently active in the editor (for context sensitive commands, * for example).</li> * <li>{@link CKEDITOR.TRISTATE_OFF}: the command is enabled * and currently inactive in the editor (for context sensitive * commands, for example).</li> * </ul> * Do not set this property directly, using the {@link #setState} * method instead. * @type Number * @default {@link CKEDITOR.TRISTATE_OFF} * @example * if ( command.<b>state</b> == CKEDITOR.TRISTATE_DISABLED ) * alert( 'This command is disabled' ); */ state : CKEDITOR.TRISTATE_OFF }); // Call the CKEDITOR.event constructor to initialize this instance. CKEDITOR.event.call( this ); }; CKEDITOR.command.prototype = { /** * Enables the command for execution. The command state (see * {@link CKEDITOR.command.prototype.state}) available before disabling it * is restored. * @example * command.<b>enable()</b>; * command.exec(); // Execute the command. */ enable : function() { if ( this.state == CKEDITOR.TRISTATE_DISABLED ) this.setState( ( !this.preserveState || ( typeof this.previousState == 'undefined' ) ) ? CKEDITOR.TRISTATE_OFF : this.previousState ); }, /** * Disables the command for execution. The command state (see * {@link CKEDITOR.command.prototype.state}) will be set to * {@link CKEDITOR.TRISTATE_DISABLED}. * @example * command.<b>disable()</b>; * command.exec(); // "false" - Nothing happens. */ disable : function() { this.setState( CKEDITOR.TRISTATE_DISABLED ); }, /** * Sets the command state. * @param {Number} newState The new state. See {@link #state}. * @returns {Boolean} Returns "true" if the command state changed. * @example * command.<b>setState( CKEDITOR.TRISTATE_ON )</b>; * command.exec(); // Execute the command. * command.<b>setState( CKEDITOR.TRISTATE_DISABLED )</b>; * command.exec(); // "false" - Nothing happens. * command.<b>setState( CKEDITOR.TRISTATE_OFF )</b>; * command.exec(); // Execute the command. */ setState : function( newState ) { // Do nothing if there is no state change. if ( this.state == newState ) return false; this.previousState = this.state; // Set the new state. this.state = newState; // Fire the "state" event, so other parts of the code can react to the // change. this.fire( 'state' ); return true; }, /** * Toggles the on/off (active/inactive) state of the command. This is * mainly used internally by context sensitive commands. * @example * command.<b>toggleState()</b>; */ toggleState : function() { if ( this.state == CKEDITOR.TRISTATE_OFF ) this.setState( CKEDITOR.TRISTATE_ON ); else if ( this.state == CKEDITOR.TRISTATE_ON ) this.setState( CKEDITOR.TRISTATE_OFF ); } }; CKEDITOR.event.implementOn( CKEDITOR.command.prototype, true ); /** * Indicates the previous command state. * @name CKEDITOR.command.prototype.previousState * @type Number * @see #state * @example * alert( command.<b>previousState</b> ); */ /** * Fired when the command state changes. * @name CKEDITOR.command#state * @event * @example * command.on( <b>'state'</b> , function( e ) * { * // Alerts the new state. * alert( this.state ); * }); */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * A lightweight representation of an HTML comment. * @constructor * @example */ CKEDITOR.htmlParser.comment = function( value ) { /** * The comment text. * @type String * @example */ this.value = value; /** @private */ this._ = { isBlockLike : false }; }; CKEDITOR.htmlParser.comment.prototype = { /** * The node type. This is a constant value set to {@link CKEDITOR.NODE_COMMENT}. * @type Number * @example */ type : CKEDITOR.NODE_COMMENT, /** * Writes the HTML representation of this comment to a CKEDITOR.htmlWriter. * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. * @example */ writeHtml : function( writer, filter ) { var comment = this.value; if ( filter ) { if ( !( comment = filter.onComment( comment, this ) ) ) return; if ( typeof comment != 'string' ) { comment.parent = this.parent; comment.writeHtml( writer, filter ); return; } } writer.comment( comment ); } };
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { CKEDITOR.htmlParser.filter = CKEDITOR.tools.createClass( { $ : function( rules ) { this._ = { elementNames : [], attributeNames : [], elements : { $length : 0 }, attributes : { $length : 0 } }; if ( rules ) this.addRules( rules, 10 ); }, proto : { addRules : function( rules, priority ) { if ( typeof priority != 'number' ) priority = 10; // Add the elementNames. addItemsToList( this._.elementNames, rules.elementNames, priority ); // Add the attributeNames. addItemsToList( this._.attributeNames, rules.attributeNames, priority ); // Add the elements. addNamedItems( this._.elements, rules.elements, priority ); // Add the attributes. addNamedItems( this._.attributes, rules.attributes, priority ); // Add the text. this._.text = transformNamedItem( this._.text, rules.text, priority ) || this._.text; // Add the comment. this._.comment = transformNamedItem( this._.comment, rules.comment, priority ) || this._.comment; // Add root fragment. this._.root = transformNamedItem( this._.root, rules.root, priority ) || this._.root; }, onElementName : function( name ) { return filterName( name, this._.elementNames ); }, onAttributeName : function( name ) { return filterName( name, this._.attributeNames ); }, onText : function( text ) { var textFilter = this._.text; return textFilter ? textFilter.filter( text ) : text; }, onComment : function( commentText, comment ) { var textFilter = this._.comment; return textFilter ? textFilter.filter( commentText, comment ) : commentText; }, onFragment : function( element ) { var rootFilter = this._.root; return rootFilter ? rootFilter.filter( element ) : element; }, onElement : function( element ) { // We must apply filters set to the specific element name as // well as those set to the generic $ name. So, add both to an // array and process them in a small loop. var filters = [ this._.elements[ '^' ], this._.elements[ element.name ], this._.elements.$ ], filter, ret; for ( var i = 0 ; i < 3 ; i++ ) { filter = filters[ i ]; if ( filter ) { ret = filter.filter( element, this ); if ( ret === false ) return null; if ( ret && ret != element ) return this.onNode( ret ); // The non-root element has been dismissed by one of the filters. if ( element.parent && !element.name ) break; } } return element; }, onNode : function( node ) { var type = node.type; return type == CKEDITOR.NODE_ELEMENT ? this.onElement( node ) : type == CKEDITOR.NODE_TEXT ? new CKEDITOR.htmlParser.text( this.onText( node.value ) ) : type == CKEDITOR.NODE_COMMENT ? new CKEDITOR.htmlParser.comment( this.onComment( node.value ) ): null; }, onAttribute : function( element, name, value ) { var filter = this._.attributes[ name ]; if ( filter ) { var ret = filter.filter( value, element, this ); if ( ret === false ) return false; if ( typeof ret != 'undefined' ) return ret; } return value; } } }); function filterName( name, filters ) { for ( var i = 0 ; name && i < filters.length ; i++ ) { var filter = filters[ i ]; name = name.replace( filter[ 0 ], filter[ 1 ] ); } return name; } function addItemsToList( list, items, priority ) { if ( typeof items == 'function' ) items = [ items ]; var i, j, listLength = list.length, itemsLength = items && items.length; if ( itemsLength ) { // Find the index to insert the items at. for ( i = 0 ; i < listLength && list[ i ].pri < priority ; i++ ) { /*jsl:pass*/ } // Add all new items to the list at the specific index. for ( j = itemsLength - 1 ; j >= 0 ; j-- ) { var item = items[ j ]; if ( item ) { item.pri = priority; list.splice( i, 0, item ); } } } } function addNamedItems( hashTable, items, priority ) { if ( items ) { for ( var name in items ) { var current = hashTable[ name ]; hashTable[ name ] = transformNamedItem( current, items[ name ], priority ); if ( !current ) hashTable.$length++; } } } function transformNamedItem( current, item, priority ) { if ( item ) { item.pri = priority; if ( current ) { // If the current item is not an Array, transform it. if ( !current.splice ) { if ( current.pri > priority ) current = [ item, current ]; else current = [ current, item ]; current.filter = callItems; } else addItemsToList( current, item, priority ); return current; } else { item.filter = item; return item; } } } // Invoke filters sequentially on the array, break the iteration // when it doesn't make sense to continue anymore. function callItems( currentEntry ) { var isNode = currentEntry.type || currentEntry instanceof CKEDITOR.htmlParser.fragment; for ( var i = 0 ; i < this.length ; i++ ) { // Backup the node info before filtering. if ( isNode ) { var orgType = currentEntry.type, orgName = currentEntry.name; } var item = this[ i ], ret = item.apply( window, arguments ); if ( ret === false ) return ret; // We're filtering node (element/fragment). if ( isNode ) { // No further filtering if it's not anymore // fitable for the subsequent filters. if ( ret && ( ret.name != orgName || ret.type != orgType ) ) { return ret; } } // Filtering value (nodeName/textValue/attrValue). else { // No further filtering if it's not // any more values. if ( typeof ret != 'string' ) return ret; } ret != undefined && ( currentEntry = ret ); } return currentEntry; } })(); // "entities" plugin /* { text : function( text ) { // TODO : Process entities. return text.toUpperCase(); } }; */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { /** * A lightweight representation of HTML text. * @constructor * @example */ CKEDITOR.htmlParser.cdata = function( value ) { /** * The CDATA value. * @type String * @example */ this.value = value; }; CKEDITOR.htmlParser.cdata.prototype = { /** * CDATA has the same type as {@link CKEDITOR.htmlParser.text} This is * a constant value set to {@link CKEDITOR.NODE_TEXT}. * @type Number * @example */ type : CKEDITOR.NODE_TEXT, /** * Writes write the CDATA with no special manipulations. * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. */ writeHtml : function( writer ) { writer.write( this.value ); } }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { /** * A lightweight representation of HTML text. * @constructor * @example */ CKEDITOR.htmlParser.text = function( value ) { /** * The text value. * @type String * @example */ this.value = value; /** @private */ this._ = { isBlockLike : false }; }; CKEDITOR.htmlParser.text.prototype = { /** * The node type. This is a constant value set to {@link CKEDITOR.NODE_TEXT}. * @type Number * @example */ type : CKEDITOR.NODE_TEXT, /** * Writes the HTML representation of this text to a CKEDITOR.htmlWriter. * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. * @example */ writeHtml : function( writer, filter ) { var text = this.value; if ( filter && !( text = filter.onText( text, this ) ) ) return; writer.text( text ); } }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( { $ : function() { this._ = { output : [] }; }, proto : { /** * Writes the tag opening part for a opener tag. * @param {String} tagName The element name for this tag. * @param {Object} attributes The attributes defined for this tag. The * attributes could be used to inspect the tag. * @example * // Writes "&lt;p". * writer.openTag( 'p', { class : 'MyClass', id : 'MyId' } ); */ openTag : function( tagName, attributes ) { this._.output.push( '<', tagName ); }, /** * Writes the tag closing part for a opener tag. * @param {String} tagName The element name for this tag. * @param {Boolean} isSelfClose Indicates that this is a self-closing tag, * like "br" or "img". * @example * // Writes "&gt;". * writer.openTagClose( 'p', false ); * @example * // Writes " /&gt;". * writer.openTagClose( 'br', true ); */ openTagClose : function( tagName, isSelfClose ) { if ( isSelfClose ) this._.output.push( ' />' ); else this._.output.push( '>' ); }, /** * Writes an attribute. This function should be called after opening the * tag with {@link #openTagClose}. * @param {String} attName The attribute name. * @param {String} attValue The attribute value. * @example * // Writes ' class="MyClass"'. * writer.attribute( 'class', 'MyClass' ); */ attribute : function( attName, attValue ) { // Browsers don't always escape special character in attribute values. (#4683, #4719). if ( typeof attValue == 'string' ) attValue = CKEDITOR.tools.htmlEncodeAttr( attValue ); this._.output.push( ' ', attName, '="', attValue, '"' ); }, /** * Writes a closer tag. * @param {String} tagName The element name for this tag. * @example * // Writes "&lt;/p&gt;". * writer.closeTag( 'p' ); */ closeTag : function( tagName ) { this._.output.push( '</', tagName, '>' ); }, /** * Writes text. * @param {String} text The text value * @example * // Writes "Hello Word". * writer.text( 'Hello Word' ); */ text : function( text ) { this._.output.push( text ); }, /** * Writes a comment. * @param {String} comment The comment text. * @example * // Writes "&lt;!-- My comment --&gt;". * writer.comment( ' My comment ' ); */ comment : function( comment ) { this._.output.push( '<!--', comment, '-->' ); }, /** * Writes any kind of data to the ouput. * @example * writer.write( 'This is an &lt;b&gt;example&lt;/b&gt;.' ); */ write : function( data ) { this._.output.push( data ); }, /** * Empties the current output buffer. * @example * writer.reset(); */ reset : function() { this._.output = []; this._.indent = false; }, /** * Empties the current output buffer. * @param {Boolean} reset Indicates that the {@link reset} function is to * be automatically called after retrieving the HTML. * @returns {String} The HTML written to the writer so far. * @example * var html = writer.getHtml(); */ getHtml : function( reset ) { var html = this._.output.join( '' ); if ( reset ) this.reset(); return html; } } });
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * A lightweight representation of an HTML DOM structure. * @constructor * @example */ CKEDITOR.htmlParser.fragment = function() { /** * The nodes contained in the root of this fragment. * @type Array * @example * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<b>Sample</b> Text' ); * alert( fragment.children.length ); "2" */ this.children = []; /** * Get the fragment parent. Should always be null. * @type Object * @default null * @example */ this.parent = null; /** @private */ this._ = { isBlockLike : true, hasInlineStarted : false }; }; (function() { // Block-level elements whose internal structure should be respected during // parser fixing. var nonBreakingBlocks = CKEDITOR.tools.extend( { table:1,ul:1,ol:1,dl:1 }, CKEDITOR.dtd.table, CKEDITOR.dtd.ul, CKEDITOR.dtd.ol, CKEDITOR.dtd.dl ); // IE < 8 don't output the close tag on definition list items. (#6975) var optionalCloseTags = CKEDITOR.env.ie && CKEDITOR.env.version < 8 ? { dd : 1, dt :1 } : {}; var listBlocks = { ol:1, ul:1 }; // Dtd of the fragment element, basically it accept anything except for intermediate structure, e.g. orphan <li>. var rootDtd = CKEDITOR.tools.extend( {}, { html: 1 }, CKEDITOR.dtd.html, CKEDITOR.dtd.body, CKEDITOR.dtd.head, { style:1,script:1 } ); function isRemoveEmpty( node ) { // Empty link is to be removed when empty but not anchor. (#7894) return node.name == 'a' && node.attributes.href || CKEDITOR.dtd.$removeEmpty[ node.name ]; } /** * Creates a {@link CKEDITOR.htmlParser.fragment} from an HTML string. * @param {String} fragmentHtml The HTML to be parsed, filling the fragment. * @param {Number} [fixForBody=false] Wrap body with specified element if needed. * @param {CKEDITOR.htmlParser.element} contextNode Parse the html as the content of this element. * @returns CKEDITOR.htmlParser.fragment The fragment created. * @example * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '<b>Sample</b> Text' ); * alert( fragment.children[0].name ); "b" * alert( fragment.children[1].value ); " Text" */ CKEDITOR.htmlParser.fragment.fromHtml = function( fragmentHtml, fixForBody, contextNode ) { var parser = new CKEDITOR.htmlParser(), fragment = contextNode || new CKEDITOR.htmlParser.fragment(), pendingInline = [], pendingBRs = [], currentNode = fragment, // Indicate we're inside a <textarea> element, spaces should be touched differently. inTextarea = false, // Indicate we're inside a <pre> element, spaces should be touched differently. inPre = false; function checkPending( newTagName ) { var pendingBRsSent; if ( pendingInline.length > 0 ) { for ( var i = 0 ; i < pendingInline.length ; i++ ) { var pendingElement = pendingInline[ i ], pendingName = pendingElement.name, pendingDtd = CKEDITOR.dtd[ pendingName ], currentDtd = currentNode.name && CKEDITOR.dtd[ currentNode.name ]; if ( ( !currentDtd || currentDtd[ pendingName ] ) && ( !newTagName || !pendingDtd || pendingDtd[ newTagName ] || !CKEDITOR.dtd[ newTagName ] ) ) { if ( !pendingBRsSent ) { sendPendingBRs(); pendingBRsSent = 1; } // Get a clone for the pending element. pendingElement = pendingElement.clone(); // Add it to the current node and make it the current, // so the new element will be added inside of it. pendingElement.parent = currentNode; currentNode = pendingElement; // Remove the pending element (back the index by one // to properly process the next entry). pendingInline.splice( i, 1 ); i--; } else { // Some element of the same type cannot be nested, flat them, // e.g. <a href="#">foo<a href="#">bar</a></a>. (#7894) if ( pendingName == currentNode.name ) addElement( currentNode, currentNode.parent, 1 ), i--; } } } } function sendPendingBRs() { while ( pendingBRs.length ) currentNode.add( pendingBRs.shift() ); } /* * Beside of simply append specified element to target, this function also takes * care of other dirty lifts like forcing block in body, trimming spaces at * the block boundaries etc. * * @param {Element} element The element to be added as the last child of {@link target}. * @param {Element} target The parent element to relieve the new node. * @param {Boolean} [moveCurrent=false] Don't change the "currentNode" global unless * there's a return point node specified on the element, otherwise move current onto {@link target} node. */ function addElement( element, target, moveCurrent ) { // Ignore any element that has already been added. if ( element.previous !== undefined ) return; target = target || currentNode || fragment; // Current element might be mangled by fix body below, // save it for restore later. var savedCurrent = currentNode; // If the target is the fragment and this inline element can't go inside // body (if fixForBody). if ( fixForBody && ( !target.type || target.name == 'body' ) ) { var elementName, realElementName; if ( element.attributes && ( realElementName = element.attributes[ 'data-cke-real-element-type' ] ) ) elementName = realElementName; else elementName = element.name; if ( elementName && !( elementName in CKEDITOR.dtd.$body || elementName == 'body' || element.isOrphan ) ) { // Create a <p> in the fragment. currentNode = target; parser.onTagOpen( fixForBody, {} ); // The new target now is the <p>. element.returnPoint = target = currentNode; } } // Rtrim empty spaces on block end boundary. (#3585) if ( element._.isBlockLike && element.name != 'pre' && element.name != 'textarea' ) { var length = element.children.length, lastChild = element.children[ length - 1 ], text; if ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT ) { if ( !( text = CKEDITOR.tools.rtrim( lastChild.value ) ) ) element.children.length = length -1; else lastChild.value = text; } } target.add( element ); if ( element.name == 'pre' ) inPre = false; if ( element.name == 'textarea' ) inTextarea = false; if ( element.returnPoint ) { currentNode = element.returnPoint; delete element.returnPoint; } else currentNode = moveCurrent ? target : savedCurrent; } parser.onTagOpen = function( tagName, attributes, selfClosing, optionalClose ) { var element = new CKEDITOR.htmlParser.element( tagName, attributes ); // "isEmpty" will be always "false" for unknown elements, so we // must force it if the parser has identified it as a selfClosing tag. if ( element.isUnknown && selfClosing ) element.isEmpty = true; // Check for optional closed elements, including browser quirks and manually opened blocks. element.isOptionalClose = tagName in optionalCloseTags || optionalClose; // This is a tag to be removed if empty, so do not add it immediately. if ( isRemoveEmpty( element ) ) { pendingInline.push( element ); return; } else if ( tagName == 'pre' ) inPre = true; else if ( tagName == 'br' && inPre ) { currentNode.add( new CKEDITOR.htmlParser.text( '\n' ) ); return; } else if ( tagName == 'textarea' ) inTextarea = true; if ( tagName == 'br' ) { pendingBRs.push( element ); return; } while( 1 ) { var currentName = currentNode.name; var currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ] || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) : rootDtd; // If the element cannot be child of the current element. if ( !element.isUnknown && !currentNode.isUnknown && !currentDtd[ tagName ] ) { // Current node doesn't have a close tag, time for a close // as this element isn't fit in. (#7497) if ( currentNode.isOptionalClose ) parser.onTagClose( currentName ); // Fixing malformed nested lists by moving it into a previous list item. (#3828) else if ( tagName in listBlocks && currentName in listBlocks ) { var children = currentNode.children, lastChild = children[ children.length - 1 ]; // Establish the list item if it's not existed. if ( !( lastChild && lastChild.name == 'li' ) ) addElement( ( lastChild = new CKEDITOR.htmlParser.element( 'li' ) ), currentNode ); !element.returnPoint && ( element.returnPoint = currentNode ); currentNode = lastChild; } // Establish new list root for orphan list items. else if ( tagName in CKEDITOR.dtd.$listItem && currentName != tagName ) parser.onTagOpen( tagName == 'li' ? 'ul' : 'dl', {}, 0, 1 ); // We're inside a structural block like table and list, AND the incoming element // is not of the same type (e.g. <td>td1<td>td2</td>), we simply add this new one before it, // and most importantly, return back to here once this element is added, // e.g. <table><tr><td>td1</td><p>p1</p><td>td2</td></tr></table> else if ( currentName in nonBreakingBlocks && currentName != tagName ) { !element.returnPoint && ( element.returnPoint = currentNode ); currentNode = currentNode.parent; } else { // The current element is an inline element, which // need to be continued even after the close, so put // it in the pending list. if ( currentName in CKEDITOR.dtd.$inline ) pendingInline.unshift( currentNode ); // The most common case where we just need to close the // current one and append the new one to the parent. if ( currentNode.parent ) addElement( currentNode, currentNode.parent, 1 ); // We've tried our best to fix the embarrassment here, while // this element still doesn't find it's parent, mark it as // orphan and show our tolerance to it. else { element.isOrphan = 1; break; } } } else break; } checkPending( tagName ); sendPendingBRs(); element.parent = currentNode; if ( element.isEmpty ) addElement( element ); else currentNode = element; }; parser.onTagClose = function( tagName ) { // Check if there is any pending tag to be closed. for ( var i = pendingInline.length - 1 ; i >= 0 ; i-- ) { // If found, just remove it from the list. if ( tagName == pendingInline[ i ].name ) { pendingInline.splice( i, 1 ); return; } } var pendingAdd = [], newPendingInline = [], candidate = currentNode; while ( candidate != fragment && candidate.name != tagName ) { // If this is an inline element, add it to the pending list, if we're // really closing one of the parents element later, they will continue // after it. if ( !candidate._.isBlockLike ) newPendingInline.unshift( candidate ); // This node should be added to it's parent at this point. But, // it should happen only if the closing tag is really closing // one of the nodes. So, for now, we just cache it. pendingAdd.push( candidate ); // Make sure return point is properly restored. candidate = candidate.returnPoint || candidate.parent; } if ( candidate != fragment ) { // Add all elements that have been found in the above loop. for ( i = 0 ; i < pendingAdd.length ; i++ ) { var node = pendingAdd[ i ]; addElement( node, node.parent ); } currentNode = candidate; if ( candidate._.isBlockLike ) sendPendingBRs(); addElement( candidate, candidate.parent ); // The parent should start receiving new nodes now, except if // addElement changed the currentNode. if ( candidate == currentNode ) currentNode = currentNode.parent; pendingInline = pendingInline.concat( newPendingInline ); } if ( tagName == 'body' ) fixForBody = false; }; parser.onText = function( text ) { // Trim empty spaces at beginning of text contents except <pre> and <textarea>. if ( ( !currentNode._.hasInlineStarted || pendingBRs.length ) && !inPre && !inTextarea ) { text = CKEDITOR.tools.ltrim( text ); if ( text.length === 0 ) return; } var currentName = currentNode.name, currentDtd = currentName ? ( CKEDITOR.dtd[ currentName ] || ( currentNode._.isBlockLike ? CKEDITOR.dtd.div : CKEDITOR.dtd.span ) ) : rootDtd; // Fix orphan text in list/table. (#8540) (#8870) if ( !inTextarea && !currentDtd [ '#' ] && currentName in nonBreakingBlocks ) { parser.onTagOpen( currentName in listBlocks ? 'li' : currentName == 'dl' ? 'dd' : currentName == 'table' ? 'tr' : currentName == 'tr' ? 'td' : '' ); parser.onText( text ); return; } sendPendingBRs(); checkPending(); if ( fixForBody && ( !currentNode.type || currentNode.name == 'body' ) && CKEDITOR.tools.trim( text ) ) { this.onTagOpen( fixForBody, {}, 0, 1 ); } // Shrinking consequential spaces into one single for all elements // text contents. if ( !inPre && !inTextarea ) text = text.replace( /[\t\r\n ]{2,}|[\t\r\n]/g, ' ' ); currentNode.add( new CKEDITOR.htmlParser.text( text ) ); }; parser.onCDATA = function( cdata ) { currentNode.add( new CKEDITOR.htmlParser.cdata( cdata ) ); }; parser.onComment = function( comment ) { sendPendingBRs(); checkPending(); currentNode.add( new CKEDITOR.htmlParser.comment( comment ) ); }; // Parse it. parser.parse( fragmentHtml ); // Send all pending BRs except one, which we consider a unwanted bogus. (#5293) sendPendingBRs( !CKEDITOR.env.ie && 1 ); // Close all pending nodes, make sure return point is properly restored. while ( currentNode != fragment ) addElement( currentNode, currentNode.parent, 1 ); return fragment; }; CKEDITOR.htmlParser.fragment.prototype = { /** * Adds a node to this fragment. * @param {Object} node The node to be added. It can be any of of the * following types: {@link CKEDITOR.htmlParser.element}, * {@link CKEDITOR.htmlParser.text} and * {@link CKEDITOR.htmlParser.comment}. * @param {Number} [index] From where the insertion happens. * @example */ add : function( node, index ) { isNaN( index ) && ( index = this.children.length ); var previous = index > 0 ? this.children[ index - 1 ] : null; if ( previous ) { // If the block to be appended is following text, trim spaces at // the right of it. if ( node._.isBlockLike && previous.type == CKEDITOR.NODE_TEXT ) { previous.value = CKEDITOR.tools.rtrim( previous.value ); // If we have completely cleared the previous node. if ( previous.value.length === 0 ) { // Remove it from the list and add the node again. this.children.pop(); this.add( node ); return; } } previous.next = node; } node.previous = previous; node.parent = this; this.children.splice( index, 0, node ); this._.hasInlineStarted = node.type == CKEDITOR.NODE_TEXT || ( node.type == CKEDITOR.NODE_ELEMENT && !node._.isBlockLike ); }, /** * Writes the fragment HTML to a CKEDITOR.htmlWriter. * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. * @example * var writer = new CKEDITOR.htmlWriter(); * var fragment = CKEDITOR.htmlParser.fragment.fromHtml( '&lt;P&gt;&lt;B&gt;Example' ); * fragment.writeHtml( writer ) * alert( writer.getHtml() ); "&lt;p&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/p&gt;" */ writeHtml : function( writer, filter ) { var isChildrenFiltered; this.filterChildren = function() { var writer = new CKEDITOR.htmlParser.basicWriter(); this.writeChildrenHtml.call( this, writer, filter, true ); var html = writer.getHtml(); this.children = new CKEDITOR.htmlParser.fragment.fromHtml( html ).children; isChildrenFiltered = 1; }; // Filtering the root fragment before anything else. !this.name && filter && filter.onFragment( this ); this.writeChildrenHtml( writer, isChildrenFiltered ? null : filter ); }, writeChildrenHtml : function( writer, filter ) { for ( var i = 0 ; i < this.children.length ; i++ ) this.children[i].writeHtml( writer, filter ); } }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * A lightweight representation of an HTML element. * @param {String} name The element name. * @param {Object} attributes And object holding all attributes defined for * this element. * @constructor * @example */ CKEDITOR.htmlParser.element = function( name, attributes ) { /** * The element name. * @type String * @example */ this.name = name; /** * Holds the attributes defined for this element. * @type Object * @example */ this.attributes = attributes || ( attributes = {} ); /** * The nodes that are direct children of this element. * @type Array * @example */ this.children = []; var tagName = attributes[ 'data-cke-real-element-type' ] || name || ''; // Reveal the real semantic of our internal custom tag name (#6639). var internalTag = tagName.match( /^cke:(.*)/ ); internalTag && ( tagName = internalTag[ 1 ] ); var dtd = CKEDITOR.dtd, isBlockLike = !!( dtd.$nonBodyContent[ tagName ] || dtd.$block[ tagName ] || dtd.$listItem[ tagName ] || dtd.$tableContent[ tagName ] || dtd.$nonEditable[ tagName ] || tagName == 'br' ), isEmpty = !!dtd.$empty[ name ]; this.isEmpty = isEmpty; this.isUnknown = !dtd[ name ]; /** @private */ this._ = { isBlockLike : isBlockLike, hasInlineStarted : isEmpty || !isBlockLike }; }; /** * Object presentation of CSS style declaration text. * @param {CKEDITOR.htmlParser.element|String} elementOrStyleText A html parser element or the inline style text. */ CKEDITOR.htmlParser.cssStyle = function() { var styleText, arg = arguments[ 0 ], rules = {}; styleText = arg instanceof CKEDITOR.htmlParser.element ? arg.attributes.style : arg; // html-encoded quote might be introduced by 'font-family' // from MS-Word which confused the following regexp. e.g. //'font-family: &quot;Lucida, Console&quot;' ( styleText || '' ) .replace( /&quot;/g, '"' ) .replace( /\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g, function( match, name, value ) { name == 'font-family' && ( value = value.replace( /["']/g, '' ) ); rules[ name.toLowerCase() ] = value; }); return { rules : rules, /** * Apply the styles onto the specified element or object. * @param {CKEDITOR.htmlParser.element|CKEDITOR.dom.element|Object} obj */ populate : function( obj ) { var style = this.toString(); if ( style ) { obj instanceof CKEDITOR.dom.element ? obj.setAttribute( 'style', style ) : obj instanceof CKEDITOR.htmlParser.element ? obj.attributes.style = style : obj.style = style; } }, toString : function() { var output = []; for ( var i in rules ) rules[ i ] && output.push( i, ':', rules[ i ], ';' ); return output.join( '' ); } }; }; (function() { // Used to sort attribute entries in an array, where the first element of // each object is the attribute name. var sortAttribs = function( a, b ) { a = a[0]; b = b[0]; return a < b ? -1 : a > b ? 1 : 0; }; CKEDITOR.htmlParser.element.prototype = { /** * The node type. This is a constant value set to {@link CKEDITOR.NODE_ELEMENT}. * @type Number * @example */ type : CKEDITOR.NODE_ELEMENT, /** * Adds a node to the element children list. * @param {Object} node The node to be added. It can be any of of the * following types: {@link CKEDITOR.htmlParser.element}, * {@link CKEDITOR.htmlParser.text} and * {@link CKEDITOR.htmlParser.comment}. * @function * @example */ add : CKEDITOR.htmlParser.fragment.prototype.add, /** * Clone this element. * @returns {CKEDITOR.htmlParser.element} The element clone. * @example */ clone : function() { return new CKEDITOR.htmlParser.element( this.name, this.attributes ); }, /** * Writes the element HTML to a CKEDITOR.htmlWriter. * @param {CKEDITOR.htmlWriter} writer The writer to which write the HTML. * @example */ writeHtml : function( writer, filter ) { var attributes = this.attributes; // Ignore cke: prefixes when writing HTML. var element = this, writeName = element.name, a, newAttrName, value; var isChildrenFiltered; /** * Providing an option for bottom-up filtering order ( element * children to be pre-filtered before the element itself ). */ element.filterChildren = function() { if ( !isChildrenFiltered ) { var writer = new CKEDITOR.htmlParser.basicWriter(); CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call( element, writer, filter ); element.children = new CKEDITOR.htmlParser.fragment.fromHtml( writer.getHtml(), 0, element.clone() ).children; isChildrenFiltered = 1; } }; if ( filter ) { while ( true ) { if ( !( writeName = filter.onElementName( writeName ) ) ) return; element.name = writeName; if ( !( element = filter.onElement( element ) ) ) return; element.parent = this.parent; if ( element.name == writeName ) break; // If the element has been replaced with something of a // different type, then make the replacement write itself. if ( element.type != CKEDITOR.NODE_ELEMENT ) { element.writeHtml( writer, filter ); return; } writeName = element.name; // This indicate that the element has been dropped by // filter but not the children. if ( !writeName ) { // Fix broken parent refs. for ( var c = 0, length = this.children.length ; c < length ; c++ ) this.children[ c ].parent = element.parent; this.writeChildrenHtml.call( element, writer, isChildrenFiltered ? null : filter ); return; } } // The element may have been changed, so update the local // references. attributes = element.attributes; } // Open element tag. writer.openTag( writeName, attributes ); // Copy all attributes to an array. var attribsArray = []; // Iterate over the attributes twice since filters may alter // other attributes. for ( var i = 0 ; i < 2; i++ ) { for ( a in attributes ) { newAttrName = a; value = attributes[ a ]; if ( i == 1 ) attribsArray.push( [ a, value ] ); else if ( filter ) { while ( true ) { if ( !( newAttrName = filter.onAttributeName( a ) ) ) { delete attributes[ a ]; break; } else if ( newAttrName != a ) { delete attributes[ a ]; a = newAttrName; continue; } else break; } if ( newAttrName ) { if ( ( value = filter.onAttribute( element, newAttrName, value ) ) === false ) delete attributes[ newAttrName ]; else attributes [ newAttrName ] = value; } } } } // Sort the attributes by name. if ( writer.sortAttributes ) attribsArray.sort( sortAttribs ); // Send the attributes. var len = attribsArray.length; for ( i = 0 ; i < len ; i++ ) { var attrib = attribsArray[ i ]; writer.attribute( attrib[0], attrib[1] ); } // Close the tag. writer.openTagClose( writeName, element.isEmpty ); if ( !element.isEmpty ) { this.writeChildrenHtml.call( element, writer, isChildrenFiltered ? null : filter ); // Close the element. writer.closeTag( writeName ); } }, writeChildrenHtml : function( writer, filter ) { // Send children. CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.apply( this, arguments ); } }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the "virtual" {@link CKEDITOR.commandDefinition} class, * which contains the defintion of a command. This file is for * documentation purposes only. */ /** * (Virtual Class) Do not call this constructor. This class is not really part * of the API. * @name CKEDITOR.commandDefinition * @class Virtual class that illustrates the features of command objects to be * passed to the {@link CKEDITOR.editor.prototype.addCommand} function. * @example */ /** * The function to be fired when the commend is executed. * @name CKEDITOR.commandDefinition.prototype.exec * @function * @param {CKEDITOR.editor} editor The editor within which run the command. * @param {Object} [data] Additional data to be used to execute the command. * @returns {Boolean} Whether the command has been successfully executed. * Defaults to "true", if nothing is returned. * @example * editorInstance.addCommand( 'sample', * { * exec : function( editor ) * { * alert( 'Executing a command for the editor name "' + editor.name + '"!' ); * } * }); */ /** * Whether the command need to be hooked into the redo/undo system. * @name CKEDITOR.commandDefinition.prototype.canUndo * @type {Boolean} * @default true * @field * @example * editorInstance.addCommand( 'alertName', * { * exec : function( editor ) * { * alert( editor.name ); * }, * canUndo : false // No support for undo/redo * }); */ /** * Whether the command is asynchronous, which means that the * {@link CKEDITOR.editor#event:afterCommandExec} event will be fired by the * command itself manually, and that the return value of this command is not to * be returned by the {@link CKEDITOR.command#exec} function. * @name CKEDITOR.commandDefinition.prototype.async * @default false * @type {Boolean} * @example * editorInstance.addCommand( 'loadOptions', * { * exec : function( editor ) * { * // Asynchronous operation below. * CKEDITOR.ajax.loadXml( 'data.xml', function() * { * editor.fire( 'afterCommandExec' ); * )); * }, * async : true // The command need some time to complete after exec function returns. * }); */ /** * Whether the command should give focus to the editor before execution. * @name CKEDITOR.commandDefinition.prototype.editorFocus * @type {Boolean} * @default true * @see CKEDITOR.command#editorFocus * @example * editorInstance.addCommand( 'maximize', * { * exec : function( editor ) * { * // ... * }, * editorFocus : false // The command doesn't require focusing the editing document. * }); */ /** * Whether the command state should be set to {@link CKEDITOR.TRISTATE_DISABLED} on startup. * @name CKEDITOR.commandDefinition.prototype.startDisabled * @type {Boolean} * @default false * @example * editorInstance.addCommand( 'unlink', * { * exec : function( editor ) * { * // ... * }, * startDisabled : true // Command is unavailable until selection is inside a link. * }); */ /** * The editor modes within which the command can be executed. The execution * will have no action if the current mode is not listed in this property. * @name CKEDITOR.commandDefinition.prototype.modes * @type Object * @default { wysiwyg : 1 } * @see CKEDITOR.command#modes * @example * editorInstance.addCommand( 'link', * { * exec : function( editor ) * { * // ... * }, * modes : { wysiwyg : 1 } // Command is available in wysiwyg mode only. * }); */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * Creates a {@link CKEDITOR.htmlParser} class instance. * @class Provides an "event like" system to parse strings of HTML data. * @example * var parser = new CKEDITOR.htmlParser(); * parser.onTagOpen = function( tagName, attributes, selfClosing ) * { * alert( tagName ); * }; * parser.parse( '&lt;p&gt;Some &lt;b&gt;text&lt;/b&gt;.&lt;/p&gt;' ); */ CKEDITOR.htmlParser = function() { this._ = { htmlPartsRegex : new RegExp( '<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:"[^"]*")|(?:\'[^\']*\')|[^"\'>])*)\\/?>))', 'g' ) }; }; (function() { var attribsRegex = /([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g, emptyAttribs = {checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1}; CKEDITOR.htmlParser.prototype = { /** * Function to be fired when a tag opener is found. This function * should be overriden when using this class. * @param {String} tagName The tag name. The name is guarantted to be * lowercased. * @param {Object} attributes An object containing all tag attributes. Each * property in this object represent and attribute name and its * value is the attribute value. * @param {Boolean} selfClosing true if the tag closes itself, false if the * tag doesn't. * @example * var parser = new CKEDITOR.htmlParser(); * parser.onTagOpen = function( tagName, attributes, selfClosing ) * { * alert( tagName ); // e.g. "b" * }); * parser.parse( "&lt;!-- Example --&gt;&lt;b&gt;Hello&lt;/b&gt;" ); */ onTagOpen : function() {}, /** * Function to be fired when a tag closer is found. This function * should be overriden when using this class. * @param {String} tagName The tag name. The name is guarantted to be * lowercased. * @example * var parser = new CKEDITOR.htmlParser(); * parser.onTagClose = function( tagName ) * { * alert( tagName ); // e.g. "b" * }); * parser.parse( "&lt;!-- Example --&gt;&lt;b&gt;Hello&lt;/b&gt;" ); */ onTagClose : function() {}, /** * Function to be fired when text is found. This function * should be overriden when using this class. * @param {String} text The text found. * @example * var parser = new CKEDITOR.htmlParser(); * parser.onText = function( text ) * { * alert( text ); // e.g. "Hello" * }); * parser.parse( "&lt;!-- Example --&gt;&lt;b&gt;Hello&lt;/b&gt;" ); */ onText : function() {}, /** * Function to be fired when CDATA section is found. This function * should be overriden when using this class. * @param {String} cdata The CDATA been found. * @example * var parser = new CKEDITOR.htmlParser(); * parser.onCDATA = function( cdata ) * { * alert( cdata ); // e.g. "var hello;" * }); * parser.parse( "&lt;script&gt;var hello;&lt;/script&gt;" ); */ onCDATA : function() {}, /** * Function to be fired when a commend is found. This function * should be overriden when using this class. * @param {String} comment The comment text. * @example * var parser = new CKEDITOR.htmlParser(); * parser.onComment = function( comment ) * { * alert( comment ); // e.g. " Example " * }); * parser.parse( "&lt;!-- Example --&gt;&lt;b&gt;Hello&lt;/b&gt;" ); */ onComment : function() {}, /** * Parses text, looking for HTML tokens, like tag openers or closers, * or comments. This function fires the onTagOpen, onTagClose, onText * and onComment function during its execution. * @param {String} html The HTML to be parsed. * @example * var parser = new CKEDITOR.htmlParser(); * // The onTagOpen, onTagClose, onText and onComment should be overriden * // at this point. * parser.parse( "&lt;!-- Example --&gt;&lt;b&gt;Hello&lt;/b&gt;" ); */ parse : function( html ) { var parts, tagName, nextIndex = 0, cdata; // The collected data inside a CDATA section. while ( ( parts = this._.htmlPartsRegex.exec( html ) ) ) { var tagIndex = parts.index; if ( tagIndex > nextIndex ) { var text = html.substring( nextIndex, tagIndex ); if ( cdata ) cdata.push( text ); else this.onText( text ); } nextIndex = this._.htmlPartsRegex.lastIndex; /* "parts" is an array with the following items: 0 : The entire match for opening/closing tags and comments. 1 : Group filled with the tag name for closing tags. 2 : Group filled with the comment text. 3 : Group filled with the tag name for opening tags. 4 : Group filled with the attributes part of opening tags. */ // Closing tag if ( ( tagName = parts[ 1 ] ) ) { tagName = tagName.toLowerCase(); if ( cdata && CKEDITOR.dtd.$cdata[ tagName ] ) { // Send the CDATA data. this.onCDATA( cdata.join('') ); cdata = null; } if ( !cdata ) { this.onTagClose( tagName ); continue; } } // If CDATA is enabled, just save the raw match. if ( cdata ) { cdata.push( parts[ 0 ] ); continue; } // Opening tag if ( ( tagName = parts[ 3 ] ) ) { tagName = tagName.toLowerCase(); // There are some tag names that can break things, so let's // simply ignore them when parsing. (#5224) if ( /="/.test( tagName ) ) continue; var attribs = {}, attribMatch, attribsPart = parts[ 4 ], selfClosing = !!( attribsPart && attribsPart.charAt( attribsPart.length - 1 ) == '/' ); if ( attribsPart ) { while ( ( attribMatch = attribsRegex.exec( attribsPart ) ) ) { var attName = attribMatch[1].toLowerCase(), attValue = attribMatch[2] || attribMatch[3] || attribMatch[4] || ''; if ( !attValue && emptyAttribs[ attName ] ) attribs[ attName ] = attName; else attribs[ attName ] = attValue; } } this.onTagOpen( tagName, attribs, selfClosing ); // Open CDATA mode when finding the appropriate tags. if ( !cdata && CKEDITOR.dtd.$cdata[ tagName ] ) cdata = []; continue; } // Comment if ( ( tagName = parts[ 2 ] ) ) this.onComment( tagName ); } if ( html.length > nextIndex ) this.onText( html.substring( nextIndex, html.length ) ); } }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { var loadedLangs = {}; /** * @namespace Holds language related functions. */ CKEDITOR.lang = { /** * The list of languages available in the editor core. * @type Object * @example * alert( CKEDITOR.lang.en ); // "true" */ languages : { 'af' : 1, 'ar' : 1, 'bg' : 1, 'bn' : 1, 'bs' : 1, 'ca' : 1, 'cs' : 1, 'cy' : 1, 'da' : 1, 'de' : 1, 'el' : 1, 'en-au' : 1, 'en-ca' : 1, 'en-gb' : 1, 'en' : 1, 'eo' : 1, 'es' : 1, 'et' : 1, 'eu' : 1, 'fa' : 1, 'fi' : 1, 'fo' : 1, 'fr-ca' : 1, 'fr' : 1, 'gl' : 1, 'gu' : 1, 'he' : 1, 'hi' : 1, 'hr' : 1, 'hu' : 1, 'is' : 1, 'it' : 1, 'ja' : 1, 'ka' : 1, 'km' : 1, 'ko' : 1, 'lt' : 1, 'lv' : 1, 'mn' : 1, 'ms' : 1, 'nb' : 1, 'nl' : 1, 'no' : 1, 'pl' : 1, 'pt-br' : 1, 'pt' : 1, 'ro' : 1, 'ru' : 1, 'sk' : 1, 'sl' : 1, 'sr-latn' : 1, 'sr' : 1, 'sv' : 1, 'th' : 1, 'tr' : 1, 'uk' : 1, 'vi' : 1, 'zh-cn' : 1, 'zh' : 1 }, /** * Loads a specific language file, or auto detect it. A callback is * then called when the file gets loaded. * @param {String} languageCode The code of the language file to be * loaded. If null or empty, autodetection will be performed. The * same happens if the language is not supported. * @param {String} defaultLanguage The language to be used if * languageCode is not supported or if the autodetection fails. * @param {Function} callback A function to be called once the * language file is loaded. Two parameters are passed to this * function: the language code and the loaded language entries. * @example */ load : function( languageCode, defaultLanguage, callback ) { // If no languageCode - fallback to browser or default. // If languageCode - fallback to no-localized version or default. if ( !languageCode || !CKEDITOR.lang.languages[ languageCode ] ) languageCode = this.detect( defaultLanguage, languageCode ); if ( !this[ languageCode ] ) { CKEDITOR.scriptLoader.load( CKEDITOR.getUrl( '_source/' + // @Packager.RemoveLine 'lang/' + languageCode + '.js' ), function() { callback( languageCode, this[ languageCode ] ); } , this ); } else callback( languageCode, this[ languageCode ] ); }, /** * Returns the language that best fit the user language. For example, * suppose that the user language is "pt-br". If this language is * supported by the editor, it is returned. Otherwise, if only "pt" is * supported, it is returned instead. If none of the previous are * supported, a default language is then returned. * @param {String} defaultLanguage The default language to be returned * if the user language is not supported. * @param {String} [probeLanguage] A language code to try to use, * instead of the browser based autodetection. * @returns {String} The detected language code. * @example * alert( CKEDITOR.lang.detect( 'en' ) ); // e.g., in a German browser: "de" */ detect : function( defaultLanguage, probeLanguage ) { var languages = this.languages; probeLanguage = probeLanguage || navigator.userLanguage || navigator.language || defaultLanguage; var parts = probeLanguage .toLowerCase() .match( /([a-z]+)(?:-([a-z]+))?/ ), lang = parts[1], locale = parts[2]; if ( languages[ lang + '-' + locale ] ) lang = lang + '-' + locale; else if ( !languages[ lang ] ) lang = null; CKEDITOR.lang.detect = lang ? function() { return lang; } : function( defaultLanguage ) { return defaultLanguage; }; return lang || defaultLanguage; } }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview API initialization code. */ (function() { // Disable HC detaction in WebKit. (#5429) if ( CKEDITOR.env.webkit ) { CKEDITOR.env.hc = false; return; } // Check whether high contrast is active by creating a colored border. var hcDetect = CKEDITOR.dom.element.createFromHtml( '<div style="width:0px;height:0px;position:absolute;left:-10000px;' + 'border: 1px solid;border-color: red blue;"></div>', CKEDITOR.document ); hcDetect.appendTo( CKEDITOR.document.getHead() ); // Update CKEDITOR.env. // Catch exception needed sometimes for FF. (#4230) try { CKEDITOR.env.hc = hcDetect.getComputedStyle( 'border-top-color' ) == hcDetect.getComputedStyle( 'border-right-color' ); } catch (e) { CKEDITOR.env.hc = false; } if ( CKEDITOR.env.hc ) CKEDITOR.env.cssClass += ' cke_hc'; hcDetect.remove(); })(); // Load core plugins. CKEDITOR.plugins.load( CKEDITOR.config.corePlugins.split( ',' ), function() { CKEDITOR.status = 'loaded'; CKEDITOR.fire( 'loaded' ); // Process all instances created by the "basic" implementation. var pending = CKEDITOR._.pending; if ( pending ) { delete CKEDITOR._.pending; for ( var i = 0 ; i < pending.length ; i++ ) CKEDITOR.add( pending[ i ] ); } }); // Needed for IE6 to not request image (HTTP 200 or 304) for every CSS background. (#6187) if ( CKEDITOR.env.ie ) { // Remove IE mouse flickering on IE6 because of background images. try { document.execCommand( 'BackgroundImageCache', false, true ); } catch (e) { // We have been reported about loading problems caused by the above // line. For safety, let's just ignore errors. } } /** * Indicates that CKEditor is running on a High Contrast environment. * @name CKEDITOR.env.hc * @example * if ( CKEDITOR.env.hc ) * alert( 'You're running on High Contrast mode. The editor interface will get adapted to provide you a better experience.' ); */ /** * Fired when a CKEDITOR core object is fully loaded and ready for interaction. * @name CKEDITOR#loaded * @event */
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.dom.comment} class, which represents * a DOM comment node. */ /** * Represents a DOM comment node. * @constructor * @augments CKEDITOR.dom.node * @param {Object|String} comment A native DOM comment node or a string containing * the text to use to create a new comment node. * @param {CKEDITOR.dom.document} [ownerDocument] The document that will contain * the node in case of new node creation. Defaults to the current document. * @example * var nativeNode = document.createComment( 'Example' ); * var comment = CKEDITOR.dom.comment( nativeNode ); * @example * var comment = CKEDITOR.dom.comment( 'Example' ); */ CKEDITOR.dom.comment = function( comment, ownerDocument ) { if ( typeof comment == 'string' ) comment = ( ownerDocument ? ownerDocument.$ : document ).createComment( comment ); CKEDITOR.dom.domObject.call( this, comment ); }; CKEDITOR.dom.comment.prototype = new CKEDITOR.dom.node(); CKEDITOR.tools.extend( CKEDITOR.dom.comment.prototype, /** @lends CKEDITOR.dom.comment.prototype */ { type : CKEDITOR.NODE_COMMENT, getOuterHtml : function() { return '<!--' + this.$.nodeValue + '-->'; } });
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.editor} class, which is the base * for other classes representing DOM objects. */ /** * Represents a DOM object. This class is not intended to be used directly. It * serves as the base class for other classes representing specific DOM * objects. * @constructor * @param {Object} nativeDomObject A native DOM object. * @augments CKEDITOR.event * @example */ CKEDITOR.dom.domObject = function( nativeDomObject ) { if ( nativeDomObject ) { /** * The native DOM object represented by this class instance. * @type Object * @example * var element = new CKEDITOR.dom.element( 'span' ); * alert( element.$.nodeType ); // "1" */ this.$ = nativeDomObject; } }; CKEDITOR.dom.domObject.prototype = (function() { // Do not define other local variables here. We want to keep the native // listener closures as clean as possible. var getNativeListener = function( domObject, eventName ) { return function( domEvent ) { // In FF, when reloading the page with the editor focused, it may // throw an error because the CKEDITOR global is not anymore // available. So, we check it here first. (#2923) if ( typeof CKEDITOR != 'undefined' ) domObject.fire( eventName, new CKEDITOR.dom.event( domEvent ) ); }; }; return /** @lends CKEDITOR.dom.domObject.prototype */ { getPrivate : function() { var priv; // Get the main private function from the custom data. Create it if not // defined. if ( !( priv = this.getCustomData( '_' ) ) ) this.setCustomData( '_', ( priv = {} ) ); return priv; }, /** @ignore */ on : function( eventName ) { // We customize the "on" function here. The basic idea is that we'll have // only one listener for a native event, which will then call all listeners // set to the event. // Get the listeners holder object. var nativeListeners = this.getCustomData( '_cke_nativeListeners' ); if ( !nativeListeners ) { nativeListeners = {}; this.setCustomData( '_cke_nativeListeners', nativeListeners ); } // Check if we have a listener for that event. if ( !nativeListeners[ eventName ] ) { var listener = nativeListeners[ eventName ] = getNativeListener( this, eventName ); if ( this.$.addEventListener ) this.$.addEventListener( eventName, listener, !!CKEDITOR.event.useCapture ); else if ( this.$.attachEvent ) this.$.attachEvent( 'on' + eventName, listener ); } // Call the original implementation. return CKEDITOR.event.prototype.on.apply( this, arguments ); }, /** @ignore */ removeListener : function( eventName ) { // Call the original implementation. CKEDITOR.event.prototype.removeListener.apply( this, arguments ); // If we don't have listeners for this event, clean the DOM up. if ( !this.hasListeners( eventName ) ) { var nativeListeners = this.getCustomData( '_cke_nativeListeners' ); var listener = nativeListeners && nativeListeners[ eventName ]; if ( listener ) { if ( this.$.removeEventListener ) this.$.removeEventListener( eventName, listener, false ); else if ( this.$.detachEvent ) this.$.detachEvent( 'on' + eventName, listener ); delete nativeListeners[ eventName ]; } } }, /** * Removes any listener set on this object. * To avoid memory leaks we must assure that there are no * references left after the object is no longer needed. */ removeAllListeners : function() { var nativeListeners = this.getCustomData( '_cke_nativeListeners' ); for ( var eventName in nativeListeners ) { var listener = nativeListeners[ eventName ]; if ( this.$.detachEvent ) this.$.detachEvent( 'on' + eventName, listener ); else if ( this.$.removeEventListener ) this.$.removeEventListener( eventName, listener, false ); delete nativeListeners[ eventName ]; } } }; })(); (function( domObjectProto ) { var customData = {}; CKEDITOR.on( 'reset', function() { customData = {}; }); /** * Determines whether the specified object is equal to the current object. * @name CKEDITOR.dom.domObject.prototype.equals * @function * @param {Object} object The object to compare with the current object. * @returns {Boolean} "true" if the object is equal. * @example * var doc = new CKEDITOR.dom.document( document ); * alert( doc.equals( CKEDITOR.document ) ); // "true" * alert( doc == CKEDITOR.document ); // "false" */ domObjectProto.equals = function( object ) { return ( object && object.$ === this.$ ); }; /** * Sets a data slot value for this object. These values are shared by all * instances pointing to that same DOM object. * <strong>Note:</strong> The created data slot is only guarantied to be available on this unique dom node, * thus any wish to continue access it from other element clones (either created by clone node or from innerHtml) * will fail, for such usage, please use {@link CKEDITOR.dom.element::setAttribute} instead. * @name CKEDITOR.dom.domObject.prototype.setCustomData * @function * @param {String} key A key used to identify the data slot. * @param {Object} value The value to set to the data slot. * @returns {CKEDITOR.dom.domObject} This DOM object instance. * @see CKEDITOR.dom.domObject.prototype.getCustomData * @example * var element = new CKEDITOR.dom.element( 'span' ); * element.setCustomData( 'hasCustomData', true ); */ domObjectProto.setCustomData = function( key, value ) { var expandoNumber = this.getUniqueId(), dataSlot = customData[ expandoNumber ] || ( customData[ expandoNumber ] = {} ); dataSlot[ key ] = value; return this; }; /** * Gets the value set to a data slot in this object. * @name CKEDITOR.dom.domObject.prototype.getCustomData * @function * @param {String} key The key used to identify the data slot. * @returns {Object} This value set to the data slot. * @see CKEDITOR.dom.domObject.prototype.setCustomData * @example * var element = new CKEDITOR.dom.element( 'span' ); * alert( element.getCustomData( 'hasCustomData' ) ); // e.g. 'true' */ domObjectProto.getCustomData = function( key ) { var expandoNumber = this.$[ 'data-cke-expando' ], dataSlot = expandoNumber && customData[ expandoNumber ]; return dataSlot && dataSlot[ key ]; }; /** * @name CKEDITOR.dom.domObject.prototype.removeCustomData */ domObjectProto.removeCustomData = function( key ) { var expandoNumber = this.$[ 'data-cke-expando' ], dataSlot = expandoNumber && customData[ expandoNumber ], retval = dataSlot && dataSlot[ key ]; if ( typeof retval != 'undefined' ) delete dataSlot[ key ]; return retval || null; }; /** * Removes any data stored on this object. * To avoid memory leaks we must assure that there are no * references left after the object is no longer needed. * @name CKEDITOR.dom.domObject.prototype.clearCustomData * @function */ domObjectProto.clearCustomData = function() { // Clear all event listeners this.removeAllListeners(); var expandoNumber = this.$[ 'data-cke-expando' ]; expandoNumber && delete customData[ expandoNumber ]; }; /** * Gets an ID that can be used to identiquely identify this DOM object in * the running session. * @name CKEDITOR.dom.domObject.prototype.getUniqueId * @function * @returns {Number} A unique ID. */ domObjectProto.getUniqueId = function() { return this.$[ 'data-cke-expando' ] || ( this.$[ 'data-cke-expando' ] = CKEDITOR.tools.getNextNumber() ); }; // Implement CKEDITOR.event. CKEDITOR.event.implementOn( domObjectProto ); })( CKEDITOR.dom.domObject.prototype );
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.dom.node} class which is the base * class for classes that represent DOM nodes. */ /** * Base class for classes representing DOM nodes. This constructor may return * an instance of a class that inherits from this class, like * {@link CKEDITOR.dom.element} or {@link CKEDITOR.dom.text}. * @augments CKEDITOR.dom.domObject * @param {Object} domNode A native DOM node. * @constructor * @see CKEDITOR.dom.element * @see CKEDITOR.dom.text * @example */ CKEDITOR.dom.node = function( domNode ) { if ( domNode ) { var type = domNode.nodeType == CKEDITOR.NODE_DOCUMENT ? 'document' : domNode.nodeType == CKEDITOR.NODE_ELEMENT ? 'element' : domNode.nodeType == CKEDITOR.NODE_TEXT ? 'text' : domNode.nodeType == CKEDITOR.NODE_COMMENT ? 'comment' : 'domObject'; // Call the base constructor otherwise. return new CKEDITOR.dom[ type ]( domNode ); } return this; }; CKEDITOR.dom.node.prototype = new CKEDITOR.dom.domObject(); /** * Element node type. * @constant * @example */ CKEDITOR.NODE_ELEMENT = 1; /** * Document node type. * @constant * @example */ CKEDITOR.NODE_DOCUMENT = 9; /** * Text node type. * @constant * @example */ CKEDITOR.NODE_TEXT = 3; /** * Comment node type. * @constant * @example */ CKEDITOR.NODE_COMMENT = 8; CKEDITOR.NODE_DOCUMENT_FRAGMENT = 11; CKEDITOR.POSITION_IDENTICAL = 0; CKEDITOR.POSITION_DISCONNECTED = 1; CKEDITOR.POSITION_FOLLOWING = 2; CKEDITOR.POSITION_PRECEDING = 4; CKEDITOR.POSITION_IS_CONTAINED = 8; CKEDITOR.POSITION_CONTAINS = 16; CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, /** @lends CKEDITOR.dom.node.prototype */ { /** * Makes this node a child of another element. * @param {CKEDITOR.dom.element} element The target element to which * this node will be appended. * @returns {CKEDITOR.dom.element} The target element. * @example * var p = new CKEDITOR.dom.element( 'p' ); * var strong = new CKEDITOR.dom.element( 'strong' ); * strong.appendTo( p ); * * // result: "&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;" */ appendTo : function( element, toStart ) { element.append( this, toStart ); return element; }, clone : function( includeChildren, cloneId ) { var $clone = this.$.cloneNode( includeChildren ); var removeIds = function( node ) { if ( node.nodeType != CKEDITOR.NODE_ELEMENT ) return; if ( !cloneId ) node.removeAttribute( 'id', false ); node.removeAttribute( 'data-cke-expando', false ); if ( includeChildren ) { var childs = node.childNodes; for ( var i=0; i < childs.length; i++ ) removeIds( childs[ i ] ); } }; // The "id" attribute should never be cloned to avoid duplication. removeIds( $clone ); return new CKEDITOR.dom.node( $clone ); }, hasPrevious : function() { return !!this.$.previousSibling; }, hasNext : function() { return !!this.$.nextSibling; }, /** * Inserts this element after a node. * @param {CKEDITOR.dom.node} node The node that will precede this element. * @returns {CKEDITOR.dom.node} The node preceding this one after * insertion. * @example * var em = new CKEDITOR.dom.element( 'em' ); * var strong = new CKEDITOR.dom.element( 'strong' ); * strong.insertAfter( em ); * * // result: "&lt;em&gt;&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt;" */ insertAfter : function( node ) { node.$.parentNode.insertBefore( this.$, node.$.nextSibling ); return node; }, /** * Inserts this element before a node. * @param {CKEDITOR.dom.node} node The node that will succeed this element. * @returns {CKEDITOR.dom.node} The node being inserted. * @example * var em = new CKEDITOR.dom.element( 'em' ); * var strong = new CKEDITOR.dom.element( 'strong' ); * strong.insertBefore( em ); * * // result: "&lt;strong&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;" */ insertBefore : function( node ) { node.$.parentNode.insertBefore( this.$, node.$ ); return node; }, insertBeforeMe : function( node ) { this.$.parentNode.insertBefore( node.$, this.$ ); return node; }, /** * Retrieves a uniquely identifiable tree address for this node. * The tree address returned is an array of integers, with each integer * indicating a child index of a DOM node, starting from * <code>document.documentElement</code>. * * For example, assuming <code>&lt;body&gt;</code> is the second child * of <code>&lt;html&gt;</code> (<code>&lt;head&gt;</code> being the first), * and we would like to address the third child under the * fourth child of <code>&lt;body&gt;</code>, the tree address returned would be: * [1, 3, 2] * * The tree address cannot be used for finding back the DOM tree node once * the DOM tree structure has been modified. */ getAddress : function( normalized ) { var address = []; var $documentElement = this.getDocument().$.documentElement; var node = this.$; while ( node && node != $documentElement ) { var parentNode = node.parentNode; if ( parentNode ) { // Get the node index. For performance, call getIndex // directly, instead of creating a new node object. address.unshift( this.getIndex.call( { $ : node }, normalized ) ); } node = parentNode; } return address; }, /** * Gets the document containing this element. * @returns {CKEDITOR.dom.document} The document. * @example * var element = CKEDITOR.document.getById( 'example' ); * alert( <strong>element.getDocument().equals( CKEDITOR.document )</strong> ); // "true" */ getDocument : function() { return new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument ); }, getIndex : function( normalized ) { // Attention: getAddress depends on this.$ var current = this.$, index = 0; while ( ( current = current.previousSibling ) ) { // When normalizing, do not count it if this is an // empty text node or if it's a text node following another one. if ( normalized && current.nodeType == 3 && ( !current.nodeValue.length || ( current.previousSibling && current.previousSibling.nodeType == 3 ) ) ) { continue; } index++; } return index; }, getNextSourceNode : function( startFromSibling, nodeType, guard ) { // If "guard" is a node, transform it in a function. if ( guard && !guard.call ) { var guardNode = guard; guard = function( node ) { return !node.equals( guardNode ); }; } var node = ( !startFromSibling && this.getFirst && this.getFirst() ), parent; // Guarding when we're skipping the current element( no children or 'startFromSibling' ). // send the 'moving out' signal even we don't actually dive into. if ( !node ) { if ( this.type == CKEDITOR.NODE_ELEMENT && guard && guard( this, true ) === false ) return null; node = this.getNext(); } while ( !node && ( parent = ( parent || this ).getParent() ) ) { // The guard check sends the "true" paramenter to indicate that // we are moving "out" of the element. if ( guard && guard( parent, true ) === false ) return null; node = parent.getNext(); } if ( !node ) return null; if ( guard && guard( node ) === false ) return null; if ( nodeType && nodeType != node.type ) return node.getNextSourceNode( false, nodeType, guard ); return node; }, getPreviousSourceNode : function( startFromSibling, nodeType, guard ) { if ( guard && !guard.call ) { var guardNode = guard; guard = function( node ) { return !node.equals( guardNode ); }; } var node = ( !startFromSibling && this.getLast && this.getLast() ), parent; // Guarding when we're skipping the current element( no children or 'startFromSibling' ). // send the 'moving out' signal even we don't actually dive into. if ( !node ) { if ( this.type == CKEDITOR.NODE_ELEMENT && guard && guard( this, true ) === false ) return null; node = this.getPrevious(); } while ( !node && ( parent = ( parent || this ).getParent() ) ) { // The guard check sends the "true" paramenter to indicate that // we are moving "out" of the element. if ( guard && guard( parent, true ) === false ) return null; node = parent.getPrevious(); } if ( !node ) return null; if ( guard && guard( node ) === false ) return null; if ( nodeType && node.type != nodeType ) return node.getPreviousSourceNode( false, nodeType, guard ); return node; }, getPrevious : function( evaluator ) { var previous = this.$, retval; do { previous = previous.previousSibling; // Avoid returning the doc type node. // http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-412266927 retval = previous && previous.nodeType != 10 && new CKEDITOR.dom.node( previous ); } while ( retval && evaluator && !evaluator( retval ) ) return retval; }, /** * Gets the node that follows this element in its parent's child list. * @param {Function} evaluator Filtering the result node. * @returns {CKEDITOR.dom.node} The next node or null if not available. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;&lt;b&gt;Example&lt;/b&gt; &lt;i&gt;next&lt;/i&gt;&lt;/div&gt;' ); * var first = <strong>element.getFirst().getNext()</strong>; * alert( first.getName() ); // "i" */ getNext : function( evaluator ) { var next = this.$, retval; do { next = next.nextSibling; retval = next && new CKEDITOR.dom.node( next ); } while ( retval && evaluator && !evaluator( retval ) ) return retval; }, /** * Gets the parent element for this node. * @returns {CKEDITOR.dom.element} The parent element. * @example * var node = editor.document.getBody().getFirst(); * var parent = node.<strong>getParent()</strong>; * alert( node.getName() ); // "body" */ getParent : function() { var parent = this.$.parentNode; return ( parent && parent.nodeType == 1 ) ? new CKEDITOR.dom.node( parent ) : null; }, getParents : function( closerFirst ) { var node = this; var parents = []; do { parents[ closerFirst ? 'push' : 'unshift' ]( node ); } while ( ( node = node.getParent() ) ) return parents; }, getCommonAncestor : function( node ) { if ( node.equals( this ) ) return this; if ( node.contains && node.contains( this ) ) return node; var start = this.contains ? this : this.getParent(); do { if ( start.contains( node ) ) return start; } while ( ( start = start.getParent() ) ); return null; }, getPosition : function( otherNode ) { var $ = this.$; var $other = otherNode.$; if ( $.compareDocumentPosition ) return $.compareDocumentPosition( $other ); // IE and Safari have no support for compareDocumentPosition. if ( $ == $other ) return CKEDITOR.POSITION_IDENTICAL; // Only element nodes support contains and sourceIndex. if ( this.type == CKEDITOR.NODE_ELEMENT && otherNode.type == CKEDITOR.NODE_ELEMENT ) { if ( $.contains ) { if ( $.contains( $other ) ) return CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING; if ( $other.contains( $ ) ) return CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING; } if ( 'sourceIndex' in $ ) { return ( $.sourceIndex < 0 || $other.sourceIndex < 0 ) ? CKEDITOR.POSITION_DISCONNECTED : ( $.sourceIndex < $other.sourceIndex ) ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING; } } // For nodes that don't support compareDocumentPosition, contains // or sourceIndex, their "address" is compared. var addressOfThis = this.getAddress(), addressOfOther = otherNode.getAddress(), minLevel = Math.min( addressOfThis.length, addressOfOther.length ); // Determinate preceed/follow relationship. for ( var i = 0 ; i <= minLevel - 1 ; i++ ) { if ( addressOfThis[ i ] != addressOfOther[ i ] ) { if ( i < minLevel ) { return addressOfThis[ i ] < addressOfOther[ i ] ? CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_FOLLOWING; } break; } } // Determinate contains/contained relationship. return ( addressOfThis.length < addressOfOther.length ) ? CKEDITOR.POSITION_CONTAINS + CKEDITOR.POSITION_PRECEDING : CKEDITOR.POSITION_IS_CONTAINED + CKEDITOR.POSITION_FOLLOWING; }, /** * Gets the closest ancestor node of this node, specified by its name. * @param {String} reference The name of the ancestor node to search or * an object with the node names to search for. * @param {Boolean} [includeSelf] Whether to include the current * node in the search. * @returns {CKEDITOR.dom.node} The located ancestor node or null if not found. * @since 3.6.1 * @example * // Suppose we have the following HTML structure: * // &lt;div id="outer"&gt;&lt;div id="inner"&gt;&lt;p&gt;&lt;b&gt;Some text&lt;/b&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt; * // If node == &lt;b&gt; * ascendant = node.getAscendant( 'div' ); // ascendant == &lt;div id="inner"&gt * ascendant = node.getAscendant( 'b' ); // ascendant == null * ascendant = node.getAscendant( 'b', true ); // ascendant == &lt;b&gt; * ascendant = node.getAscendant( { div: 1, p: 1} ); // Searches for the first 'div' or 'p': ascendant == &lt;div id="inner"&gt */ getAscendant : function( reference, includeSelf ) { var $ = this.$, name; if ( !includeSelf ) $ = $.parentNode; while ( $ ) { if ( $.nodeName && ( name = $.nodeName.toLowerCase(), ( typeof reference == 'string' ? name == reference : name in reference ) ) ) return new CKEDITOR.dom.node( $ ); $ = $.parentNode; } return null; }, hasAscendant : function( name, includeSelf ) { var $ = this.$; if ( !includeSelf ) $ = $.parentNode; while ( $ ) { if ( $.nodeName && $.nodeName.toLowerCase() == name ) return true; $ = $.parentNode; } return false; }, move : function( target, toStart ) { target.append( this.remove(), toStart ); }, /** * Removes this node from the document DOM. * @param {Boolean} [preserveChildren] Indicates that the children * elements must remain in the document, removing only the outer * tags. * @example * var element = CKEDITOR.dom.element.getById( 'MyElement' ); * <strong>element.remove()</strong>; */ remove : function( preserveChildren ) { var $ = this.$; var parent = $.parentNode; if ( parent ) { if ( preserveChildren ) { // Move all children before the node. for ( var child ; ( child = $.firstChild ) ; ) { parent.insertBefore( $.removeChild( child ), $ ); } } parent.removeChild( $ ); } return this; }, replace : function( nodeToReplace ) { this.insertBefore( nodeToReplace ); nodeToReplace.remove(); }, trim : function() { this.ltrim(); this.rtrim(); }, ltrim : function() { var child; while ( this.getFirst && ( child = this.getFirst() ) ) { if ( child.type == CKEDITOR.NODE_TEXT ) { var trimmed = CKEDITOR.tools.ltrim( child.getText() ), originalLength = child.getLength(); if ( !trimmed ) { child.remove(); continue; } else if ( trimmed.length < originalLength ) { child.split( originalLength - trimmed.length ); // IE BUG: child.remove() may raise JavaScript errors here. (#81) this.$.removeChild( this.$.firstChild ); } } break; } }, rtrim : function() { var child; while ( this.getLast && ( child = this.getLast() ) ) { if ( child.type == CKEDITOR.NODE_TEXT ) { var trimmed = CKEDITOR.tools.rtrim( child.getText() ), originalLength = child.getLength(); if ( !trimmed ) { child.remove(); continue; } else if ( trimmed.length < originalLength ) { child.split( trimmed.length ); // IE BUG: child.getNext().remove() may raise JavaScript errors here. // (#81) this.$.lastChild.parentNode.removeChild( this.$.lastChild ); } } break; } if ( !CKEDITOR.env.ie && !CKEDITOR.env.opera ) { child = this.$.lastChild; if ( child && child.type == 1 && child.nodeName.toLowerCase() == 'br' ) { // Use "eChildNode.parentNode" instead of "node" to avoid IE bug (#324). child.parentNode.removeChild( child ) ; } } }, /** * Checks if this node is read-only (should not be changed). * @returns {Boolean} * @since 3.5 * @example * // For the following HTML: * // &lt;div contenteditable="false"&gt;Some &lt;b&gt;text&lt;/b&gt;&lt;/div&gt; * * // If "ele" is the above &lt;div&gt; * ele.isReadOnly(); // true */ isReadOnly : function() { var element = this; if ( this.type != CKEDITOR.NODE_ELEMENT ) element = this.getParent(); if ( element && typeof element.$.isContentEditable != 'undefined' ) return ! ( element.$.isContentEditable || element.data( 'cke-editable' ) ); else { // Degrade for old browsers which don't support "isContentEditable", e.g. FF3 var current = element; while( current ) { if ( current.is( 'body' ) || !!current.data( 'cke-editable' ) ) break; if ( current.getAttribute( 'contentEditable' ) == 'false' ) return true; else if ( current.getAttribute( 'contentEditable' ) == 'true' ) break; current = current.getParent(); } return false; } } } );
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @class DocumentFragment is a "lightweight" or "minimal" Document object. It is * commonly used to extract a portion of a document's tree or to create a new * fragment of a document. Various operations may take DocumentFragment objects * as arguments and results in all the child nodes of the DocumentFragment being * moved to the child list of this node. * @param {Object} ownerDocument */ CKEDITOR.dom.documentFragment = function( ownerDocument ) { ownerDocument = ownerDocument || CKEDITOR.document; this.$ = ownerDocument.$.createDocumentFragment(); }; CKEDITOR.tools.extend( CKEDITOR.dom.documentFragment.prototype, CKEDITOR.dom.element.prototype, { type : CKEDITOR.NODE_DOCUMENT_FRAGMENT, insertAfterNode : function( node ) { node = node.$; node.parentNode.insertBefore( this.$, node.nextSibling ); } }, true, { 'append' : 1, 'appendBogus' : 1, 'getFirst' : 1, 'getLast' : 1, 'appendTo' : 1, 'moveChildren' : 1, 'insertBefore' : 1, 'insertAfterNode' : 1, 'replace' : 1, 'trim' : 1, 'type' : 1, 'ltrim' : 1, 'rtrim' : 1, 'getDocument' : 1, 'getChildCount' : 1, 'getChild' : 1, 'getChildren' : 1 } );
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.dom.text} class, which represents * a DOM text node. */ /** * Represents a DOM text node. * @constructor * @augments CKEDITOR.dom.node * @param {Object|String} text A native DOM text node or a string containing * the text to use to create a new text node. * @param {CKEDITOR.dom.document} [ownerDocument] The document that will contain * the node in case of new node creation. Defaults to the current document. * @example * var nativeNode = document.createTextNode( 'Example' ); * var text = CKEDITOR.dom.text( nativeNode ); * @example * var text = CKEDITOR.dom.text( 'Example' ); */ CKEDITOR.dom.text = function( text, ownerDocument ) { if ( typeof text == 'string' ) text = ( ownerDocument ? ownerDocument.$ : document ).createTextNode( text ); // Theoretically, we should call the base constructor here // (not CKEDITOR.dom.node though). But, IE doesn't support expando // properties on text node, so the features provided by domObject will not // work for text nodes (which is not a big issue for us). // // CKEDITOR.dom.domObject.call( this, element ); /** * The native DOM text node represented by this class instance. * @type Object * @example * var element = new CKEDITOR.dom.text( 'Example' ); * alert( element.$.nodeType ); // "3" */ this.$ = text; }; CKEDITOR.dom.text.prototype = new CKEDITOR.dom.node(); CKEDITOR.tools.extend( CKEDITOR.dom.text.prototype, /** @lends CKEDITOR.dom.text.prototype */ { /** * The node type. This is a constant value set to * {@link CKEDITOR.NODE_TEXT}. * @type Number * @example */ type : CKEDITOR.NODE_TEXT, getLength : function() { return this.$.nodeValue.length; }, getText : function() { return this.$.nodeValue; }, setText : function( text ) { this.$.nodeValue = text; }, /** * Breaks this text node into two nodes at the specified offset, * keeping both in the tree as siblings. This node then only contains * all the content up to the offset point. A new text node, which is * inserted as the next sibling of this node, contains all the content * at and after the offset point. When the offset is equal to the * length of this node, the new node has no data. * @param {Number} The position at which to split, starting from zero. * @returns {CKEDITOR.dom.text} The new text node. */ split : function( offset ) { // If the offset is after the last char, IE creates the text node // on split, but don't include it into the DOM. So, we have to do // that manually here. if ( CKEDITOR.env.ie && offset == this.getLength() ) { var next = this.getDocument().createText( '' ); next.insertAfter( this ); return next; } var doc = this.getDocument(); var retval = new CKEDITOR.dom.text( this.$.splitText( offset ), doc ); // IE BUG: IE8 does not update the childNodes array in DOM after splitText(), // we need to make some DOM changes to make it update. (#3436) if ( CKEDITOR.env.ie8 ) { var workaround = new CKEDITOR.dom.text( '', doc ); workaround.insertAfter( retval ); workaround.remove(); } return retval; }, /** * Extracts characters from indexA up to but not including indexB. * @param {Number} indexA An integer between 0 and one less than the * length of the text. * @param {Number} [indexB] An integer between 0 and the length of the * string. If omitted, extracts characters to the end of the text. */ substring : function( indexA, indexB ) { // We need the following check due to a Firefox bug // https://bugzilla.mozilla.org/show_bug.cgi?id=458886 if ( typeof indexB != 'number' ) return this.$.nodeValue.substr( indexA ); else return this.$.nodeValue.substring( indexA, indexB ); } });
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * Creates a CKEDITOR.dom.range instance that can be used inside a specific * DOM Document. * @class Represents a delimited piece of content in a DOM Document. * It is contiguous in the sense that it can be characterized as selecting all * of the content between a pair of boundary-points.<br> * <br> * This class shares much of the W3C * <a href="http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html">Document Object Model Range</a> * ideas and features, adding several range manipulation tools to it, but it's * not intended to be compatible with it. * @param {CKEDITOR.dom.document} document The document into which the range * features will be available. * @example * // Create a range for the entire contents of the editor document body. * var range = new CKEDITOR.dom.range( editor.document ); * range.selectNodeContents( editor.document.getBody() ); * // Delete the contents. * range.deleteContents(); */ CKEDITOR.dom.range = function( document ) { /** * Node within which the range begins. * @type {CKEDITOR.NODE_ELEMENT|CKEDITOR.NODE_TEXT} * @example * var range = new CKEDITOR.dom.range( editor.document ); * range.selectNodeContents( editor.document.getBody() ); * alert( range.startContainer.getName() ); // "body" */ this.startContainer = null; /** * Offset within the starting node of the range. * @type {Number} * @example * var range = new CKEDITOR.dom.range( editor.document ); * range.selectNodeContents( editor.document.getBody() ); * alert( range.startOffset ); // "0" */ this.startOffset = null; /** * Node within which the range ends. * @type {CKEDITOR.NODE_ELEMENT|CKEDITOR.NODE_TEXT} * @example * var range = new CKEDITOR.dom.range( editor.document ); * range.selectNodeContents( editor.document.getBody() ); * alert( range.endContainer.getName() ); // "body" */ this.endContainer = null; /** * Offset within the ending node of the range. * @type {Number} * @example * var range = new CKEDITOR.dom.range( editor.document ); * range.selectNodeContents( editor.document.getBody() ); * alert( range.endOffset ); // == editor.document.getBody().getChildCount() */ this.endOffset = null; /** * Indicates that this is a collapsed range. A collapsed range has it's * start and end boudaries at the very same point so nothing is contained * in it. * @example * var range = new CKEDITOR.dom.range( editor.document ); * range.selectNodeContents( editor.document.getBody() ); * alert( range.collapsed ); // "false" * range.collapse(); * alert( range.collapsed ); // "true" */ this.collapsed = true; /** * The document within which the range can be used. * @type {CKEDITOR.dom.document} * @example * // Selects the body contents of the range document. * range.selectNodeContents( range.document.getBody() ); */ this.document = document; }; (function() { // Updates the "collapsed" property for the given range object. var updateCollapsed = function( range ) { range.collapsed = ( range.startContainer && range.endContainer && range.startContainer.equals( range.endContainer ) && range.startOffset == range.endOffset ); }; // This is a shared function used to delete, extract and clone the range // contents. // V2 var execContentsAction = function( range, action, docFrag, mergeThen ) { range.optimizeBookmark(); var startNode = range.startContainer; var endNode = range.endContainer; var startOffset = range.startOffset; var endOffset = range.endOffset; var removeStartNode; var removeEndNode; // For text containers, we must simply split the node and point to the // second part. The removal will be handled by the rest of the code . if ( endNode.type == CKEDITOR.NODE_TEXT ) endNode = endNode.split( endOffset ); else { // If the end container has children and the offset is pointing // to a child, then we should start from it. if ( endNode.getChildCount() > 0 ) { // If the offset points after the last node. if ( endOffset >= endNode.getChildCount() ) { // Let's create a temporary node and mark it for removal. endNode = endNode.append( range.document.createText( '' ) ); removeEndNode = true; } else endNode = endNode.getChild( endOffset ); } } // For text containers, we must simply split the node. The removal will // be handled by the rest of the code . if ( startNode.type == CKEDITOR.NODE_TEXT ) { startNode.split( startOffset ); // In cases the end node is the same as the start node, the above // splitting will also split the end, so me must move the end to // the second part of the split. if ( startNode.equals( endNode ) ) endNode = startNode.getNext(); } else { // If the start container has children and the offset is pointing // to a child, then we should start from its previous sibling. // If the offset points to the first node, we don't have a // sibling, so let's use the first one, but mark it for removal. if ( !startOffset ) { // Let's create a temporary node and mark it for removal. startNode = startNode.getFirst().insertBeforeMe( range.document.createText( '' ) ); removeStartNode = true; } else if ( startOffset >= startNode.getChildCount() ) { // Let's create a temporary node and mark it for removal. startNode = startNode.append( range.document.createText( '' ) ); removeStartNode = true; } else startNode = startNode.getChild( startOffset ).getPrevious(); } // Get the parent nodes tree for the start and end boundaries. var startParents = startNode.getParents(); var endParents = endNode.getParents(); // Compare them, to find the top most siblings. var i, topStart, topEnd; for ( i = 0 ; i < startParents.length ; i++ ) { topStart = startParents[ i ]; topEnd = endParents[ i ]; // The compared nodes will match until we find the top most // siblings (different nodes that have the same parent). // "i" will hold the index in the parents array for the top // most element. if ( !topStart.equals( topEnd ) ) break; } var clone = docFrag, levelStartNode, levelClone, currentNode, currentSibling; // Remove all successive sibling nodes for every node in the // startParents tree. for ( var j = i ; j < startParents.length ; j++ ) { levelStartNode = startParents[j]; // For Extract and Clone, we must clone this level. if ( clone && !levelStartNode.equals( startNode ) ) // action = 0 = Delete levelClone = clone.append( levelStartNode.clone() ); currentNode = levelStartNode.getNext(); while ( currentNode ) { // Stop processing when the current node matches a node in the // endParents tree or if it is the endNode. if ( currentNode.equals( endParents[ j ] ) || currentNode.equals( endNode ) ) break; // Cache the next sibling. currentSibling = currentNode.getNext(); // If cloning, just clone it. if ( action == 2 ) // 2 = Clone clone.append( currentNode.clone( true ) ); else { // Both Delete and Extract will remove the node. currentNode.remove(); // When Extracting, move the removed node to the docFrag. if ( action == 1 ) // 1 = Extract clone.append( currentNode ); } currentNode = currentSibling; } if ( clone ) clone = levelClone; } clone = docFrag; // Remove all previous sibling nodes for every node in the // endParents tree. for ( var k = i ; k < endParents.length ; k++ ) { levelStartNode = endParents[ k ]; // For Extract and Clone, we must clone this level. if ( action > 0 && !levelStartNode.equals( endNode ) ) // action = 0 = Delete levelClone = clone.append( levelStartNode.clone() ); // The processing of siblings may have already been done by the parent. if ( !startParents[ k ] || levelStartNode.$.parentNode != startParents[ k ].$.parentNode ) { currentNode = levelStartNode.getPrevious(); while ( currentNode ) { // Stop processing when the current node matches a node in the // startParents tree or if it is the startNode. if ( currentNode.equals( startParents[ k ] ) || currentNode.equals( startNode ) ) break; // Cache the next sibling. currentSibling = currentNode.getPrevious(); // If cloning, just clone it. if ( action == 2 ) // 2 = Clone clone.$.insertBefore( currentNode.$.cloneNode( true ), clone.$.firstChild ) ; else { // Both Delete and Extract will remove the node. currentNode.remove(); // When Extracting, mode the removed node to the docFrag. if ( action == 1 ) // 1 = Extract clone.$.insertBefore( currentNode.$, clone.$.firstChild ); } currentNode = currentSibling; } } if ( clone ) clone = levelClone; } if ( action == 2 ) // 2 = Clone. { // No changes in the DOM should be done, so fix the split text (if any). var startTextNode = range.startContainer; if ( startTextNode.type == CKEDITOR.NODE_TEXT ) { startTextNode.$.data += startTextNode.$.nextSibling.data; startTextNode.$.parentNode.removeChild( startTextNode.$.nextSibling ); } var endTextNode = range.endContainer; if ( endTextNode.type == CKEDITOR.NODE_TEXT && endTextNode.$.nextSibling ) { endTextNode.$.data += endTextNode.$.nextSibling.data; endTextNode.$.parentNode.removeChild( endTextNode.$.nextSibling ); } } else { // Collapse the range. // If a node has been partially selected, collapse the range between // topStart and topEnd. Otherwise, simply collapse it to the start. (W3C specs). if ( topStart && topEnd && ( startNode.$.parentNode != topStart.$.parentNode || endNode.$.parentNode != topEnd.$.parentNode ) ) { var endIndex = topEnd.getIndex(); // If the start node is to be removed, we must correct the // index to reflect the removal. if ( removeStartNode && topEnd.$.parentNode == startNode.$.parentNode ) endIndex--; // Merge splitted parents. if ( mergeThen && topStart.type == CKEDITOR.NODE_ELEMENT ) { var span = CKEDITOR.dom.element.createFromHtml( '<span ' + 'data-cke-bookmark="1" style="display:none">&nbsp;</span>', range.document ); span.insertAfter( topStart ); topStart.mergeSiblings( false ); range.moveToBookmark( { startNode : span } ); } else range.setStart( topEnd.getParent(), endIndex ); } // Collapse it to the start. range.collapse( true ); } // Cleanup any marked node. if ( removeStartNode ) startNode.remove(); if ( removeEndNode && endNode.$.parentNode ) endNode.remove(); }; var inlineChildReqElements = { abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1 }; // Creates the appropriate node evaluator for the dom walker used inside // check(Start|End)OfBlock. function getCheckStartEndBlockEvalFunction( isStart ) { var hadBr = false, bookmarkEvaluator = CKEDITOR.dom.walker.bookmark( true ); return function( node ) { // First ignore bookmark nodes. if ( bookmarkEvaluator( node ) ) return true; if ( node.type == CKEDITOR.NODE_TEXT ) { // If there's any visible text, then we're not at the start. if ( node.hasAscendant( 'pre' ) || CKEDITOR.tools.trim( node.getText() ).length ) return false; } else if ( node.type == CKEDITOR.NODE_ELEMENT ) { // If there are non-empty inline elements (e.g. <img />), then we're not // at the start. if ( !inlineChildReqElements[ node.getName() ] ) { // If we're working at the end-of-block, forgive the first <br /> in non-IE // browsers. if ( !isStart && !CKEDITOR.env.ie && node.getName() == 'br' && !hadBr ) hadBr = true; else return false; } } return true; }; } var isBogus = CKEDITOR.dom.walker.bogus(); // Evaluator for CKEDITOR.dom.element::checkBoundaryOfElement, reject any // text node and non-empty elements unless it's being bookmark text. function elementBoundaryEval( checkStart ) { return function( node ) { // Tolerant bogus br when checking at the end of block. // Reject any text node unless it's being bookmark // OR it's spaces. // Reject any element unless it's being invisible empty. (#3883) return !checkStart && isBogus( node ) || ( node.type == CKEDITOR.NODE_TEXT ? !CKEDITOR.tools.trim( node.getText() ) || !!node.getParent().data( 'cke-bookmark' ) : node.getName() in CKEDITOR.dtd.$removeEmpty ); }; } var whitespaceEval = new CKEDITOR.dom.walker.whitespaces(), bookmarkEval = new CKEDITOR.dom.walker.bookmark(); function nonWhitespaceOrBookmarkEval( node ) { // Whitespaces and bookmark nodes are to be ignored. return !whitespaceEval( node ) && !bookmarkEval( node ); } CKEDITOR.dom.range.prototype = { clone : function() { var clone = new CKEDITOR.dom.range( this.document ); clone.startContainer = this.startContainer; clone.startOffset = this.startOffset; clone.endContainer = this.endContainer; clone.endOffset = this.endOffset; clone.collapsed = this.collapsed; return clone; }, collapse : function( toStart ) { if ( toStart ) { this.endContainer = this.startContainer; this.endOffset = this.startOffset; } else { this.startContainer = this.endContainer; this.startOffset = this.endOffset; } this.collapsed = true; }, /** * The content nodes of the range are cloned and added to a document fragment, which is returned. * <strong> Note: </strong> Text selection may lost after invoking this method. (caused by text node splitting). */ cloneContents : function() { var docFrag = new CKEDITOR.dom.documentFragment( this.document ); if ( !this.collapsed ) execContentsAction( this, 2, docFrag ); return docFrag; }, /** * Deletes the content nodes of the range permanently from the DOM tree. * @param {Boolean} [mergeThen] Merge any splitted elements result in DOM true due to partial selection. */ deleteContents : function( mergeThen ) { if ( this.collapsed ) return; execContentsAction( this, 0, null, mergeThen ); }, /** * The content nodes of the range are cloned and added to a document fragment, * meanwhile they're removed permanently from the DOM tree. * @param {Boolean} [mergeThen] Merge any splitted elements result in DOM true due to partial selection. */ extractContents : function( mergeThen ) { var docFrag = new CKEDITOR.dom.documentFragment( this.document ); if ( !this.collapsed ) execContentsAction( this, 1, docFrag, mergeThen ); return docFrag; }, /** * Creates a bookmark object, which can be later used to restore the * range by using the moveToBookmark function. * This is an "intrusive" way to create a bookmark. It includes <span> tags * in the range boundaries. The advantage of it is that it is possible to * handle DOM mutations when moving back to the bookmark. * Attention: the inclusion of nodes in the DOM is a design choice and * should not be changed as there are other points in the code that may be * using those nodes to perform operations. See GetBookmarkNode. * @param {Boolean} [serializable] Indicates that the bookmark nodes * must contain ids, which can be used to restore the range even * when these nodes suffer mutations (like a clonation or innerHTML * change). * @returns {Object} And object representing a bookmark. */ createBookmark : function( serializable ) { var startNode, endNode; var baseId; var clone; var collapsed = this.collapsed; startNode = this.document.createElement( 'span' ); startNode.data( 'cke-bookmark', 1 ); startNode.setStyle( 'display', 'none' ); // For IE, it must have something inside, otherwise it may be // removed during DOM operations. startNode.setHtml( '&nbsp;' ); if ( serializable ) { baseId = 'cke_bm_' + CKEDITOR.tools.getNextNumber(); startNode.setAttribute( 'id', baseId + 'S' ); } // If collapsed, the endNode will not be created. if ( !collapsed ) { endNode = startNode.clone(); endNode.setHtml( '&nbsp;' ); if ( serializable ) endNode.setAttribute( 'id', baseId + 'E' ); clone = this.clone(); clone.collapse(); clone.insertNode( endNode ); } clone = this.clone(); clone.collapse( true ); clone.insertNode( startNode ); // Update the range position. if ( endNode ) { this.setStartAfter( startNode ); this.setEndBefore( endNode ); } else this.moveToPosition( startNode, CKEDITOR.POSITION_AFTER_END ); return { startNode : serializable ? baseId + 'S' : startNode, endNode : serializable ? baseId + 'E' : endNode, serializable : serializable, collapsed : collapsed }; }, /** * Creates a "non intrusive" and "mutation sensible" bookmark. This * kind of bookmark should be used only when the DOM is supposed to * remain stable after its creation. * @param {Boolean} [normalized] Indicates that the bookmark must * normalized. When normalized, the successive text nodes are * considered a single node. To sucessful load a normalized * bookmark, the DOM tree must be also normalized before calling * moveToBookmark. * @returns {Object} An object representing the bookmark. */ createBookmark2 : function( normalized ) { var startContainer = this.startContainer, endContainer = this.endContainer; var startOffset = this.startOffset, endOffset = this.endOffset; var collapsed = this.collapsed; var child, previous; // If there is no range then get out of here. // It happens on initial load in Safari #962 and if the editor it's // hidden also in Firefox if ( !startContainer || !endContainer ) return { start : 0, end : 0 }; if ( normalized ) { // Find out if the start is pointing to a text node that will // be normalized. if ( startContainer.type == CKEDITOR.NODE_ELEMENT ) { child = startContainer.getChild( startOffset ); // In this case, move the start information to that text // node. if ( child && child.type == CKEDITOR.NODE_TEXT && startOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT ) { startContainer = child; startOffset = 0; } // Get the normalized offset. if ( child && child.type == CKEDITOR.NODE_ELEMENT ) startOffset = child.getIndex( 1 ); } // Normalize the start. while ( startContainer.type == CKEDITOR.NODE_TEXT && ( previous = startContainer.getPrevious() ) && previous.type == CKEDITOR.NODE_TEXT ) { startContainer = previous; startOffset += previous.getLength(); } // Process the end only if not normalized. if ( !collapsed ) { // Find out if the start is pointing to a text node that // will be normalized. if ( endContainer.type == CKEDITOR.NODE_ELEMENT ) { child = endContainer.getChild( endOffset ); // In this case, move the start information to that // text node. if ( child && child.type == CKEDITOR.NODE_TEXT && endOffset > 0 && child.getPrevious().type == CKEDITOR.NODE_TEXT ) { endContainer = child; endOffset = 0; } // Get the normalized offset. if ( child && child.type == CKEDITOR.NODE_ELEMENT ) endOffset = child.getIndex( 1 ); } // Normalize the end. while ( endContainer.type == CKEDITOR.NODE_TEXT && ( previous = endContainer.getPrevious() ) && previous.type == CKEDITOR.NODE_TEXT ) { endContainer = previous; endOffset += previous.getLength(); } } } return { start : startContainer.getAddress( normalized ), end : collapsed ? null : endContainer.getAddress( normalized ), startOffset : startOffset, endOffset : endOffset, normalized : normalized, collapsed : collapsed, is2 : true // It's a createBookmark2 bookmark. }; }, moveToBookmark : function( bookmark ) { if ( bookmark.is2 ) // Created with createBookmark2(). { // Get the start information. var startContainer = this.document.getByAddress( bookmark.start, bookmark.normalized ), startOffset = bookmark.startOffset; // Get the end information. var endContainer = bookmark.end && this.document.getByAddress( bookmark.end, bookmark.normalized ), endOffset = bookmark.endOffset; // Set the start boundary. this.setStart( startContainer, startOffset ); // Set the end boundary. If not available, collapse it. if ( endContainer ) this.setEnd( endContainer, endOffset ); else this.collapse( true ); } else // Created with createBookmark(). { var serializable = bookmark.serializable, startNode = serializable ? this.document.getById( bookmark.startNode ) : bookmark.startNode, endNode = serializable ? this.document.getById( bookmark.endNode ) : bookmark.endNode; // Set the range start at the bookmark start node position. this.setStartBefore( startNode ); // Remove it, because it may interfere in the setEndBefore call. startNode.remove(); // Set the range end at the bookmark end node position, or simply // collapse it if it is not available. if ( endNode ) { this.setEndBefore( endNode ); endNode.remove(); } else this.collapse( true ); } }, getBoundaryNodes : function() { var startNode = this.startContainer, endNode = this.endContainer, startOffset = this.startOffset, endOffset = this.endOffset, childCount; if ( startNode.type == CKEDITOR.NODE_ELEMENT ) { childCount = startNode.getChildCount(); if ( childCount > startOffset ) startNode = startNode.getChild( startOffset ); else if ( childCount < 1 ) startNode = startNode.getPreviousSourceNode(); else // startOffset > childCount but childCount is not 0 { // Try to take the node just after the current position. startNode = startNode.$; while ( startNode.lastChild ) startNode = startNode.lastChild; startNode = new CKEDITOR.dom.node( startNode ); // Normally we should take the next node in DFS order. But it // is also possible that we've already reached the end of // document. startNode = startNode.getNextSourceNode() || startNode; } } if ( endNode.type == CKEDITOR.NODE_ELEMENT ) { childCount = endNode.getChildCount(); if ( childCount > endOffset ) endNode = endNode.getChild( endOffset ).getPreviousSourceNode( true ); else if ( childCount < 1 ) endNode = endNode.getPreviousSourceNode(); else // endOffset > childCount but childCount is not 0 { // Try to take the node just before the current position. endNode = endNode.$; while ( endNode.lastChild ) endNode = endNode.lastChild; endNode = new CKEDITOR.dom.node( endNode ); } } // Sometimes the endNode will come right before startNode for collapsed // ranges. Fix it. (#3780) if ( startNode.getPosition( endNode ) & CKEDITOR.POSITION_FOLLOWING ) startNode = endNode; return { startNode : startNode, endNode : endNode }; }, /** * Find the node which fully contains the range. * @param includeSelf * @param {Boolean} ignoreTextNode Whether ignore CKEDITOR.NODE_TEXT type. */ getCommonAncestor : function( includeSelf , ignoreTextNode ) { var start = this.startContainer, end = this.endContainer, ancestor; if ( start.equals( end ) ) { if ( includeSelf && start.type == CKEDITOR.NODE_ELEMENT && this.startOffset == this.endOffset - 1 ) ancestor = start.getChild( this.startOffset ); else ancestor = start; } else ancestor = start.getCommonAncestor( end ); return ignoreTextNode && !ancestor.is ? ancestor.getParent() : ancestor; }, /** * Transforms the startContainer and endContainer properties from text * nodes to element nodes, whenever possible. This is actually possible * if either of the boundary containers point to a text node, and its * offset is set to zero, or after the last char in the node. */ optimize : function() { var container = this.startContainer; var offset = this.startOffset; if ( container.type != CKEDITOR.NODE_ELEMENT ) { if ( !offset ) this.setStartBefore( container ); else if ( offset >= container.getLength() ) this.setStartAfter( container ); } container = this.endContainer; offset = this.endOffset; if ( container.type != CKEDITOR.NODE_ELEMENT ) { if ( !offset ) this.setEndBefore( container ); else if ( offset >= container.getLength() ) this.setEndAfter( container ); } }, /** * Move the range out of bookmark nodes if they'd been the container. */ optimizeBookmark: function() { var startNode = this.startContainer, endNode = this.endContainer; if ( startNode.is && startNode.is( 'span' ) && startNode.data( 'cke-bookmark' ) ) this.setStartAt( startNode, CKEDITOR.POSITION_BEFORE_START ); if ( endNode && endNode.is && endNode.is( 'span' ) && endNode.data( 'cke-bookmark' ) ) this.setEndAt( endNode, CKEDITOR.POSITION_AFTER_END ); }, trim : function( ignoreStart, ignoreEnd ) { var startContainer = this.startContainer, startOffset = this.startOffset, collapsed = this.collapsed; if ( ( !ignoreStart || collapsed ) && startContainer && startContainer.type == CKEDITOR.NODE_TEXT ) { // If the offset is zero, we just insert the new node before // the start. if ( !startOffset ) { startOffset = startContainer.getIndex(); startContainer = startContainer.getParent(); } // If the offset is at the end, we'll insert it after the text // node. else if ( startOffset >= startContainer.getLength() ) { startOffset = startContainer.getIndex() + 1; startContainer = startContainer.getParent(); } // In other case, we split the text node and insert the new // node at the split point. else { var nextText = startContainer.split( startOffset ); startOffset = startContainer.getIndex() + 1; startContainer = startContainer.getParent(); // Check all necessity of updating the end boundary. if ( this.startContainer.equals( this.endContainer ) ) this.setEnd( nextText, this.endOffset - this.startOffset ); else if ( startContainer.equals( this.endContainer ) ) this.endOffset += 1; } this.setStart( startContainer, startOffset ); if ( collapsed ) { this.collapse( true ); return; } } var endContainer = this.endContainer; var endOffset = this.endOffset; if ( !( ignoreEnd || collapsed ) && endContainer && endContainer.type == CKEDITOR.NODE_TEXT ) { // If the offset is zero, we just insert the new node before // the start. if ( !endOffset ) { endOffset = endContainer.getIndex(); endContainer = endContainer.getParent(); } // If the offset is at the end, we'll insert it after the text // node. else if ( endOffset >= endContainer.getLength() ) { endOffset = endContainer.getIndex() + 1; endContainer = endContainer.getParent(); } // In other case, we split the text node and insert the new // node at the split point. else { endContainer.split( endOffset ); endOffset = endContainer.getIndex() + 1; endContainer = endContainer.getParent(); } this.setEnd( endContainer, endOffset ); } }, /** * Expands the range so that partial units are completely contained. * @param unit {Number} The unit type to expand with. * @param {Boolean} [excludeBrs=false] Whether include line-breaks when expanding. */ enlarge : function( unit, excludeBrs ) { switch ( unit ) { case CKEDITOR.ENLARGE_ELEMENT : if ( this.collapsed ) return; // Get the common ancestor. var commonAncestor = this.getCommonAncestor(); var body = this.document.getBody(); // For each boundary // a. Depending on its position, find out the first node to be checked (a sibling) or, if not available, to be enlarge. // b. Go ahead checking siblings and enlarging the boundary as much as possible until the common ancestor is not reached. After reaching the common ancestor, just save the enlargeable node to be used later. var startTop, endTop; var enlargeable, sibling, commonReached; // Indicates that the node can be added only if whitespace // is available before it. var needsWhiteSpace = false; var isWhiteSpace; var siblingText; // Process the start boundary. var container = this.startContainer; var offset = this.startOffset; if ( container.type == CKEDITOR.NODE_TEXT ) { if ( offset ) { // Check if there is any non-space text before the // offset. Otherwise, container is null. container = !CKEDITOR.tools.trim( container.substring( 0, offset ) ).length && container; // If we found only whitespace in the node, it // means that we'll need more whitespace to be able // to expand. For example, <i> can be expanded in // "A <i> [B]</i>", but not in "A<i> [B]</i>". needsWhiteSpace = !!container; } if ( container ) { if ( !( sibling = container.getPrevious() ) ) enlargeable = container.getParent(); } } else { // If we have offset, get the node preceeding it as the // first sibling to be checked. if ( offset ) sibling = container.getChild( offset - 1 ) || container.getLast(); // If there is no sibling, mark the container to be // enlarged. if ( !sibling ) enlargeable = container; } while ( enlargeable || sibling ) { if ( enlargeable && !sibling ) { // If we reached the common ancestor, mark the flag // for it. if ( !commonReached && enlargeable.equals( commonAncestor ) ) commonReached = true; if ( !body.contains( enlargeable ) ) break; // If we don't need space or this element breaks // the line, then enlarge it. if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' ) { needsWhiteSpace = false; // If the common ancestor has been reached, // we'll not enlarge it immediately, but just // mark it to be enlarged later if the end // boundary also enlarges it. if ( commonReached ) startTop = enlargeable; else this.setStartBefore( enlargeable ); } sibling = enlargeable.getPrevious(); } // Check all sibling nodes preceeding the enlargeable // node. The node wil lbe enlarged only if none of them // blocks it. while ( sibling ) { // This flag indicates that this node has // whitespaces at the end. isWhiteSpace = false; if ( sibling.type == CKEDITOR.NODE_COMMENT ) { sibling = sibling.getPrevious(); continue; } else if ( sibling.type == CKEDITOR.NODE_TEXT ) { siblingText = sibling.getText(); if ( /[^\s\ufeff]/.test( siblingText ) ) sibling = null; isWhiteSpace = /[\s\ufeff]$/.test( siblingText ); } else { // If this is a visible element. // We need to check for the bookmark attribute because IE insists on // rendering the display:none nodes we use for bookmarks. (#3363) // Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041) if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) ) { // We'll accept it only if we need // whitespace, and this is an inline // element with whitespace only. if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] ) { // It must contains spaces and inline elements only. siblingText = sibling.getText(); if ( (/[^\s\ufeff]/).test( siblingText ) ) // Spaces + Zero Width No-Break Space (U+FEFF) sibling = null; else { var allChildren = sibling.$.getElementsByTagName( '*' ); for ( var i = 0, child ; child = allChildren[ i++ ] ; ) { if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] ) { sibling = null; break; } } } if ( sibling ) isWhiteSpace = !!siblingText.length; } else sibling = null; } } // A node with whitespaces has been found. if ( isWhiteSpace ) { // Enlarge the last enlargeable node, if we // were waiting for spaces. if ( needsWhiteSpace ) { if ( commonReached ) startTop = enlargeable; else if ( enlargeable ) this.setStartBefore( enlargeable ); } else needsWhiteSpace = true; } if ( sibling ) { var next = sibling.getPrevious(); if ( !enlargeable && !next ) { // Set the sibling as enlargeable, so it's // parent will be get later outside this while. enlargeable = sibling; sibling = null; break; } sibling = next; } else { // If sibling has been set to null, then we // need to stop enlarging. enlargeable = null; } } if ( enlargeable ) enlargeable = enlargeable.getParent(); } // Process the end boundary. This is basically the same // code used for the start boundary, with small changes to // make it work in the oposite side (to the right). This // makes it difficult to reuse the code here. So, fixes to // the above code are likely to be replicated here. container = this.endContainer; offset = this.endOffset; // Reset the common variables. enlargeable = sibling = null; commonReached = needsWhiteSpace = false; if ( container.type == CKEDITOR.NODE_TEXT ) { // Check if there is any non-space text after the // offset. Otherwise, container is null. container = !CKEDITOR.tools.trim( container.substring( offset ) ).length && container; // If we found only whitespace in the node, it // means that we'll need more whitespace to be able // to expand. For example, <i> can be expanded in // "A <i> [B]</i>", but not in "A<i> [B]</i>". needsWhiteSpace = !( container && container.getLength() ); if ( container ) { if ( !( sibling = container.getNext() ) ) enlargeable = container.getParent(); } } else { // Get the node right after the boudary to be checked // first. sibling = container.getChild( offset ); if ( !sibling ) enlargeable = container; } while ( enlargeable || sibling ) { if ( enlargeable && !sibling ) { if ( !commonReached && enlargeable.equals( commonAncestor ) ) commonReached = true; if ( !body.contains( enlargeable ) ) break; if ( !needsWhiteSpace || enlargeable.getComputedStyle( 'display' ) != 'inline' ) { needsWhiteSpace = false; if ( commonReached ) endTop = enlargeable; else if ( enlargeable ) this.setEndAfter( enlargeable ); } sibling = enlargeable.getNext(); } while ( sibling ) { isWhiteSpace = false; if ( sibling.type == CKEDITOR.NODE_TEXT ) { siblingText = sibling.getText(); if ( /[^\s\ufeff]/.test( siblingText ) ) sibling = null; isWhiteSpace = /^[\s\ufeff]/.test( siblingText ); } else if ( sibling.type == CKEDITOR.NODE_ELEMENT ) { // If this is a visible element. // We need to check for the bookmark attribute because IE insists on // rendering the display:none nodes we use for bookmarks. (#3363) // Line-breaks (br) are rendered with zero width, which we don't want to include. (#7041) if ( ( sibling.$.offsetWidth > 0 || excludeBrs && sibling.is( 'br' ) ) && !sibling.data( 'cke-bookmark' ) ) { // We'll accept it only if we need // whitespace, and this is an inline // element with whitespace only. if ( needsWhiteSpace && CKEDITOR.dtd.$removeEmpty[ sibling.getName() ] ) { // It must contains spaces and inline elements only. siblingText = sibling.getText(); if ( (/[^\s\ufeff]/).test( siblingText ) ) sibling = null; else { allChildren = sibling.$.getElementsByTagName( '*' ); for ( i = 0 ; child = allChildren[ i++ ] ; ) { if ( !CKEDITOR.dtd.$removeEmpty[ child.nodeName.toLowerCase() ] ) { sibling = null; break; } } } if ( sibling ) isWhiteSpace = !!siblingText.length; } else sibling = null; } } else isWhiteSpace = 1; if ( isWhiteSpace ) { if ( needsWhiteSpace ) { if ( commonReached ) endTop = enlargeable; else this.setEndAfter( enlargeable ); } } if ( sibling ) { next = sibling.getNext(); if ( !enlargeable && !next ) { enlargeable = sibling; sibling = null; break; } sibling = next; } else { // If sibling has been set to null, then we // need to stop enlarging. enlargeable = null; } } if ( enlargeable ) enlargeable = enlargeable.getParent(); } // If the common ancestor can be enlarged by both boundaries, then include it also. if ( startTop && endTop ) { commonAncestor = startTop.contains( endTop ) ? endTop : startTop; this.setStartBefore( commonAncestor ); this.setEndAfter( commonAncestor ); } break; case CKEDITOR.ENLARGE_BLOCK_CONTENTS: case CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS: // Enlarging the start boundary. var walkerRange = new CKEDITOR.dom.range( this.document ); body = this.document.getBody(); walkerRange.setStartAt( body, CKEDITOR.POSITION_AFTER_START ); walkerRange.setEnd( this.startContainer, this.startOffset ); var walker = new CKEDITOR.dom.walker( walkerRange ), blockBoundary, // The node on which the enlarging should stop. tailBr, // In case BR as block boundary. notBlockBoundary = CKEDITOR.dom.walker.blockBoundary( ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? { br : 1 } : null ), // Record the encountered 'blockBoundary' for later use. boundaryGuard = function( node ) { var retval = notBlockBoundary( node ); if ( !retval ) blockBoundary = node; return retval; }, // Record the encounted 'tailBr' for later use. tailBrGuard = function( node ) { var retval = boundaryGuard( node ); if ( !retval && node.is && node.is( 'br' ) ) tailBr = node; return retval; }; walker.guard = boundaryGuard; enlargeable = walker.lastBackward(); // It's the body which stop the enlarging if no block boundary found. blockBoundary = blockBoundary || body; // Start the range either after the end of found block (<p>...</p>[text) // or at the start of block (<p>[text...), by comparing the document position // with 'enlargeable' node. this.setStartAt( blockBoundary, !blockBoundary.is( 'br' ) && ( !enlargeable && this.checkStartOfBlock() || enlargeable && blockBoundary.contains( enlargeable ) ) ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_AFTER_END ); // Avoid enlarging the range further when end boundary spans right after the BR. (#7490) if ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) { var theRange = this.clone(); walker = new CKEDITOR.dom.walker( theRange ); var whitespaces = CKEDITOR.dom.walker.whitespaces(), bookmark = CKEDITOR.dom.walker.bookmark(); walker.evaluator = function( node ) { return !whitespaces( node ) && !bookmark( node ); }; var previous = walker.previous(); if ( previous && previous.type == CKEDITOR.NODE_ELEMENT && previous.is( 'br' ) ) return; } // Enlarging the end boundary. walkerRange = this.clone(); walkerRange.collapse(); walkerRange.setEndAt( body, CKEDITOR.POSITION_BEFORE_END ); walker = new CKEDITOR.dom.walker( walkerRange ); // tailBrGuard only used for on range end. walker.guard = ( unit == CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS ) ? tailBrGuard : boundaryGuard; blockBoundary = null; // End the range right before the block boundary node. enlargeable = walker.lastForward(); // It's the body which stop the enlarging if no block boundary found. blockBoundary = blockBoundary || body; // Close the range either before the found block start (text]<p>...</p>) or at the block end (...text]</p>) // by comparing the document position with 'enlargeable' node. this.setEndAt( blockBoundary, ( !enlargeable && this.checkEndOfBlock() || enlargeable && blockBoundary.contains( enlargeable ) ) ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_BEFORE_START ); // We must include the <br> at the end of range if there's // one and we're expanding list item contents if ( tailBr ) this.setEndAfter( tailBr ); } }, /** * Descrease the range to make sure that boundaries * always anchor beside text nodes or innermost element. * @param {Number} mode ( CKEDITOR.SHRINK_ELEMENT | CKEDITOR.SHRINK_TEXT ) The shrinking mode. * <dl> * <dt>CKEDITOR.SHRINK_ELEMENT</dt> * <dd>Shrink the range boundaries to the edge of the innermost element.</dd> * <dt>CKEDITOR.SHRINK_TEXT</dt> * <dd>Shrink the range boudaries to anchor by the side of enclosed text node, range remains if there's no text nodes on boundaries at all.</dd> * </dl> * @param {Boolean} selectContents Whether result range anchors at the inner OR outer boundary of the node. */ shrink : function( mode, selectContents ) { // Unable to shrink a collapsed range. if ( !this.collapsed ) { mode = mode || CKEDITOR.SHRINK_TEXT; var walkerRange = this.clone(); var startContainer = this.startContainer, endContainer = this.endContainer, startOffset = this.startOffset, endOffset = this.endOffset, collapsed = this.collapsed; // Whether the start/end boundary is moveable. var moveStart = 1, moveEnd = 1; if ( startContainer && startContainer.type == CKEDITOR.NODE_TEXT ) { if ( !startOffset ) walkerRange.setStartBefore( startContainer ); else if ( startOffset >= startContainer.getLength( ) ) walkerRange.setStartAfter( startContainer ); else { // Enlarge the range properly to avoid walker making // DOM changes caused by triming the text nodes later. walkerRange.setStartBefore( startContainer ); moveStart = 0; } } if ( endContainer && endContainer.type == CKEDITOR.NODE_TEXT ) { if ( !endOffset ) walkerRange.setEndBefore( endContainer ); else if ( endOffset >= endContainer.getLength( ) ) walkerRange.setEndAfter( endContainer ); else { walkerRange.setEndAfter( endContainer ); moveEnd = 0; } } var walker = new CKEDITOR.dom.walker( walkerRange ), isBookmark = CKEDITOR.dom.walker.bookmark(); walker.evaluator = function( node ) { return node.type == ( mode == CKEDITOR.SHRINK_ELEMENT ? CKEDITOR.NODE_ELEMENT : CKEDITOR.NODE_TEXT ); }; var currentElement; walker.guard = function( node, movingOut ) { if ( isBookmark( node ) ) return true; // Stop when we're shrink in element mode while encountering a text node. if ( mode == CKEDITOR.SHRINK_ELEMENT && node.type == CKEDITOR.NODE_TEXT ) return false; // Stop when we've already walked "through" an element. if ( movingOut && node.equals( currentElement ) ) return false; if ( !movingOut && node.type == CKEDITOR.NODE_ELEMENT ) currentElement = node; return true; }; if ( moveStart ) { var textStart = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastForward' : 'next'](); textStart && this.setStartAt( textStart, selectContents ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_START ); } if ( moveEnd ) { walker.reset(); var textEnd = walker[ mode == CKEDITOR.SHRINK_ELEMENT ? 'lastBackward' : 'previous'](); textEnd && this.setEndAt( textEnd, selectContents ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_END ); } return !!( moveStart || moveEnd ); } }, /** * Inserts a node at the start of the range. The range will be expanded * the contain the node. */ insertNode : function( node ) { this.optimizeBookmark(); this.trim( false, true ); var startContainer = this.startContainer; var startOffset = this.startOffset; var nextNode = startContainer.getChild( startOffset ); if ( nextNode ) node.insertBefore( nextNode ); else startContainer.append( node ); // Check if we need to update the end boundary. if ( node.getParent().equals( this.endContainer ) ) this.endOffset++; // Expand the range to embrace the new node. this.setStartBefore( node ); }, moveToPosition : function( node, position ) { this.setStartAt( node, position ); this.collapse( true ); }, selectNodeContents : function( node ) { this.setStart( node, 0 ); this.setEnd( node, node.type == CKEDITOR.NODE_TEXT ? node.getLength() : node.getChildCount() ); }, /** * Sets the start position of a Range. * @param {CKEDITOR.dom.node} startNode The node to start the range. * @param {Number} startOffset An integer greater than or equal to zero * representing the offset for the start of the range from the start * of startNode. */ setStart : function( startNode, startOffset ) { // W3C requires a check for the new position. If it is after the end // boundary, the range should be collapsed to the new start. It seams // we will not need this check for our use of this class so we can // ignore it for now. // Fixing invalid range start inside dtd empty elements. if( startNode.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[ startNode.getName() ] ) startOffset = startNode.getIndex(), startNode = startNode.getParent(); this.startContainer = startNode; this.startOffset = startOffset; if ( !this.endContainer ) { this.endContainer = startNode; this.endOffset = startOffset; } updateCollapsed( this ); }, /** * Sets the end position of a Range. * @param {CKEDITOR.dom.node} endNode The node to end the range. * @param {Number} endOffset An integer greater than or equal to zero * representing the offset for the end of the range from the start * of endNode. */ setEnd : function( endNode, endOffset ) { // W3C requires a check for the new position. If it is before the start // boundary, the range should be collapsed to the new end. It seams we // will not need this check for our use of this class so we can ignore // it for now. // Fixing invalid range end inside dtd empty elements. if( endNode.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$empty[ endNode.getName() ] ) endOffset = endNode.getIndex() + 1, endNode = endNode.getParent(); this.endContainer = endNode; this.endOffset = endOffset; if ( !this.startContainer ) { this.startContainer = endNode; this.startOffset = endOffset; } updateCollapsed( this ); }, setStartAfter : function( node ) { this.setStart( node.getParent(), node.getIndex() + 1 ); }, setStartBefore : function( node ) { this.setStart( node.getParent(), node.getIndex() ); }, setEndAfter : function( node ) { this.setEnd( node.getParent(), node.getIndex() + 1 ); }, setEndBefore : function( node ) { this.setEnd( node.getParent(), node.getIndex() ); }, setStartAt : function( node, position ) { switch( position ) { case CKEDITOR.POSITION_AFTER_START : this.setStart( node, 0 ); break; case CKEDITOR.POSITION_BEFORE_END : if ( node.type == CKEDITOR.NODE_TEXT ) this.setStart( node, node.getLength() ); else this.setStart( node, node.getChildCount() ); break; case CKEDITOR.POSITION_BEFORE_START : this.setStartBefore( node ); break; case CKEDITOR.POSITION_AFTER_END : this.setStartAfter( node ); } updateCollapsed( this ); }, setEndAt : function( node, position ) { switch( position ) { case CKEDITOR.POSITION_AFTER_START : this.setEnd( node, 0 ); break; case CKEDITOR.POSITION_BEFORE_END : if ( node.type == CKEDITOR.NODE_TEXT ) this.setEnd( node, node.getLength() ); else this.setEnd( node, node.getChildCount() ); break; case CKEDITOR.POSITION_BEFORE_START : this.setEndBefore( node ); break; case CKEDITOR.POSITION_AFTER_END : this.setEndAfter( node ); } updateCollapsed( this ); }, fixBlock : function( isStart, blockTag ) { var bookmark = this.createBookmark(), fixedBlock = this.document.createElement( blockTag ); this.collapse( isStart ); this.enlarge( CKEDITOR.ENLARGE_BLOCK_CONTENTS ); this.extractContents().appendTo( fixedBlock ); fixedBlock.trim(); if ( !CKEDITOR.env.ie ) fixedBlock.appendBogus(); this.insertNode( fixedBlock ); this.moveToBookmark( bookmark ); return fixedBlock; }, splitBlock : function( blockTag ) { var startPath = new CKEDITOR.dom.elementPath( this.startContainer ), endPath = new CKEDITOR.dom.elementPath( this.endContainer ); var startBlockLimit = startPath.blockLimit, endBlockLimit = endPath.blockLimit; var startBlock = startPath.block, endBlock = endPath.block; var elementPath = null; // Do nothing if the boundaries are in different block limits. if ( !startBlockLimit.equals( endBlockLimit ) ) return null; // Get or fix current blocks. if ( blockTag != 'br' ) { if ( !startBlock ) { startBlock = this.fixBlock( true, blockTag ); endBlock = new CKEDITOR.dom.elementPath( this.endContainer ).block; } if ( !endBlock ) endBlock = this.fixBlock( false, blockTag ); } // Get the range position. var isStartOfBlock = startBlock && this.checkStartOfBlock(), isEndOfBlock = endBlock && this.checkEndOfBlock(); // Delete the current contents. // TODO: Why is 2.x doing CheckIsEmpty()? this.deleteContents(); if ( startBlock && startBlock.equals( endBlock ) ) { if ( isEndOfBlock ) { elementPath = new CKEDITOR.dom.elementPath( this.startContainer ); this.moveToPosition( endBlock, CKEDITOR.POSITION_AFTER_END ); endBlock = null; } else if ( isStartOfBlock ) { elementPath = new CKEDITOR.dom.elementPath( this.startContainer ); this.moveToPosition( startBlock, CKEDITOR.POSITION_BEFORE_START ); startBlock = null; } else { endBlock = this.splitElement( startBlock ); // In Gecko, the last child node must be a bogus <br>. // Note: bogus <br> added under <ul> or <ol> would cause // lists to be incorrectly rendered. if ( !CKEDITOR.env.ie && !startBlock.is( 'ul', 'ol') ) startBlock.appendBogus() ; } } return { previousBlock : startBlock, nextBlock : endBlock, wasStartOfBlock : isStartOfBlock, wasEndOfBlock : isEndOfBlock, elementPath : elementPath }; }, /** * Branch the specified element from the collapsed range position and * place the caret between the two result branches. * Note: The range must be collapsed and been enclosed by this element. * @param {CKEDITOR.dom.element} element * @return {CKEDITOR.dom.element} Root element of the new branch after the split. */ splitElement : function( toSplit ) { if ( !this.collapsed ) return null; // Extract the contents of the block from the selection point to the end // of its contents. this.setEndAt( toSplit, CKEDITOR.POSITION_BEFORE_END ); var documentFragment = this.extractContents(); // Duplicate the element after it. var clone = toSplit.clone( false ); // Place the extracted contents into the duplicated element. documentFragment.appendTo( clone ); clone.insertAfter( toSplit ); this.moveToPosition( toSplit, CKEDITOR.POSITION_AFTER_END ); return clone; }, /** * Check whether a range boundary is at the inner boundary of a given * element. * @param {CKEDITOR.dom.element} element The target element to check. * @param {Number} checkType The boundary to check for both the range * and the element. It can be CKEDITOR.START or CKEDITOR.END. * @returns {Boolean} "true" if the range boundary is at the inner * boundary of the element. */ checkBoundaryOfElement : function( element, checkType ) { var checkStart = ( checkType == CKEDITOR.START ); // Create a copy of this range, so we can manipulate it for our checks. var walkerRange = this.clone(); // Collapse the range at the proper size. walkerRange.collapse( checkStart ); // Expand the range to element boundary. walkerRange[ checkStart ? 'setStartAt' : 'setEndAt' ] ( element, checkStart ? CKEDITOR.POSITION_AFTER_START : CKEDITOR.POSITION_BEFORE_END ); // Create the walker, which will check if we have anything useful // in the range. var walker = new CKEDITOR.dom.walker( walkerRange ); walker.evaluator = elementBoundaryEval( checkStart ); return walker[ checkStart ? 'checkBackward' : 'checkForward' ](); }, // Calls to this function may produce changes to the DOM. The range may // be updated to reflect such changes. checkStartOfBlock : function() { var startContainer = this.startContainer, startOffset = this.startOffset; // If the starting node is a text node, and non-empty before the offset, // then we're surely not at the start of block. if ( startOffset && startContainer.type == CKEDITOR.NODE_TEXT ) { var textBefore = CKEDITOR.tools.ltrim( startContainer.substring( 0, startOffset ) ); if ( textBefore.length ) return false; } // Antecipate the trim() call here, so the walker will not make // changes to the DOM, which would not get reflected into this // range otherwise. this.trim(); // We need to grab the block element holding the start boundary, so // let's use an element path for it. var path = new CKEDITOR.dom.elementPath( this.startContainer ); // Creates a range starting at the block start until the range start. var walkerRange = this.clone(); walkerRange.collapse( true ); walkerRange.setStartAt( path.block || path.blockLimit, CKEDITOR.POSITION_AFTER_START ); var walker = new CKEDITOR.dom.walker( walkerRange ); walker.evaluator = getCheckStartEndBlockEvalFunction( true ); return walker.checkBackward(); }, checkEndOfBlock : function() { var endContainer = this.endContainer, endOffset = this.endOffset; // If the ending node is a text node, and non-empty after the offset, // then we're surely not at the end of block. if ( endContainer.type == CKEDITOR.NODE_TEXT ) { var textAfter = CKEDITOR.tools.rtrim( endContainer.substring( endOffset ) ); if ( textAfter.length ) return false; } // Antecipate the trim() call here, so the walker will not make // changes to the DOM, which would not get reflected into this // range otherwise. this.trim(); // We need to grab the block element holding the start boundary, so // let's use an element path for it. var path = new CKEDITOR.dom.elementPath( this.endContainer ); // Creates a range starting at the block start until the range start. var walkerRange = this.clone(); walkerRange.collapse( false ); walkerRange.setEndAt( path.block || path.blockLimit, CKEDITOR.POSITION_BEFORE_END ); var walker = new CKEDITOR.dom.walker( walkerRange ); walker.evaluator = getCheckStartEndBlockEvalFunction( false ); return walker.checkForward(); }, /** * Check if elements at which the range boundaries anchor are read-only, * with respect to "contenteditable" attribute. */ checkReadOnly : ( function() { function checkNodesEditable( node, anotherEnd ) { while( node ) { if ( node.type == CKEDITOR.NODE_ELEMENT ) { if ( node.getAttribute( 'contentEditable' ) == 'false' && !node.data( 'cke-editable' ) ) { return 0; } // Range enclosed entirely in an editable element. else if ( node.is( 'html' ) || node.getAttribute( 'contentEditable' ) == 'true' && ( node.contains( anotherEnd ) || node.equals( anotherEnd ) ) ) { break; } } node = node.getParent(); } return 1; } return function() { var startNode = this.startContainer, endNode = this.endContainer; // Check if elements path at both boundaries are editable. return !( checkNodesEditable( startNode, endNode ) && checkNodesEditable( endNode, startNode ) ); }; })(), /** * Moves the range boundaries to the first/end editing point inside an * element. For example, in an element tree like * "&lt;p&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt; Text&lt;/p&gt;", the start editing point is * "&lt;p&gt;&lt;b&gt;&lt;i&gt;^&lt;/i&gt;&lt;/b&gt; Text&lt;/p&gt;" (inside &lt;i&gt;). * @param {CKEDITOR.dom.element} el The element into which look for the * editing spot. * @param {Boolean} isMoveToEnd Whether move to the end editable position. */ moveToElementEditablePosition : function( el, isMoveToEnd ) { function nextDFS( node, childOnly ) { var next; if ( node.type == CKEDITOR.NODE_ELEMENT && node.isEditable( false ) && !CKEDITOR.dtd.$nonEditable[ node.getName() ] ) { next = node[ isMoveToEnd ? 'getLast' : 'getFirst' ]( nonWhitespaceOrBookmarkEval ); } if ( !childOnly && !next ) next = node[ isMoveToEnd ? 'getPrevious' : 'getNext' ]( nonWhitespaceOrBookmarkEval ); return next; } var found = 0; while ( el ) { // Stop immediately if we've found a text node. if ( el.type == CKEDITOR.NODE_TEXT ) { this.moveToPosition( el, isMoveToEnd ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START ); found = 1; break; } // If an editable element is found, move inside it, but not stop the searching. if ( el.type == CKEDITOR.NODE_ELEMENT ) { if ( el.isEditable() ) { this.moveToPosition( el, isMoveToEnd ? CKEDITOR.POSITION_BEFORE_END : CKEDITOR.POSITION_AFTER_START ); found = 1; } } el = nextDFS( el, found ); } return !!found; }, /** *@see {CKEDITOR.dom.range.moveToElementEditablePosition} */ moveToElementEditStart : function( target ) { return this.moveToElementEditablePosition( target ); }, /** *@see {CKEDITOR.dom.range.moveToElementEditablePosition} */ moveToElementEditEnd : function( target ) { return this.moveToElementEditablePosition( target, true ); }, /** * Get the single node enclosed within the range if there's one. */ getEnclosedNode : function() { var walkerRange = this.clone(); // Optimize and analyze the range to avoid DOM destructive nature of walker. (#5780) walkerRange.optimize(); if ( walkerRange.startContainer.type != CKEDITOR.NODE_ELEMENT || walkerRange.endContainer.type != CKEDITOR.NODE_ELEMENT ) return null; var walker = new CKEDITOR.dom.walker( walkerRange ), isNotBookmarks = CKEDITOR.dom.walker.bookmark( true ), isNotWhitespaces = CKEDITOR.dom.walker.whitespaces( true ), evaluator = function( node ) { return isNotWhitespaces( node ) && isNotBookmarks( node ); }; walkerRange.evaluator = evaluator; var node = walker.next(); walker.reset(); return node && node.equals( walker.previous() ) ? node : null; }, getTouchedStartNode : function() { var container = this.startContainer ; if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT ) return container ; return container.getChild( this.startOffset ) || container ; }, getTouchedEndNode : function() { var container = this.endContainer ; if ( this.collapsed || container.type != CKEDITOR.NODE_ELEMENT ) return container ; return container.getChild( this.endOffset - 1 ) || container ; } }; })(); CKEDITOR.POSITION_AFTER_START = 1; // <element>^contents</element> "^text" CKEDITOR.POSITION_BEFORE_END = 2; // <element>contents^</element> "text^" CKEDITOR.POSITION_BEFORE_START = 3; // ^<element>contents</element> ^"text" CKEDITOR.POSITION_AFTER_END = 4; // <element>contents</element>^ "text" CKEDITOR.ENLARGE_ELEMENT = 1; CKEDITOR.ENLARGE_BLOCK_CONTENTS = 2; CKEDITOR.ENLARGE_LIST_ITEM_CONTENTS = 3; // Check boundary types. // @see CKEDITOR.dom.range.prototype.checkBoundaryOfElement CKEDITOR.START = 1; CKEDITOR.END = 2; CKEDITOR.STARTEND = 3; // Shrink range types. // @see CKEDITOR.dom.range.prototype.shrink CKEDITOR.SHRINK_ELEMENT = 1; CKEDITOR.SHRINK_TEXT = 2;
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.dom.document} class, which * represents a DOM document. */ /** * Represents a DOM window. * @constructor * @augments CKEDITOR.dom.domObject * @param {Object} domWindow A native DOM window. * @example * var document = new CKEDITOR.dom.window( window ); */ CKEDITOR.dom.window = function( domWindow ) { CKEDITOR.dom.domObject.call( this, domWindow ); }; CKEDITOR.dom.window.prototype = new CKEDITOR.dom.domObject(); CKEDITOR.tools.extend( CKEDITOR.dom.window.prototype, /** @lends CKEDITOR.dom.window.prototype */ { /** * Moves the selection focus to this window. * @function * @example * var win = new CKEDITOR.dom.window( window ); * <b>win.focus()</b>; */ focus : function() { // Webkit is sometimes failed to focus iframe, blur it first(#3835). if ( CKEDITOR.env.webkit && this.$.parent ) this.$.parent.focus(); this.$.focus(); }, /** * Gets the width and height of this window's viewable area. * @function * @returns {Object} An object with the "width" and "height" * properties containing the size. * @example * var win = new CKEDITOR.dom.window( window ); * var size = <b>win.getViewPaneSize()</b>; * alert( size.width ); * alert( size.height ); */ getViewPaneSize : function() { var doc = this.$.document, stdMode = doc.compatMode == 'CSS1Compat'; return { width : ( stdMode ? doc.documentElement.clientWidth : doc.body.clientWidth ) || 0, height : ( stdMode ? doc.documentElement.clientHeight : doc.body.clientHeight ) || 0 }; }, /** * Gets the current position of the window's scroll. * @function * @returns {Object} An object with the "x" and "y" properties * containing the scroll position. * @example * var win = new CKEDITOR.dom.window( window ); * var pos = <b>win.getScrollPosition()</b>; * alert( pos.x ); * alert( pos.y ); */ getScrollPosition : function() { var $ = this.$; if ( 'pageXOffset' in $ ) { return { x : $.pageXOffset || 0, y : $.pageYOffset || 0 }; } else { var doc = $.document; return { x : doc.documentElement.scrollLeft || doc.body.scrollLeft || 0, y : doc.documentElement.scrollTop || doc.body.scrollTop || 0 }; } } });
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @class */ CKEDITOR.dom.nodeList = function( nativeList ) { this.$ = nativeList; }; CKEDITOR.dom.nodeList.prototype = { count : function() { return this.$.length; }, getItem : function( index ) { var $node = this.$[ index ]; return $node ? new CKEDITOR.dom.node( $node ) : null; } };
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.dom.document} class, which * represents a DOM document. */ /** * Represents a DOM document. * @constructor * @augments CKEDITOR.dom.domObject * @param {Object} domDocument A native DOM document. * @example * var document = new CKEDITOR.dom.document( document ); */ CKEDITOR.dom.document = function( domDocument ) { CKEDITOR.dom.domObject.call( this, domDocument ); }; // PACKAGER_RENAME( CKEDITOR.dom.document ) CKEDITOR.dom.document.prototype = new CKEDITOR.dom.domObject(); CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, /** @lends CKEDITOR.dom.document.prototype */ { /** * Appends a CSS file to the document. * @param {String} cssFileUrl The CSS file URL. * @example * <b>CKEDITOR.document.appendStyleSheet( '/mystyles.css' )</b>; */ appendStyleSheet : function( cssFileUrl ) { if ( this.$.createStyleSheet ) this.$.createStyleSheet( cssFileUrl ); else { var link = new CKEDITOR.dom.element( 'link' ); link.setAttributes( { rel :'stylesheet', type : 'text/css', href : cssFileUrl }); this.getHead().append( link ); } }, appendStyleText : function( cssStyleText ) { if ( this.$.createStyleSheet ) { var styleSheet = this.$.createStyleSheet( "" ); styleSheet.cssText = cssStyleText ; } else { var style = new CKEDITOR.dom.element( 'style', this ); style.append( new CKEDITOR.dom.text( cssStyleText, this ) ); this.getHead().append( style ); } }, createElement : function( name, attribsAndStyles ) { var element = new CKEDITOR.dom.element( name, this ); if ( attribsAndStyles ) { if ( attribsAndStyles.attributes ) element.setAttributes( attribsAndStyles.attributes ); if ( attribsAndStyles.styles ) element.setStyles( attribsAndStyles.styles ); } return element; }, createText : function( text ) { return new CKEDITOR.dom.text( text, this ); }, focus : function() { this.getWindow().focus(); }, /** * Gets and element based on its id. * @param {String} elementId The element id. * @returns {CKEDITOR.dom.element} The element instance, or null if not found. * @example * var element = <b>CKEDITOR.document.getById( 'myElement' )</b>; * alert( element.getId() ); // "myElement" */ getById : function( elementId ) { var $ = this.$.getElementById( elementId ); return $ ? new CKEDITOR.dom.element( $ ) : null; }, getByAddress : function( address, normalized ) { var $ = this.$.documentElement; for ( var i = 0 ; $ && i < address.length ; i++ ) { var target = address[ i ]; if ( !normalized ) { $ = $.childNodes[ target ]; continue; } var currentIndex = -1; for (var j = 0 ; j < $.childNodes.length ; j++ ) { var candidate = $.childNodes[ j ]; if ( normalized === true && candidate.nodeType == 3 && candidate.previousSibling && candidate.previousSibling.nodeType == 3 ) { continue; } currentIndex++; if ( currentIndex == target ) { $ = candidate; break; } } } return $ ? new CKEDITOR.dom.node( $ ) : null; }, getElementsByTag : function( tagName, namespace ) { if ( !( CKEDITOR.env.ie && ! ( document.documentMode > 8 ) ) && namespace ) tagName = namespace + ':' + tagName; return new CKEDITOR.dom.nodeList( this.$.getElementsByTagName( tagName ) ); }, /** * Gets the &lt;head&gt; element for this document. * @returns {CKEDITOR.dom.element} The &lt;head&gt; element. * @example * var element = <b>CKEDITOR.document.getHead()</b>; * alert( element.getName() ); // "head" */ getHead : function() { var head = this.$.getElementsByTagName( 'head' )[0]; if ( !head ) head = this.getDocumentElement().append( new CKEDITOR.dom.element( 'head' ), true ); else head = new CKEDITOR.dom.element( head ); return ( this.getHead = function() { return head; })(); }, /** * Gets the &lt;body&gt; element for this document. * @returns {CKEDITOR.dom.element} The &lt;body&gt; element. * @example * var element = <b>CKEDITOR.document.getBody()</b>; * alert( element.getName() ); // "body" */ getBody : function() { var body = new CKEDITOR.dom.element( this.$.body ); return ( this.getBody = function() { return body; })(); }, /** * Gets the DOM document element for this document. * @returns {CKEDITOR.dom.element} The DOM document element. */ getDocumentElement : function() { var documentElement = new CKEDITOR.dom.element( this.$.documentElement ); return ( this.getDocumentElement = function() { return documentElement; })(); }, /** * Gets the window object that holds this document. * @returns {CKEDITOR.dom.window} The window object. */ getWindow : function() { var win = new CKEDITOR.dom.window( this.$.parentWindow || this.$.defaultView ); return ( this.getWindow = function() { return win; })(); }, /** * Defines the document contents through document.write. Note that the * previous document contents will be lost (cleaned). * @since 3.5 * @param {String} html The HTML defining the document contents. * @example * document.write( * '&lt;html&gt;' + * '&lt;head&gt;&lt;title&gt;Sample Doc&lt;/title&gt;&lt;/head&gt;' + * '&lt;body&gt;Document contents created by code&lt;/body&gt;' + * '&lt;/html&gt;' ); */ write : function( html ) { // Don't leave any history log in IE. (#5657) this.$.open( 'text/html', 'replace' ); // Support for custom document.domain in IE. CKEDITOR.env.isCustomDomain() && ( this.$.domain = document.domain ); this.$.write( html ); this.$.close(); } });
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { // This function is to be called under a "walker" instance scope. function iterate( rtl, breakOnFalse ) { var range = this.range; // Return null if we have reached the end. if ( this._.end ) return null; // This is the first call. Initialize it. if ( !this._.start ) { this._.start = 1; // A collapsed range must return null at first call. if ( range.collapsed ) { this.end(); return null; } // Move outside of text node edges. range.optimize(); } var node, startCt = range.startContainer, endCt = range.endContainer, startOffset = range.startOffset, endOffset = range.endOffset, guard, userGuard = this.guard, type = this.type, getSourceNodeFn = ( rtl ? 'getPreviousSourceNode' : 'getNextSourceNode' ); // Create the LTR guard function, if necessary. if ( !rtl && !this._.guardLTR ) { // The node that stops walker from moving up. var limitLTR = endCt.type == CKEDITOR.NODE_ELEMENT ? endCt : endCt.getParent(); // The node that stops the walker from going to next. var blockerLTR = endCt.type == CKEDITOR.NODE_ELEMENT ? endCt.getChild( endOffset ) : endCt.getNext(); this._.guardLTR = function( node, movingOut ) { return ( ( !movingOut || !limitLTR.equals( node ) ) && ( !blockerLTR || !node.equals( blockerLTR ) ) && ( node.type != CKEDITOR.NODE_ELEMENT || !movingOut || node.getName() != 'body' ) ); }; } // Create the RTL guard function, if necessary. if ( rtl && !this._.guardRTL ) { // The node that stops walker from moving up. var limitRTL = startCt.type == CKEDITOR.NODE_ELEMENT ? startCt : startCt.getParent(); // The node that stops the walker from going to next. var blockerRTL = startCt.type == CKEDITOR.NODE_ELEMENT ? startOffset ? startCt.getChild( startOffset - 1 ) : null : startCt.getPrevious(); this._.guardRTL = function( node, movingOut ) { return ( ( !movingOut || !limitRTL.equals( node ) ) && ( !blockerRTL || !node.equals( blockerRTL ) ) && ( node.type != CKEDITOR.NODE_ELEMENT || !movingOut || node.getName() != 'body' ) ); }; } // Define which guard function to use. var stopGuard = rtl ? this._.guardRTL : this._.guardLTR; // Make the user defined guard function participate in the process, // otherwise simply use the boundary guard. if ( userGuard ) { guard = function( node, movingOut ) { if ( stopGuard( node, movingOut ) === false ) return false; return userGuard( node, movingOut ); }; } else guard = stopGuard; if ( this.current ) node = this.current[ getSourceNodeFn ]( false, type, guard ); else { // Get the first node to be returned. if ( rtl ) { node = endCt; if ( node.type == CKEDITOR.NODE_ELEMENT ) { if ( endOffset > 0 ) node = node.getChild( endOffset - 1 ); else node = ( guard ( node, true ) === false ) ? null : node.getPreviousSourceNode( true, type, guard ); } } else { node = startCt; if ( node.type == CKEDITOR.NODE_ELEMENT ) { if ( ! ( node = node.getChild( startOffset ) ) ) node = ( guard ( startCt, true ) === false ) ? null : startCt.getNextSourceNode( true, type, guard ) ; } } if ( node && guard( node ) === false ) node = null; } while ( node && !this._.end ) { this.current = node; if ( !this.evaluator || this.evaluator( node ) !== false ) { if ( !breakOnFalse ) return node; } else if ( breakOnFalse && this.evaluator ) return false; node = node[ getSourceNodeFn ]( false, type, guard ); } this.end(); return this.current = null; } function iterateToLast( rtl ) { var node, last = null; while ( ( node = iterate.call( this, rtl ) ) ) last = node; return last; } CKEDITOR.dom.walker = CKEDITOR.tools.createClass( { /** * Utility class to "walk" the DOM inside a range boundaries. If * necessary, partially included nodes (text nodes) are broken to * reflect the boundaries limits, so DOM and range changes may happen. * Outside changes to the range may break the walker. * * The walker may return nodes that are not totaly included into the * range boundaires. Let's take the following range representation, * where the square brackets indicate the boundaries: * * [&lt;p&gt;Some &lt;b&gt;sample] text&lt;/b&gt; * * While walking forward into the above range, the following nodes are * returned: &lt;p&gt;, "Some ", &lt;b&gt; and "sample". Going * backwards instead we have: "sample" and "Some ". So note that the * walker always returns nodes when "entering" them, but not when * "leaving" them. The guard function is instead called both when * entering and leaving nodes. * * @constructor * @param {CKEDITOR.dom.range} range The range within which walk. */ $ : function( range ) { this.range = range; /** * A function executed for every matched node, to check whether * it's to be considered into the walk or not. If not provided, all * matched nodes are considered good. * If the function returns "false" the node is ignored. * @name CKEDITOR.dom.walker.prototype.evaluator * @property * @type Function */ // this.evaluator = null; /** * A function executed for every node the walk pass by to check * whether the walk is to be finished. It's called when both * entering and exiting nodes, as well as for the matched nodes. * If this function returns "false", the walking ends and no more * nodes are evaluated. * @name CKEDITOR.dom.walker.prototype.guard * @property * @type Function */ // this.guard = null; /** @private */ this._ = {}; }, // statics : // { // /* Creates a CKEDITOR.dom.walker instance to walk inside DOM boundaries set by nodes. // * @param {CKEDITOR.dom.node} startNode The node from wich the walk // * will start. // * @param {CKEDITOR.dom.node} [endNode] The last node to be considered // * in the walk. No more nodes are retrieved after touching or // * passing it. If not provided, the walker stops at the // * &lt;body&gt; closing boundary. // * @returns {CKEDITOR.dom.walker} A DOM walker for the nodes between the // * provided nodes. // */ // createOnNodes : function( startNode, endNode, startInclusive, endInclusive ) // { // var range = new CKEDITOR.dom.range(); // if ( startNode ) // range.setStartAt( startNode, startInclusive ? CKEDITOR.POSITION_BEFORE_START : CKEDITOR.POSITION_AFTER_END ) ; // else // range.setStartAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_AFTER_START ) ; // // if ( endNode ) // range.setEndAt( endNode, endInclusive ? CKEDITOR.POSITION_AFTER_END : CKEDITOR.POSITION_BEFORE_START ) ; // else // range.setEndAt( startNode.getDocument().getBody(), CKEDITOR.POSITION_BEFORE_END ) ; // // return new CKEDITOR.dom.walker( range ); // } // }, // proto : { /** * Stop walking. No more nodes are retrieved if this function gets * called. */ end : function() { this._.end = 1; }, /** * Retrieves the next node (at right). * @returns {CKEDITOR.dom.node} The next node or null if no more * nodes are available. */ next : function() { return iterate.call( this ); }, /** * Retrieves the previous node (at left). * @returns {CKEDITOR.dom.node} The previous node or null if no more * nodes are available. */ previous : function() { return iterate.call( this, 1 ); }, /** * Check all nodes at right, executing the evaluation fuction. * @returns {Boolean} "false" if the evaluator function returned * "false" for any of the matched nodes. Otherwise "true". */ checkForward : function() { return iterate.call( this, 0, 1 ) !== false; }, /** * Check all nodes at left, executing the evaluation fuction. * @returns {Boolean} "false" if the evaluator function returned * "false" for any of the matched nodes. Otherwise "true". */ checkBackward : function() { return iterate.call( this, 1, 1 ) !== false; }, /** * Executes a full walk forward (to the right), until no more nodes * are available, returning the last valid node. * @returns {CKEDITOR.dom.node} The last node at the right or null * if no valid nodes are available. */ lastForward : function() { return iterateToLast.call( this ); }, /** * Executes a full walk backwards (to the left), until no more nodes * are available, returning the last valid node. * @returns {CKEDITOR.dom.node} The last node at the left or null * if no valid nodes are available. */ lastBackward : function() { return iterateToLast.call( this, 1 ); }, reset : function() { delete this.current; this._ = {}; } } }); /* * Anything whose display computed style is block, list-item, table, * table-row-group, table-header-group, table-footer-group, table-row, * table-column-group, table-column, table-cell, table-caption, or whose node * name is hr, br (when enterMode is br only) is a block boundary. */ var blockBoundaryDisplayMatch = { block : 1, 'list-item' : 1, table : 1, 'table-row-group' : 1, 'table-header-group' : 1, 'table-footer-group' : 1, 'table-row' : 1, 'table-column-group' : 1, 'table-column' : 1, 'table-cell' : 1, 'table-caption' : 1 }; CKEDITOR.dom.element.prototype.isBlockBoundary = function( customNodeNames ) { var nodeNameMatches = customNodeNames ? CKEDITOR.tools.extend( {}, CKEDITOR.dtd.$block, customNodeNames || {} ) : CKEDITOR.dtd.$block; // Don't consider floated formatting as block boundary, fall back to dtd check in that case. (#6297) return this.getComputedStyle( 'float' ) == 'none' && blockBoundaryDisplayMatch[ this.getComputedStyle( 'display' ) ] || nodeNameMatches[ this.getName() ]; }; CKEDITOR.dom.walker.blockBoundary = function( customNodeNames ) { return function( node , type ) { return ! ( node.type == CKEDITOR.NODE_ELEMENT && node.isBlockBoundary( customNodeNames ) ); }; }; CKEDITOR.dom.walker.listItemBoundary = function() { return this.blockBoundary( { br : 1 } ); }; /** * Whether the to-be-evaluated node is a bookmark node OR bookmark node * inner contents. * @param {Boolean} contentOnly Whether only test againt the text content of * bookmark node instead of the element itself(default). * @param {Boolean} isReject Whether should return 'false' for the bookmark * node instead of 'true'(default). */ CKEDITOR.dom.walker.bookmark = function( contentOnly, isReject ) { function isBookmarkNode( node ) { return ( node && node.getName && node.getName() == 'span' && node.data( 'cke-bookmark' ) ); } return function( node ) { var isBookmark, parent; // Is bookmark inner text node? isBookmark = ( node && !node.getName && ( parent = node.getParent() ) && isBookmarkNode( parent ) ); // Is bookmark node? isBookmark = contentOnly ? isBookmark : isBookmark || isBookmarkNode( node ); return !! ( isReject ^ isBookmark ); }; }; /** * Whether the node is a text node containing only whitespaces characters. * @param isReject */ CKEDITOR.dom.walker.whitespaces = function( isReject ) { return function( node ) { var isWhitespace = node && ( node.type == CKEDITOR.NODE_TEXT ) && !CKEDITOR.tools.trim( node.getText() ); return !! ( isReject ^ isWhitespace ); }; }; /** * Whether the node is invisible in wysiwyg mode. * @param isReject */ CKEDITOR.dom.walker.invisible = function( isReject ) { var whitespace = CKEDITOR.dom.walker.whitespaces(); return function( node ) { // Nodes that take no spaces in wysiwyg: // 1. White-spaces but not including NBSP; // 2. Empty inline elements, e.g. <b></b> we're checking here // 'offsetHeight' instead of 'offsetWidth' for properly excluding // all sorts of empty paragraph, e.g. <br />. var isInvisible = whitespace( node ) || node.is && !node.$.offsetHeight; return !! ( isReject ^ isInvisible ); }; }; CKEDITOR.dom.walker.nodeType = function( type, isReject ) { return function( node ) { return !! ( isReject ^ ( node.type == type ) ); }; }; CKEDITOR.dom.walker.bogus = function( type, isReject ) { function nonEmpty( node ) { return !isWhitespaces( node ) && !isBookmark( node ); } return function( node ) { var parent = node.getParent(), isBogus = !CKEDITOR.env.ie ? node.is && node.is( 'br' ) : node.getText && tailNbspRegex.test( node.getText() ); isBogus = isBogus && parent.isBlockBoundary() && !!parent.getLast( nonEmpty ); return !! ( isReject ^ isBogus ); }; }; var tailNbspRegex = /^[\t\r\n ]*(?:&nbsp;|\xa0)$/, isWhitespaces = CKEDITOR.dom.walker.whitespaces(), isBookmark = CKEDITOR.dom.walker.bookmark(), toSkip = function( node ) { return isBookmark( node ) || isWhitespaces( node ) || node.type == CKEDITOR.NODE_ELEMENT && node.getName() in CKEDITOR.dtd.$inline && !( node.getName() in CKEDITOR.dtd.$empty ); }; // Check if there's a filler node at the end of an element, and return it. CKEDITOR.dom.element.prototype.getBogus = function() { // Bogus are not always at the end, e.g. <p><a>text<br /></a></p> (#7070). var tail = this; do { tail = tail.getPreviousSourceNode(); } while ( toSkip( tail ) ) if ( tail && ( !CKEDITOR.env.ie ? tail.is && tail.is( 'br' ) : tail.getText && tailNbspRegex.test( tail.getText() ) ) ) { return tail; } 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.dom.element} class, which * represents a DOM element. */ /** * Represents a DOM element. * @constructor * @augments CKEDITOR.dom.node * @param {Object|String} element A native DOM element or the element name for * new elements. * @param {CKEDITOR.dom.document} [ownerDocument] The document that will contain * the element in case of element creation. * @example * // Create a new &lt;span&gt; element. * var element = new CKEDITOR.dom.element( 'span' ); * @example * // Create an element based on a native DOM element. * var element = new CKEDITOR.dom.element( document.getElementById( 'myId' ) ); */ CKEDITOR.dom.element = function( element, ownerDocument ) { if ( typeof element == 'string' ) element = ( ownerDocument ? ownerDocument.$ : document ).createElement( element ); // Call the base constructor (we must not call CKEDITOR.dom.node). CKEDITOR.dom.domObject.call( this, element ); }; // PACKAGER_RENAME( CKEDITOR.dom.element ) /** * The the {@link CKEDITOR.dom.element} representing and element. If the * element is a native DOM element, it will be transformed into a valid * CKEDITOR.dom.element object. * @returns {CKEDITOR.dom.element} The transformed element. * @example * var element = new CKEDITOR.dom.element( 'span' ); * alert( element == <b>CKEDITOR.dom.element.get( element )</b> ); "true" * @example * var element = document.getElementById( 'myElement' ); * alert( <b>CKEDITOR.dom.element.get( element )</b>.getName() ); e.g. "p" */ CKEDITOR.dom.element.get = function( element ) { return element && ( element.$ ? element : new CKEDITOR.dom.element( element ) ); }; CKEDITOR.dom.element.prototype = new CKEDITOR.dom.node(); /** * Creates an instance of the {@link CKEDITOR.dom.element} class based on the * HTML representation of an element. * @param {String} html The element HTML. It should define only one element in * the "root" level. The "root" element can have child nodes, but not * siblings. * @returns {CKEDITOR.dom.element} The element instance. * @example * var element = <b>CKEDITOR.dom.element.createFromHtml( '&lt;strong class="anyclass"&gt;My element&lt;/strong&gt;' )</b>; * alert( element.getName() ); // "strong" */ CKEDITOR.dom.element.createFromHtml = function( html, ownerDocument ) { var temp = new CKEDITOR.dom.element( 'div', ownerDocument ); temp.setHtml( html ); // When returning the node, remove it from its parent to detach it. return temp.getFirst().remove(); }; CKEDITOR.dom.element.setMarker = function( database, element, name, value ) { var id = element.getCustomData( 'list_marker_id' ) || ( element.setCustomData( 'list_marker_id', CKEDITOR.tools.getNextNumber() ).getCustomData( 'list_marker_id' ) ), markerNames = element.getCustomData( 'list_marker_names' ) || ( element.setCustomData( 'list_marker_names', {} ).getCustomData( 'list_marker_names' ) ); database[id] = element; markerNames[name] = 1; return element.setCustomData( name, value ); }; CKEDITOR.dom.element.clearAllMarkers = function( database ) { for ( var i in database ) CKEDITOR.dom.element.clearMarkers( database, database[i], 1 ); }; CKEDITOR.dom.element.clearMarkers = function( database, element, removeFromDatabase ) { var names = element.getCustomData( 'list_marker_names' ), id = element.getCustomData( 'list_marker_id' ); for ( var i in names ) element.removeCustomData( i ); element.removeCustomData( 'list_marker_names' ); if ( removeFromDatabase ) { element.removeCustomData( 'list_marker_id' ); delete database[id]; } }; CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, /** @lends CKEDITOR.dom.element.prototype */ { /** * The node type. This is a constant value set to * {@link CKEDITOR.NODE_ELEMENT}. * @type Number * @example */ type : CKEDITOR.NODE_ELEMENT, /** * Adds a CSS class to the element. It appends the class to the * already existing names. * @param {String} className The name of the class to be added. * @example * var element = new CKEDITOR.dom.element( 'div' ); * element.addClass( 'classA' ); // &lt;div class="classA"&gt; * element.addClass( 'classB' ); // &lt;div class="classA classB"&gt; * element.addClass( 'classA' ); // &lt;div class="classA classB"&gt; */ addClass : function( className ) { var c = this.$.className; if ( c ) { var regex = new RegExp( '(?:^|\\s)' + className + '(?:\\s|$)', '' ); if ( !regex.test( c ) ) c += ' ' + className; } this.$.className = c || className; }, /** * Removes a CSS class name from the elements classes. Other classes * remain untouched. * @param {String} className The name of the class to remove. * @example * var element = new CKEDITOR.dom.element( 'div' ); * element.addClass( 'classA' ); // &lt;div class="classA"&gt; * element.addClass( 'classB' ); // &lt;div class="classA classB"&gt; * element.removeClass( 'classA' ); // &lt;div class="classB"&gt; * element.removeClass( 'classB' ); // &lt;div&gt; */ removeClass : function( className ) { var c = this.getAttribute( 'class' ); if ( c ) { var regex = new RegExp( '(?:^|\\s+)' + className + '(?=\\s|$)', 'i' ); if ( regex.test( c ) ) { c = c.replace( regex, '' ).replace( /^\s+/, '' ); if ( c ) this.setAttribute( 'class', c ); else this.removeAttribute( 'class' ); } } }, hasClass : function( className ) { var regex = new RegExp( '(?:^|\\s+)' + className + '(?=\\s|$)', '' ); return regex.test( this.getAttribute('class') ); }, /** * Append a node as a child of this element. * @param {CKEDITOR.dom.node|String} node The node or element name to be * appended. * @param {Boolean} [toStart] Indicates that the element is to be * appended at the start. * @returns {CKEDITOR.dom.node} The appended node. * @example * var p = new CKEDITOR.dom.element( 'p' ); * * var strong = new CKEDITOR.dom.element( 'strong' ); * <b>p.append( strong );</b> * * var em = <b>p.append( 'em' );</b> * * // result: "&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;" */ append : function( node, toStart ) { if ( typeof node == 'string' ) node = this.getDocument().createElement( node ); if ( toStart ) this.$.insertBefore( node.$, this.$.firstChild ); else this.$.appendChild( node.$ ); return node; }, appendHtml : function( html ) { if ( !this.$.childNodes.length ) this.setHtml( html ); else { var temp = new CKEDITOR.dom.element( 'div', this.getDocument() ); temp.setHtml( html ); temp.moveChildren( this ); } }, /** * Append text to this element. * @param {String} text The text to be appended. * @returns {CKEDITOR.dom.node} The appended node. * @example * var p = new CKEDITOR.dom.element( 'p' ); * p.appendText( 'This is' ); * p.appendText( ' some text' ); * * // result: "&lt;p&gt;This is some text&lt;/p&gt;" */ appendText : function( text ) { if ( this.$.text != undefined ) this.$.text += text; else this.append( new CKEDITOR.dom.text( text ) ); }, appendBogus : function() { var lastChild = this.getLast() ; // Ignore empty/spaces text. while ( lastChild && lastChild.type == CKEDITOR.NODE_TEXT && !CKEDITOR.tools.rtrim( lastChild.getText() ) ) lastChild = lastChild.getPrevious(); if ( !lastChild || !lastChild.is || !lastChild.is( 'br' ) ) { var bogus = CKEDITOR.env.opera ? this.getDocument().createText('') : this.getDocument().createElement( 'br' ); CKEDITOR.env.gecko && bogus.setAttribute( 'type', '_moz' ); this.append( bogus ); } }, /** * Breaks one of the ancestor element in the element position, moving * this element between the broken parts. * @param {CKEDITOR.dom.element} parent The anscestor element to get broken. * @example * // Before breaking: * // &lt;b&gt;This &lt;i&gt;is some&lt;span /&gt; sample&lt;/i&gt; test text&lt;/b&gt; * // If "element" is &lt;span /&gt; and "parent" is &lt;i&gt;: * // &lt;b&gt;This &lt;i&gt;is some&lt;/i&gt;&lt;span /&gt;&lt;i&gt; sample&lt;/i&gt; test text&lt;/b&gt; * element.breakParent( parent ); * @example * // Before breaking: * // &lt;b&gt;This &lt;i&gt;is some&lt;span /&gt; sample&lt;/i&gt; test text&lt;/b&gt; * // If "element" is &lt;span /&gt; and "parent" is &lt;b&gt;: * // &lt;b&gt;This &lt;i&gt;is some&lt;/i&gt;&lt;/b&gt;&lt;span /&gt;&lt;b&gt;&lt;i&gt; sample&lt;/i&gt; test text&lt;/b&gt; * element.breakParent( parent ); */ breakParent : function( parent ) { var range = new CKEDITOR.dom.range( this.getDocument() ); // We'll be extracting part of this element, so let's use our // range to get the correct piece. range.setStartAfter( this ); range.setEndAfter( parent ); // Extract it. var docFrag = range.extractContents(); // Move the element outside the broken element. range.insertNode( this.remove() ); // Re-insert the extracted piece after the element. docFrag.insertAfterNode( this ); }, contains : CKEDITOR.env.ie || CKEDITOR.env.webkit ? function( node ) { var $ = this.$; return node.type != CKEDITOR.NODE_ELEMENT ? $.contains( node.getParent().$ ) : $ != node.$ && $.contains( node.$ ); } : function( node ) { return !!( this.$.compareDocumentPosition( node.$ ) & 16 ); }, /** * Moves the selection focus to this element. * @function * @param {Boolean} defer Whether to asynchronously defer the * execution by 100 ms. * @example * var element = CKEDITOR.document.getById( 'myTextarea' ); * <b>element.focus()</b>; */ focus : ( function() { function exec() { // IE throws error if the element is not visible. try { this.$.focus(); } catch (e) {} } return function( defer ) { if ( defer ) CKEDITOR.tools.setTimeout( exec, 100, this ); else exec.call( this ); }; })(), /** * Gets the inner HTML of this element. * @returns {String} The inner HTML of this element. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/div&gt;' ); * alert( <b>p.getHtml()</b> ); // "&lt;b&gt;Example&lt;/b&gt;" */ getHtml : function() { var retval = this.$.innerHTML; // Strip <?xml:namespace> tags in IE. (#3341). return CKEDITOR.env.ie ? retval.replace( /<\?[^>]*>/g, '' ) : retval; }, getOuterHtml : function() { if ( this.$.outerHTML ) { // IE includes the <?xml:namespace> tag in the outerHTML of // namespaced element. So, we must strip it here. (#3341) return this.$.outerHTML.replace( /<\?[^>]*>/, '' ); } var tmpDiv = this.$.ownerDocument.createElement( 'div' ); tmpDiv.appendChild( this.$.cloneNode( true ) ); return tmpDiv.innerHTML; }, /** * Sets the inner HTML of this element. * @param {String} html The HTML to be set for this element. * @returns {String} The inserted HTML. * @example * var p = new CKEDITOR.dom.element( 'p' ); * <b>p.setHtml( '&lt;b&gt;Inner&lt;/b&gt; HTML' );</b> * * // result: "&lt;p&gt;&lt;b&gt;Inner&lt;/b&gt; HTML&lt;/p&gt;" */ setHtml : function( html ) { return ( this.$.innerHTML = html ); }, /** * Sets the element contents as plain text. * @param {String} text The text to be set. * @returns {String} The inserted text. * @example * var element = new CKEDITOR.dom.element( 'div' ); * element.setText( 'A > B & C < D' ); * alert( element.innerHTML ); // "A &amp;gt; B &amp;amp; C &amp;lt; D" */ setText : function( text ) { CKEDITOR.dom.element.prototype.setText = ( this.$.innerText != undefined ) ? function ( text ) { return this.$.innerText = text; } : function ( text ) { return this.$.textContent = text; }; return this.setText( text ); }, /** * Gets the value of an element attribute. * @function * @param {String} name The attribute name. * @returns {String} The attribute value or null if not defined. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;input type="text" /&gt;' ); * alert( <b>element.getAttribute( 'type' )</b> ); // "text" */ getAttribute : (function() { var standard = function( name ) { return this.$.getAttribute( name, 2 ); }; if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) { return function( name ) { switch ( name ) { case 'class': name = 'className'; break; case 'http-equiv': name = 'httpEquiv'; break; case 'name': return this.$.name; case 'tabindex': var tabIndex = standard.call( this, name ); // IE returns tabIndex=0 by default for all // elements. For those elements, // getAtrribute( 'tabindex', 2 ) returns 32768 // instead. So, we must make this check to give a // uniform result among all browsers. if ( tabIndex !== 0 && this.$.tabIndex === 0 ) tabIndex = null; return tabIndex; break; case 'checked': { var attr = this.$.attributes.getNamedItem( name ), attrValue = attr.specified ? attr.nodeValue // For value given by parser. : this.$.checked; // For value created via DOM interface. return attrValue ? 'checked' : null; } case 'hspace': case 'value': return this.$[ name ]; case 'style': // IE does not return inline styles via getAttribute(). See #2947. return this.$.style.cssText; } return standard.call( this, name ); }; } else return standard; })(), getChildren : function() { return new CKEDITOR.dom.nodeList( this.$.childNodes ); }, /** * Gets the current computed value of one of the element CSS style * properties. * @function * @param {String} propertyName The style property name. * @returns {String} The property value. * @example * var element = new CKEDITOR.dom.element( 'span' ); * alert( <b>element.getComputedStyle( 'display' )</b> ); // "inline" */ getComputedStyle : CKEDITOR.env.ie ? function( propertyName ) { return this.$.currentStyle[ CKEDITOR.tools.cssStyleToDomStyle( propertyName ) ]; } : function( propertyName ) { return this.getWindow().$.getComputedStyle( this.$, '' ).getPropertyValue( propertyName ); }, /** * Gets the DTD entries for this element. * @returns {Object} An object containing the list of elements accepted * by this element. */ getDtd : function() { var dtd = CKEDITOR.dtd[ this.getName() ]; this.getDtd = function() { return dtd; }; return dtd; }, getElementsByTag : CKEDITOR.dom.document.prototype.getElementsByTag, /** * Gets the computed tabindex for this element. * @function * @returns {Number} The tabindex value. * @example * var element = CKEDITOR.document.getById( 'myDiv' ); * alert( <b>element.getTabIndex()</b> ); // e.g. "-1" */ getTabIndex : CKEDITOR.env.ie ? function() { var tabIndex = this.$.tabIndex; // IE returns tabIndex=0 by default for all elements. In // those cases we must check that the element really has // the tabindex attribute set to zero, or it is one of // those element that should have zero by default. if ( tabIndex === 0 && !CKEDITOR.dtd.$tabIndex[ this.getName() ] && parseInt( this.getAttribute( 'tabindex' ), 10 ) !== 0 ) tabIndex = -1; return tabIndex; } : CKEDITOR.env.webkit ? function() { var tabIndex = this.$.tabIndex; // Safari returns "undefined" for elements that should not // have tabindex (like a div). So, we must try to get it // from the attribute. // https://bugs.webkit.org/show_bug.cgi?id=20596 if ( tabIndex == undefined ) { tabIndex = parseInt( this.getAttribute( 'tabindex' ), 10 ); // If the element don't have the tabindex attribute, // then we should return -1. if ( isNaN( tabIndex ) ) tabIndex = -1; } return tabIndex; } : function() { return this.$.tabIndex; }, /** * Gets the text value of this element. * * Only in IE (which uses innerText), &lt;br&gt; will cause linebreaks, * and sucessive whitespaces (including line breaks) will be reduced to * a single space. This behavior is ok for us, for now. It may change * in the future. * @returns {String} The text value. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;Sample &lt;i&gt;text&lt;/i&gt;.&lt;/div&gt;' ); * alert( <b>element.getText()</b> ); // "Sample text." */ getText : function() { return this.$.textContent || this.$.innerText || ''; }, /** * Gets the window object that contains this element. * @returns {CKEDITOR.dom.window} The window object. * @example */ getWindow : function() { return this.getDocument().getWindow(); }, /** * Gets the value of the "id" attribute of this element. * @returns {String} The element id, or null if not available. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;p id="myId"&gt;&lt;/p&gt;' ); * alert( <b>element.getId()</b> ); // "myId" */ getId : function() { return this.$.id || null; }, /** * Gets the value of the "name" attribute of this element. * @returns {String} The element name, or null if not available. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;input name="myName"&gt;&lt;/input&gt;' ); * alert( <b>element.getNameAtt()</b> ); // "myName" */ getNameAtt : function() { return this.$.name || null; }, /** * Gets the element name (tag name). The returned name is guaranteed to * be always full lowercased. * @returns {String} The element name. * @example * var element = new CKEDITOR.dom.element( 'span' ); * alert( <b>element.getName()</b> ); // "span" */ getName : function() { // Cache the lowercased name inside a closure. var nodeName = this.$.nodeName.toLowerCase(); if ( CKEDITOR.env.ie && ! ( document.documentMode > 8 ) ) { var scopeName = this.$.scopeName; if ( scopeName != 'HTML' ) nodeName = scopeName.toLowerCase() + ':' + nodeName; } return ( this.getName = function() { return nodeName; })(); }, /** * Gets the value set to this element. This value is usually available * for form field elements. * @returns {String} The element value. */ getValue : function() { return this.$.value; }, /** * Gets the first child node of this element. * @param {Function} evaluator Filtering the result node. * @returns {CKEDITOR.dom.node} The first child node or null if not * available. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;&lt;b&gt;Example&lt;/b&gt;&lt;/div&gt;' ); * var first = <b>element.getFirst()</b>; * alert( first.getName() ); // "b" */ getFirst : function( evaluator ) { var first = this.$.firstChild, retval = first && new CKEDITOR.dom.node( first ); if ( retval && evaluator && !evaluator( retval ) ) retval = retval.getNext( evaluator ); return retval; }, /** * @param {Function} evaluator Filtering the result node. */ getLast : function( evaluator ) { var last = this.$.lastChild, retval = last && new CKEDITOR.dom.node( last ); if ( retval && evaluator && !evaluator( retval ) ) retval = retval.getPrevious( evaluator ); return retval; }, getStyle : function( name ) { return this.$.style[ CKEDITOR.tools.cssStyleToDomStyle( name ) ]; }, /** * Checks if the element name matches one or more names. * @param {String} name[,name[,...]] One or more names to be checked. * @returns {Boolean} true if the element name matches any of the names. * @example * var element = new CKEDITOR.element( 'span' ); * alert( <b>element.is( 'span' )</b> ); "true" * alert( <b>element.is( 'p', 'span' )</b> ); "true" * alert( <b>element.is( 'p' )</b> ); "false" * alert( <b>element.is( 'p', 'div' )</b> ); "false" */ is : function() { var name = this.getName(); for ( var i = 0 ; i < arguments.length ; i++ ) { if ( arguments[ i ] == name ) return true; } return false; }, /** * Decide whether one element is able to receive cursor. * @param {Boolean} [textCursor=true] Only consider element that could receive text child. */ isEditable : function( textCursor ) { var name = this.getName(); if ( this.isReadOnly() || this.getComputedStyle( 'display' ) == 'none' || this.getComputedStyle( 'visibility' ) == 'hidden' || this.is( 'a' ) && this.data( 'cke-saved-name' ) && !this.getChildCount() || CKEDITOR.dtd.$nonEditable[ name ] ) { return false; } if ( textCursor !== false ) { // Get the element DTD (defaults to span for unknown elements). var dtd = CKEDITOR.dtd[ name ] || CKEDITOR.dtd.span; // In the DTD # == text node. return ( dtd && dtd[ '#'] ); } return true; }, isIdentical : function( otherElement ) { if ( this.getName() != otherElement.getName() ) return false; var thisAttribs = this.$.attributes, otherAttribs = otherElement.$.attributes; var thisLength = thisAttribs.length, otherLength = otherAttribs.length; for ( var i = 0 ; i < thisLength ; i++ ) { var attribute = thisAttribs[ i ]; if ( attribute.nodeName == '_moz_dirty' ) continue; if ( ( !CKEDITOR.env.ie || ( attribute.specified && attribute.nodeName != 'data-cke-expando' ) ) && attribute.nodeValue != otherElement.getAttribute( attribute.nodeName ) ) return false; } // For IE, we have to for both elements, because it's difficult to // know how the atttibutes collection is organized in its DOM. if ( CKEDITOR.env.ie ) { for ( i = 0 ; i < otherLength ; i++ ) { attribute = otherAttribs[ i ]; if ( attribute.specified && attribute.nodeName != 'data-cke-expando' && attribute.nodeValue != this.getAttribute( attribute.nodeName ) ) return false; } } return true; }, /** * Checks if this element is visible. May not work if the element is * child of an element with visibility set to "hidden", but works well * on the great majority of cases. * @return {Boolean} True if the element is visible. */ isVisible : function() { var isVisible = ( this.$.offsetHeight || this.$.offsetWidth ) && this.getComputedStyle( 'visibility' ) != 'hidden', elementWindow, elementWindowFrame; // Webkit and Opera report non-zero offsetHeight despite that // element is inside an invisible iframe. (#4542) if ( isVisible && ( CKEDITOR.env.webkit || CKEDITOR.env.opera ) ) { elementWindow = this.getWindow(); if ( !elementWindow.equals( CKEDITOR.document.getWindow() ) && ( elementWindowFrame = elementWindow.$.frameElement ) ) { isVisible = new CKEDITOR.dom.element( elementWindowFrame ).isVisible(); } } return !!isVisible; }, /** * Whether it's an empty inline elements which has no visual impact when removed. */ isEmptyInlineRemoveable : function() { if ( !CKEDITOR.dtd.$removeEmpty[ this.getName() ] ) return false; var children = this.getChildren(); for ( var i = 0, count = children.count(); i < count; i++ ) { var child = children.getItem( i ); if ( child.type == CKEDITOR.NODE_ELEMENT && child.data( 'cke-bookmark' ) ) continue; if ( child.type == CKEDITOR.NODE_ELEMENT && !child.isEmptyInlineRemoveable() || child.type == CKEDITOR.NODE_TEXT && CKEDITOR.tools.trim( child.getText() ) ) { return false; } } return true; }, /** * Checks if the element has any defined attributes. * @function * @returns {Boolean} True if the element has attributes. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div title="Test"&gt;Example&lt;/div&gt;' ); * alert( <b>element.hasAttributes()</b> ); // "true" * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;div&gt;Example&lt;/div&gt;' ); * alert( <b>element.hasAttributes()</b> ); // "false" */ hasAttributes : CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ? function() { var attributes = this.$.attributes; for ( var i = 0 ; i < attributes.length ; i++ ) { var attribute = attributes[i]; switch ( attribute.nodeName ) { case 'class' : // IE has a strange bug. If calling removeAttribute('className'), // the attributes collection will still contain the "class" // attribute, which will be marked as "specified", even if the // outerHTML of the element is not displaying the class attribute. // Note : I was not able to reproduce it outside the editor, // but I've faced it while working on the TC of #1391. if ( this.getAttribute( 'class' ) ) return true; // Attributes to be ignored. case 'data-cke-expando' : continue; /*jsl:fallthru*/ default : if ( attribute.specified ) return true; } } return false; } : function() { var attrs = this.$.attributes, attrsNum = attrs.length; // The _moz_dirty attribute might get into the element after pasting (#5455) var execludeAttrs = { 'data-cke-expando' : 1, _moz_dirty : 1 }; return attrsNum > 0 && ( attrsNum > 2 || !execludeAttrs[ attrs[0].nodeName ] || ( attrsNum == 2 && !execludeAttrs[ attrs[1].nodeName ] ) ); }, /** * Checks if the specified attribute is defined for this element. * @returns {Boolean} True if the specified attribute is defined. * @param {String} name The attribute name. * @example */ hasAttribute : (function() { function standard( name ) { var $attr = this.$.attributes.getNamedItem( name ); return !!( $attr && $attr.specified ); } return ( CKEDITOR.env.ie && CKEDITOR.env.version < 8 ) ? function( name ) { // On IE < 8 the name attribute cannot be retrieved // right after the element creation and setting the // name with setAttribute. if ( name == 'name' ) return !!this.$.name; return standard.call( this, name ); } : standard; })(), /** * Hides this element (display:none). * @example * var element = CKEDITOR.dom.element.getById( 'myElement' ); * <b>element.hide()</b>; */ hide : function() { this.setStyle( 'display', 'none' ); }, moveChildren : function( target, toStart ) { var $ = this.$; target = target.$; if ( $ == target ) return; var child; if ( toStart ) { while ( ( child = $.lastChild ) ) target.insertBefore( $.removeChild( child ), target.firstChild ); } else { while ( ( child = $.firstChild ) ) target.appendChild( $.removeChild( child ) ); } }, /** * Merges sibling elements that are identical to this one.<br> * <br> * Identical child elements are also merged. For example:<br> * &lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt; =&gt; &lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt; * @function * @param {Boolean} [inlineOnly] Allow only inline elements to be merged. Defaults to "true". */ mergeSiblings : ( function() { function mergeElements( element, sibling, isNext ) { if ( sibling && sibling.type == CKEDITOR.NODE_ELEMENT ) { // Jumping over bookmark nodes and empty inline elements, e.g. <b><i></i></b>, // queuing them to be moved later. (#5567) var pendingNodes = []; while ( sibling.data( 'cke-bookmark' ) || sibling.isEmptyInlineRemoveable() ) { pendingNodes.push( sibling ); sibling = isNext ? sibling.getNext() : sibling.getPrevious(); if ( !sibling || sibling.type != CKEDITOR.NODE_ELEMENT ) return; } if ( element.isIdentical( sibling ) ) { // Save the last child to be checked too, to merge things like // <b><i></i></b><b><i></i></b> => <b><i></i></b> var innerSibling = isNext ? element.getLast() : element.getFirst(); // Move pending nodes first into the target element. while( pendingNodes.length ) pendingNodes.shift().move( element, !isNext ); sibling.moveChildren( element, !isNext ); sibling.remove(); // Now check the last inner child (see two comments above). if ( innerSibling && innerSibling.type == CKEDITOR.NODE_ELEMENT ) innerSibling.mergeSiblings(); } } } return function( inlineOnly ) { if ( ! ( inlineOnly === false || CKEDITOR.dtd.$removeEmpty[ this.getName() ] || this.is( 'a' ) ) ) // Merge empty links and anchors also. (#5567) { return; } mergeElements( this, this.getNext(), true ); mergeElements( this, this.getPrevious() ); }; } )(), /** * Shows this element (display it). * @example * var element = CKEDITOR.dom.element.getById( 'myElement' ); * <b>element.show()</b>; */ show : function() { this.setStyles( { display : '', visibility : '' }); }, /** * Sets the value of an element attribute. * @param {String} name The name of the attribute. * @param {String} value The value to be set to the attribute. * @function * @returns {CKEDITOR.dom.element} This element instance. * @example * var element = CKEDITOR.dom.element.getById( 'myElement' ); * <b>element.setAttribute( 'class', 'myClass' )</b>; * <b>element.setAttribute( 'title', 'This is an example' )</b>; */ setAttribute : (function() { var standard = function( name, value ) { this.$.setAttribute( name, value ); return this; }; if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) { return function( name, value ) { if ( name == 'class' ) this.$.className = value; else if ( name == 'style' ) this.$.style.cssText = value; else if ( name == 'tabindex' ) // Case sensitive. this.$.tabIndex = value; else if ( name == 'checked' ) this.$.checked = value; else standard.apply( this, arguments ); return this; }; } else if ( CKEDITOR.env.ie8Compat && CKEDITOR.env.secure ) { return function( name, value ) { // IE8 throws error when setting src attribute to non-ssl value. (#7847) if ( name == 'src' && value.match( /^http:\/\// ) ) try { standard.apply( this, arguments ); } catch( e ){} else standard.apply( this, arguments ); return this; }; } else return standard; })(), /** * Sets the value of several element attributes. * @param {Object} attributesPairs An object containing the names and * values of the attributes. * @returns {CKEDITOR.dom.element} This element instance. * @example * var element = CKEDITOR.dom.element.getById( 'myElement' ); * <b>element.setAttributes({ * 'class' : 'myClass', * 'title' : 'This is an example' })</b>; */ setAttributes : function( attributesPairs ) { for ( var name in attributesPairs ) this.setAttribute( name, attributesPairs[ name ] ); return this; }, /** * Sets the element value. This function is usually used with form * field element. * @param {String} value The element value. * @returns {CKEDITOR.dom.element} This element instance. */ setValue : function( value ) { this.$.value = value; return this; }, /** * Removes an attribute from the element. * @param {String} name The attribute name. * @function * @example * var element = CKEDITOR.dom.element.createFromHtml( '<div class="classA"></div>' ); * element.removeAttribute( 'class' ); */ removeAttribute : (function() { var standard = function( name ) { this.$.removeAttribute( name ); }; if ( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) ) { return function( name ) { if ( name == 'class' ) name = 'className'; else if ( name == 'tabindex' ) name = 'tabIndex'; standard.call( this, name ); }; } else return standard; })(), removeAttributes : function ( attributes ) { if ( CKEDITOR.tools.isArray( attributes ) ) { for ( var i = 0 ; i < attributes.length ; i++ ) this.removeAttribute( attributes[ i ] ); } else { for ( var attr in attributes ) attributes.hasOwnProperty( attr ) && this.removeAttribute( attr ); } }, /** * Removes a style from the element. * @param {String} name The style name. * @function * @example * var element = CKEDITOR.dom.element.createFromHtml( '<div style="display:none"></div>' ); * element.removeStyle( 'display' ); */ removeStyle : function( name ) { this.setStyle( name, '' ); if ( this.$.style.removeAttribute ) this.$.style.removeAttribute( CKEDITOR.tools.cssStyleToDomStyle( name ) ); if ( !this.$.style.cssText ) this.removeAttribute( 'style' ); }, /** * Sets the value of an element style. * @param {String} name The name of the style. The CSS naming notation * must be used (e.g. "background-color"). * @param {String} value The value to be set to the style. * @returns {CKEDITOR.dom.element} This element instance. * @example * var element = CKEDITOR.dom.element.getById( 'myElement' ); * <b>element.setStyle( 'background-color', '#ff0000' )</b>; * <b>element.setStyle( 'margin-top', '10px' )</b>; * <b>element.setStyle( 'float', 'right' )</b>; */ setStyle : function( name, value ) { this.$.style[ CKEDITOR.tools.cssStyleToDomStyle( name ) ] = value; return this; }, /** * Sets the value of several element styles. * @param {Object} stylesPairs An object containing the names and * values of the styles. * @returns {CKEDITOR.dom.element} This element instance. * @example * var element = CKEDITOR.dom.element.getById( 'myElement' ); * <b>element.setStyles({ * 'position' : 'absolute', * 'float' : 'right' })</b>; */ setStyles : function( stylesPairs ) { for ( var name in stylesPairs ) this.setStyle( name, stylesPairs[ name ] ); return this; }, /** * Sets the opacity of an element. * @param {Number} opacity A number within the range [0.0, 1.0]. * @example * var element = CKEDITOR.dom.element.getById( 'myElement' ); * <b>element.setOpacity( 0.75 )</b>; */ setOpacity : function( opacity ) { if ( CKEDITOR.env.ie ) { opacity = Math.round( opacity * 100 ); this.setStyle( 'filter', opacity >= 100 ? '' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + opacity + ')' ); } else this.setStyle( 'opacity', opacity ); }, /** * Makes the element and its children unselectable. * @function * @example * var element = CKEDITOR.dom.element.getById( 'myElement' ); * element.unselectable(); */ unselectable : CKEDITOR.env.gecko ? function() { this.$.style.MozUserSelect = 'none'; this.on( 'dragstart', function( evt ) { evt.data.preventDefault(); } ); } : CKEDITOR.env.webkit ? function() { this.$.style.KhtmlUserSelect = 'none'; this.on( 'dragstart', function( evt ) { evt.data.preventDefault(); } ); } : function() { if ( CKEDITOR.env.ie || CKEDITOR.env.opera ) { var element = this.$, elements = element.getElementsByTagName("*"), e, i = 0; element.unselectable = 'on'; while ( ( e = elements[ i++ ] ) ) { switch ( e.tagName.toLowerCase() ) { case 'iframe' : case 'textarea' : case 'input' : case 'select' : /* Ignore the above tags */ break; default : e.unselectable = 'on'; } } } }, getPositionedAncestor : function() { var current = this; while ( current.getName() != 'html' ) { if ( current.getComputedStyle( 'position' ) != 'static' ) return current; current = current.getParent(); } return null; }, getDocumentPosition : function( refDocument ) { var x = 0, y = 0, doc = this.getDocument(), body = doc.getBody(), quirks = doc.$.compatMode == 'BackCompat'; if ( document.documentElement[ "getBoundingClientRect" ] ) { var box = this.$.getBoundingClientRect(), $doc = doc.$, $docElem = $doc.documentElement; var clientTop = $docElem.clientTop || body.$.clientTop || 0, clientLeft = $docElem.clientLeft || body.$.clientLeft || 0, needAdjustScrollAndBorders = true; /* * #3804: getBoundingClientRect() works differently on IE and non-IE * browsers, regarding scroll positions. * * On IE, the top position of the <html> element is always 0, no matter * how much you scrolled down. * * On other browsers, the top position of the <html> element is negative * scrollTop. */ if ( CKEDITOR.env.ie ) { var inDocElem = doc.getDocumentElement().contains( this ), inBody = doc.getBody().contains( this ); needAdjustScrollAndBorders = ( quirks && inBody ) || ( !quirks && inDocElem ); } if ( needAdjustScrollAndBorders ) { x = box.left + ( !quirks && $docElem.scrollLeft || body.$.scrollLeft ); x -= clientLeft; y = box.top + ( !quirks && $docElem.scrollTop || body.$.scrollTop ); y -= clientTop; } } else { var current = this, previous = null, offsetParent; while ( current && !( current.getName() == 'body' || current.getName() == 'html' ) ) { x += current.$.offsetLeft - current.$.scrollLeft; y += current.$.offsetTop - current.$.scrollTop; // Opera includes clientTop|Left into offsetTop|Left. if ( !current.equals( this ) ) { x += ( current.$.clientLeft || 0 ); y += ( current.$.clientTop || 0 ); } var scrollElement = previous; while ( scrollElement && !scrollElement.equals( current ) ) { x -= scrollElement.$.scrollLeft; y -= scrollElement.$.scrollTop; scrollElement = scrollElement.getParent(); } previous = current; current = ( offsetParent = current.$.offsetParent ) ? new CKEDITOR.dom.element( offsetParent ) : null; } } if ( refDocument ) { var currentWindow = this.getWindow(), refWindow = refDocument.getWindow(); if ( !currentWindow.equals( refWindow ) && currentWindow.$.frameElement ) { var iframePosition = ( new CKEDITOR.dom.element( currentWindow.$.frameElement ) ).getDocumentPosition( refDocument ); x += iframePosition.x; y += iframePosition.y; } } if ( !document.documentElement[ "getBoundingClientRect" ] ) { // In Firefox, we'll endup one pixel before the element positions, // so we must add it here. if ( CKEDITOR.env.gecko && !quirks ) { x += this.$.clientLeft ? 1 : 0; y += this.$.clientTop ? 1 : 0; } } return { x : x, y : y }; }, /** * Make any page element visible inside the browser viewport. * @param {Boolean} [alignToTop] */ scrollIntoView : function( alignToTop ) { var parent = this.getParent(); if ( !parent ) return; // Scroll the element into parent container from the inner out. do { // Check ancestors that overflows. var overflowed = parent.$.clientWidth && parent.$.clientWidth < parent.$.scrollWidth || parent.$.clientHeight && parent.$.clientHeight < parent.$.scrollHeight; if ( overflowed ) this.scrollIntoParent( parent, alignToTop, 1 ); // Walk across the frame. if ( parent.is( 'html' ) ) { var win = parent.getWindow(); // Avoid security error. try { var iframe = win.$.frameElement; iframe && ( parent = new CKEDITOR.dom.element( iframe ) ); } catch(er){} } } while ( ( parent = parent.getParent() ) ); }, /** * Make any page element visible inside one of the ancestors by scrolling the parent. * @param {CKEDITOR.dom.element|CKEDITOR.dom.window} parent The container to scroll into. * @param {Boolean} [alignToTop] Align the element's top side with the container's * when <code>true</code> is specified; align the bottom with viewport bottom when * <code>false</code> is specified. Otherwise scroll on either side with the minimum * amount to show the element. * @param {Boolean} [hscroll] Whether horizontal overflow should be considered. */ scrollIntoParent : function( parent, alignToTop, hscroll ) { !parent && ( parent = this.getWindow() ); var doc = parent.getDocument(); var isQuirks = doc.$.compatMode == 'BackCompat'; // On window <html> is scrolled while quirks scrolls <body>. if ( parent instanceof CKEDITOR.dom.window ) parent = isQuirks ? doc.getBody() : doc.getDocumentElement(); // Scroll the parent by the specified amount. function scrollBy( x, y ) { // Webkit doesn't support "scrollTop/scrollLeft" // on documentElement/body element. if ( /body|html/.test( parent.getName() ) ) parent.getWindow().$.scrollBy( x, y ); else { parent.$[ 'scrollLeft' ] += x; parent.$[ 'scrollTop' ] += y; } } // Figure out the element position relative to the specified window. function screenPos( element, refWin ) { var pos = { x: 0, y: 0 }; if ( !( element.is( isQuirks ? 'body' : 'html' ) ) ) { var box = element.$.getBoundingClientRect(); pos.x = box.left, pos.y = box.top; } var win = element.getWindow(); if ( !win.equals( refWin ) ) { var outerPos = screenPos( CKEDITOR.dom.element.get( win.$.frameElement ), refWin ); pos.x += outerPos.x, pos.y += outerPos.y; } return pos; } // calculated margin size. function margin( element, side ) { return parseInt( element.getComputedStyle( 'margin-' + side ) || 0, 10 ) || 0; } var win = parent.getWindow(); var thisPos = screenPos( this, win ), parentPos = screenPos( parent, win ), eh = this.$.offsetHeight, ew = this.$.offsetWidth, ch = parent.$.clientHeight, cw = parent.$.clientWidth, lt, br; // Left-top margins. lt = { x : thisPos.x - margin( this, 'left' ) - parentPos.x || 0, y : thisPos.y - margin( this, 'top' ) - parentPos.y|| 0 }; // Bottom-right margins. br = { x : thisPos.x + ew + margin( this, 'right' ) - ( ( parentPos.x ) + cw ) || 0, y : thisPos.y + eh + margin( this, 'bottom' ) - ( ( parentPos.y ) + ch ) || 0 }; // 1. Do the specified alignment as much as possible; // 2. Otherwise be smart to scroll only the minimum amount; // 3. Never cut at the top; // 4. DO NOT scroll when already visible. if ( lt.y < 0 || br.y > 0 ) { scrollBy( 0, alignToTop === true ? lt.y : alignToTop === false ? br.y : lt.y < 0 ? lt.y : br.y ); } if ( hscroll && ( lt.x < 0 || br.x > 0 ) ) scrollBy( lt.x < 0 ? lt.x : br.x, 0 ); }, setState : function( state ) { switch ( state ) { case CKEDITOR.TRISTATE_ON : this.addClass( 'cke_on' ); this.removeClass( 'cke_off' ); this.removeClass( 'cke_disabled' ); break; case CKEDITOR.TRISTATE_DISABLED : this.addClass( 'cke_disabled' ); this.removeClass( 'cke_off' ); this.removeClass( 'cke_on' ); break; default : this.addClass( 'cke_off' ); this.removeClass( 'cke_on' ); this.removeClass( 'cke_disabled' ); break; } }, /** * Returns the inner document of this IFRAME element. * @returns {CKEDITOR.dom.document} The inner document. */ getFrameDocument : function() { var $ = this.$; try { // In IE, with custom document.domain, it may happen that // the iframe is not yet available, resulting in "Access // Denied" for the following property access. $.contentWindow.document; } catch ( e ) { // Trick to solve this issue, forcing the iframe to get ready // by simply setting its "src" property. $.src = $.src; // In IE6 though, the above is not enough, so we must pause the // execution for a while, giving it time to think. if ( CKEDITOR.env.ie && CKEDITOR.env.version < 7 ) { window.showModalDialog( 'javascript:document.write("' + '<script>' + 'window.setTimeout(' + 'function(){window.close();}' + ',50);' + '</script>")' ); } } return $ && new CKEDITOR.dom.document( $.contentWindow.document ); }, /** * Copy all the attributes from one node to the other, kinda like a clone * skipAttributes is an object with the attributes that must NOT be copied. * @param {CKEDITOR.dom.element} dest The destination element. * @param {Object} skipAttributes A dictionary of attributes to skip. * @example */ copyAttributes : function( dest, skipAttributes ) { var attributes = this.$.attributes; skipAttributes = skipAttributes || {}; for ( var n = 0 ; n < attributes.length ; n++ ) { var attribute = attributes[n]; // Lowercase attribute name hard rule is broken for // some attribute on IE, e.g. CHECKED. var attrName = attribute.nodeName.toLowerCase(), attrValue; // We can set the type only once, so do it with the proper value, not copying it. if ( attrName in skipAttributes ) continue; if ( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) ) dest.setAttribute( attrName, attrValue ); // IE BUG: value attribute is never specified even if it exists. else if ( attribute.specified || ( CKEDITOR.env.ie && attribute.nodeValue && attrName == 'value' ) ) { attrValue = this.getAttribute( attrName ); if ( attrValue === null ) attrValue = attribute.nodeValue; dest.setAttribute( attrName, attrValue ); } } // The style: if ( this.$.style.cssText !== '' ) dest.$.style.cssText = this.$.style.cssText; }, /** * Changes the tag name of the current element. * @param {String} newTag The new tag for the element. */ renameNode : function( newTag ) { // If it's already correct exit here. if ( this.getName() == newTag ) return; var doc = this.getDocument(); // Create the new node. var newNode = new CKEDITOR.dom.element( newTag, doc ); // Copy all attributes. this.copyAttributes( newNode ); // Move children to the new node. this.moveChildren( newNode ); // Replace the node. this.getParent() && this.$.parentNode.replaceChild( newNode.$, this.$ ); newNode.$[ 'data-cke-expando' ] = this.$[ 'data-cke-expando' ]; this.$ = newNode.$; }, /** * Gets a DOM tree descendant under the current node. * @param {Array|Number} indices The child index or array of child indices under the node. * @returns {CKEDITOR.dom.node} The specified DOM child under the current node. Null if child does not exist. * @example * var strong = p.getChild(0); */ getChild : function( indices ) { var rawNode = this.$; if ( !indices.slice ) rawNode = rawNode.childNodes[ indices ]; else { while ( indices.length > 0 && rawNode ) rawNode = rawNode.childNodes[ indices.shift() ]; } return rawNode ? new CKEDITOR.dom.node( rawNode ) : null; }, getChildCount : function() { return this.$.childNodes.length; }, disableContextMenu : function() { this.on( 'contextmenu', function( event ) { // Cancel the browser context menu. if ( !event.data.getTarget().hasClass( 'cke_enable_context_menu' ) ) event.data.preventDefault(); } ); }, /** * Gets element's direction. Supports both CSS 'direction' prop and 'dir' attr. */ getDirection : function( useComputed ) { return useComputed ? this.getComputedStyle( 'direction' ) // Webkit: offline element returns empty direction (#8053). || this.getDirection() || this.getDocument().$.dir || this.getDocument().getBody().getDirection( 1 ) : this.getStyle( 'direction' ) || this.getAttribute( 'dir' ); }, /** * Gets, sets and removes custom data to be stored as HTML5 data-* attributes. * @param {String} name The name of the attribute, excluding the 'data-' part. * @param {String} [value] The value to set. If set to false, the attribute will be removed. * @example * element.data( 'extra-info', 'test' ); // appended the attribute data-extra-info="test" to the element * alert( element.data( 'extra-info' ) ); // "test" * element.data( 'extra-info', false ); // remove the data-extra-info attribute from the element */ data : function ( name, value ) { name = 'data-' + name; if ( value === undefined ) return this.getAttribute( name ); else if ( value === false ) this.removeAttribute( name ); else this.setAttribute( name, value ); return null; } }); ( function() { var sides = { width : [ "border-left-width", "border-right-width","padding-left", "padding-right" ], height : [ "border-top-width", "border-bottom-width", "padding-top", "padding-bottom" ] }; function marginAndPaddingSize( type ) { var adjustment = 0; for ( var i = 0, len = sides[ type ].length; i < len; i++ ) adjustment += parseInt( this.getComputedStyle( sides [ type ][ i ] ) || 0, 10 ) || 0; return adjustment; } /** * Sets the element size considering the box model. * @name CKEDITOR.dom.element.prototype.setSize * @function * @param {String} type The dimension to set. It accepts "width" and "height". * @param {Number} size The length unit in px. * @param {Boolean} isBorderBox Apply the size based on the border box model. */ CKEDITOR.dom.element.prototype.setSize = function( type, size, isBorderBox ) { if ( typeof size == 'number' ) { if ( isBorderBox && !( CKEDITOR.env.ie && CKEDITOR.env.quirks ) ) size -= marginAndPaddingSize.call( this, type ); this.setStyle( type, size + 'px' ); } }; /** * Gets the element size, possibly considering the box model. * @name CKEDITOR.dom.element.prototype.getSize * @function * @param {String} type The dimension to get. It accepts "width" and "height". * @param {Boolean} isBorderBox Get the size based on the border box model. */ CKEDITOR.dom.element.prototype.getSize = function( type, isBorderBox ) { var size = Math.max( this.$[ 'offset' + CKEDITOR.tools.capitalize( type ) ], this.$[ 'client' + CKEDITOR.tools.capitalize( type ) ] ) || 0; if ( isBorderBox ) size -= marginAndPaddingSize.call( this, type ); return size; }; })();
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { /** * Represents a list os CKEDITOR.dom.range objects, which can be easily * iterated sequentially. * @constructor * @param {CKEDITOR.dom.range|Array} [ranges] The ranges contained on this list. * Note that, if an array of ranges is specified, the range sequence * should match its DOM order. This class will not help to sort them. */ CKEDITOR.dom.rangeList = function( ranges ) { if ( ranges instanceof CKEDITOR.dom.rangeList ) return ranges; if ( !ranges ) ranges = []; else if ( ranges instanceof CKEDITOR.dom.range ) ranges = [ ranges ]; return CKEDITOR.tools.extend( ranges, mixins ); }; var mixins = /** @lends CKEDITOR.dom.rangeList.prototype */ { /** * Creates an instance of the rangeList iterator, it should be used * only when the ranges processing could be DOM intrusive, which * means it may pollute and break other ranges in this list. * Otherwise, it's enough to just iterate over this array in a for loop. * @returns {CKEDITOR.dom.rangeListIterator} */ createIterator : function() { var rangeList = this, bookmark = CKEDITOR.dom.walker.bookmark(), guard = function( node ) { return ! ( node.is && node.is( 'tr' ) ); }, bookmarks = [], current; /** * @lends CKEDITOR.dom.rangeListIterator.prototype */ return { /** * Retrieves the next range in the list. * @param {Boolean} mergeConsequent Whether join two adjacent ranges into single, e.g. consequent table cells. */ getNextRange : function( mergeConsequent ) { current = current == undefined ? 0 : current + 1; var range = rangeList[ current ]; // Multiple ranges might be mangled by each other. if ( range && rangeList.length > 1 ) { // Bookmarking all other ranges on the first iteration, // the range correctness after it doesn't matter since we'll // restore them before the next iteration. if ( !current ) { // Make sure bookmark correctness by reverse processing. for ( var i = rangeList.length - 1; i >= 0; i-- ) bookmarks.unshift( rangeList[ i ].createBookmark( true ) ); } if ( mergeConsequent ) { // Figure out how many ranges should be merged. var mergeCount = 0; while ( rangeList[ current + mergeCount + 1 ] ) { var doc = range.document, found = 0, left = doc.getById( bookmarks[ mergeCount ].endNode ), right = doc.getById( bookmarks[ mergeCount + 1 ].startNode ), next; // Check subsequent range. while ( 1 ) { next = left.getNextSourceNode( false ); if ( !right.equals( next ) ) { // This could be yet another bookmark or // walking across block boundaries. if ( bookmark( next ) || ( next.type == CKEDITOR.NODE_ELEMENT && next.isBlockBoundary() ) ) { left = next; continue; } } else found = 1; break; } if ( !found ) break; mergeCount++; } } range.moveToBookmark( bookmarks.shift() ); // Merge ranges finally after moving to bookmarks. while( mergeCount-- ) { next = rangeList[ ++current ]; next.moveToBookmark( bookmarks.shift() ); range.setEnd( next.endContainer, next.endOffset ); } } return range; } }; }, createBookmarks : function( serializable ) { var retval = [], bookmark; for ( var i = 0; i < this.length ; i++ ) { retval.push( bookmark = this[ i ].createBookmark( serializable, true) ); // Updating the container & offset values for ranges // that have been touched. for ( var j = i + 1; j < this.length; j++ ) { this[ j ] = updateDirtyRange( bookmark, this[ j ] ); this[ j ] = updateDirtyRange( bookmark, this[ j ], true ); } } return retval; }, createBookmarks2 : function( normalized ) { var bookmarks = []; for ( var i = 0 ; i < this.length ; i++ ) bookmarks.push( this[ i ].createBookmark2( normalized ) ); return bookmarks; }, /** * Move each range in the list to the position specified by a list of bookmarks. * @param {Array} bookmarks The list of bookmarks, each one matching a range in the list. */ moveToBookmarks : function( bookmarks ) { for ( var i = 0 ; i < this.length ; i++ ) this[ i ].moveToBookmark( bookmarks[ i ] ); } }; // Update the specified range which has been mangled by previous insertion of // range bookmark nodes.(#3256) function updateDirtyRange( bookmark, dirtyRange, checkEnd ) { var serializable = bookmark.serializable, container = dirtyRange[ checkEnd ? 'endContainer' : 'startContainer' ], offset = checkEnd ? 'endOffset' : 'startOffset'; var bookmarkStart = serializable ? dirtyRange.document.getById( bookmark.startNode ) : bookmark.startNode; var bookmarkEnd = serializable ? dirtyRange.document.getById( bookmark.endNode ) : bookmark.endNode; if ( container.equals( bookmarkStart.getPrevious() ) ) { dirtyRange.startOffset = dirtyRange.startOffset - container.getLength() - bookmarkEnd.getPrevious().getLength(); container = bookmarkEnd.getNext(); } else if ( container.equals( bookmarkEnd.getPrevious() ) ) { dirtyRange.startOffset = dirtyRange.startOffset - container.getLength(); container = bookmarkEnd.getNext(); } container.equals( bookmarkStart.getParent() ) && dirtyRange[ offset ]++; container.equals( bookmarkEnd.getParent() ) && dirtyRange[ offset ]++; // Update and return this range. dirtyRange[ checkEnd ? 'endContainer' : 'startContainer' ] = container; return dirtyRange; } })(); /** * (Virtual Class) Do not call this constructor. This class is not really part * of the API. It just describes the return type of {@link CKEDITOR.dom.rangeList#createIterator}. * @name CKEDITOR.dom.rangeListIterator * @constructor * @example */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function() { // Elements that may be considered the "Block boundary" in an element path. var pathBlockElements = { address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1, legend:1,caption:1 }; // Elements that may be considered the "Block limit" in an element path. var pathBlockLimitElements = { body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,form:1,fieldset:1 }; // Check if an element contains any block element. var checkHasBlock = function( element ) { var childNodes = element.getChildren(); for ( var i = 0, count = childNodes.count() ; i < count ; i++ ) { var child = childNodes.getItem( i ); if ( child.type == CKEDITOR.NODE_ELEMENT && CKEDITOR.dtd.$block[ child.getName() ] ) return true; } return false; }; /** * @class */ CKEDITOR.dom.elementPath = function( lastNode ) { var block = null; var blockLimit = null; var elements = []; var e = lastNode; while ( e ) { if ( e.type == CKEDITOR.NODE_ELEMENT ) { if ( !this.lastElement ) this.lastElement = e; var elementName = e.getName(); if ( !blockLimit ) { if ( !block && pathBlockElements[ elementName ] ) block = e; if ( pathBlockLimitElements[ elementName ] ) { // DIV is considered the Block, if no block is available (#525) // and if it doesn't contain other blocks. if ( !block && elementName == 'div' && !checkHasBlock( e ) ) block = e; else blockLimit = e; } } elements.push( e ); if ( elementName == 'body' ) break; } e = e.getParent(); } this.block = block; this.blockLimit = blockLimit; this.elements = elements; }; })(); CKEDITOR.dom.elementPath.prototype = { /** * Compares this element path with another one. * @param {CKEDITOR.dom.elementPath} otherPath The elementPath object to be * compared with this one. * @returns {Boolean} "true" if the paths are equal, containing the same * number of elements and the same elements in the same order. */ compare : function( otherPath ) { var thisElements = this.elements; var otherElements = otherPath && otherPath.elements; if ( !otherElements || thisElements.length != otherElements.length ) return false; for ( var i = 0 ; i < thisElements.length ; i++ ) { if ( !thisElements[ i ].equals( otherElements[ i ] ) ) return false; } return true; }, contains : function( tagNames ) { var elements = this.elements; for ( var i = 0 ; i < elements.length ; i++ ) { if ( elements[ i ].getName() in tagNames ) return elements[ i ]; } return null; } };
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.dom.event} class, which * represents the a native DOM event object. */ /** * Represents a native DOM event object. * @constructor * @param {Object} domEvent A native DOM event object. * @example */ CKEDITOR.dom.event = function( domEvent ) { /** * The native DOM event object represented by this class instance. * @type Object * @example */ this.$ = domEvent; }; CKEDITOR.dom.event.prototype = { /** * Gets the key code associated to the event. * @returns {Number} The key code. * @example * alert( event.getKey() ); "65" is "a" has been pressed */ getKey : function() { return this.$.keyCode || this.$.which; }, /** * Gets a number represeting the combination of the keys pressed during the * event. It is the sum with the current key code and the {@link CKEDITOR.CTRL}, * {@link CKEDITOR.SHIFT} and {@link CKEDITOR.ALT} constants. * @returns {Number} The number representing the keys combination. * @example * alert( event.getKeystroke() == 65 ); // "a" key * alert( event.getKeystroke() == CKEDITOR.CTRL + 65 ); // CTRL + "a" key * alert( event.getKeystroke() == CKEDITOR.CTRL + CKEDITOR.SHIFT + 65 ); // CTRL + SHIFT + "a" key */ getKeystroke : function() { var keystroke = this.getKey(); if ( this.$.ctrlKey || this.$.metaKey ) keystroke += CKEDITOR.CTRL; if ( this.$.shiftKey ) keystroke += CKEDITOR.SHIFT; if ( this.$.altKey ) keystroke += CKEDITOR.ALT; return keystroke; }, /** * Prevents the original behavior of the event to happen. It can optionally * stop propagating the event in the event chain. * @param {Boolean} [stopPropagation] Stop propagating this event in the * event chain. * @example * var element = CKEDITOR.document.getById( 'myElement' ); * element.on( 'click', function( ev ) * { * // The DOM event object is passed by the "data" property. * var domEvent = ev.data; * // Prevent the click to chave any effect in the element. * domEvent.preventDefault(); * }); */ preventDefault : function( stopPropagation ) { var $ = this.$; if ( $.preventDefault ) $.preventDefault(); else $.returnValue = false; if ( stopPropagation ) this.stopPropagation(); }, stopPropagation : function() { var $ = this.$; if ( $.stopPropagation ) $.stopPropagation(); else $.cancelBubble = true; }, /** * Returns the DOM node where the event was targeted to. * @returns {CKEDITOR.dom.node} The target DOM node. * @example * var element = CKEDITOR.document.getById( 'myElement' ); * element.on( 'click', function( ev ) * { * // The DOM event object is passed by the "data" property. * var domEvent = ev.data; * // Add a CSS class to the event target. * domEvent.getTarget().addClass( 'clicked' ); * }); */ getTarget : function() { var rawNode = this.$.target || this.$.srcElement; return rawNode ? new CKEDITOR.dom.node( rawNode ) : null; } }; // For the followind constants, we need to go over the Unicode boundaries // (0x10FFFF) to avoid collision. /** * CTRL key (0x110000). * @constant * @example */ CKEDITOR.CTRL = 0x110000; /** * SHIFT key (0x220000). * @constant * @example */ CKEDITOR.SHIFT = 0x220000; /** * ALT key (0x440000). * @constant * @example */ CKEDITOR.ALT = 0x440000;
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.resourceManager} class, which is * the base for resource managers, like plugins and themes. */ /** * Base class for resource managers, like plugins and themes. This class is not * intended to be used out of the CKEditor core code. * @param {String} basePath The path for the resources folder. * @param {String} fileName The name used for resource files. * @namespace * @example */ CKEDITOR.resourceManager = function( basePath, fileName ) { /** * The base directory containing all resources. * @name CKEDITOR.resourceManager.prototype.basePath * @type String * @example */ this.basePath = basePath; /** * The name used for resource files. * @name CKEDITOR.resourceManager.prototype.fileName * @type String * @example */ this.fileName = fileName; /** * Contains references to all resources that have already been registered * with {@link #add}. * @name CKEDITOR.resourceManager.prototype.registered * @type Object * @example */ this.registered = {}; /** * Contains references to all resources that have already been loaded * with {@link #load}. * @name CKEDITOR.resourceManager.prototype.loaded * @type Object * @example */ this.loaded = {}; /** * Contains references to all resources that have already been registered * with {@link #addExternal}. * @name CKEDITOR.resourceManager.prototype.externals * @type Object * @example */ this.externals = {}; /** * @private */ this._ = { // List of callbacks waiting for plugins to be loaded. waitingList : {} }; }; CKEDITOR.resourceManager.prototype = { /** * Registers a resource. * @param {String} name The resource name. * @param {Object} [definition] The resource definition. * @example * CKEDITOR.plugins.add( 'sample', { ... plugin definition ... } ); * @see CKEDITOR.pluginDefinition */ add : function( name, definition ) { if ( this.registered[ name ] ) throw '[CKEDITOR.resourceManager.add] The resource name "' + name + '" is already registered.'; CKEDITOR.fire( name + CKEDITOR.tools.capitalize( this.fileName ) + 'Ready', this.registered[ name ] = definition || {} ); }, /** * Gets the definition of a specific resource. * @param {String} name The resource name. * @type Object * @example * var definition = <b>CKEDITOR.plugins.get( 'sample' )</b>; */ get : function( name ) { return this.registered[ name ] || null; }, /** * Get the folder path for a specific loaded resource. * @param {String} name The resource name. * @type String * @example * alert( <b>CKEDITOR.plugins.getPath( 'sample' )</b> ); // "&lt;editor path&gt;/plugins/sample/" */ getPath : function( name ) { var external = this.externals[ name ]; return CKEDITOR.getUrl( ( external && external.dir ) || this.basePath + name + '/' ); }, /** * Get the file path for a specific loaded resource. * @param {String} name The resource name. * @type String * @example * alert( <b>CKEDITOR.plugins.getFilePath( 'sample' )</b> ); // "&lt;editor path&gt;/plugins/sample/plugin.js" */ getFilePath : function( name ) { var external = this.externals[ name ]; return CKEDITOR.getUrl( this.getPath( name ) + ( ( external && ( typeof external.file == 'string' ) ) ? external.file : this.fileName + '.js' ) ); }, /** * Registers one or more resources to be loaded from an external path * instead of the core base path. * @param {String} names The resource names, separated by commas. * @param {String} path The path of the folder containing the resource. * @param {String} [fileName] The resource file name. If not provided, the * default name is used; If provided with a empty string, will implicitly indicates that {@param path} * is already the full path. * @example * // Loads a plugin from '/myplugin/samples/plugin.js'. * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/' ); * @example * // Loads a plugin from '/myplugin/samples/my_plugin.js'. * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/', 'my_plugin.js' ); * @example * // Loads a plugin from '/myplugin/samples/my_plugin.js'. * CKEDITOR.plugins.addExternal( 'sample', '/myplugins/sample/my_plugin.js', '' ); */ addExternal : function( names, path, fileName ) { names = names.split( ',' ); for ( var i = 0 ; i < names.length ; i++ ) { var name = names[ i ]; this.externals[ name ] = { dir : path, file : fileName }; } }, /** * Loads one or more resources. * @param {String|Array} name The name of the resource to load. It may be a * string with a single resource name, or an array with several names. * @param {Function} callback A function to be called when all resources * are loaded. The callback will receive an array containing all * loaded names. * @param {Object} [scope] The scope object to be used for the callback * call. * @example * <b>CKEDITOR.plugins.load</b>( 'myplugin', function( plugins ) * { * alert( plugins['myplugin'] ); // "object" * }); */ load : function( names, callback, scope ) { // Ensure that we have an array of names. if ( !CKEDITOR.tools.isArray( names ) ) names = names ? [ names ] : []; var loaded = this.loaded, registered = this.registered, urls = [], urlsNames = {}, resources = {}; // Loop through all names. for ( var i = 0 ; i < names.length ; i++ ) { var name = names[ i ]; if ( !name ) continue; // If not available yet. if ( !loaded[ name ] && !registered[ name ] ) { var url = this.getFilePath( name ); urls.push( url ); if ( !( url in urlsNames ) ) urlsNames[ url ] = []; urlsNames[ url ].push( name ); } else resources[ name ] = this.get( name ); } CKEDITOR.scriptLoader.load( urls, function( completed, failed ) { if ( failed.length ) { throw '[CKEDITOR.resourceManager.load] Resource name "' + urlsNames[ failed[ 0 ] ].join( ',' ) + '" was not found at "' + failed[ 0 ] + '".'; } for ( var i = 0 ; i < completed.length ; i++ ) { var nameList = urlsNames[ completed[ i ] ]; for ( var j = 0 ; j < nameList.length ; j++ ) { var name = nameList[ j ]; resources[ name ] = this.get( name ); loaded[ name ] = 1; } } callback.call( scope, resources ); } , this); } };
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.editor} class, which represents an * editor instance. */ (function() { // The counter for automatic instance names. var nameCounter = 0; var getNewName = function() { var name = 'editor' + ( ++nameCounter ); return ( CKEDITOR.instances && CKEDITOR.instances[ name ] ) ? getNewName() : name; }; // ##### START: Config Privates // These function loads custom configuration files and cache the // CKEDITOR.editorConfig functions defined on them, so there is no need to // download them more than once for several instances. var loadConfigLoaded = {}; var loadConfig = function( editor ) { var customConfig = editor.config.customConfig; // Check if there is a custom config to load. if ( !customConfig ) return false; customConfig = CKEDITOR.getUrl( customConfig ); var loadedConfig = loadConfigLoaded[ customConfig ] || ( loadConfigLoaded[ customConfig ] = {} ); // If the custom config has already been downloaded, reuse it. if ( loadedConfig.fn ) { // Call the cached CKEDITOR.editorConfig defined in the custom // config file for the editor instance depending on it. loadedConfig.fn.call( editor, editor.config ); // If there is no other customConfig in the chain, fire the // "configLoaded" event. if ( CKEDITOR.getUrl( editor.config.customConfig ) == customConfig || !loadConfig( editor ) ) editor.fireOnce( 'customConfigLoaded' ); } else { // Load the custom configuration file. CKEDITOR.scriptLoader.load( customConfig, function() { // If the CKEDITOR.editorConfig function has been properly // defined in the custom configuration file, cache it. if ( CKEDITOR.editorConfig ) loadedConfig.fn = CKEDITOR.editorConfig; else loadedConfig.fn = function(){}; // Call the load config again. This time the custom // config is already cached and so it will get loaded. loadConfig( editor ); }); } return true; }; var initConfig = function( editor, instanceConfig ) { // Setup the lister for the "customConfigLoaded" event. editor.on( 'customConfigLoaded', function() { if ( instanceConfig ) { // Register the events that may have been set at the instance // configuration object. if ( instanceConfig.on ) { for ( var eventName in instanceConfig.on ) { editor.on( eventName, instanceConfig.on[ eventName ] ); } } // Overwrite the settings from the in-page config. CKEDITOR.tools.extend( editor.config, instanceConfig, true ); delete editor.config.on; } onConfigLoaded( editor ); }); // The instance config may override the customConfig setting to avoid // loading the default ~/config.js file. if ( instanceConfig && instanceConfig.customConfig != undefined ) editor.config.customConfig = instanceConfig.customConfig; // Load configs from the custom configuration files. if ( !loadConfig( editor ) ) editor.fireOnce( 'customConfigLoaded' ); }; // ##### END: Config Privates var onConfigLoaded = function( editor ) { // Set config related properties. var skin = editor.config.skin.split( ',' ), skinName = skin[ 0 ], skinPath = CKEDITOR.getUrl( skin[ 1 ] || ( '_source/' + // @Packager.RemoveLine 'skins/' + skinName + '/' ) ); /** * The name of the skin used by this editor instance. The skin name can * be set through the <code>{@link CKEDITOR.config.skin}</code> setting. * @name CKEDITOR.editor.prototype.skinName * @type String * @example * alert( editor.skinName ); // E.g. "kama" */ editor.skinName = skinName; /** * The full URL of the skin directory. * @name CKEDITOR.editor.prototype.skinPath * @type String * @example * alert( editor.skinPath ); // E.g. "http://example.com/ckeditor/skins/kama/" */ editor.skinPath = skinPath; /** * The CSS class name used for skin identification purposes. * @name CKEDITOR.editor.prototype.skinClass * @type String * @example * alert( editor.skinClass ); // E.g. "cke_skin_kama" */ editor.skinClass = 'cke_skin_' + skinName; /** * The <a href="http://en.wikipedia.org/wiki/Tabbing_navigation">tabbing * navigation</a> order that has been calculated for this editor * instance. This can be set by the <code>{@link CKEDITOR.config.tabIndex}</code> * setting or taken from the <code>tabindex</code> attribute of the * <code>{@link #element}</code> associated with the editor. * @name CKEDITOR.editor.prototype.tabIndex * @type Number * @default 0 (zero) * @example * alert( editor.tabIndex ); // E.g. "0" */ editor.tabIndex = editor.config.tabIndex || editor.element.getAttribute( 'tabindex' ) || 0; /** * Indicates the read-only state of this editor. This is a read-only property. * @name CKEDITOR.editor.prototype.readOnly * @type Boolean * @since 3.6 * @see CKEDITOR.editor#setReadOnly */ editor.readOnly = !!( editor.config.readOnly || editor.element.getAttribute( 'disabled' ) ); // Fire the "configLoaded" event. editor.fireOnce( 'configLoaded' ); // Load language file. loadSkin( editor ); }; var loadLang = function( editor ) { CKEDITOR.lang.load( editor.config.language, editor.config.defaultLanguage, function( languageCode, lang ) { /** * The code for the language resources that have been loaded * for the user interface elements of this editor instance. * @name CKEDITOR.editor.prototype.langCode * @type String * @example * alert( editor.langCode ); // E.g. "en" */ editor.langCode = languageCode; /** * An object that contains all language strings used by the editor * interface. * @name CKEDITOR.editor.prototype.lang * @type CKEDITOR.lang * @example * alert( editor.lang.bold ); // E.g. "Negrito" (if the language is set to Portuguese) */ // As we'll be adding plugin specific entries that could come // from different language code files, we need a copy of lang, // not a direct reference to it. editor.lang = CKEDITOR.tools.prototypedCopy( lang ); // We're not able to support RTL in Firefox 2 at this time. if ( CKEDITOR.env.gecko && CKEDITOR.env.version < 10900 && editor.lang.dir == 'rtl' ) editor.lang.dir = 'ltr'; editor.fire( 'langLoaded' ); var config = editor.config; config.contentsLangDirection == 'ui' && ( config.contentsLangDirection = editor.lang.dir ); loadPlugins( editor ); }); }; var loadPlugins = function( editor ) { var config = editor.config, plugins = config.plugins, extraPlugins = config.extraPlugins, removePlugins = config.removePlugins; if ( extraPlugins ) { // Remove them first to avoid duplications. var removeRegex = new RegExp( '(?:^|,)(?:' + extraPlugins.replace( /\s*,\s*/g, '|' ) + ')(?=,|$)' , 'g' ); plugins = plugins.replace( removeRegex, '' ); plugins += ',' + extraPlugins; } if ( removePlugins ) { removeRegex = new RegExp( '(?:^|,)(?:' + removePlugins.replace( /\s*,\s*/g, '|' ) + ')(?=,|$)' , 'g' ); plugins = plugins.replace( removeRegex, '' ); } // Load the Adobe AIR plugin conditionally. CKEDITOR.env.air && ( plugins += ',adobeair' ); // Load all plugins defined in the "plugins" setting. CKEDITOR.plugins.load( plugins.split( ',' ), function( plugins ) { // The list of plugins. var pluginsArray = []; // The language code to get loaded for each plugin. Null // entries will be appended for plugins with no language files. var languageCodes = []; // The list of URLs to language files. var languageFiles = []; /** * An object that contains references to all plugins used by this * editor instance. * @name CKEDITOR.editor.prototype.plugins * @type Object * @example * alert( editor.plugins.dialog.path ); // E.g. "http://example.com/ckeditor/plugins/dialog/" */ editor.plugins = plugins; // Loop through all plugins, to build the list of language // files to get loaded. for ( var pluginName in plugins ) { var plugin = plugins[ pluginName ], pluginLangs = plugin.lang, pluginPath = CKEDITOR.plugins.getPath( pluginName ), lang = null; // Set the plugin path in the plugin. plugin.path = pluginPath; // If the plugin has "lang". if ( pluginLangs ) { // Resolve the plugin language. If the current language // is not available, get the first one (default one). lang = ( CKEDITOR.tools.indexOf( pluginLangs, editor.langCode ) >= 0 ? editor.langCode : pluginLangs[ 0 ] ); if ( !plugin.langEntries || !plugin.langEntries[ lang ] ) { // Put the language file URL into the list of files to // get downloaded. languageFiles.push( CKEDITOR.getUrl( pluginPath + 'lang/' + lang + '.js' ) ); } else { CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ lang ] ); lang = null; } } // Save the language code, so we know later which // language has been resolved to this plugin. languageCodes.push( lang ); pluginsArray.push( plugin ); } // Load all plugin specific language files in a row. CKEDITOR.scriptLoader.load( languageFiles, function() { // Initialize all plugins that have the "beforeInit" and "init" methods defined. var methods = [ 'beforeInit', 'init', 'afterInit' ]; for ( var m = 0 ; m < methods.length ; m++ ) { for ( var i = 0 ; i < pluginsArray.length ; i++ ) { var plugin = pluginsArray[ i ]; // Uses the first loop to update the language entries also. if ( m === 0 && languageCodes[ i ] && plugin.lang ) CKEDITOR.tools.extend( editor.lang, plugin.langEntries[ languageCodes[ i ] ] ); // Call the plugin method (beforeInit and init). if ( plugin[ methods[ m ] ] ) plugin[ methods[ m ] ]( editor ); } } // Load the editor skin. editor.fire( 'pluginsLoaded' ); loadTheme( editor ); }); }); }; var loadSkin = function( editor ) { CKEDITOR.skins.load( editor, 'editor', function() { loadLang( editor ); }); }; var loadTheme = function( editor ) { var theme = editor.config.theme; CKEDITOR.themes.load( theme, function() { /** * The theme used by this editor instance. * @name CKEDITOR.editor.prototype.theme * @type CKEDITOR.theme * @example * alert( editor.theme ); // E.g. "http://example.com/ckeditor/themes/default/" */ var editorTheme = editor.theme = CKEDITOR.themes.get( theme ); editorTheme.path = CKEDITOR.themes.getPath( theme ); editorTheme.build( editor ); if ( editor.config.autoUpdateElement ) attachToForm( editor ); }); }; var attachToForm = function( editor ) { var element = editor.element; // If are replacing a textarea, we must if ( editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && element.is( 'textarea' ) ) { var form = element.$.form && new CKEDITOR.dom.element( element.$.form ); if ( form ) { function onSubmit() { editor.updateElement(); } form.on( 'submit',onSubmit ); // Setup the submit function because it doesn't fire the // "submit" event. if ( !form.$.submit.nodeName && !form.$.submit.length ) { form.$.submit = CKEDITOR.tools.override( form.$.submit, function( originalSubmit ) { return function() { editor.updateElement(); // For IE, the DOM submit function is not a // function, so we need thid check. if ( originalSubmit.apply ) originalSubmit.apply( this, arguments ); else originalSubmit(); }; }); } // Remove 'submit' events registered on form element before destroying.(#3988) editor.on( 'destroy', function() { form.removeListener( 'submit', onSubmit ); } ); } } }; function updateCommands() { var command, commands = this._.commands, mode = this.mode; if ( !mode ) return; for ( var name in commands ) { command = commands[ name ]; command[ command.startDisabled ? 'disable' : this.readOnly && !command.readOnly ? 'disable' : command.modes[ mode ] ? 'enable' : 'disable' ](); } } /** * Initializes the editor instance. This function is called by the editor * contructor (<code>editor_basic.js</code>). * @private */ CKEDITOR.editor.prototype._init = function() { // Get the properties that have been saved in the editor_base // implementation. var element = CKEDITOR.dom.element.get( this._.element ), instanceConfig = this._.instanceConfig; delete this._.element; delete this._.instanceConfig; this._.commands = {}; this._.styles = []; /** * The DOM element that was replaced by this editor instance. This * element stores the editor data on load and post. * @name CKEDITOR.editor.prototype.element * @type CKEDITOR.dom.element * @example * var editor = CKEDITOR.instances.editor1; * alert( <strong>editor.element</strong>.getName() ); // E.g. "textarea" */ this.element = element; /** * The editor instance name. It may be the replaced element ID, name, or * a default name using the progressive counter (<code>editor1</code>, * <code>editor2</code>, ...). * @name CKEDITOR.editor.prototype.name * @type String * @example * var editor = CKEDITOR.instances.editor1; * alert( <strong>editor.name</strong> ); // "editor1" */ this.name = ( element && ( this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) && ( element.getId() || element.getNameAtt() ) ) || getNewName(); if ( this.name in CKEDITOR.instances ) throw '[CKEDITOR.editor] The instance "' + this.name + '" already exists.'; /** * A unique random string assigned to each editor instance on the page. * @name CKEDITOR.editor.prototype.id * @type String */ this.id = CKEDITOR.tools.getNextId(); /** * The configurations for this editor instance. It inherits all * settings defined in <code>(@link CKEDITOR.config}</code>, combined with settings * loaded from custom configuration files and those defined inline in * the page when creating the editor. * @name CKEDITOR.editor.prototype.config * @type Object * @example * var editor = CKEDITOR.instances.editor1; * alert( <strong>editor.config.theme</strong> ); // E.g. "default" */ this.config = CKEDITOR.tools.prototypedCopy( CKEDITOR.config ); /** * The namespace containing UI features related to this editor instance. * @name CKEDITOR.editor.prototype.ui * @type CKEDITOR.ui * @example */ this.ui = new CKEDITOR.ui( this ); /** * Controls the focus state of this editor instance. This property * is rarely used for normal API operations. It is mainly * intended for developers adding UI elements to the editor interface. * @name CKEDITOR.editor.prototype.focusManager * @type CKEDITOR.focusManager * @example */ this.focusManager = new CKEDITOR.focusManager( this ); CKEDITOR.fire( 'instanceCreated', null, this ); this.on( 'mode', updateCommands, null, null, 1 ); this.on( 'readOnly', updateCommands, null, null, 1 ); initConfig( this, instanceConfig ); }; })(); CKEDITOR.tools.extend( CKEDITOR.editor.prototype, /** @lends CKEDITOR.editor.prototype */ { /** * Adds a command definition to the editor instance. Commands added with * this function can be executed later with the <code>{@link #execCommand}</code> method. * @param {String} commandName The indentifier name of the command. * @param {CKEDITOR.commandDefinition} commandDefinition The command definition. * @example * editorInstance.addCommand( 'sample', * { * exec : function( editor ) * { * alert( 'Executing a command for the editor name "' + editor.name + '"!' ); * } * }); */ addCommand : function( commandName, commandDefinition ) { return this._.commands[ commandName ] = new CKEDITOR.command( this, commandDefinition ); }, /** * Adds a piece of CSS code to the editor which will be applied to the WYSIWYG editing document. * This CSS would not be added to the output, and is there mainly for editor-specific editing requirements. * Note: This function should be called before the editor is loaded to take effect. * @param css {String} CSS text. * @example * editorInstance.addCss( 'body { background-color: grey; }' ); */ addCss : function( css ) { this._.styles.push( css ); }, /** * Destroys the editor instance, releasing all resources used by it. * If the editor replaced an element, the element will be recovered. * @param {Boolean} [noUpdate] If the instance is replacing a DOM * element, this parameter indicates whether or not to update the * element with the instance contents. * @example * alert( CKEDITOR.instances.editor1 ); // E.g "object" * <strong>CKEDITOR.instances.editor1.destroy()</strong>; * alert( CKEDITOR.instances.editor1 ); // "undefined" */ destroy : function( noUpdate ) { if ( !noUpdate ) this.updateElement(); this.fire( 'destroy' ); this.theme && this.theme.destroy( this ); CKEDITOR.remove( this ); CKEDITOR.fire( 'instanceDestroyed', null, this ); }, /** * Executes a command associated with the editor. * @param {String} commandName The indentifier name of the command. * @param {Object} [data] Data to be passed to the command. * @returns {Boolean} <code>true</code> if the command was executed * successfully, otherwise <code>false</code>. * @see CKEDITOR.editor.addCommand * @example * editorInstance.execCommand( 'bold' ); */ execCommand : function( commandName, data ) { var command = this.getCommand( commandName ); var eventData = { name: commandName, commandData: data, command: command }; if ( command && command.state != CKEDITOR.TRISTATE_DISABLED ) { if ( this.fire( 'beforeCommandExec', eventData ) !== true ) { eventData.returnValue = command.exec( eventData.commandData ); // Fire the 'afterCommandExec' immediately if command is synchronous. if ( !command.async && this.fire( 'afterCommandExec', eventData ) !== true ) return eventData.returnValue; } } // throw 'Unknown command name "' + commandName + '"'; return false; }, /** * Gets one of the registered commands. Note that after registering a * command definition with <code>{@link #addCommand}</code>, it is * transformed internally into an instance of * <code>{@link CKEDITOR.command}</code>, which will then be returned * by this function. * @param {String} commandName The name of the command to be returned. * This is the same name that is used to register the command with * <code>addCommand</code>. * @returns {CKEDITOR.command} The command object identified by the * provided name. */ getCommand : function( commandName ) { return this._.commands[ commandName ]; }, /** * Gets the editor data. The data will be in raw format. It is the same * data that is posted by the editor. * @type String * @returns (String) The editor data. * @example * if ( CKEDITOR.instances.editor1.<strong>getData()</strong> == '' ) * alert( 'There is no data available' ); */ getData : function() { this.fire( 'beforeGetData' ); var eventData = this._.data; if ( typeof eventData != 'string' ) { var element = this.element; if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) eventData = element.is( 'textarea' ) ? element.getValue() : element.getHtml(); else eventData = ''; } eventData = { dataValue : eventData }; // Fire "getData" so data manipulation may happen. this.fire( 'getData', eventData ); return eventData.dataValue; }, /** * Gets the "raw data" currently available in the editor. This is a * fast method which returns the data as is, without processing, so it is * not recommended to use it on resulting pages. Instead it can be used * combined with the <code>{@link #loadSnapshot}</code> method in order * to be able to automatically save the editor data from time to time * while the user is using the editor, to avoid data loss, without risking * performance issues. * @see CKEDITOR.editor.getData * @example * alert( editor.getSnapshot() ); */ getSnapshot : function() { var data = this.fire( 'getSnapshot' ); if ( typeof data != 'string' ) { var element = this.element; if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) data = element.is( 'textarea' ) ? element.getValue() : element.getHtml(); } return data; }, /** * Loads "raw data" into the editor. The data is loaded with processing * straight to the editing area. It should not be used as a way to load * any kind of data, but instead in combination with * <code>{@link #getSnapshot}</code> produced data. * @see CKEDITOR.editor.setData * @example * var data = editor.getSnapshot(); * editor.<strong>loadSnapshot( data )</strong>; */ loadSnapshot : function( snapshot ) { this.fire( 'loadSnapshot', snapshot ); }, /** * Sets the editor data. The data must be provided in the raw format (HTML).<br /> * <br /> * Note that this method is asynchronous. The <code>callback</code> parameter must * be used if interaction with the editor is needed after setting the data. * @param {String} data HTML code to replace the curent content in the * editor. * @param {Function} callback Function to be called after the <code>setData</code> * is completed. *@param {Boolean} internal Whether to suppress any event firing when copying data * internally inside the editor. * @example * CKEDITOR.instances.editor1.<strong>setData</strong>( '&lt;p&gt;This is the editor data.&lt;/p&gt;' ); * @example * CKEDITOR.instances.editor1.<strong>setData</strong>( '&lt;p&gt;Some other editor data.&lt;/p&gt;', function() * { * this.checkDirty(); // true * }); */ setData : function( data , callback, internal ) { if( callback ) { this.on( 'dataReady', function( evt ) { evt.removeListener(); callback.call( evt.editor ); } ); } // Fire "setData" so data manipulation may happen. var eventData = { dataValue : data }; !internal && this.fire( 'setData', eventData ); this._.data = eventData.dataValue; !internal && this.fire( 'afterSetData', eventData ); }, /** * Puts or restores the editor into read-only state. When in read-only, * the user is not able to change the editor contents, but can still use * some editor features. This function sets the <code>{@link CKEDITOR.config.readOnly}</code> * property of the editor, firing the <code>{@link CKEDITOR.editor#readOnly}</code> event.<br><br> * <strong>Note:</strong> the current editing area will be reloaded. * @param {Boolean} [isReadOnly] Indicates that the editor must go * read-only (<code>true</code>, default) or be restored and made editable * (<code>false</code>). * @since 3.6 */ setReadOnly : function( isReadOnly ) { isReadOnly = ( isReadOnly == undefined ) || isReadOnly; if ( this.readOnly != isReadOnly ) { this.readOnly = isReadOnly; // Fire the readOnly event so the editor features can update // their state accordingly. this.fire( 'readOnly' ); } }, /** * Inserts HTML code into the currently selected position in the editor in WYSIWYG mode. * @param {String} data HTML code to be inserted into the editor. * @example * CKEDITOR.instances.editor1.<strong>insertHtml( '&lt;p&gt;This is a new paragraph.&lt;/p&gt;' )</strong>; */ insertHtml : function( data ) { this.fire( 'insertHtml', data ); }, /** * Insert text content into the currently selected position in the * editor in WYSIWYG mode. The styles of the selected element will be applied to the inserted text. * Spaces around the text will be leaving untouched. * <strong>Note:</strong> two subsequent line-breaks will introduce one paragraph. This depends on <code>{@link CKEDITOR.config.enterMode}</code>; * A single line-break will be instead translated into one &lt;br /&gt;. * @since 3.5 * @param {String} text Text to be inserted into the editor. * @example * CKEDITOR.instances.editor1.<strong>insertText( ' line1 \n\n line2' )</strong>; */ insertText : function( text ) { this.fire( 'insertText', text ); }, /** * Inserts an element into the currently selected position in the * editor in WYSIWYG mode. * @param {CKEDITOR.dom.element} element The element to be inserted * into the editor. * @example * var element = CKEDITOR.dom.element.createFromHtml( '&lt;img src="hello.png" border="0" title="Hello" /&gt;' ); * CKEDITOR.instances.editor1.<strong>insertElement( element )</strong>; */ insertElement : function( element ) { this.fire( 'insertElement', element ); }, /** * Checks whether the current editor contents contain changes when * compared to the contents loaded into the editor at startup, or to * the contents available in the editor when <code>{@link #resetDirty}</code> * was called. * @returns {Boolean} "true" is the contents contain changes. * @example * function beforeUnload( e ) * { * if ( CKEDITOR.instances.editor1.<strong>checkDirty()</strong> ) * return e.returnValue = "You will lose the changes made in the editor."; * } * * if ( window.addEventListener ) * window.addEventListener( 'beforeunload', beforeUnload, false ); * else * window.attachEvent( 'onbeforeunload', beforeUnload ); */ checkDirty : function() { return ( this.mayBeDirty && this._.previousValue !== this.getSnapshot() ); }, /** * Resets the "dirty state" of the editor so subsequent calls to * <code>{@link #checkDirty}</code> will return <code>false</code> if the user will not * have made further changes to the contents. * @example * alert( editor.checkDirty() ); // E.g. "true" * editor.<strong>resetDirty()</strong>; * alert( editor.checkDirty() ); // "false" */ resetDirty : function() { if ( this.mayBeDirty ) this._.previousValue = this.getSnapshot(); }, /** * Updates the <code>&lt;textarea&gt;</code> element that was replaced by the editor with * the current data available in the editor. * @see CKEDITOR.editor.element * @example * CKEDITOR.instances.editor1.updateElement(); * alert( document.getElementById( 'editor1' ).value ); // The current editor data. */ updateElement : function() { var element = this.element; if ( element && this.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) { var data = this.getData(); if ( this.config.htmlEncodeOutput ) data = CKEDITOR.tools.htmlEncode( data ); if ( element.is( 'textarea' ) ) element.setValue( data ); else element.setHtml( data ); } } }); CKEDITOR.on( 'loaded', function() { // Run the full initialization for pending editors. var pending = CKEDITOR.editor._pending; if ( pending ) { delete CKEDITOR.editor._pending; for ( var i = 0 ; i < pending.length ; i++ ) pending[ i ]._init(); } }); /** * Whether to escape HTML when the editor updates the original input element. * @name CKEDITOR.config.htmlEncodeOutput * @since 3.1 * @type Boolean * @default false * @example * config.htmlEncodeOutput = true; */ /** * If <code>true</code>, makes the editor start in read-only state. Otherwise, it will check * if the linked <code>&lt;textarea&gt;</code> element has the <code>disabled</code> attribute. * @name CKEDITOR.config.readOnly * @see CKEDITOR.editor#setReadOnly * @type Boolean * @default false * @since 3.6 * @example * config.readOnly = true; */ /** * Fired when a CKEDITOR instance is created, but still before initializing it. * To interact with a fully initialized instance, use the * <code>{@link CKEDITOR#instanceReady}</code> event instead. * @name CKEDITOR#instanceCreated * @event * @param {CKEDITOR.editor} editor The editor instance that has been created. */ /** * Fired when a CKEDITOR instance is destroyed. * @name CKEDITOR#instanceDestroyed * @event * @param {CKEDITOR.editor} editor The editor instance that has been destroyed. */ /** * Fired when the language is loaded into the editor instance. * @name CKEDITOR.editor#langLoaded * @event * @since 3.6.1 * @param {CKEDITOR.editor} editor This editor instance. */ /** * Fired when all plugins are loaded and initialized into the editor instance. * @name CKEDITOR.editor#pluginsLoaded * @event * @param {CKEDITOR.editor} editor This editor instance. */ /** * Fired before the command execution when <code>{@link #execCommand}</code> is called. * @name CKEDITOR.editor#beforeCommandExec * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {String} data.name The command name. * @param {Object} data.commandData The data to be sent to the command. This * can be manipulated by the event listener. * @param {CKEDITOR.command} data.command The command itself. */ /** * Fired after the command execution when <code>{@link #execCommand}</code> is called. * @name CKEDITOR.editor#afterCommandExec * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {String} data.name The command name. * @param {Object} data.commandData The data sent to the command. * @param {CKEDITOR.command} data.command The command itself. * @param {Object} data.returnValue The value returned by the command execution. */ /** * Fired when the custom configuration file is loaded, before the final * configurations initialization.<br /> * <br /> * Custom configuration files can be loaded thorugh the * <code>{@link CKEDITOR.config.customConfig}</code> setting. Several files can be loaded * by changing this setting. * @name CKEDITOR.editor#customConfigLoaded * @event * @param {CKEDITOR.editor} editor This editor instance. */ /** * Fired once the editor configuration is ready (loaded and processed). * @name CKEDITOR.editor#configLoaded * @event * @param {CKEDITOR.editor} editor This editor instance. */ /** * Fired when this editor instance is destroyed. The editor at this * point is not usable and this event should be used to perform the clean-up * in any plugin. * @name CKEDITOR.editor#destroy * @event */ /** * Internal event to get the current data. * @name CKEDITOR.editor#beforeGetData * @event */ /** * Internal event to perform the <code>#getSnapshot</code> call. * @name CKEDITOR.editor#getSnapshot * @event */ /** * Internal event to perform the <code>#loadSnapshot</code> call. * @name CKEDITOR.editor#loadSnapshot * @event */ /** * Event fired before the <code>#getData</code> call returns allowing additional manipulation. * @name CKEDITOR.editor#getData * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {String} data.dataValue The data that will be returned. */ /** * Event fired before the <code>#setData</code> call is executed allowing additional manipulation. * @name CKEDITOR.editor#setData * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {String} data.dataValue The data that will be used. */ /** * Event fired at the end of the <code>#setData</code> call execution. Usually it is better to use the * <code>{@link CKEDITOR.editor.prototype.dataReady}</code> event. * @name CKEDITOR.editor#afterSetData * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {String} data.dataValue The data that has been set. */ /** * Internal event to perform the <code>#insertHtml</code> call * @name CKEDITOR.editor#insertHtml * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {String} data The HTML to insert. */ /** * Internal event to perform the <code>#insertText</code> call * @name CKEDITOR.editor#insertText * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {String} text The text to insert. */ /** * Internal event to perform the <code>#insertElement</code> call * @name CKEDITOR.editor#insertElement * @event * @param {CKEDITOR.editor} editor This editor instance. * @param {Object} element The element to insert. */ /** * Event fired after the <code>{@link CKEDITOR.editor#readOnly}</code> property changes. * @name CKEDITOR.editor#readOnly * @event * @since 3.6 * @param {CKEDITOR.editor} editor This editor instance. */
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.event} class, which serves as the * base for classes and objects that require event handling features. */ if ( !CKEDITOR.event ) { /** * Creates an event class instance. This constructor is rearely used, being * the {@link #.implementOn} function used in class prototypes directly * instead. * @class This is a base class for classes and objects that require event * handling features.<br /> * <br /> * Do not confuse this class with {@link CKEDITOR.dom.event} which is * instead used for DOM events. The CKEDITOR.event class implements the * internal event system used by the CKEditor to fire API related events. * @example */ CKEDITOR.event = function() {}; /** * Implements the {@link CKEDITOR.event} features in an object. * @param {Object} targetObject The object into which implement the features. * @example * var myObject = { message : 'Example' }; * <b>CKEDITOR.event.implementOn( myObject }</b>; * myObject.on( 'testEvent', function() * { * alert( this.message ); // "Example" * }); * myObject.fire( 'testEvent' ); */ CKEDITOR.event.implementOn = function( targetObject ) { var eventProto = CKEDITOR.event.prototype; for ( var prop in eventProto ) { if ( targetObject[ prop ] == undefined ) targetObject[ prop ] = eventProto[ prop ]; } }; CKEDITOR.event.prototype = (function() { // Returns the private events object for a given object. var getPrivate = function( obj ) { var _ = ( obj.getPrivate && obj.getPrivate() ) || obj._ || ( obj._ = {} ); return _.events || ( _.events = {} ); }; var eventEntry = function( eventName ) { this.name = eventName; this.listeners = []; }; eventEntry.prototype = { // Get the listener index for a specified function. // Returns -1 if not found. getListenerIndex : function( listenerFunction ) { for ( var i = 0, listeners = this.listeners ; i < listeners.length ; i++ ) { if ( listeners[i].fn == listenerFunction ) return i; } return -1; } }; return /** @lends CKEDITOR.event.prototype */ { /** * Registers a listener to a specific event in the current object. * @param {String} eventName The event name to which listen. * @param {Function} listenerFunction The function listening to the * event. A single {@link CKEDITOR.eventInfo} object instanced * is passed to this function containing all the event data. * @param {Object} [scopeObj] The object used to scope the listener * call (the this object. If omitted, the current object is used. * @param {Object} [listenerData] Data to be sent as the * {@link CKEDITOR.eventInfo#listenerData} when calling the * listener. * @param {Number} [priority] The listener priority. Lower priority * listeners are called first. Listeners with the same priority * value are called in registration order. Defaults to 10. * @example * someObject.on( 'someEvent', function() * { * alert( this == someObject ); // "true" * }); * @example * someObject.on( 'someEvent', function() * { * alert( this == anotherObject ); // "true" * } * , anotherObject ); * @example * someObject.on( 'someEvent', function( event ) * { * alert( event.listenerData ); // "Example" * } * , null, 'Example' ); * @example * someObject.on( 'someEvent', function() { ... } ); // 2nd called * someObject.on( 'someEvent', function() { ... }, null, null, 100 ); // 3rd called * someObject.on( 'someEvent', function() { ... }, null, null, 1 ); // 1st called */ on : function( eventName, listenerFunction, scopeObj, listenerData, priority ) { // Get the event entry (create it if needed). var events = getPrivate( this ), event = events[ eventName ] || ( events[ eventName ] = new eventEntry( eventName ) ); if ( event.getListenerIndex( listenerFunction ) < 0 ) { // Get the listeners. var listeners = event.listeners; // Fill the scope. if ( !scopeObj ) scopeObj = this; // Default the priority, if needed. if ( isNaN( priority ) ) priority = 10; var me = this; // Create the function to be fired for this listener. var listenerFirer = function( editor, publisherData, stopFn, cancelFn ) { var ev = { name : eventName, sender : this, editor : editor, data : publisherData, listenerData : listenerData, stop : stopFn, cancel : cancelFn, removeListener : function() { me.removeListener( eventName, listenerFunction ); } }; listenerFunction.call( scopeObj, ev ); return ev.data; }; listenerFirer.fn = listenerFunction; listenerFirer.priority = priority; // Search for the right position for this new listener, based on its // priority. for ( var i = listeners.length - 1 ; i >= 0 ; i-- ) { // Find the item which should be before the new one. if ( listeners[ i ].priority <= priority ) { // Insert the listener in the array. listeners.splice( i + 1, 0, listenerFirer ); return; } } // If no position has been found (or zero length), put it in // the front of list. listeners.unshift( listenerFirer ); } }, /** * Fires an specific event in the object. All registered listeners are * called at this point. * @function * @param {String} eventName The event name to fire. * @param {Object} [data] Data to be sent as the * {@link CKEDITOR.eventInfo#data} when calling the * listeners. * @param {CKEDITOR.editor} [editor] The editor instance to send as the * {@link CKEDITOR.eventInfo#editor} when calling the * listener. * @returns {Boolean|Object} A booloan indicating that the event is to be * canceled, or data returned by one of the listeners. * @example * someObject.on( 'someEvent', function() { ... } ); * someObject.on( 'someEvent', function() { ... } ); * <b>someObject.fire( 'someEvent' )</b>; // both listeners are called * @example * someObject.on( 'someEvent', function( event ) * { * alert( event.data ); // "Example" * }); * <b>someObject.fire( 'someEvent', 'Example' )</b>; */ fire : (function() { // Create the function that marks the event as stopped. var stopped = false; var stopEvent = function() { stopped = true; }; // Create the function that marks the event as canceled. var canceled = false; var cancelEvent = function() { canceled = true; }; return function( eventName, data, editor ) { // Get the event entry. var event = getPrivate( this )[ eventName ]; // Save the previous stopped and cancelled states. We may // be nesting fire() calls. var previousStopped = stopped, previousCancelled = canceled; // Reset the stopped and canceled flags. stopped = canceled = false; if ( event ) { var listeners = event.listeners; if ( listeners.length ) { // As some listeners may remove themselves from the // event, the original array length is dinamic. So, // let's make a copy of all listeners, so we are // sure we'll call all of them. listeners = listeners.slice( 0 ); // Loop through all listeners. for ( var i = 0 ; i < listeners.length ; i++ ) { // Call the listener, passing the event data. var retData = listeners[i].call( this, editor, data, stopEvent, cancelEvent ); if ( typeof retData != 'undefined' ) data = retData; // No further calls is stopped or canceled. if ( stopped || canceled ) break; } } } var ret = canceled || ( typeof data == 'undefined' ? false : data ); // Restore the previous stopped and canceled states. stopped = previousStopped; canceled = previousCancelled; return ret; }; })(), /** * Fires an specific event in the object, releasing all listeners * registered to that event. The same listeners are not called again on * successive calls of it or of {@link #fire}. * @param {String} eventName The event name to fire. * @param {Object} [data] Data to be sent as the * {@link CKEDITOR.eventInfo#data} when calling the * listeners. * @param {CKEDITOR.editor} [editor] The editor instance to send as the * {@link CKEDITOR.eventInfo#editor} when calling the * listener. * @returns {Boolean|Object} A booloan indicating that the event is to be * canceled, or data returned by one of the listeners. * @example * someObject.on( 'someEvent', function() { ... } ); * someObject.fire( 'someEvent' ); // above listener called * <b>someObject.fireOnce( 'someEvent' )</b>; // above listener called * someObject.fire( 'someEvent' ); // no listeners called */ fireOnce : function( eventName, data, editor ) { var ret = this.fire( eventName, data, editor ); delete getPrivate( this )[ eventName ]; return ret; }, /** * Unregisters a listener function from being called at the specified * event. No errors are thrown if the listener has not been * registered previously. * @param {String} eventName The event name. * @param {Function} listenerFunction The listener function to unregister. * @example * var myListener = function() { ... }; * someObject.on( 'someEvent', myListener ); * someObject.fire( 'someEvent' ); // myListener called * <b>someObject.removeListener( 'someEvent', myListener )</b>; * someObject.fire( 'someEvent' ); // myListener not called */ removeListener : function( eventName, listenerFunction ) { // Get the event entry. var event = getPrivate( this )[ eventName ]; if ( event ) { var index = event.getListenerIndex( listenerFunction ); if ( index >= 0 ) event.listeners.splice( index, 1 ); } }, /** * Checks if there is any listener registered to a given event. * @param {String} eventName The event name. * @example * var myListener = function() { ... }; * someObject.on( 'someEvent', myListener ); * alert( someObject.<b>hasListeners( 'someEvent' )</b> ); // "true" * alert( someObject.<b>hasListeners( 'noEvent' )</b> ); // "false" */ hasListeners : function( eventName ) { var event = getPrivate( this )[ eventName ]; return ( event && event.listeners.length > 0 ) ; } }; })(); }
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @fileOverview Defines the "virtual" {@link CKEDITOR.dataProcessor} class, which * defines the basic structure of data processor objects to be * set to {@link CKEDITOR.editor.dataProcessor}. */ /** * If defined, points to the data processor which is responsible to translate * and transform the editor data on input and output. * Generaly it will point to an instance of {@link CKEDITOR.htmlDataProcessor}, * which handles HTML data. The editor may also handle other data formats by * using different data processors provided by specific plugins. * @name CKEDITOR.editor.prototype.dataProcessor * @type CKEDITOR.dataProcessor */ /** * This class is here for documentation purposes only and is not really part of * the API. It serves as the base ("interface") for data processors * implementation. * @name CKEDITOR.dataProcessor * @class Represents a data processor, which is responsible to translate and * transform the editor data on input and output. * @example */ /** * Transforms input data into HTML to be loaded in the editor. * While the editor is able to handle non HTML data (like BBCode), at runtime * it can handle HTML data only. The role of the data processor is transforming * the input data into HTML through this function. * @name CKEDITOR.dataProcessor.prototype.toHtml * @function * @param {String} data The input data to be transformed. * @param {String} [fixForBody] The tag name to be used if the data must be * fixed because it is supposed to be loaded direcly into the &lt;body&gt; * tag. This is generally not used by non-HTML data processors. * @example * // Tranforming BBCode data, having a custom BBCode data processor. * var data = 'This is [b]an example[/b].'; * var html = editor.dataProcessor.toHtml( data ); // '&lt;p&gt;This is &lt;b&gt;an example&lt;/b&gt;.&lt;/p&gt;' */ /** * Transforms HTML into data to be outputted by the editor, in the format * expected by the data processor. * While the editor is able to handle non HTML data (like BBCode), at runtime * it can handle HTML data only. The role of the data processor is transforming * the HTML data containined by the editor into a specific data format through * this function. * @name CKEDITOR.dataProcessor.prototype.toDataFormat * @function * @param {String} html The HTML to be transformed. * @param {String} fixForBody The tag name to be used if the output data is * coming from &lt;body&gt; and may be eventually fixed for it. This is * generally not used by non-HTML data processors. * // Tranforming into BBCode data, having a custom BBCode data processor. * var html = '&lt;p&gt;This is &lt;b&gt;an example&lt;/b&gt;.&lt;/p&gt;'; * var data = editor.dataProcessor.toDataFormat( html ); // 'This is [b]an example[/b].' */
JavaScript
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @name CKEDITOR.theme * @class */ CKEDITOR.themes.add( 'default', (function() { var hiddenSkins = {}; function checkSharedSpace( editor, spaceName ) { var container, element; // Try to retrieve the target element from the sharedSpaces settings. element = editor.config.sharedSpaces; element = element && element[ spaceName ]; element = element && CKEDITOR.document.getById( element ); // If the element is available, we'll then create the container for // the space. if ( element ) { // Creates an HTML structure that reproduces the editor class hierarchy. var html = '<span class="cke_shared "' + ' dir="'+ editor.lang.dir + '"' + '>' + '<span class="' + editor.skinClass + ' ' + editor.id + ' cke_editor_' + editor.name + '">' + '<span class="' + CKEDITOR.env.cssClass + '">' + '<span class="cke_wrapper cke_' + editor.lang.dir + '">' + '<span class="cke_editor">' + '<div class="cke_' + spaceName + '">' + '</div></span></span></span></span></span>'; var mainContainer = element.append( CKEDITOR.dom.element.createFromHtml( html, element.getDocument() ) ); // Only the first container starts visible. Others get hidden. if ( element.getCustomData( 'cke_hasshared' ) ) mainContainer.hide(); else element.setCustomData( 'cke_hasshared', 1 ); // Get the deeper inner <div>. container = mainContainer.getChild( [0,0,0,0] ); // Save a reference to the shared space container. !editor.sharedSpaces && ( editor.sharedSpaces = {} ); editor.sharedSpaces[ spaceName ] = container; // When the editor gets focus, we show the space container, hiding others. editor.on( 'focus', function() { for ( var i = 0, sibling, children = element.getChildren() ; ( sibling = children.getItem( i ) ) ; i++ ) { if ( sibling.type == CKEDITOR.NODE_ELEMENT && !sibling.equals( mainContainer ) && sibling.hasClass( 'cke_shared' ) ) { sibling.hide(); } } mainContainer.show(); }); editor.on( 'destroy', function() { mainContainer.remove(); }); } return container; } return /** @lends CKEDITOR.theme */ { build : function( editor, themePath ) { var name = editor.name, element = editor.element, elementMode = editor.elementMode; if ( !element || elementMode == CKEDITOR.ELEMENT_MODE_NONE ) return; if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) element.hide(); // Get the HTML for the predefined spaces. var topHtml = editor.fire( 'themeSpace', { space : 'top', html : '' } ).html; var contentsHtml = editor.fire( 'themeSpace', { space : 'contents', html : '' } ).html; var bottomHtml = editor.fireOnce( 'themeSpace', { space : 'bottom', html : '' } ).html; var height = contentsHtml && editor.config.height; var tabIndex = editor.config.tabIndex || editor.element.getAttribute( 'tabindex' ) || 0; // The editor height is considered only if the contents space got filled. if ( !contentsHtml ) height = 'auto'; else if ( !isNaN( height ) ) height += 'px'; var style = ''; var width = editor.config.width; if ( width ) { if ( !isNaN( width ) ) width += 'px'; style += "width: " + width + ";"; } var sharedTop = topHtml && checkSharedSpace( editor, 'top' ), sharedBottoms = checkSharedSpace( editor, 'bottom' ); sharedTop && ( sharedTop.setHtml( topHtml ) , topHtml = '' ); sharedBottoms && ( sharedBottoms.setHtml( bottomHtml ), bottomHtml = '' ); var hideSkin = '<style>.' + editor.skinClass + '{visibility:hidden;}</style>'; if ( hiddenSkins[ editor.skinClass ] ) hideSkin = ''; else hiddenSkins[ editor.skinClass ] = 1; var container = CKEDITOR.dom.element.createFromHtml( [ '<span' + ' id="cke_', name, '"' + ' class="', editor.skinClass, ' ', editor.id, ' cke_editor_', name, '"' + ' dir="', editor.lang.dir, '"' + ' title="', ( CKEDITOR.env.gecko ? ' ' : '' ), '"' + ' lang="', editor.langCode, '"' + ( CKEDITOR.env.webkit? ' tabindex="' + tabIndex + '"' : '' ) + ' role="application"' + ' aria-labelledby="cke_', name, '_arialbl"' + ( style ? ' style="' + style + '"' : '' ) + '>' + '<span id="cke_', name, '_arialbl" class="cke_voice_label">' + editor.lang.editor + '</span>' + '<span class="' , CKEDITOR.env.cssClass, '" role="presentation">' + '<span class="cke_wrapper cke_', editor.lang.dir, '" role="presentation">' + '<table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody>' + '<tr', topHtml ? '' : ' style="display:none"', ' role="presentation"><td id="cke_top_' , name, '" class="cke_top" role="presentation">' , topHtml , '</td></tr>' + '<tr', contentsHtml ? '' : ' style="display:none"', ' role="presentation"><td id="cke_contents_', name, '" class="cke_contents" style="height:', height, '" role="presentation">', contentsHtml, '</td></tr>' + '<tr', bottomHtml ? '' : ' style="display:none"', ' role="presentation"><td id="cke_bottom_' , name, '" class="cke_bottom" role="presentation">' , bottomHtml , '</td></tr>' + '</tbody></table>' + //Hide the container when loading skins, later restored by skin css. hideSkin + '</span>' + '</span>' + '</span>' ].join( '' ) ); container.getChild( [1, 0, 0, 0, 0] ).unselectable(); container.getChild( [1, 0, 0, 0, 2] ).unselectable(); if ( elementMode == CKEDITOR.ELEMENT_MODE_REPLACE ) container.insertAfter( element ); else element.append( container ); /** * The DOM element that holds the main editor interface. * @name CKEDITOR.editor.prototype.container * @type CKEDITOR.dom.element * @example * var editor = CKEDITOR.instances.editor1; * alert( <b>editor.container</b>.getName() ); "span" */ editor.container = container; // Disable browser context menu for editor's chrome. container.disableContextMenu(); // Use a class to indicate that the current selection is in different direction than the UI. editor.on( 'contentDirChanged', function( evt ) { var func = ( editor.lang.dir != evt.data ? 'add' : 'remove' ) + 'Class'; container.getChild( 1 )[ func ]( 'cke_mixed_dir_content' ); // Put the mixed direction class on the respective element also for shared spaces. var toolbarSpace = this.sharedSpaces && this.sharedSpaces[ this.config.toolbarLocation ]; toolbarSpace && toolbarSpace.getParent().getParent()[ func ]( 'cke_mixed_dir_content' ); }); editor.fireOnce( 'themeLoaded' ); editor.fireOnce( 'uiReady' ); }, buildDialog : function( editor ) { var baseIdNumber = CKEDITOR.tools.getNextNumber(); var element = CKEDITOR.dom.element.createFromHtml( [ '<div class="', editor.id, '_dialog cke_editor_', editor.name.replace('.', '\\.'), '_dialog cke_skin_', editor.skinName, '" dir="', editor.lang.dir, '"' + ' lang="', editor.langCode, '"' + ' role="dialog"' + ' aria-labelledby="%title#"' + '>' + '<table class="cke_dialog', ' ' + CKEDITOR.env.cssClass, ' cke_', editor.lang.dir, '" style="position:absolute" role="presentation">' + '<tr><td role="presentation">' + '<div class="%body" role="presentation">' + '<div id="%title#" class="%title" role="presentation"></div>' + '<a id="%close_button#" class="%close_button" href="javascript:void(0)" title="' + editor.lang.common.close+'" role="button"><span class="cke_label">X</span></a>' + '<div id="%tabs#" class="%tabs" role="tablist"></div>' + '<table class="%contents" role="presentation">' + '<tr>' + '<td id="%contents#" class="%contents" role="presentation"></td>' + '</tr>' + '<tr>' + '<td id="%footer#" class="%footer" role="presentation"></td>' + '</tr>' + '</table>' + '</div>' + '<div id="%tl#" class="%tl"></div>' + '<div id="%tc#" class="%tc"></div>' + '<div id="%tr#" class="%tr"></div>' + '<div id="%ml#" class="%ml"></div>' + '<div id="%mr#" class="%mr"></div>' + '<div id="%bl#" class="%bl"></div>' + '<div id="%bc#" class="%bc"></div>' + '<div id="%br#" class="%br"></div>' + '</td></tr>' + '</table>', //Hide the container when loading skins, later restored by skin css. ( CKEDITOR.env.ie ? '' : '<style>.cke_dialog{visibility:hidden;}</style>' ), '</div>' ].join( '' ) .replace( /#/g, '_' + baseIdNumber ) .replace( /%/g, 'cke_dialog_' ) ); var body = element.getChild( [ 0, 0, 0, 0, 0 ] ), title = body.getChild( 0 ), close = body.getChild( 1 ); // IFrame shim for dialog that masks activeX in IE. (#7619) if ( CKEDITOR.env.ie && !CKEDITOR.env.ie6Compat ) { var isCustomDomain = CKEDITOR.env.isCustomDomain(), src = 'javascript:void(function(){' + encodeURIComponent( 'document.open();' + ( isCustomDomain ? ( 'document.domain="' + document.domain + '";' ) : '' ) + 'document.close();' ) + '}())', iframe = CKEDITOR.dom.element.createFromHtml( '<iframe' + ' frameBorder="0"' + ' class="cke_iframe_shim"' + ' src="' + src + '"' + ' tabIndex="-1"' + '></iframe>' ); iframe.appendTo( body.getParent() ); } // Make the Title and Close Button unselectable. title.unselectable(); close.unselectable(); return { element : element, parts : { dialog : element.getChild( 0 ), title : title, close : close, tabs : body.getChild( 2 ), contents : body.getChild( [ 3, 0, 0, 0 ] ), footer : body.getChild( [ 3, 0, 1, 0 ] ) } }; }, destroy : function( editor ) { var container = editor.container, element = editor.element; if ( container ) { container.clearCustomData(); container.remove(); } if ( element ) { element.clearCustomData(); editor.elementMode == CKEDITOR.ELEMENT_MODE_REPLACE && element.show(); delete editor.element; } } }; })() ); /** * Returns the DOM element that represents a theme space. The default theme defines * three spaces, namely "top", "contents" and "bottom", representing the main * blocks that compose the editor interface. * @param {String} spaceName The space name. * @returns {CKEDITOR.dom.element} The element that represents the space. * @example * // Hide the bottom space in the UI. * var bottom = editor.getThemeSpace( 'bottom' ); * bottom.setStyle( 'display', 'none' ); */ CKEDITOR.editor.prototype.getThemeSpace = function( spaceName ) { var spacePrefix = 'cke_' + spaceName; var space = this._[ spacePrefix ] || ( this._[ spacePrefix ] = CKEDITOR.document.getById( spacePrefix + '_' + this.name ) ); return space; }; /** * Resizes the editor interface. * @param {Number|String} width The new width. It can be an pixels integer or a * CSS size value. * @param {Number|String} height The new height. It can be an pixels integer or * a CSS size value. * @param {Boolean} [isContentHeight] Indicates that the provided height is to * be applied to the editor contents space, not to the entire editor * interface. Defaults to false. * @param {Boolean} [resizeInner] Indicates that the first inner interface * element must receive the size, not the outer element. The default theme * defines the interface inside a pair of span elements * (&lt;span&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;). By default the * first span element receives the sizes. If this parameter is set to * true, the second span is sized instead. * @example * editor.resize( 900, 300 ); * @example * editor.resize( '100%', 450, true ); */ CKEDITOR.editor.prototype.resize = function( width, height, isContentHeight, resizeInner ) { var container = this.container, contents = CKEDITOR.document.getById( 'cke_contents_' + this.name ), contentsFrame = CKEDITOR.env.webkit && this.document && this.document.getWindow().$.frameElement, outer = resizeInner ? container.getChild( 1 ) : container; // Set as border box width. (#5353) outer.setSize( 'width', width, true ); // WebKit needs to refresh the iframe size to avoid rendering issues. (1/2) (#8348) contentsFrame && ( contentsFrame.style.width = '1%' ); // Get the height delta between the outer table and the content area. // If we're setting the content area's height, then we don't need the delta. var delta = isContentHeight ? 0 : ( outer.$.offsetHeight || 0 ) - ( contents.$.clientHeight || 0 ); contents.setStyle( 'height', Math.max( height - delta, 0 ) + 'px' ); // WebKit needs to refresh the iframe size to avoid rendering issues. (2/2) (#8348) contentsFrame && ( contentsFrame.style.width = '100%' ); // Emit a resize event. this.fire( 'resize' ); }; /** * Gets the element that can be freely used to check the editor size. This method * is mainly used by the resize plugin, which adds a UI handle that can be used * to resize the editor. * @param {Boolean} forContents Whether to return the "contents" part of the theme instead of the container. * @returns {CKEDITOR.dom.element} The resizable element. * @example */ CKEDITOR.editor.prototype.getResizable = function( forContents ) { return forContents ? CKEDITOR.document.getById( 'cke_contents_' + this.name ) : this.container; }; /** * Makes it possible to place some of the editor UI blocks, like the toolbar * and the elements path, into any element in the page. * The elements used to hold the UI blocks can be shared among several editor * instances. In that case, only the blocks of the active editor instance will * display. * @name CKEDITOR.config.sharedSpaces * @type Object * @default undefined * @example * // Place the toolbar inside the element with ID "someElementId" and the * // elements path into the element with ID "anotherId". * config.sharedSpaces = * { * top : 'someElementId', * bottom : 'anotherId' * }; * @example * // Place the toolbar inside the element with ID "someElementId". The * // elements path will remain attached to the editor UI. * config.sharedSpaces = * { * top : 'someElementId' * }; */ /** * Fired after the editor instance is resized through * the {@link CKEDITOR.editor.prototype.resize} method. * @name CKEDITOR.editor#resize * @event */
JavaScript
/** * jQuery.ScrollTo * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * Date: 2/19/2008 * * @projectDescription Easy element scrolling using jQuery. * Tested with jQuery 1.2.1. On FF 2.0.0.11, IE 6, Opera 9.22 and Safari 3 beta. on Windows. * * @author Ariel Flesler * @version 1.3.3 * * @id jQuery.scrollTo * @id jQuery.fn.scrollTo * @param {String, Number, DOMElement, jQuery, Object} target Where to scroll the matched elements. * The different options for target are: * - A number position (will be applied to all axes). * - A string position ('44', '100px', '+=90', etc ) will be applied to all axes * - A jQuery/DOM element ( logically, child of the element to scroll ) * - A string selector, that will be relative to the element to scroll ( 'li:eq(2)', etc ) * - A hash { top:x, left:y }, x and y can be any kind of number/string like above. * @param {Number} duration The OVERALL length of the animation, this argument can be the settings object instead. * @param {Object} settings Hash of settings, optional. * @option {String} axis Which axis must be scrolled, use 'x', 'y', 'xy' or 'yx'. * @option {Number} duration The OVERALL length of the animation. * @option {String} easing The easing method for the animation. * @option {Boolean} margin If true, the margin of the target element will be deducted from the final position. * @option {Object, Number} offset Add/deduct from the end position. One number for both axes or { top:x, left:y }. * @option {Object, Number} over Add/deduct the height/width multiplied by 'over', can be { top:x, left:y } when using both axes. * @option {Boolean} queue If true, and both axis are given, the 2nd axis will only be animated after the first one ends. * @option {Function} onAfter Function to be called after the scrolling ends. * @option {Function} onAfterFirst If queuing is activated, this function will be called after the first scrolling ends. * @return {jQuery} Returns the same jQuery object, for chaining. * * @example $('div').scrollTo( 340 ); * * @example $('div').scrollTo( '+=340px', { axis:'y' } ); * * @example $('div').scrollTo( 'p.paragraph:eq(2)', 500, { easing:'swing', queue:true, axis:'xy' } ); * * @example var second_child = document.getElementById('container').firstChild.nextSibling; * $('#container').scrollTo( second_child, { duration:500, axis:'x', onAfter:function(){ * alert('scrolled!!'); * }}); * * @example $('div').scrollTo( { top: 300, left:'+=200' }, { offset:-20 } ); * * Notes: * - jQuery.scrollTo will make the whole window scroll, it accepts the same arguments as jQuery.fn.scrollTo. * - If you are interested in animated anchor navigation, check http://jquery.com/plugins/project/LocalScroll. * - The options margin, offset and over are ignored, if the target is not a jQuery object or a DOM element. * - The option 'queue' won't be taken into account, if only 1 axis is given. */ ;(function( $ ){ var $scrollTo = $.scrollTo = function( target, duration, settings ){ $scrollTo.window().scrollTo( target, duration, settings ); }; $scrollTo.defaults = { axis:'y', duration:1 }; //returns the element that needs to be animated to scroll the window $scrollTo.window = function(){ return $( $.browser.safari ? 'body' : 'html' ); }; $.fn.scrollTo = function( target, duration, settings ){ if( typeof duration == 'object' ){ settings = duration; duration = 0; } settings = $.extend( {}, $scrollTo.defaults, settings ); duration = duration || settings.speed || settings.duration;//speed is still recognized for backwards compatibility settings.queue = settings.queue && settings.axis.length > 1;//make sure the settings are given right if( settings.queue ) duration /= 2;//let's keep the overall speed, the same. settings.offset = both( settings.offset ); settings.over = both( settings.over ); return this.each(function(){ var elem = this, $elem = $(elem), t = target, toff, attr = {}, win = $elem.is('html,body'); switch( typeof t ){ case 'number'://will pass the regex case 'string': if( /^([+-]=)?\d+(px)?$/.test(t) ){ t = both( t ); break;//we are done } t = $(t,this);// relative selector, no break! case 'object': if( t.is || t.style )//DOM/jQuery toff = (t = $(t)).offset();//get the real position of the target } $.each( settings.axis.split(''), function( i, axis ){ var Pos = axis == 'x' ? 'Left' : 'Top', pos = Pos.toLowerCase(), key = 'scroll' + Pos, act = elem[key], Dim = axis == 'x' ? 'Width' : 'Height', dim = Dim.toLowerCase(); if( toff ){//jQuery/DOM attr[key] = toff[pos] + ( win ? 0 : act - $elem.offset()[pos] ); if( settings.margin ){//if it's a dom element, reduce the margin attr[key] -= parseInt(t.css('margin'+Pos)) || 0; attr[key] -= parseInt(t.css('border'+Pos+'Width')) || 0; } attr[key] += settings.offset[pos] || 0;//add/deduct the offset if( settings.over[pos] )//scroll to a fraction of its width/height attr[key] += t[dim]() * settings.over[pos]; }else attr[key] = t[pos];//remove the unnecesary 'px' if( /^\d+$/.test(attr[key]) )//number or 'number' attr[key] = attr[key] <= 0 ? 0 : Math.min( attr[key], max(Dim) );//check the limits if( !i && settings.queue ){//queueing each axis is required if( act != attr[key] )//don't waste time animating, if there's no need. animate( settings.onAfterFirst );//intermediate animation delete attr[key];//don't animate this axis again in the next iteration. } }); animate( settings.onAfter ); function animate( callback ){ $elem.animate( attr, duration, settings.easing, callback && function(){ callback.call(this, target); }); }; function max( Dim ){ var el = win ? $.browser.opera ? document.body : document.documentElement : elem; return el['scroll'+Dim] - el['client'+Dim]; }; }); }; function both( val ){ return typeof val == 'object' ? val : { top:val, left:val }; }; })( jQuery );// JavaScript Document
JavaScript
/** * jQuery.LocalScroll * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 3/10/2008 * * @projectDescription Animated scrolling navigation, using anchors. * http://flesler.blogspot.com/2007/10/jquerylocalscroll-10.html * @author Ariel Flesler * @version 1.2.5 * * @id jQuery.fn.localScroll * @param {Object} settings Hash of settings, it is passed in to jQuery.ScrollTo, none is required. * @return {jQuery} Returns the same jQuery object, for chaining. * * @example $('ul.links').localScroll(); * * @example $('ul.links').localScroll({ filter:'.animated', duration:400, axis:'x' }); * * @example $.localScroll({ target:'#pane', axis:'xy', queue:true, event:'mouseover' }); * * Notes: * - The plugin requires jQuery.ScrollTo. * - The hash of settings, is passed to jQuery.ScrollTo, so the settings are valid for that plugin as well. * - jQuery.localScroll can be used if the desired links, are all over the document, it accepts the same settings. * - If the setting 'lazy' is set to true, then the binding will still work for later added anchors. * - The setting 'speed' is deprecated, use 'duration' instead. * - If onBefore returns false, the event is ignored. **/ ;(function( $ ){ var URI = location.href.replace(/#.*/,'');//local url without hash var $localScroll = $.localScroll = function( settings ){ $('body').localScroll( settings ); }; //Many of these defaults, belong to jQuery.ScrollTo, check it's demo for an example of each option. //@see http://www.freewebs.com/flesler/jQuery.ScrollTo/ $localScroll.defaults = {//the defaults are public and can be overriden. duration:1000, //how long to animate. axis:'y',//which of top and left should be modified. event:'click',//on which event to react. stop:true//avoid queuing animations /* lock:false,//ignore events if already animating lazy:false,//if true, links can be added later, and will still work. target:null, //what to scroll (selector or element). Keep it null if want to scroll the whole window. filter:null, //filter some anchors out of the matched elements. hash: false//if true, the hash of the selected link, will appear on the address bar. */ }; //if the URL contains a hash, it will scroll to the pointed element $localScroll.hash = function( settings ){ settings = $.extend( {}, $localScroll.defaults, settings ); settings.hash = false;//can't be true if( location.hash ) setTimeout(function(){ scroll( 0, location, settings ); }, 0 );//better wrapped with a setTimeout }; $.fn.localScroll = function( settings ){ settings = $.extend( {}, $localScroll.defaults, settings ); return ( settings.persistent || settings.lazy ) ? this.bind( settings.event, function( e ){//use event delegation, more links can be added later. var a = $([e.target, e.target.parentNode]).filter(filter)[0];//if a valid link was clicked. a && scroll( e, a, settings );//do scroll. }) : this.find('a')//bind concretely, to each matching link .filter( filter ).bind( settings.event, function(e){ scroll( e, this, settings ); }).end() .end(); function filter(){//is this a link that points to an anchor and passes a possible filter ? href is checked to avoid a bug in FF. return !!this.href && !!this.hash && this.href.replace(this.hash,'') == URI && (!settings.filter || $(this).is( settings.filter )); }; }; function scroll( e, link, settings ){ var id = link.hash.slice(1), elem = document.getElementById(id) || document.getElementsByName(id)[0]; if ( elem ){ e && e.preventDefault(); var $target = $( settings.target || $.scrollTo.window() );//if none specified, then the window. if( settings.lock && $target.is(':animated') || settings.onBefore && settings.onBefore.call(link, e, elem, $target) === false ) return; if( settings.stop ) $target.queue('fx',[]).stop();//remove all its animations $target .scrollTo( elem, settings )//do scroll .trigger('notify.serialScroll',[elem]);//notify serialScroll about this change if( settings.hash ) $target.queue(function(){ location = link.hash; }); } }; })( jQuery );
JavaScript
// when the DOM is ready... $(document).ready(function () { var $panels = $('#slider .scrollContainer > div'); var $container = $('#slider .scrollContainer'); // if false, we'll float all the panels left and fix the width // of the container var horizontal = false; // float the panels left if we're going horizontal if (horizontal) { $panels.css({ 'float' : 'left', 'position' : 'relative' // IE fix to ensure overflow is hidden }); // calculate a new width for the container (so it holds all panels) $container.css('width', $panels[0].offsetWidth * $panels.length); } // collect the scroll object, at the same time apply the hidden overflow // to remove the default scrollbars that will appear var $scroll = $('#slider .scroll').css('overflow', 'hidden'); // apply our left + right buttons $scroll .before('<img class="scrollButtons left" src="" />') .after('<img class="scrollButtons right" src="" />'); // handle nav selection function selectNav() { $(this) .parents('ul:first') .find('a') .removeClass('selected') .end() .end() .addClass('selected'); } $('#slider .navigation').find('a').click(selectNav); // go find the navigation link that has this target and select the nav function trigger(data) { var el = $('#slider .navigation').find('a[href$="' + data.id + '"]').get(0); selectNav.call(el); } if (window.location.hash) { trigger({ id : window.location.hash.substr(1) }); } else { $('ul.navigation a:first').click(); } // offset is used to move to *exactly* the right place, since I'm using // padding on my example, I need to subtract the amount of padding to // the offset. Try removing this to get a good idea of the effect var offset = parseInt((horizontal ? $container.css('paddingTop') : $container.css('paddingLeft')) || 0) * -1; var scrollOptions = { target: $scroll, // the element that has the overflow // can be a selector which will be relative to the target items: $panels, navigation: '.navigation a', // selectors are NOT relative to document, i.e. make sure they're unique prev: 'img.left', next: 'img.right', // allow the scroll effect to run both directions axis: 'xy', onAfter: trigger, // our final callback offset: offset, // duration of the sliding effect duration: 500, // easing - can be used with the easing plugin: // http://gsgd.co.uk/sandbox/jquery/easing/ easing: 'swing' }; // apply serialScroll to the slider - we chose this plugin because it // supports// the indexed next and previous scroll along with hooking // in to our navigation. $('#slider').serialScroll(scrollOptions); // now apply localScroll to hook any other arbitrary links to trigger // the effect $.localScroll(scrollOptions); // finally, if the URL has a hash, move the slider in to position, // setting the duration to 1 because I don't want it to scroll in the // very first page load. We don't always need this, but it ensures // the positioning is absolutely spot on when the pages loads. scrollOptions.duration = 1; $.localScroll.hash(scrollOptions); });
JavaScript
/** * jQuery.serialScroll * Copyright (c) 2007-2008 Ariel Flesler - aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 3/20/2008 * * @projectDescription Animated scrolling of series. * @author Ariel Flesler * @version 1.2.1 * * @id jQuery.serialScroll * @id jQuery.fn.serialScroll * @param {Object} settings Hash of settings, it is passed in to jQuery.ScrollTo, none is required. * @return {jQuery} Returns the same jQuery object, for chaining. * * http://flesler.blogspot.com/2008/02/jqueryserialscroll.html * * Notes: * - The plugin requires jQuery.ScrollTo. * - The hash of settings, is passed to jQuery.ScrollTo, so its settings can be used as well. */ ;(function( $ ){ var $serialScroll = $.serialScroll = function( settings ){ $.scrollTo.window().serialScroll( settings ); }; //Many of these defaults, belong to jQuery.ScrollTo, check it's demo for an example of each option. //@see http://flesler.webs/jQuery.ScrollTo/ $serialScroll.defaults = {//the defaults are public and can be overriden. duration:1000, //how long to animate. axis:'x', //which of top and left should be scrolled event:'click', //on which event to react. start:0, //first element (zero-based index) step:1, //how many elements to scroll on each action lock:true,//ignore events if already animating cycle:true, //cycle endlessly ( constant velocity ) constant:true //use contant speed ? /* navigation:null,//if specified, it's a selector a collection of items to navigate the container target:null, //if specified, it's a selector to the element to be scrolled. interval:0, //it's the number of milliseconds to automatically go to the next lazy:false,//go find the elements each time (allows AJAX or JS content, or reordering) stop:false, //stop any previous animations to avoid queueing force:false,//force the scroll to the first element on start ? jump: false,//if true, when the event is triggered on an element, the pane scrolls to it items:null, //selector to the items (relative to the matched elements) prev:null, //selector to the 'prev' button next:null, //selector to the 'next' button onBefore: function(){}, //function called before scrolling, if it returns false, the event is ignored exclude:0 //exclude the last x elements, so we cannot scroll past the end */ }; $.fn.serialScroll = function( settings ){ settings = $.extend( {}, $serialScroll.defaults, settings ); var event = settings.event, //this one is just to get shorter code when compressed step = settings.step, // idem lazy = settings.lazy;//idem return this.each(function(){ var context = settings.target ? this : document, //if a target is specified, then everything's relative to 'this'. $pane = $(settings.target || this, context),//the element to be scrolled (will carry all the events) pane = $pane[0], //will be reused, save it into a variable items = settings.items, //will hold a lazy list of elements active = settings.start, //active index auto = settings.interval, //boolean, do auto or not nav = settings.navigation, //save it now to make the code shorter timer; //holds the interval id if( !lazy )//if not lazy, go get the items now items = getItems(); if( settings.force ) jump( {}, active );//generate an initial call // Button binding, optionall $(settings.prev||[], context).bind( event, -step, move ); $(settings.next||[], context).bind( event, step, move ); // Custom events bound to the container if( !pane.ssbound )//don't bind more than once $pane .bind('prev.serialScroll', -step, move ) //you can trigger with just 'prev' .bind('next.serialScroll', step, move ) //for example: $(container).trigger('next'); .bind('goto.serialScroll', jump ); //for example: $(container).trigger('goto', [4] ); if( auto ) $pane .bind('start.serialScroll', function(e){ if( !auto ){ clear(); auto = true; next(); } }) .bind('stop.serialScroll', function(){//stop a current animation clear(); auto = false; }); $pane.bind('notify.serialScroll', function(e, elem){//let serialScroll know that the index changed externally var i = index(elem); if( i > -1 ) active = i; }); pane.ssbound = true;//avoid many bindings if( settings.jump )//can't use jump if using lazy items and a non-bubbling event (lazy ? $pane : getItems()).bind( event, function( e ){ jump( e, index(e.target) ); }); if( nav ) nav = $(nav, context).bind(event, function( e ){ e.data = Math.round(getItems().length / nav.length) * nav.index(this); jump( e, this ); }); function move( e ){ e.data += active; jump( e, this ); }; function jump( e, button ){ if( !isNaN(button) ){//initial or special call from the outside $(container).trigger('goto',[index]); e.data = button; button = pane; } var pos = e.data, n, real = e.type, //is a real event triggering ? $items = settings.exclude ? getItems().slice(0,-settings.exclude) : getItems(),//handle a possible exclude limit = $items.length, elem = $items[pos], duration = settings.duration; if( real )//real event object e.preventDefault(); if( auto ){ clear();//clear any possible automatic scrolling. timer = setTimeout( next, settings.interval ); } if( !elem ){ //exceeded the limits n = pos < 0 ? 0 : limit - 1; if( active != n )//we exceeded for the first time pos = n; else if( !settings.cycle )//this is a bad case return; else pos = limit - n - 1;//invert, go to the other side elem = $items[pos]; } if( !elem || real && active == pos || //could happen, save some CPU cycles in vain settings.lock && $pane.is(':animated') || //no animations while busy real && settings.onBefore && //callback returns false ? settings.onBefore.call(button, e, elem, $pane, getItems(), pos) === false ) return; if( settings.stop ) $pane.queue('fx',[]).stop();//remove all its animations if( settings.constant ) duration = Math.abs(duration/step * (active - pos ));//keep constant velocity $pane .scrollTo( elem, duration, settings )//do scroll .trigger('notify.serialScroll',[pos]);//in case serialScroll was called on this elem more than once. }; function next(){//I'll use the namespace to avoid conflicts $pane.trigger('next.serialScroll'); }; function clear(){ clearTimeout(timer); }; function getItems(){ return $( items, pane ); }; function index( elem ){ if( !isNaN(elem) ) return elem;//number var $items = getItems(), i; while(( i = $items.index(elem)) == -1 && elem != pane )//see if it matches or one of its ancestors elem = elem.parentNode; return i; }; }); }; })( jQuery );
JavaScript
/* * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/ * * Uses the built in easing capabilities added In jQuery 1.1 * to offer multiple easing options * * TERMS OF USE - jQuery Easing * * Open source under the BSD License. * * Copyright © 2008 George McGinley Smith * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */ // t: current time, b: begInnIng value, c: change In value, d: duration jQuery.easing['jswing'] = jQuery.easing['swing']; jQuery.extend( jQuery.easing, { def: 'easeOutQuad', swing: function (x, t, b, c, d) { //alert(jQuery.easing.default); return jQuery.easing[jQuery.easing.def](x, t, b, c, d); }, easeInQuad: function (x, t, b, c, d) { return c*(t/=d)*t + b; }, easeOutQuad: function (x, t, b, c, d) { return -c *(t/=d)*(t-2) + b; }, easeInOutQuad: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; return -c/2 * ((--t)*(t-2) - 1) + b; }, easeInCubic: function (x, t, b, c, d) { return c*(t/=d)*t*t + b; }, easeOutCubic: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t + 1) + b; }, easeInOutCubic: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t + b; return c/2*((t-=2)*t*t + 2) + b; }, easeInQuart: function (x, t, b, c, d) { return c*(t/=d)*t*t*t + b; }, easeOutQuart: function (x, t, b, c, d) { return -c * ((t=t/d-1)*t*t*t - 1) + b; }, easeInOutQuart: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t + b; return -c/2 * ((t-=2)*t*t*t - 2) + b; }, easeInQuint: function (x, t, b, c, d) { return c*(t/=d)*t*t*t*t + b; }, easeOutQuint: function (x, t, b, c, d) { return c*((t=t/d-1)*t*t*t*t + 1) + b; }, easeInOutQuint: function (x, t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b; return c/2*((t-=2)*t*t*t*t + 2) + b; }, easeInSine: function (x, t, b, c, d) { return -c * Math.cos(t/d * (Math.PI/2)) + c + b; }, easeOutSine: function (x, t, b, c, d) { return c * Math.sin(t/d * (Math.PI/2)) + b; }, easeInOutSine: function (x, t, b, c, d) { return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b; }, easeInExpo: function (x, t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; }, easeOutExpo: function (x, t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; }, easeInOutExpo: function (x, t, b, c, d) { if (t==0) return b; if (t==d) return b+c; if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b; return c/2 * (-Math.pow(2, -10 * --t) + 2) + b; }, easeInCirc: function (x, t, b, c, d) { return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b; }, easeOutCirc: function (x, t, b, c, d) { return c * Math.sqrt(1 - (t=t/d-1)*t) + b; }, easeInOutCirc: function (x, t, b, c, d) { if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b; return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b; }, easeInElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; }, easeOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; }, easeInOutElastic: function (x, t, b, c, d) { var s=1.70158;var p=0;var a=c; if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); if (a < Math.abs(c)) { a=c; var s=p/4; } else var s = p/(2*Math.PI) * Math.asin (c/a); if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; }, easeInBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*(t/=d)*t*((s+1)*t - s) + b; }, easeOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; }, easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; }, easeInBounce: function (x, t, b, c, d) { return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b; }, easeOutBounce: function (x, t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } }, easeInOutBounce: function (x, t, b, c, d) { if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b; return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b; } }); /* * * TERMS OF USE - EASING EQUATIONS * * Open source under the BSD License. * * Copyright © 2001 Robert Penner * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list * of conditions and the following disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the author nor the names of contributors may be used to endorse * or promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * */
JavaScript
/** * The accessibleList plugin provides two transformations to improve lists display: * - truncate list to a given length, and add a 'more' button to reveal the whole list * - paginate long lists so they are easier to read * Each effect can be used without the other, or simultaneously */ (function($) { /** * Add controls to a list */ $.fn.accessibleList = function(options) { var settings = $.extend({}, $.fn.accessibleList.defaults, options); var inited = false; this.each(function(i) { var list = $(this); var lines = list.children(); var listNode = list; var currentPage; var pagination = false; // Detect lag in rendering (IE...) if (list.height() == 0) { setTimeout(function() { list.accessibleList(options); }, 20); return; } // Setup list.css('overflow', 'hidden').addClass('relative'); var listHeight = list.height(); if (settings.pageSize && lines.length > settings.pageSize) { var nbPages = Math.max(1, Math.ceil(lines.length/settings.pageSize)); currentPage = Math.max(1, Math.min(nbPages, settings.startPage)); // Setup pages var width = list.width(); list.width(width); var linePage = 0; var lineRow = 0; var height = 0; listHeight = 0; lines.addClass('absolute').css({ width: (width-parseInt(lines.css('padding-left'))-parseInt(lines.css('padding-right')))+'px', overflow: 'hidden', textOverflow: 'ellipsis' }).each(function(i) { var line = $(this); line.css('top', height+'px').css('left', (linePage*100)+'%'); height += line.outerHeight(); ++lineRow; if (lineRow == settings.pageSize) { // Detect listHeight if (height > listHeight) { listHeight = height; } ++linePage; lineRow = 0; height = 0; } else { height += parseInt(line.css('margin-bottom')); } }).attr('scrollLeft', (currentPage-1)*width); list.height(listHeight); // Create pagination pagination = listNode.after('<ul class="small-pagination"></ul>').next(); for (number = 0; number < nbPages; ++number) { pagination.append(' <li><a href="#" title="Page '+(number+1)+'">'+(number+1)+'</a></li>'); } var links = pagination.find('a'); links.click(function(event) { // Stop link action event.preventDefault(); var element = $(this); // Page number currentPage = parseInt(element.text()); if (isNaN(currentPage)) { currentPage = 1; } // Show page var scrollVal = (currentPage-1)*width; if (inited && settings.animate) { list.animate({scrollLeft: scrollVal}); } else { list.attr('scrollLeft', scrollVal); } // Style element.parent().addClass('current').siblings().removeClass('current'); if (currentPage == 1) { pagination.find('li.prev').css('visibility', 'hidden'); } else { pagination.find('li.prev').css('visibility', 'visible'); } if (currentPage == nbPages) { pagination.find('li.next').css('visibility', 'hidden'); } else { pagination.find('li.next').css('visibility', 'visible'); } // Callback if (settings.after) { settings.after.call(list.get(0)); } }); // Prev / next buttons pagination.prepend('<li class="prev"><a href="#">Prev</a></li>').find('li.prev a').click(function() { pagination.find('li.current').prev().not('.prev').children('a').trigger('click'); }); pagination.append(' <li class="next"><a href="#">Next</a></li>').find('li.next a').click(function() { pagination.find('li.current').next().not('.next').children('a').trigger('click'); }); // First update links.eq(currentPage-1).trigger('click'); // Prepare for next condition listNode = pagination; } if (settings.moreAfter && lines.length > settings.moreAfter) { var expanded = true; var more = $('<a href="#" class="search-less">'+settings.lessText+'</a>').insertAfter(listNode).click(function(event) { // Stop link action event.preventDefault(); // Detect mode if (!expanded) { if (inited && settings.animate) { list.animate({'height':listHeight}); } else { list.css({'height':listHeight}); } // Pagination if (pagination) { if (inited && settings.animate) { pagination.expand(); } else { pagination.show(); } } // More button more.removeClass('search-more').addClass('search-less').text(settings.lessText); expanded = true; } else { // Gather visible elements if (settings.pageSize && lines.length > settings.pageSize) { var visibleLines = lines; var rangeStart = (currentPage-1)*settings.pageSize; if (rangeStart > 0) { visibleLines = visibleLines.filter(':gt('+(rangeStart-1)+')'); } visibleLines = visibleLines.filter(':lt('+settings.moreAfter+')'); } else { var visibleLines = lines.filter(':lt('+settings.moreAfter+')'); } // Calculate visible height var visibleHeight = 0; var visibleCount = visibleLines.length; visibleLines.each(function(i) { visibleHeight += $(this).outerHeight(); if (i < visibleCount-1) { visibleHeight += parseInt($(this).css('margin-bottom')); } }); if (inited && settings.animate) { list.animate({'height': visibleHeight}); } else { list.css({'height': visibleHeight}); } // Pagination if (pagination) { if (inited && settings.animate) { pagination.fold(); } else { pagination.hide(); } } // More button more.removeClass('search-less').addClass('search-more').text(settings.moreText); expanded = false; } // Callback if (settings.after) { settings.after.call(list.get(0)); } }); if (!settings.openedOnStart) { more.trigger('click'); } } }); // List ready inited = true; return this; }; $.fn.accessibleList.defaults = { /** * Max number of visible lines in each list above 'more' button (0 for no masking) * @var int */ moreAfter: 2, /** * Number of visible matches per page (0 for no pagination) * @var int */ pageSize: 7, /** * Number of page displayed on startup * @var int */ startPage: 1, /** * Tell wether the list should be expanded on startup (ignored if moreAfter is on 0) * @var boolean */ openedOnStart: false, /** * Enable animation on list expand/page change * @var boolean */ animate: true, /** * Text for the 'more' button * @var string */ moreText: 'More', /** * Text for the 'less' button * @var string */ lessText: 'Less', /** * Callback function after collapsing/expading/changing page. 'this' is the target list * @var function|boolean */ after: false }; })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Slovenian localisation for jQuery Datepicker. Written by Jaka Jancar (jaka@kubje.org). */ /* c = &#x10D;, s = &#x161; z = &#x17E; C = &#x10C; S = &#x160; Z = &#x17D; */ (function($) { $.datepick.regional['sl'] = { monthNames: ['Januar','Februar','Marec','April','Maj','Junij', 'Julij','Avgust','September','Oktober','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Avg','Sep','Okt','Nov','Dec'], dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','&#x10C;etrtek','Petek','Sobota'], dayNamesShort: ['Ned','Pon','Tor','Sre','&#x10C;et','Pet','Sob'], dayNamesMin: ['Ne','Po','To','Sr','&#x10C;e','Pe','So'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&lt;Prej&#x161;nji', prevStatus: 'Prika&#x17E;i prej&#x161;nji mesec', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Naslednji&gt;', nextStatus: 'Prika&#x17E;i naslednji mesec', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Trenutni', currentStatus: 'Prika&#x17E;i trenutni mesec', todayText: 'Trenutni', todayStatus: 'Prika&#x17E;i trenutni mesec', clearText: 'Izbri&#x161;i', clearStatus: 'Izbri&#x161;i trenutni datum', closeText: 'Zapri', closeStatus: 'Zapri brez spreminjanja', yearStatus: 'Prika&#x17E;i drugo leto', monthStatus: 'Prika&#x17E;i drug mesec', weekText: 'Teden', weekStatus: 'Teden v letu', dayStatus: 'Izberi DD, d MM yy', defaultStatus: 'Izbira datuma', isRTL: false }; $.datepick.setDefaults($.datepick.regional['sl']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html French localisation for jQuery Datepicker. Stéphane Nahmani (sholby@sholby.net). */ (function($) { $.datepick.regional['fr'] = { monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin', 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'], monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun', 'Jul','Aoû','Sep','Oct','Nov','Déc'], dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'], dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'], dateFormat: 'dd/mm/yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Préc', prevStatus: 'Voir le mois précédent', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: 'Voir l\'année précédent', nextText: 'Suiv&#x3e;', nextStatus: 'Voir le mois suivant', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: 'Voir l\'année suivant', currentText: 'Courant', currentStatus: 'Voir le mois courant', todayText: 'Aujourd\'hui', todayStatus: 'Voir aujourd\'hui', clearText: 'Effacer', clearStatus: 'Effacer la date sélectionnée', closeText: 'Fermer', closeStatus: 'Fermer sans modifier', yearStatus: 'Voir une autre année', monthStatus: 'Voir un autre mois', weekText: 'Sm', weekStatus: 'Semaine de l\'année', dayStatus: '\'Choisir\' le DD d MM', defaultStatus: 'Choisir la date', isRTL: false }; $.datepick.setDefaults($.datepick.regional['fr']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Swedish localisation for jQuery Datepicker. Written by Anders Ekdahl ( anders@nomadiz.se). */ (function($) { $.datepick.regional['sv'] = { monthNames: ['Januari','Februari','Mars','April','Maj','Juni', 'Juli','Augusti','September','Oktober','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aug','Sep','Okt','Nov','Dec'], dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'], dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'], dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'], dateFormat: 'yyyy-mm-dd', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&laquo;Förra', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Nästa&raquo;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Idag', currentStatus: '', todayText: 'Idag', todayStatus: '', clearText: 'Rensa', clearStatus: '', closeText: 'Stäng', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Ve', weekStatus: '', dayStatus: 'D, M d', defauktStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['sv']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Serbian localisation for jQuery Datepicker. Written by Dejan Dimić. */ (function($){ $.datepick.regional['sr-SR'] = { monthNames: ['Januar','Februar','Mart','April','Maj','Jun', 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Avg','Sep','Okt','Nov','Dec'], dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'], dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'], dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], dateFormat: 'dd/mm/yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;', prevStatus: 'Prikaži prethodni mesec', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: 'Prikaži prethodnu godinu', nextText: '&#x3e;', nextStatus: 'Prikaži sledeći mesec', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: 'Prikaži sledeću godinu', currentText: 'Danas', currentStatus: 'Tekući mesec', todayText: 'Danas', todayStatus: 'Tekući mesec', clearText: 'Obriši', clearStatus: 'Obriši trenutni datum', closeText: 'Zatvori', closeStatus: 'Zatvori kalendar', yearStatus: 'Prikaži godine', monthStatus: 'Prikaži mesece', weekText: 'Sed', weekStatus: 'Sedmica', dayStatus: '\'Datum\' D, M d', defaultStatus: 'Odaberi datum', isRTL: false }; $.datepick.setDefaults($.datepick.regional['sr-SR']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Armenian localisation for jQuery Datepicker. Written by Levon Zakaryan (levon.zakaryan@gmail.com)*/ (function($) { $.datepick.regional['hy'] = { monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս', 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'], monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս', 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'], dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'], dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Նախ.', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Հաջ.&#x3e;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Այսօր', currentStatus: '', todayText: 'Այսօր', todayStatus: '', clearText: 'Մաքրել', clearStatus: '', closeText: 'Փակել', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'ՇԲՏ', weekStatus: '', dayStatus: 'D, M d', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['hy']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Albanian localisation for jQuery Datepicker. Written by Flakron Bytyqi (flakron@gmail.com). */ (function($) { $.datepick.regional['sq'] = { monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor', 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'], monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer', 'Kor','Gus','Sht','Tet','Nën','Dhj'], dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'], dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'], dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;mbrapa', prevStatus: 'trego muajin e fundit', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Përpara&#x3e;', nextStatus: 'trego muajin tjetër', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'sot', currentStatus: '', todayText: 'sot', todayStatus: '', clearText: 'fshije', clearStatus: 'fshije datën aktuale', closeText: 'mbylle', closeStatus: 'mbylle pa ndryshime', yearStatus: 'trego tjetër vit', monthStatus: 'trego muajin tjetër', weekText: 'Ja', weekStatus: 'Java e muajit', dayStatus: '\'Zgjedh\' D, M d', defaultStatus: 'Zgjedhe një datë', isRTL: false }; $.datepick.setDefaults($.datepick.regional['sq']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Romanian localisation for jQuery Datepicker. Written by Edmond L. (ll_edmond@walla.com) and Ionut G. Stan (ionut.g.stan@gmail.com). */ (function($) { $.datepick.regional['ro'] = { monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie', 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'], monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun', 'Iul', 'Aug', 'Sep', 'Oct', 'Noi', 'Dec'], dayNames: ['Duminică', 'Luni', 'Marti', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'], dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'], dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&laquo;Precedenta', prevStatus: 'Arata luna precedenta', prevJumpText: '&laquo;&laquo;', prevJumpStatus: '', nextText: 'Urmatoare&raquo;', nextStatus: 'Arata luna urmatoare', nextJumpText: '&raquo;&raquo;', nextJumpStatus: '', currentText: 'Azi', currentStatus: 'Arata luna curenta', todayText: 'Azi', todayStatus: 'Arata luna curenta', clearText: 'Curat', clearStatus: 'Sterge data curenta', closeText: 'Închide', closeStatus: 'Închide fara schimbare', yearStatus: 'Arat un an diferit', monthStatus: 'Arata o luna diferita', weekText: 'Săpt', weekStatus: 'Săptamana anului', dayStatus: 'Selecteaza D, M d', defaultStatus: 'Selecteaza o data', isRTL: false }; $.datepick.setDefaults($.datepick.regional['ro']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Greek localisation for jQuery Datepicker. Written by Alex Cicovic (http://www.alexcicovic.com) */ (function($) { $.datepick.regional['el'] = { monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος', 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'], monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν', 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'], dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'], dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'], dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'], dateFormat: 'dd/mm/yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: 'Προηγούμενος', prevStatus: 'Επισκόπηση προηγούμενου μήνα', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Επόμενος', nextStatus: 'Επισκόπηση επόμενου μήνα', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Τρέχων Μήνας', currentStatus: 'Επισκόπηση τρέχοντος μήνα', todayText: 'Τρέχων Μήνας', todayStatus: 'Επισκόπηση τρέχοντος μήνα', clearText: 'Σβήσιμο', clearStatus: 'Σβήσιμο της επιλεγμένης ημερομηνίας', closeText: 'Κλείσιμο', closeStatus: 'Κλείσιμο χωρίς αλλαγή', yearStatus: 'Επισκόπηση άλλου έτους', monthStatus: 'Επισκόπηση άλλου μήνα', weekText: 'Εβδ', weekStatus: '', dayStatus: 'Επιλογή DD d MM', defaultStatus: 'Επιλέξτε μια ημερομηνία', isRTL: false }; $.datepick.setDefaults($.datepick.regional['el']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Swiss-German localisation for jQuery Datepicker. Written by Douglas Jose & Juerg Meier. */ (function($) { $.datepick.regional['de-CH'] = { monthNames: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'], monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', 'Jul','Aug','Sep','Okt','Nov','Dez'], dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'nächster&#x3e;', nextStatus: 'nächsten Monat zeigen', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'heute', currentStatus: '', todayText: 'heute', todayStatus: '', clearText: 'löschen', clearStatus: 'aktuelles Datum löschen', closeText: 'schliessen', closeStatus: 'ohne Änderungen schliessen', yearStatus: 'anderes Jahr anzeigen', monthStatus: 'anderen Monat anzeigen', weekText: 'Wo', weekStatus: 'Woche des Monats', dayStatus: 'Wähle D, M d', defaultStatus: 'Wähle ein Datum', isRTL: false }; $.datepick.setDefaults($.datepick.regional['de-CH']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Russian localisation for jQuery Datepicker. Written by Andrew Stromnov (stromnov@gmail.com). */ (function($) { $.datepick.regional['ru'] = { monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь', 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'], monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн', 'Июл','Авг','Сен','Окт','Ноя','Дек'], dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'], dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'], dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Пред', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'След&#x3e;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Сегодня', currentStatus: '', todayText: 'Сегодня', todayStatus: '', clearText: 'Очистить', clearStatus: '', closeText: 'Закрыть', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Не', weekStatus: '', dayStatus: 'D, M d', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['ru']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Datepicker extensions for jQuery v4.0.3. Written by Keith Wood (kbwood{at}iinet.com.au) August 2009. Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. Please attribute the author if you use it. */ (function($) { // Hide scope, no $ conflict var themeRollerRenderer = { picker: '<div{popup:start} id="ui-datepicker-div"{popup:end} class="ui-datepicker ui-widget ' + 'ui-widget-content ui-helper-clearfix ui-corner-all{inline:start} ui-datepicker-inline{inline:end}">' + '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">' + '{link:prev}{link:today}{link:next}</div>{months}' + '{popup:start}<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ' + 'ui-corner-all">{button:clear}{button:close}</div>{popup:end}' + '<div class="ui-helper-clearfix"></div></div>', monthRow: '<div class="ui-datepicker-row-break">{months}</div>', month: '<div class="ui-datepicker-group">' + '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">{monthHeader:MM yyyy}</div>' + '<table class="ui-datepicker-calendar"><thead>{weekHeader}</thead><tbody>{weeks}</tbody></table></div>', weekHeader: '<tr>{days}</tr>', dayHeader: '<th>{day}</th>', week: '<tr>{days}</tr>', day: '<td>{day}</td>', monthSelector: '.ui-datepicker-group', daySelector: 'td', rtlClass: 'ui-datepicker-rtl', multiClass: 'ui-datepicker-multi', defaultClass: 'ui-state-default', selectedClass: 'ui-state-active', highlightedClass: 'ui-state-hover', todayClass: 'ui-state-highlight', otherMonthClass: 'ui-datepicker-other-month', weekendClass: 'ui-datepicker-week-end', commandClass: 'ui-datepicker-cmd', commandButtonClass: 'ui-state-default ui-corner-all', commandLinkClass: '', disabledClass: 'ui-datepicker-disabled' }; $.extend($.datepick, { // Template for generating a datepicker showing week of year. weekOfYearRenderer: $.extend({}, $.datepick.defaultRenderer, { weekHeader: '<tr><th class="datepick-week">' + '<span title="{l10n:weekStatus}">{l10n:weekText}</span></th>{days}</tr>', week: '<tr><td class="datepick-week">{weekOfYear}</td>{days}</tr>' }), // ThemeRoller template for generating a datepicker. themeRollerRenderer: themeRollerRenderer, // ThemeRoller template for generating a datepicker showing week of year. themeRollerWeekOfYearRenderer: $.extend({}, themeRollerRenderer, { weekHeader: '<tr><th class="ui-state-hover"><span>{l10n:weekText}</span></th>{days}</tr>', week: '<tr><td class="ui-state-hover">{weekOfYear}</td>{days}</tr>' }), /* Don't allow weekends to be selected. Usage: onDate: $.datepick.noWeekends. @param date (Date) the current date @return (object) information about this date */ noWeekends: function(date) { return {selectable: (date.getDay() || 7) < 6}; }, /* Change the first day of the week by clicking on the day header. Usage: onShow: $.datepick.changeFirstDay. @param picker (jQuery) the completed datepicker division @param inst (object) the current instance settings */ changeFirstDay: function(picker, inst) { var target = $(this); picker.find('th span').each(function() { var parent = $(this).parent(); if (parent.is('.datepick-week') || parent.is('.ui-state-hover')) { return; } $('<a href="javascript:void(0)" class="' + this.className + '" title="Change first day of the week">' + $(this).text() + '</a>'). click(function() { var dow = parseInt(this.className.replace(/^.*datepick-dow-(\d+).*$/, '$1'), 10); target.datepick('option', {firstDay: dow}); }). replaceAll(this); }); }, /* Add a callback when hovering over dates. Usage: onShow: $.datepick.hoverCallback(handleHover). @param onHover (function) the callback when hovering, it receives the current date and a flag indicating selectability as parameters on entry, and no parameters on exit, this refers to the target input or division */ hoverCallback: function(onHover) { return function(picker, inst) { var target = this; var renderer = inst.get('renderer'); picker.find(renderer.daySelector + ' a, ' + renderer.daySelector + ' span'). hover(function() { onHover.apply(target, [$.datepick.retrieveDate(target, this), this.nodeName.toLowerCase() == 'a']); }, function() { onHover.apply(target, []); }); }; }, /* Highlight the entire week when hovering over it. Usage: onShow: $.datepick.highlightWeek. @param picker (jQuery) the completed datepicker division @param inst (object) the current instance settings */ highlightWeek: function(picker, inst) { var target = this; var renderer = inst.get('renderer'); picker.find(renderer.daySelector + ' a, ' + renderer.daySelector + ' span'). hover(function() { $(this).parents('tr').find(renderer.daySelector + ' *'). addClass(renderer.highlightedClass); }, function() { $(this).parents('tr').find(renderer.daySelector + ' *'). removeClass(renderer.highlightedClass); }); }, /* Show a status bar with messages. Usage: onShow: $.datepick.showStatus. @param picker (jQuery) the completed datepicker division @param inst (object) the current instance settings */ showStatus: function(picker, inst) { var renderer = inst.get('renderer'); var isTR = (renderer.selectedClass == themeRollerRenderer.selectedClass); var defaultStatus = inst.get('defaultStatus') || '&nbsp;'; var status = $('<div class="' + (!isTR ? 'datepick-status' : 'ui-datepicker-status ui-widget-header ui-helper-clearfix ui-corner-all') + '">' + defaultStatus + '</div>'). insertAfter(picker.find('.datepick-month-row:last,.ui-datepicker-row-break:last')); picker.find('*[title]').each(function() { var title = $(this).attr('title'); $(this).removeAttr('title').hover( function() { status.text(title || defaultStatus); }, function() { status.text(defaultStatus); }); }); }, /* Allow easier navigation by month/year. Usage: onShow: $.datepick.monthNavigation. @param picker (jQuery) the completed datepicker division @param inst (object) the current instance settings */ monthNavigation: function(picker, inst) { var target = $(this); var renderer = inst.get('renderer'); var isTR = (renderer.selectedClass == themeRollerRenderer.selectedClass); var minDate = inst.curMinDate(); var maxDate = inst.get('maxDate'); var monthNames = inst.get('monthNames'); var monthNamesShort = inst.get('monthNamesShort'); var month = inst.drawDate.getMonth(); var year = inst.drawDate.getFullYear(); var html = '<div class="' + (!isTR ? 'datepick-month-nav' : 'ui-datepicker-month-nav') + '"' + ' style="display: none;">'; for (var i = 0; i < monthNames.length; i++) { var inRange = ((!minDate || new Date(year, i + 1, 0).getTime() >= minDate.getTime()) && (!maxDate || new Date(year, i, 1).getTime() <= maxDate.getTime())); html += '<div>' + (inRange ? '<a href="#" class="dp' + new Date(year, i, 1).getTime() + '"' : '<span') + ' title="' + monthNames[i] + '">' + monthNamesShort[i] + (inRange ? '</a>' : '</span>') + '</div>'; } for (var i = -6; i <= 6; i++) { if (i == 0) { continue; } var inRange = ((!minDate || new Date(year + i, 12 - 1, 31).getTime() >= minDate.getTime()) && (!maxDate || new Date(year + i, 1 - 1, 1).getTime() <= maxDate.getTime())); html += '<div>' + (inRange ? '<a href="#" class="dp' + new Date(year + i, month, 1).getTime() + '"' : '<span') + ' title="' + (year + i) + '">' + (year + i) + (inRange ? '</a>' : '</span>') + '</div>'; } html += '</div>'; html = $(html).insertAfter(picker.find('div.datepick-nav,div.ui-datepicker-header:first')); html.find('a').click(function() { var date = $.datepick.retrieveDate(target[0], this); target.datepick('showMonth', date.getFullYear(), date.getMonth() + 1); return false; }); picker.find('div.datepick-month-header,div.ui-datepicker-month-header').click(function() { html.slideToggle(); }).css('cursor', 'pointer'); }, /* Select an entire week when clicking on a week number. Use in conjunction with weekOfYearRenderer or themeRollerWeekOfYearRenderer. Usage: onShow: $.datepick.selectWeek. @param picker (jQuery) the completed datepicker division @param inst (object) the current instance settings */ selectWeek: function(picker, inst) { var target = $(this); picker.find('td.datepick-week span,td.ui-state-hover span').each(function() { $('<a href="javascript:void(0)" class="' + this.className + '" title="Select the entire week">' + $(this).text() + '</a>'). click(function() { var date = target.datepick('retrieveDate', this); var dates = [date]; for (var i = 1; i < 7; i++) { dates.push(date = $.datepick.add($.datepick.newDate(date), 1, 'd')); } if (inst.get('rangeSelect')) { dates.splice(1, dates.length - 2); } target.datepick('setDate', dates).datepick('hide'); }). replaceAll(this); }); }, /* Select an entire month when clicking on the week header. Use in conjunction with weekOfYearRenderer or themeRollerWeekOfYearRenderer. Usage: onShow: $.datepick.selectMonth. @param picker (jQuery) the completed datepicker division @param inst (object) the current instance settings */ selectMonth: function(picker, inst) { var target = $(this); picker.find('th.datepick-week span,th.ui-state-hover span').each(function() { $('<a href="javascript:void(0)" title="Select the entire month">' + $(this).text() + '</a>'). click(function() { var date = target.datepick('retrieveDate', $(this).parents('table'). find('td:not(.datepick-week):not(.ui-state-hover) ' + '*:not(.datepick-other-month):not(.ui-datepicker-other-month)')[0]); var dates = [date]; var dim = $.datepick.daysInMonth(date); for (var i = 1; i < dim; i++) { dates.push(date = $.datepick.add($.datepick.newDate(date), 1, 'd')); } if (inst.get('rangeSelect')) { dates.splice(1, dates.length - 2); } target.datepick('setDate', dates).datepick('hide'); }). replaceAll(this); }); }, /* Select a month only instead of a single day. Usage: onShow: $.datepick.monthOnly. @param picker (jQuery) the completed datepicker division @param inst (object) the current instance settings */ monthOnly: function(picker, inst) { var target = $(this); var selectMonth = $('<div style="text-align: center;"><button type="button">Select</button></div>'). insertAfter(picker.find('.datepick-month-row:last,.ui-datepicker-row-break:last')). children().click(function() { var monthYear = picker.find('.datepick-month-year:first').val().split('/'); target.datepick('setDate', $.datepick.newDate( parseInt(monthYear[1], 10), parseInt(monthYear[0], 10), 1)). datepick('hide'); }); picker.find('.datepick-month-row table,.ui-datepicker-row-break table').remove(); } }); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Icelandic localisation for jQuery Datepicker. Written by Haukur H. Thorsson (haukur@eskill.is). */ (function($) { $.datepick.regional['is'] = { monthNames: ['Jan&uacute;ar','Febr&uacute;ar','Mars','Apr&iacute;l','Ma&iacute','J&uacute;n&iacute;', 'J&uacute;l&iacute;','&Aacute;g&uacute;st','September','Okt&oacute;ber','N&oacute;vember','Desember'], monthNamesShort: ['Jan','Feb','Mar','Apr','Ma&iacute;','J&uacute;n', 'J&uacute;l','&Aacute;g&uacute;','Sep','Okt','N&oacute;v','Des'], dayNames: ['Sunnudagur','M&aacute;nudagur','&THORN;ri&eth;judagur','Mi&eth;vikudagur','Fimmtudagur','F&ouml;studagur','Laugardagur'], dayNamesShort: ['Sun','M&aacute;n','&THORN;ri','Mi&eth;','Fim','F&ouml;s','Lau'], dayNamesMin: ['Su','M&aacute;','&THORN;r','Mi','Fi','F&ouml;','La'], dateFormat: 'dd/mm/yyyy', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&#x3c; Fyrri', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'N&aelig;sti &#x3e;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: '&Iacute; dag', currentStatus: '', todayText: '&Iacute; dag', todayStatus: '', clearText: 'Hreinsa', clearStatus: '', closeText: 'Loka', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Vika', weekStatus: '', dayStatus: 'D, M d', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['is']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Hong Kong Chinese localisation for jQuery Datepicker. Written by SCCY (samuelcychan@gmail.com). */ (function($) { $.datepick.regional['zh-HK'] = { monthNames: ['一月','二月','三月','四月','五月','六月', '七月','八月','九月','十月','十一月','十二月'], monthNamesShort: ['一','二','三','四','五','六', '七','八','九','十','十一','十二'], dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'], dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'], dayNamesMin: ['日','一','二','三','四','五','六'], dateFormat: 'dd-mm-yyyy', firstDay: 0, renderer: $.extend({}, $.datepick.defaultRenderer, {month: $.datepick.defaultRenderer.month. replace(/monthHeader/, 'monthHeader:yyyy年 MM')}), prevText: '&#x3c;上月', prevStatus: '顯示上月', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '顯示上一年', nextText: '下月&#x3e;', nextStatus: '顯示下月', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '顯示下一年', currentText: '今天', currentStatus: '顯示本月', todayText: '今天', todayStatus: '顯示本月', clearText: '清除', clearStatus: '清除已選日期', closeText: '關閉', closeStatus: '不改變目前的選擇', yearStatus: '選擇年份', monthStatus: '選擇月份', weekText: '周', weekStatus: '年內周次', dayStatus: '選擇 m月 d日, DD', defaultStatus: '請選擇日期', isRTL: false }; $.datepick.setDefaults($.datepick.regional['zh-HK']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Latvian localisation for jQuery Datepicker. Written by Arturas Paleicikas <arturas.paleicikas@metasite.net> */ (function($) { $.datepick.regional['lv'] = { monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs', 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'], monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn', 'Jūl','Aug','Sep','Okt','Nov','Dec'], dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'], dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'], dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'], dateFormat: 'dd-mm-yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: 'Iepr', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Nāka', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Šodien', currentStatus: '', todayText: 'Šodien', todayStatus: '', clearText: 'Notīrīt', clearStatus: '', closeText: 'Aizvērt', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Nav', weekStatus: '', dayStatus: 'D, M d', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['lv']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Hebrew localisation for jQuery Datepicker. Written by Amir Hardon (ahardon at gmail dot com). */ (function($) { $.datepick.regional['he'] = { monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני', 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'], monthNamesShort: ['1','2','3','4','5','6', '7','8','9','10','11','12'], dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'], dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], dateFormat: 'dd/mm/yyyy', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;הקודם', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'הבא&#x3e;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'היום', currentStatus: '', todayText: 'היום', todayStatus: '', clearText: 'נקה', clearStatus: '', closeText: 'סגור', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Wk', weekStatus: '', dayStatus: 'DD, M d', defaultStatus: '', isRTL: true }; $.datepick.setDefaults($.datepick.regional['he']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Faroese localisation for jQuery Datepicker. Written by Sverri Mohr Olsen, sverrimo@gmail.com */ (function($) { $.datepick.regional['fo'] = { monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni', 'Juli','August','September','Oktober','November','Desember'], monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun', 'Jul','Aug','Sep','Okt','Nov','Des'], dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'], dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'], dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'], dateFormat: 'dd-mm-yyyy', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Sísta', prevStatus: 'Vís sísta mánaðan', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: 'Vís sísta árið', nextText: 'Næsta&#x3e;', nextStatus: 'Vís næsta mánaðan', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: 'Vís næsta árið', currentText: 'Í dag', currentStatus: 'Vís mánaðan fyri í dag', todayText: 'Í dag', todayStatus: 'Vís mánaðan fyri í dag', clearText: 'Strika', clearStatus: 'Strika allir mánaðarnar', closeText: 'Goym', closeStatus: 'Goym hetta vindeyðga', yearStatus: 'Broyt árið', monthStatus: 'Broyt mánaðan', weekText: 'Vk', weekStatus: 'Vika av árinum', dayStatus: 'Vel DD, M d, yyyy', defaultStatus: 'Vel ein dato', isRTL: false }; $.datepick.setDefaults($.datepick.regional['fo']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Persian (Farsi) localisation for jQuery Datepicker. Javad Mowlanezhad -- jmowla@gmail.com */ (function($) { $.datepick.regional['fa'] = { monthNames: ['فروردين','ارديبهشت','خرداد','تير','مرداد','شهريور', 'مهر','آبان','آذر','دي','بهمن','اسفند'], monthNamesShort: ['1','2','3','4','5','6', '7','8','9','10','11','12'], dayNames: ['يکشنبه','دوشنبه','سه‌شنبه','چهارشنبه','پنجشنبه','جمعه','شنبه'], dayNamesShort: ['ي','د','س','چ','پ','ج', 'ش'], dayNamesMin: ['ي','د','س','چ','پ','ج', 'ش'], dateFormat: 'yyyy/mm/dd', firstDay: 6, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;قبلي', prevStatus: 'نمايش ماه قبل', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'بعدي&#x3e;', nextStatus: 'نمايش ماه بعد', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'امروز', currentStatus: 'نمايش ماه جاري', todayText: 'امروز', todayStatus: 'نمايش ماه جاري', clearText: 'حذف تاريخ', clearStatus: 'پاک کردن تاريخ جاري', closeText: 'بستن', closeStatus: 'بستن بدون اعمال تغييرات', yearStatus: 'نمايش سال متفاوت', monthStatus: 'نمايش ماه متفاوت', weekText: 'هف', weekStatus: 'هفتهِ سال', dayStatus: 'انتخاب D, M d', defaultStatus: 'انتخاب تاريخ', isRTL: true }; $.datepick.setDefaults($.datepick.regional['fa']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Vietnamese localisation for jQuery Datepicker. Translated by Le Thanh Huy (lthanhhuy@cit.ctu.edu.vn). */ (function($) { $.datepick.regional['vi'] = { monthNames: ['Tháng Một', 'Tháng Hai', 'Tháng Ba', 'Tháng Tư', 'Tháng Năm', 'Tháng Sáu', 'Tháng Bảy', 'Tháng Tám', 'Tháng Chín', 'Tháng Mười', 'Tháng Mười Một', 'Tháng Mười Hai'], monthNamesShort: ['Tháng 1', 'Tháng 2', 'Tháng 3', 'Tháng 4', 'Tháng 5', 'Tháng 6', 'Tháng 7', 'Tháng 8', 'Tháng 9', 'Tháng 10', 'Tháng 11', 'Tháng 12'], dayNames: ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'], dayNamesShort: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], dayNamesMin: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], dateFormat: 'dd/mm/yyyy', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Trước', prevStatus: 'Tháng trước', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: 'Năm trước', nextText: 'Tiếp&#x3e;', nextStatus: 'Tháng sau', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: 'Năm sau', currentText: 'Hôm nay', currentStatus: 'Tháng hiện tại', todayText: 'Hôm nay', todayStatus: 'Tháng hiện tại', clearText: 'Xóa', clearStatus: 'Xóa ngày hiện tại', closeText: 'Đóng', closeStatus: 'Đóng và không lưu lại thay đổi', yearStatus: 'Năm khác', monthStatus: 'Tháng khác', weekText: 'Tu', weekStatus: 'Tuần trong năm', dayStatus: 'Đang chọn DD, \'ngày\' d M', defaultStatus: 'Chọn ngày', isRTL: false }; $.datepick.setDefaults($.datepick.regional['vi']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Azerbaijani localisation for jQuery Datepicker. Written by Jamil Najafov (necefov33@gmail.com). */ (function($) { $.datepick.regional['az'] = { monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun', 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'], monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun', 'İyul','Avq','Sen','Okt','Noy','Dek'], dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'], dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'], dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Geri', prevStatus: 'Əvvəlki ay', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: 'Əvvəlki il', nextText: 'İrəli&#x3e;', nextStatus: 'Sonrakı ay', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: 'Sonrakı il', currentText: 'Bugün', currentStatus: 'İndiki ay', todayText: 'Bugün', todayStatus: 'İndiki ay', clearText: 'Təmizlə', clearStatus: 'Tarixi sil', closeText: 'Bağla', closeStatus: 'Təqvimi bağla', yearStatus: 'Başqa il', monthStatus: 'Başqa ay', weekText: 'Hf', weekStatus: 'Həftələr', dayStatus: 'D, M d seçin', defaultStatus: 'Bir tarix seçin', isRTL: false }; $.datepick.setDefaults($.datepick.regional['az']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Norwegian localisation for jQuery Datepicker. Written by Naimdjon Takhirov (naimdjon@gmail.com). */ (function($) { $.datepick.regional['no'] = { monthNames: ['Januar','Februar','Mars','April','Mai','Juni', 'Juli','August','September','Oktober','November','Desember'], monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jun', 'Jul','Aug','Sep','Okt','Nov','Des'], dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], dateFormat: 'yyyy-mm-dd', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&laquo;Forrige', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Neste&raquo;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'I dag', currentStatus: '', todayText: 'I dag', todayStatus: '', clearText: 'Tøm', clearStatus: '', closeText: 'Lukk', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Uke', weekStatus: '', dayStatus: 'D, M d', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['no']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Esperanto localisation for jQuery Datepicker. Written by Olivier M. (olivierweb@ifrance.com). */ (function($) { $.datepick.regional['eo'] = { monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio', 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aŭg','Sep','Okt','Nov','Dec'], dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'], dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'], dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'], dateFormat: 'dd/mm/yyyy', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&lt;Anta', prevStatus: 'Vidi la antaŭan monaton', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Sekv&gt;', nextStatus: 'Vidi la sekvan monaton', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Nuna', currentStatus: 'Vidi la nunan monaton', todayText: 'Nuna', todayStatus: 'Vidi la nunan monaton', clearText: 'Vakigi', clearStatus: '', closeText: 'Fermi', closeStatus: 'Fermi sen modifi', yearStatus: 'Vidi alian jaron', monthStatus: 'Vidi alian monaton', weekText: 'Sb', weekStatus: '', dayStatus: 'Elekti DD, MM d', defaultStatus: 'Elekti la daton', isRTL: false }; $.datepick.setDefaults($.datepick.regional['eo']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Italian localisation for jQuery Datepicker. Written by Apaella (apaella@gmail.com). */ (function($) { $.datepick.regional['it'] = { monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno', 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'], monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu', 'Lug','Ago','Set','Ott','Nov','Dic'], dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'], dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'], dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'], dateFormat: 'dd/mm/yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Prec', prevStatus: 'Mese precedente', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: 'Mostra l\'anno precedente', nextText: 'Succ&#x3e;', nextStatus: 'Mese successivo', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: 'Mostra l\'anno successivo', currentText: 'Oggi', currentStatus: 'Mese corrente', todayText: 'Oggi', todayStatus: 'Mese corrente', clearText: 'Svuota', clearStatus: 'Annulla', closeText: 'Chiudi', closeStatus: 'Chiudere senza modificare', yearStatus: 'Seleziona un altro anno', monthStatus: 'Seleziona un altro mese', weekText: 'Sm', weekStatus: 'Settimana dell\'anno', dayStatus: '\'Seleziona\' D, M d', defaultStatus: 'Scegliere una data', isRTL: false }; $.datepick.setDefaults($.datepick.regional['it']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html English UK localisation for jQuery Datepicker. Written by Stuart. */ (function($) { $.datepick.regional['en-GB'] = { monthNames: ['January','February','March','April','May','June', 'July','August','September','October','November','December'], monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], dateFormat: 'dd/mm/yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: 'Prev', prevStatus: 'Show the previous month', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: 'Show the previous year', nextText: 'Next', nextStatus: 'Show the next month', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: 'Show the next year', currentText: 'Current', currentStatus: 'Show the current month', todayText: 'Today', todayStatus: 'Show today\'s month', clearText: 'Clear', clearStatus: 'Erase the current date', closeText: 'Done', closeStatus: 'Close without change', yearStatus: 'Show a different year', monthStatus: 'Show a different month', weekText: 'Wk', weekStatus: 'Week of the year', dayStatus: 'Select DD, M d', defaultStatus: 'Select a date', isRTL: false }; $.datepick.setDefaults($.datepick.regional['en-GB']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Hungarian localisation for jQuery Datepicker. Written by Istvan Karaszi (jquery@spam.raszi.hu). */ (function($) { $.datepick.regional['hu'] = { monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június', 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'], monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún', 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'], dayNames: ['Vasárnap', 'Hétfö', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'], dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'], dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'], dateFormat: 'yyyy-mm-dd', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&laquo;&nbsp;vissza', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'előre&nbsp;&raquo;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'ma', currentStatus: '', todayText: 'ma', todayStatus: '', clearText: 'törlés', clearStatus: '', closeText: 'bezárás', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Hé', weekStatus: '', dayStatus: 'D, M d', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['hu']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Basque localisation for jQuery Datepicker. Karrikas-ek itzulia (karrikas@karrikas.com) */ (function($){ $.datepick.regional['eu'] = { monthNames: ['Urtarrila','Otsaila','Martxoa','Apirila','Maiatza','Ekaina', 'Uztaila','Abuztua','Iraila','Urria','Azaroa','Abendua'], monthNamesShort: ['Urt','Ots','Mar','Api','Mai','Eka', 'Uzt','Abu','Ira','Urr','Aza','Abe'], dayNames: ['Igandea','Astelehena','Asteartea','Asteazkena','Osteguna','Ostirala','Larunbata'], dayNamesShort: ['Iga','Ast','Ast','Ast','Ost','Ost','Lar'], dayNamesMin: ['Ig','As','As','As','Os','Os','La'], dateFormat: 'yyyy/mm/dd', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Aur', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Hur&#x3e;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Gaur', currentStatus: '', todayText: 'Gaur', todayStatus: '', clearText: 'X', clearStatus: '', closeText: 'Egina', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Wk', weekStatus: '', dayStatus: 'DD d MM', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['eu']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Date picker for jQuery v4.0.3. Written by Keith Wood (kbwood{at}iinet.com.au) February 2010. Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses. Please attribute the author if you use it. */ (function($) { // Hide scope, no $ conflict /* Datepicker manager. */ function Datepicker() { this._defaults = { pickerClass: '', // CSS class to add to this instance of the datepicker showOnFocus: true, // True for popup on focus, false for not showTrigger: null, // Element to be cloned for a trigger, null for none showAnim: 'show', // Name of jQuery animation for popup, '' for no animation showOptions: {}, // Options for enhanced animations showSpeed: 'normal', // Duration of display/closure popupContainer: null, // The element to which a popup calendar is added, null for body alignment: 'bottom', // Alignment of popup - with nominated corner of input: // 'top' or 'bottom' aligns depending on language direction, // 'topLeft', 'topRight', 'bottomLeft', 'bottomRight' fixedWeeks: false, // True to always show 6 weeks, false to only show as many as are needed firstDay: 0, // First day of the week, 0 = Sunday, 1 = Monday, ... calculateWeek: this.iso8601Week, // Calculate week of the year from a date, null for ISO8601 monthsToShow: 1, // How many months to show, cols or [rows, cols] monthsOffset: 0, // How many months to offset the primary month by monthsToStep: 1, // How many months to move when prev/next clicked monthsToJump: 12, // How many months to move when large prev/next clicked useMouseWheel: true, // True to use mousewheel if available, false to never use it changeMonth: true, // True to change month/year via drop-down, false for navigation only yearRange: 'c-10:c+10', // Range of years to show in drop-down: 'any' for direct text entry // or 'start:end', where start/end are '+-nn' for relative to today // or 'c+-nn' for relative to the currently selected date // or 'nnnn' for an absolute year shortYearCutoff: '+10', // Cutoff for two-digit year in the current century showOtherMonths: false, // True to show dates from other months, false to not show them selectOtherMonths: false, // True to allow selection of dates from other months too defaultDate: null, // Date to show if no other selected selectDefaultDate: false, // True to pre-select the default date if no other is chosen minDate: null, // The minimum selectable date maxDate: null, // The maximum selectable date dateFormat: 'mm/dd/yyyy', // Format for dates autoSize: false, // True to size the input field according to the date format rangeSelect: false, // Allows for selecting a date range on one date picker rangeSeparator: ' - ', // Text between two dates in a range multiSelect: 0, // Maximum number of selectable dates, zero for single select multiSeparator: ',', // Text between multiple dates onDate: null, // Callback as a date is added to the datepicker onShow: null, // Callback just before a datepicker is shown onChangeMonthYear: null, // Callback when a new month/year is selected onSelect: null, // Callback when a date is selected onClose: null, // Callback when a datepicker is closed altField: null, // Alternate field to update in synch with the datepicker altFormat: null, // Date format for alternate field, defaults to dateFormat constrainInput: true, // True to constrain typed input to dateFormat allowed characters commandsAsDateFormat: false, // True to apply formatDate to the command texts commands: this.commands // Command actions that may be added to a layout by name }; this.regional = { '': { // US/English monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], dayNamesMin: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], dateFormat: 'mm/dd/yyyy', // See options on formatDate firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... renderer: this.defaultRenderer, // The rendering templates prevText: '&lt;Prev', // Text for the previous month command prevStatus: 'Show the previous month', // Status text for the previous month command prevJumpText: '&lt;&lt;', // Text for the previous year command prevJumpStatus: 'Show the previous year', // Status text for the previous year command nextText: 'Next&gt;', // Text for the next month command nextStatus: 'Show the next month', // Status text for the next month command nextJumpText: '&gt;&gt;', // Text for the next year command nextJumpStatus: 'Show the next year', // Status text for the next year command currentText: 'Current', // Text for the current month command currentStatus: 'Show the current month', // Status text for the current month command todayText: 'Today', // Text for the today's month command todayStatus: 'Show today\'s month', // Status text for the today's month command clearText: 'Clear', // Text for the clear command clearStatus: 'Clear all the dates', // Status text for the clear command closeText: 'Close', // Text for the close command closeStatus: 'Close the datepicker', // Status text for the close command yearStatus: 'Change the year', // Status text for year selection monthStatus: 'Change the month', // Status text for month selection weekText: 'Wk', // Text for week of the year column header weekStatus: 'Week of the year', // Status text for week of the year column header dayStatus: 'Select DD, M d, yyyy', // Status text for selectable days defaultStatus: 'Select a date', // Status text shown by default isRTL: false // True if language is right-to-left }}; $.extend(this._defaults, this.regional['']); this._disabled = []; } $.extend(Datepicker.prototype, { dataName: 'datepick', /* Class name added to elements to indicate already configured with datepicker. */ markerClass: 'hasDatepick', _popupClass: 'datepick-popup', // Marker for popup division _triggerClass: 'datepick-trigger', // Marker for trigger element _disableClass: 'datepick-disable', // Marker for disabled element _coverClass: 'datepick-cover', // Marker for iframe backing element _monthYearClass: 'datepick-month-year', // Marker for month/year inputs _curMonthClass: 'datepick-month-', // Marker for current month/year _anyYearClass: 'datepick-any-year', // Marker for year direct input _curDoWClass: 'datepick-dow-', // Marker for day of week commands: { // Command actions that may be added to a layout by name // name: { // The command name, use '{button:name}' or '{link:name}' in layouts // text: '', // The field in the regional settings for the displayed text // status: '', // The field in the regional settings for the status text // // The keystroke to trigger the action // keystroke: {keyCode: nn, ctrlKey: boolean, altKey: boolean, shiftKey: boolean}, // enabled: fn, // The function that indicates the command is enabled // date: fn, // The function to get the date associated with this action // action: fn} // The function that implements the action prev: {text: 'prevText', status: 'prevStatus', // Previous month keystroke: {keyCode: 33}, // Page up enabled: function(inst) { var minDate = inst.curMinDate(); return (!minDate || $.datepick.add($.datepick.day( $.datepick.add($.datepick.newDate(inst.drawDate), 1 - inst.get('monthsToStep') - inst.get('monthsOffset'), 'm'), 1), -1, 'd'). getTime() >= minDate.getTime()); }, date: function(inst) { return $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate), -inst.get('monthsToStep') - inst.get('monthsOffset'), 'm'), 1); }, action: function(inst) { $.datepick.changeMonth(this, -inst.get('monthsToStep')); } }, prevJump: {text: 'prevJumpText', status: 'prevJumpStatus', // Previous year keystroke: {keyCode: 33, ctrlKey: true}, // Ctrl + Page up enabled: function(inst) { var minDate = inst.curMinDate(); return (!minDate || $.datepick.add($.datepick.day( $.datepick.add($.datepick.newDate(inst.drawDate), 1 - inst.get('monthsToJump') - inst.get('monthsOffset'), 'm'), 1), -1, 'd'). getTime() >= minDate.getTime()); }, date: function(inst) { return $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate), -inst.get('monthsToJump') - inst.get('monthsOffset'), 'm'), 1); }, action: function(inst) { $.datepick.changeMonth(this, -inst.get('monthsToJump')); } }, next: {text: 'nextText', status: 'nextStatus', // Next month keystroke: {keyCode: 34}, // Page down enabled: function(inst) { var maxDate = inst.get('maxDate'); return (!maxDate || $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate), inst.get('monthsToStep') - inst.get('monthsOffset'), 'm'), 1). getTime() <= maxDate.getTime()); }, date: function(inst) { return $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate), inst.get('monthsToStep') - inst.get('monthsOffset'), 'm'), 1); }, action: function(inst) { $.datepick.changeMonth(this, inst.get('monthsToStep')); } }, nextJump: {text: 'nextJumpText', status: 'nextJumpStatus', // Next year keystroke: {keyCode: 34, ctrlKey: true}, // Ctrl + Page down enabled: function(inst) { var maxDate = inst.get('maxDate'); return (!maxDate || $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate), inst.get('monthsToJump') - inst.get('monthsOffset'), 'm'), 1). getTime() <= maxDate.getTime()); }, date: function(inst) { return $.datepick.day($.datepick.add($.datepick.newDate(inst.drawDate), inst.get('monthsToJump') - inst.get('monthsOffset'), 'm'), 1); }, action: function(inst) { $.datepick.changeMonth(this, inst.get('monthsToJump')); } }, current: {text: 'currentText', status: 'currentStatus', // Current month keystroke: {keyCode: 36, ctrlKey: true}, // Ctrl + Home enabled: function(inst) { var minDate = inst.curMinDate(); var maxDate = inst.get('maxDate'); var curDate = inst.selectedDates[0] || $.datepick.today(); return (!minDate || curDate.getTime() >= minDate.getTime()) && (!maxDate || curDate.getTime() <= maxDate.getTime()); }, date: function(inst) { return inst.selectedDates[0] || $.datepick.today(); }, action: function(inst) { var curDate = inst.selectedDates[0] || $.datepick.today(); $.datepick.showMonth(this, curDate.getFullYear(), curDate.getMonth() + 1); } }, today: {text: 'todayText', status: 'todayStatus', // Today's month keystroke: {keyCode: 36, ctrlKey: true}, // Ctrl + Home enabled: function(inst) { var minDate = inst.curMinDate(); var maxDate = inst.get('maxDate'); return (!minDate || $.datepick.today().getTime() >= minDate.getTime()) && (!maxDate || $.datepick.today().getTime() <= maxDate.getTime()); }, date: function(inst) { return $.datepick.today(); }, action: function(inst) { $.datepick.showMonth(this); } }, clear: {text: 'clearText', status: 'clearStatus', // Clear the datepicker keystroke: {keyCode: 35, ctrlKey: true}, // Ctrl + End enabled: function(inst) { return true; }, date: function(inst) { return null; }, action: function(inst) { $.datepick.clear(this); } }, close: {text: 'closeText', status: 'closeStatus', // Close the datepicker keystroke: {keyCode: 27}, // Escape enabled: function(inst) { return true; }, date: function(inst) { return null; }, action: function(inst) { $.datepick.hide(this); } }, prevWeek: {text: 'prevWeekText', status: 'prevWeekStatus', // Previous week keystroke: {keyCode: 38, ctrlKey: true}, // Ctrl + Up enabled: function(inst) { var minDate = inst.curMinDate(); return (!minDate || $.datepick.add($.datepick.newDate(inst.drawDate), -7, 'd'). getTime() >= minDate.getTime()); }, date: function(inst) { return $.datepick.add($.datepick.newDate(inst.drawDate), -7, 'd'); }, action: function(inst) { $.datepick.changeDay(this, -7); } }, prevDay: {text: 'prevDayText', status: 'prevDayStatus', // Previous day keystroke: {keyCode: 37, ctrlKey: true}, // Ctrl + Left enabled: function(inst) { var minDate = inst.curMinDate(); return (!minDate || $.datepick.add($.datepick.newDate(inst.drawDate), -1, 'd'). getTime() >= minDate.getTime()); }, date: function(inst) { return $.datepick.add($.datepick.newDate(inst.drawDate), -1, 'd'); }, action: function(inst) { $.datepick.changeDay(this, -1); } }, nextDay: {text: 'nextDayText', status: 'nextDayStatus', // Next day keystroke: {keyCode: 39, ctrlKey: true}, // Ctrl + Right enabled: function(inst) { var maxDate = inst.get('maxDate'); return (!maxDate || $.datepick.add($.datepick.newDate(inst.drawDate), 1, 'd'). getTime() <= maxDate.getTime()); }, date: function(inst) { return $.datepick.add($.datepick.newDate(inst.drawDate), 1, 'd'); }, action: function(inst) { $.datepick.changeDay(this, 1); } }, nextWeek: {text: 'nextWeekText', status: 'nextWeekStatus', // Next week keystroke: {keyCode: 40, ctrlKey: true}, // Ctrl + Down enabled: function(inst) { var maxDate = inst.get('maxDate'); return (!maxDate || $.datepick.add($.datepick.newDate(inst.drawDate), 7, 'd'). getTime() <= maxDate.getTime()); }, date: function(inst) { return $.datepick.add($.datepick.newDate(inst.drawDate), 7, 'd'); }, action: function(inst) { $.datepick.changeDay(this, 7); } } }, /* Default template for generating a datepicker. */ defaultRenderer: { // Anywhere: '{l10n:name}' to insert localised value for name, // '{link:name}' to insert a link trigger for command name, // '{button:name}' to insert a button trigger for command name, // '{popup:start}...{popup:end}' to mark a section for inclusion in a popup datepicker only, // '{inline:start}...{inline:end}' to mark a section for inclusion in an inline datepicker only // Overall structure: '{months}' to insert calendar months picker: '<div class="datepick">' + '<div class="datepick-nav">{link:prev}{link:today}{link:next}</div>{months}' + '{popup:start}<div class="datepick-ctrl">{link:clear}{link:close}</div>{popup:end}' + '<div class="datepick-clear-fix"></div></div>', // One row of months: '{months}' to insert calendar months monthRow: '<div class="datepick-month-row">{months}</div>', // A single month: '{monthHeader:dateFormat}' to insert the month header - // dateFormat is optional and defaults to 'MM yyyy', // '{weekHeader}' to insert a week header, '{weeks}' to insert the month's weeks month: '<div class="datepick-month"><div class="datepick-month-header">{monthHeader}</div>' + '<table><thead>{weekHeader}</thead><tbody>{weeks}</tbody></table></div>', // A week header: '{days}' to insert individual day names weekHeader: '<tr>{days}</tr>', // Individual day header: '{day}' to insert day name dayHeader: '<th>{day}</th>', // One week of the month: '{days}' to insert the week's days, '{weekOfYear}' to insert week of year week: '<tr>{days}</tr>', // An individual day: '{day}' to insert day value day: '<td>{day}</td>', // jQuery selector, relative to picker, for a single month monthSelector: '.datepick-month', // jQuery selector, relative to picker, for individual days daySelector: 'td', // Class for right-to-left (RTL) languages rtlClass: 'datepick-rtl', // Class for multi-month datepickers multiClass: 'datepick-multi', // Class for selectable dates defaultClass: '', // Class for currently selected dates selectedClass: 'datepick-selected', // Class for highlighted dates highlightedClass: 'datepick-highlight', // Class for today todayClass: 'datepick-today', // Class for days from other months otherMonthClass: 'datepick-other-month', // Class for days on weekends weekendClass: 'datepick-weekend', // Class prefix for commands commandClass: 'datepick-cmd', // Extra class(es) for commands that are buttons commandButtonClass: '', // Extra class(es) for commands that are links commandLinkClass: '', // Class for disabled commands disabledClass: 'datepick-disabled' }, /* Override the default settings for all datepicker instances. @param settings (object) the new settings to use as defaults @return (Datepicker) this object */ setDefaults: function(settings) { $.extend(this._defaults, settings || {}); return this; }, _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), _msPerDay: 24 * 60 * 60 * 1000, ATOM: 'yyyy-mm-dd', // RFC 3339/ISO 8601 COOKIE: 'D, dd M yyyy', FULL: 'DD, MM d, yyyy', ISO_8601: 'yyyy-mm-dd', JULIAN: 'J', RFC_822: 'D, d M yy', RFC_850: 'DD, dd-M-yy', RFC_1036: 'D, d M yy', RFC_1123: 'D, d M yyyy', RFC_2822: 'D, d M yyyy', RSS: 'D, d M yy', // RFC 822 TICKS: '!', TIMESTAMP: '@', W3C: 'yyyy-mm-dd', // ISO 8601 /* Format a date object into a string value. The format can be combinations of the following: d - day of month (no leading zero) dd - day of month (two digit) o - day of year (no leading zeros) oo - day of year (three digit) D - day name short DD - day name long w - week of year (no leading zero) ww - week of year (two digit) m - month of year (no leading zero) mm - month of year (two digit) M - month name short MM - month name long yy - year (two digit) yyyy - year (four digit) @ - Unix timestamp (s since 01/01/1970) ! - Windows ticks (100ns since 01/01/0001) '...' - literal text '' - single quote @param format (string) the desired format of the date (optional, default datepicker format) @param date (Date) the date value to format @param settings (object) attributes include: dayNamesShort (string[]) abbreviated names of the days from Sunday (optional) dayNames (string[]) names of the days from Sunday (optional) monthNamesShort (string[]) abbreviated names of the months (optional) monthNames (string[]) names of the months (optional) calculateWeek (function) function that determines week of the year (optional) @return (string) the date in the above format */ formatDate: function(format, date, settings) { if (typeof format != 'string') { settings = date; date = format; format = ''; } if (!date) { return ''; } format = format || this._defaults.dateFormat; settings = settings || {}; var dayNamesShort = settings.dayNamesShort || this._defaults.dayNamesShort; var dayNames = settings.dayNames || this._defaults.dayNames; var monthNamesShort = settings.monthNamesShort || this._defaults.monthNamesShort; var monthNames = settings.monthNames || this._defaults.monthNames; var calculateWeek = settings.calculateWeek || this._defaults.calculateWeek; // Check whether a format character is doubled var doubled = function(match, step) { var matches = 1; while (iFormat + matches < format.length && format.charAt(iFormat + matches) == match) { matches++; } iFormat += matches - 1; return Math.floor(matches / (step || 1)) > 1; }; // Format a number, with leading zeroes if necessary var formatNumber = function(match, value, len, step) { var num = '' + value; if (doubled(match, step)) { while (num.length < len) { num = '0' + num; } } return num; }; // Format a name, short or long as requested var formatName = function(match, value, shortNames, longNames) { return (doubled(match) ? longNames[value] : shortNames[value]); }; var output = ''; var literal = false; for (var iFormat = 0; iFormat < format.length; iFormat++) { if (literal) { if (format.charAt(iFormat) == "'" && !doubled("'")) { literal = false; } else { output += format.charAt(iFormat); } } else { switch (format.charAt(iFormat)) { case 'd': output += formatNumber('d', date.getDate(), 2); break; case 'D': output += formatName('D', date.getDay(), dayNamesShort, dayNames); break; case 'o': output += formatNumber('o', this.dayOfYear(date), 3); break; case 'w': output += formatNumber('w', calculateWeek(date), 2); break; case 'm': output += formatNumber('m', date.getMonth() + 1, 2); break; case 'M': output += formatName('M', date.getMonth(), monthNamesShort, monthNames); break; case 'y': output += (doubled('y', 2) ? date.getFullYear() : (date.getFullYear() % 100 < 10 ? '0' : '') + date.getFullYear() % 100); break; case '@': output += Math.floor(date.getTime() / 1000); break; case '!': output += date.getTime() * 10000 + this._ticksTo1970; break; case "'": if (doubled("'")) { output += "'"; } else { literal = true; } break; default: output += format.charAt(iFormat); } } } return output; }, /* Parse a string value into a date object. See formatDate for the possible formats, plus: * - ignore rest of string @param format (string) the expected format of the date ('' for default datepicker format) @param value (string) the date in the above format @param settings (object) attributes include: shortYearCutoff (number) the cutoff year for determining the century (optional) dayNamesShort (string[]) abbreviated names of the days from Sunday (optional) dayNames (string[]) names of the days from Sunday (optional) monthNamesShort (string[]) abbreviated names of the months (optional) monthNames (string[]) names of the months (optional) @return (Date) the extracted date value or null if value is blank @throws errors if the format and/or value are missing, if the value doesn't match the format, or if the date is invalid */ parseDate: function(format, value, settings) { if (value == null) { throw 'Invalid arguments'; } value = (typeof value == 'object' ? value.toString() : value + ''); if (value == '') { return null; } format = format || this._defaults.dateFormat; settings = settings || {}; var shortYearCutoff = settings.shortYearCutoff || this._defaults.shortYearCutoff; shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : this.today().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); var dayNamesShort = settings.dayNamesShort || this._defaults.dayNamesShort; var dayNames = settings.dayNames || this._defaults.dayNames; var monthNamesShort = settings.monthNamesShort || this._defaults.monthNamesShort; var monthNames = settings.monthNames || this._defaults.monthNames; var year = -1; var month = -1; var day = -1; var doy = -1; var shortYear = false; var literal = false; // Check whether a format character is doubled var doubled = function(match, step) { var matches = 1; while (iFormat + matches < format.length && format.charAt(iFormat + matches) == match) { matches++; } iFormat += matches - 1; return Math.floor(matches / (step || 1)) > 1; }; // Extract a number from the string value var getNumber = function(match, step) { doubled(match, step); var size = [2, 3, 4, 11, 20]['oy@!'.indexOf(match) + 1]; var digits = new RegExp('^-?\\d{1,' + size + '}'); var num = value.substring(iValue).match(digits); if (!num) { throw 'Missing number at position {0}'.replace(/\{0\}/, iValue); } iValue += num[0].length; return parseInt(num[0], 10); }; // Extract a name from the string value and convert to an index var getName = function(match, shortNames, longNames, step) { var names = (doubled(match, step) ? longNames : shortNames); for (var i = 0; i < names.length; i++) { if (value.substr(iValue, names[i].length) == names[i]) { iValue += names[i].length; return i + 1; } } throw 'Unknown name at position {0}'.replace(/\{0\}/, iValue); }; // Confirm that a literal character matches the string value var checkLiteral = function() { if (value.charAt(iValue) != format.charAt(iFormat)) { throw 'Unexpected literal at position {0}'.replace(/\{0\}/, iValue); } iValue++; }; var iValue = 0; for (var iFormat = 0; iFormat < format.length; iFormat++) { if (literal) { if (format.charAt(iFormat) == "'" && !doubled("'")) { literal = false; } else { checkLiteral(); } } else { switch (format.charAt(iFormat)) { case 'd': day = getNumber('d'); break; case 'D': getName('D', dayNamesShort, dayNames); break; case 'o': doy = getNumber('o'); break; case 'w': getNumber('w'); break; case 'm': month = getNumber('m'); break; case 'M': month = getName('M', monthNamesShort, monthNames); break; case 'y': var iSave = iFormat; shortYear = !doubled('y', 2); iFormat = iSave; year = getNumber('y', 2); break; case '@': var date = this._normaliseDate(new Date(getNumber('@') * 1000)); year = date.getFullYear(); month = date.getMonth() + 1; day = date.getDate(); break; case '!': var date = this._normaliseDate( new Date((getNumber('!') - this._ticksTo1970) / 10000)); year = date.getFullYear(); month = date.getMonth() + 1; day = date.getDate(); break; case '*': iValue = value.length; break; case "'": if (doubled("'")) { checkLiteral(); } else { literal = true; } break; default: checkLiteral(); } } } if (iValue < value.length) { throw 'Additional text found at end'; } if (year == -1) { year = this.today().getFullYear(); } else if (year < 100 && shortYear) { year += (shortYearCutoff == -1 ? 1900 : this.today().getFullYear() - this.today().getFullYear() % 100 - (year <= shortYearCutoff ? 0 : 100)); } if (doy > -1) { month = 1; day = doy; for (var dim = this.daysInMonth(year, month); day > dim; dim = this.daysInMonth(year, month)) { month++; day -= dim; } } var date = this.newDate(year, month, day); if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day) { throw 'Invalid date'; } return date; }, /* A date may be specified as an exact value or a relative one. @param dateSpec (Date or number or string) the date as an object or string in the given format or an offset - numeric days from today, or string amounts and periods, e.g. '+1m +2w' @param defaultDate (Date) the date to use if no other supplied, may be null @param currentDate (Date) the current date as a possible basis for relative dates, if null today is used (optional) @param dateFormat (string) the expected date format - see formatDate above (optional) @param settings (object) attributes include: shortYearCutoff (number) the cutoff year for determining the century (optional) dayNamesShort (string[7]) abbreviated names of the days from Sunday (optional) dayNames (string[7]) names of the days from Sunday (optional) monthNamesShort (string[12]) abbreviated names of the months (optional) monthNames (string[12]) names of the months (optional) @return (Date) the decoded date */ determineDate: function(dateSpec, defaultDate, currentDate, dateFormat, settings) { if (currentDate && typeof currentDate != 'object') { settings = dateFormat; dateFormat = currentDate; currentDate = null; } if (typeof dateFormat != 'string') { settings = dateFormat; dateFormat = ''; } var offsetString = function(offset) { try { return $.datepick.parseDate(dateFormat, offset, settings); } catch (e) { // Ignore } offset = offset.toLowerCase(); var date = (offset.match(/^c/) && currentDate ? $.datepick.newDate(currentDate) : null) || $.datepick.today(); var pattern = /([+-]?[0-9]+)\s*(d|w|m|y)?/g; var matches = pattern.exec(offset); while (matches) { date = $.datepick.add(date, parseInt(matches[1], 10), matches[2] || 'd'); matches = pattern.exec(offset); } return date; }; defaultDate = (defaultDate ? $.datepick.newDate(defaultDate) : null); dateSpec = (dateSpec == null ? defaultDate : (typeof dateSpec == 'string' ? offsetString(dateSpec) : (typeof dateSpec == 'number' ? (isNaN(dateSpec) || dateSpec == Infinity || dateSpec == -Infinity ? defaultDate : $.datepick.add($.datepick.today(), dateSpec, 'd')) : $.datepick._normaliseDate(dateSpec)))); return dateSpec; }, /* Find the number of days in a given month. @param year (Date) the date to get days for or (number) the full year @param month (number) the month (1 to 12) @return (number) the number of days in this month */ daysInMonth: function(year, month) { var date = (year.getFullYear ? year : this.newDate(year, month, 1)); return 32 - this.newDate(date.getFullYear(), date.getMonth() + 1, 32).getDate(); }, /* Calculate the day of the year for a date. @param year (Date) the date to get the day-of-year for or (number) the full year @param month (number) the month (1-12) @param day (number) the day @return (number) the day of the year */ dayOfYear: function(year, month, day) { var date = (year.getFullYear ? year : this.newDate(year, month, day)); var newYear = this.newDate(date.getFullYear(), 1, 1); return (date.getTime() - newYear.getTime()) / this._msPerDay + 1; }, /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. @param year (Date) the date to get the week for or (number) the full year @param month (number) the month (1-12) @param day (number) the day @return (number) the number of the week within the year that contains this date */ iso8601Week: function(year, month, day) { var checkDate = (year.getFullYear ? new Date(year.getTime()) : this.newDate(year, month, day)); // Find Thursday of this week starting on Monday checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); var time = checkDate.getTime(); checkDate.setMonth(0); // Compare with Jan 1 checkDate.setDate(1); return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; }, /* Return today's date. @return (Date) today */ today: function() { return this._normaliseDate(new Date()); }, /* Return a new date. @param year (Date) the date to clone or (number) the year @param month (number) the month (1-12) @param day (number) the day @return (Date) the date */ newDate: function(year, month, day) { return (!year ? null : this._normaliseDate( year.getFullYear ? new Date(year.getTime()) : new Date(year, month - 1, day))); }, /* Standardise a date into a common format - zero all time values. Also cater for JavaScript peculiarities when swapping to/from daylight saving at midnight. Hours may reset to previous night when midnight changeover, but then cannot generate midnight datetime, so jump to 1AM. @param date (Date) the date to standardise @return (Date) the normalised date */ _normaliseDate: function(date) { if (!date) { return date; } date.setHours(0); date.setMinutes(0); date.setSeconds(0); date.setMilliseconds(0); date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); return date; }, /* Set the year for a date. @param date (Date) the original date @param year (number) the new year @return the updated date */ year: function(date, year) { date.setFullYear(year); return this._normaliseDate(date); }, /* Set the month for a date. @param date (Date) the original date @param month (number) the new month (1-12) @return the updated date */ month: function(date, month) { date.setMonth(month - 1); return this._normaliseDate(date); }, /* Set the day for a date. @param date (Date) the original date @param day (number) the new day of the month @return the updated date */ day: function(date, day) { date.setDate(day); return this._normaliseDate(date); }, /* Add a number of periods to a date. @param date (Date) the original date @param amount (number) the number of periods @param period (string) the type of period d/w/m/y @return the updated date */ add: function(date, amount, period) { if (period == 'd' || period == 'w') { date.setDate(date.getDate() + amount * (period == 'w' ? 7 : 1)); } else { var year = date.getFullYear() + (period == 'y' ? amount : 0); var month = date.getMonth() + (period == 'm' ? amount : 0); date.setTime(this._normaliseDate(new Date(year, month, Math.min(date.getDate(), this.daysInMonth(year, month + 1)))).getTime()); } return date; }, /* Attach the datepicker functionality to an input field. @param target (element) the control to affect @param settings (object) the custom options for this instance */ _attachPicker: function(target, settings) { target = $(target); if (target.hasClass(this.markerClass)) { return; } target.addClass(this.markerClass); var inst = {target: target, selectedDates: [], drawDate: null, pickingRange: false, inline: ($.inArray(target[0].nodeName.toLowerCase(), ['div', 'span']) > -1), get: function(name) { // Get a setting value, defaulting if necessary var value = this.settings[name] !== undefined ? this.settings[name] : $.datepick._defaults[name]; if ($.inArray(name, ['defaultDate', 'minDate', 'maxDate']) > -1) { // Decode date settings value = $.datepick.determineDate( value, null, this.selectedDates[0], this.get('dateFormat'), inst.getConfig()); } return value; }, curMinDate: function() { return (this.pickingRange ? this.selectedDates[0] : this.get('minDate')); }, getConfig: function() { return {dayNamesShort: this.get('dayNamesShort'), dayNames: this.get('dayNames'), monthNamesShort: this.get('monthNamesShort'), monthNames: this.get('monthNames'), calculateWeek: this.get('calculateWeek'), shortYearCutoff: this.get('shortYearCutoff')}; } }; $.data(target[0], this.dataName, inst); var inlineSettings = ($.fn.metadata ? target.metadata() : {}); inst.settings = $.extend({}, settings || {}, inlineSettings || {}); if (inst.inline) { this._update(target[0]); if ($.fn.mousewheel) { target.mousewheel(this._doMouseWheel); } } else { this._attachments(target, inst); target.bind('keydown.' + this.dataName, this._keyDown). bind('keypress.' + this.dataName, this._keyPress). bind('keyup.' + this.dataName, this._keyUp); if (target.attr('disabled')) { this.disable(target[0]); } } }, /* Retrieve the settings for a datepicker control. @param target (element) the control to affect @param name (string) the name of the setting (optional) @return (object) the current instance settings (name == 'all') or (object) the default settings (no name) or (any) the setting value (name supplied) */ options: function(target, name) { var inst = $.data(target, this.dataName); return (inst ? (name ? (name == 'all' ? inst.settings : inst.settings[name]) : $.datepick._defaults) : {}); }, /* Reconfigure the settings for a datepicker control. @param target (element) the control to affect @param settings (object) the new options for this instance or (string) an individual property name @param value (any) the individual property value (omit if settings is an object) */ option: function(target, settings, value) { target = $(target); if (!target.hasClass(this.markerClass)) { return; } settings = settings || {}; if (typeof settings == 'string') { var name = settings; settings = {}; settings[name] = value; } var inst = $.data(target[0], this.dataName); var dates = inst.selectedDates; extendRemove(inst.settings, settings); this.setDate(target[0], dates, null, false, true); inst.pickingRange = false; inst.drawDate = $.datepick.newDate(this._checkMinMax( (settings.defaultDate ? inst.get('defaultDate') : inst.drawDate) || inst.get('defaultDate') || $.datepick.today(), inst)); if (!inst.inline) { this._attachments(target, inst); } if (inst.inline || inst.div) { this._update(target[0]); } }, /* Attach events and trigger, if necessary. @param target (jQuery) the control to affect @param inst (object) the current instance settings */ _attachments: function(target, inst) { target.unbind('focus.' + this.dataName); if (inst.get('showOnFocus')) { target.bind('focus.' + this.dataName, this.show); } if (inst.trigger) { inst.trigger.remove(); } var trigger = inst.get('showTrigger'); inst.trigger = (!trigger ? $([]) : $(trigger).clone().removeAttr('id').addClass(this._triggerClass) [inst.get('isRTL') ? 'insertBefore' : 'insertAfter'](target). click(function() { if (!$.datepick.isDisabled(target[0])) { $.datepick[$.datepick.curInst == inst ? 'hide' : 'show'](target[0]); } })); this._autoSize(target, inst); var dates = this._extractDates(inst, target.val()); if (dates) { this.setDate(target[0], dates, null, true); } if (inst.get('selectDefaultDate') && inst.get('defaultDate') && inst.selectedDates.length == 0) { this.setDate(target[0], $.datepick.newDate(inst.get('defaultDate') || $.datepick.today())); } }, /* Apply the maximum length for the date format. @param inst (object) the current instance settings */ _autoSize: function(target, inst) { if (inst.get('autoSize') && !inst.inline) { var date = new Date(2009, 10 - 1, 20); // Ensure double digits var dateFormat = inst.get('dateFormat'); if (dateFormat.match(/[DM]/)) { var findMax = function(names) { var max = 0; var maxI = 0; for (var i = 0; i < names.length; i++) { if (names[i].length > max) { max = names[i].length; maxI = i; } } return maxI; }; date.setMonth(findMax(inst.get(dateFormat.match(/MM/) ? // Longest month 'monthNames' : 'monthNamesShort'))); date.setDate(findMax(inst.get(dateFormat.match(/DD/) ? // Longest day 'dayNames' : 'dayNamesShort')) + 20 - date.getDay()); } inst.target.attr('size', $.datepick.formatDate(dateFormat, date, inst.getConfig()).length); } }, /* Remove the datepicker functionality from a control. @param target (element) the control to affect */ destroy: function(target) { target = $(target); if (!target.hasClass(this.markerClass)) { return; } var inst = $.data(target[0], this.dataName); if (inst.trigger) { inst.trigger.remove(); } target.removeClass(this.markerClass).empty().unbind('.' + this.dataName); if (inst.inline && $.fn.mousewheel) { target.unmousewheel(); } if (!inst.inline && inst.get('autoSize')) { target.removeAttr('size'); } $.removeData(target[0], this.dataName); }, /* Apply multiple event functions. Usage, for example: onShow: multipleEvents(fn1, fn2, ...) @param fns (function...) the functions to apply */ multipleEvents: function(fns) { var funcs = arguments; return function(args) { for (var i = 0; i < funcs.length; i++) { funcs[i].apply(this, arguments); } }; }, /* Enable the datepicker and any associated trigger. @param target (element) the control to use */ enable: function(target) { var $target = $(target); if (!$target.hasClass(this.markerClass)) { return; } var inst = $.data(target, this.dataName); if (inst.inline) $target.children('.' + this._disableClass).remove().end(). find('button,select').attr('disabled', '').end(). find('a').attr('href', 'javascript:void(0)'); else { target.disabled = false; inst.trigger.filter('button.' + this._triggerClass). attr('disabled', '').end(). filter('img.' + this._triggerClass). css({opacity: '1.0', cursor: ''}); } this._disabled = $.map(this._disabled, function(value) { return (value == target ? null : value); }); // Delete entry }, /* Disable the datepicker and any associated trigger. @param target (element) the control to use */ disable: function(target) { var $target = $(target); if (!$target.hasClass(this.markerClass)) return; var inst = $.data(target, this.dataName); if (inst.inline) { var inline = $target.children(':last'); var offset = inline.offset(); var relOffset = {left: 0, top: 0}; inline.parents().each(function() { if ($(this).css('position') == 'relative') { relOffset = $(this).offset(); return false; } }); var zIndex = $target.css('zIndex'); zIndex = (zIndex == 'auto' ? 0 : parseInt(zIndex, 10)) + 1; $target.prepend('<div class="' + this._disableClass + '" style="' + 'width: ' + inline.outerWidth() + 'px; height: ' + inline.outerHeight() + 'px; left: ' + (offset.left - relOffset.left) + 'px; top: ' + (offset.top - relOffset.top) + 'px; z-index: ' + zIndex + '"></div>'). find('button,select').attr('disabled', 'disabled').end(). find('a').removeAttr('href'); } else { target.disabled = true; inst.trigger.filter('button.' + this._triggerClass). attr('disabled', 'disabled').end(). filter('img.' + this._triggerClass). css({opacity: '0.5', cursor: 'default'}); } this._disabled = $.map(this._disabled, function(value) { return (value == target ? null : value); }); // Delete entry this._disabled.push(target); }, /* Is the first field in a jQuery collection disabled as a datepicker? @param target (element) the control to examine @return (boolean) true if disabled, false if enabled */ isDisabled: function(target) { return (target && $.inArray(target, this._disabled) > -1); }, /* Show a popup datepicker. @param target (event) a focus event or (element) the control to use */ show: function(target) { target = target.target || target; var inst = $.data(target, $.datepick.dataName); if ($.datepick.curInst == inst) { return; } if ($.datepick.curInst) { $.datepick.hide($.datepick.curInst, true); } if (inst) { // Retrieve existing date(s) inst.lastVal = null; inst.selectedDates = $.datepick._extractDates(inst, $(target).val()); inst.pickingRange = false; inst.drawDate = $.datepick._checkMinMax($.datepick.newDate(inst.selectedDates[0] || inst.get('defaultDate') || $.datepick.today()), inst); inst.prevDate = $.datepick.newDate(inst.drawDate); $.datepick.curInst = inst; // Generate content $.datepick._update(target, true); // Adjust position before showing var offset = $.datepick._checkOffset(inst); inst.div.css({left: offset.left, top: offset.top}); // And display var showAnim = inst.get('showAnim'); var showSpeed = inst.get('showSpeed'); showSpeed = (showSpeed == 'normal' && $.ui && $.ui.version >= '1.8' ? '_default' : showSpeed); var postProcess = function() { var borders = $.datepick._getBorders(inst.div); inst.div.find('.' + $.datepick._coverClass). // IE6- only css({left: -borders[0], top: -borders[1], width: inst.div.outerWidth() + borders[0], height: inst.div.outerHeight() + borders[1]}); }; if ($.effects && $.effects[showAnim]) { inst.div.show(showAnim, inst.get('showOptions'), showSpeed, postProcess); } else { inst.div[showAnim || 'show']((showAnim ? showSpeed : ''), postProcess); } if (!showAnim) { postProcess(); } } }, /* Extract possible dates from a string. @param inst (object) the current instance settings @param text (string) the text to extract from @return (CDate[]) the extracted dates */ _extractDates: function(inst, datesText) { if (datesText == inst.lastVal) { return; } inst.lastVal = datesText; var dateFormat = inst.get('dateFormat'); var multiSelect = inst.get('multiSelect'); var rangeSelect = inst.get('rangeSelect'); datesText = datesText.split(multiSelect ? inst.get('multiSeparator') : (rangeSelect ? inst.get('rangeSeparator') : '\x00')); var dates = []; for (var i = 0; i < datesText.length; i++) { try { var date = $.datepick.parseDate(dateFormat, datesText[i], inst.getConfig()); if (date) { var found = false; for (var j = 0; j < dates.length; j++) { if (dates[j].getTime() == date.getTime()) { found = true; break; } } if (!found) { dates.push(date); } } } catch (e) { // Ignore } } dates.splice(multiSelect || (rangeSelect ? 2 : 1), dates.length); if (rangeSelect && dates.length == 1) { dates[1] = dates[0]; } return dates; }, /* Update the datepicker display. @param target (event) a focus event or (element) the control to use @param hidden (boolean) true to initially hide the datepicker */ _update: function(target, hidden) { target = $(target.target || target); var inst = $.data(target[0], $.datepick.dataName); if (inst) { if (inst.inline) { target.html(this._generateContent(target[0], inst)); } else if ($.datepick.curInst == inst) { if (!inst.div) { inst.div = $('<div></div>').addClass(this._popupClass). css({display: (hidden ? 'none' : 'static'), position: 'absolute', left: target.offset().left, top: target.offset().top + target.outerHeight()}). appendTo($(inst.get('popupContainer') || 'body')); if ($.fn.mousewheel) { inst.div.mousewheel(this._doMouseWheel); } } inst.div.html(this._generateContent(target[0], inst)); target.focus(); } if (inst.inline || $.datepick.curInst == inst) { var onChange = inst.get('onChangeMonthYear'); if (onChange && (!inst.prevDate || inst.prevDate.getFullYear() != inst.drawDate.getFullYear() || inst.prevDate.getMonth() != inst.drawDate.getMonth())) { onChange.apply(target[0], [inst.drawDate.getFullYear(), inst.drawDate.getMonth() + 1]); } } } }, /* Update the input field and any alternate field with the current dates. @param target (element) the control to use @param keyUp (boolean, internal) true if coming from keyUp processing */ _updateInput: function(target, keyUp) { var inst = $.data(target, this.dataName); if (inst) { var value = ''; var altValue = ''; var sep = (inst.get('multiSelect') ? inst.get('multiSeparator') : inst.get('rangeSeparator')); var dateFormat = inst.get('dateFormat'); var altFormat = inst.get('altFormat') || dateFormat; for (var i = 0; i < inst.selectedDates.length; i++) { value += (keyUp ? '' : (i > 0 ? sep : '') + $.datepick.formatDate( dateFormat, inst.selectedDates[i], inst.getConfig())); altValue += (i > 0 ? sep : '') + $.datepick.formatDate( altFormat, inst.selectedDates[i], inst.getConfig()); } if (!inst.inline && !keyUp) { $(target).val(value); } $(inst.get('altField')).val(altValue); var onSelect = inst.get('onSelect'); if (onSelect && !keyUp && !inst.inSelect) { inst.inSelect = true; // Prevent endless loops onSelect.apply(target, [inst.selectedDates]); inst.inSelect = false; } } }, /* Retrieve the size of left and top borders for an element. @param elem (jQuery) the element of interest @return (number[2]) the left and top borders */ _getBorders: function(elem) { var convert = function(value) { var extra = ($.browser.msie ? 1 : 0); return {thin: 1 + extra, medium: 3 + extra, thick: 5 + extra}[value] || value; }; return [parseFloat(convert(elem.css('border-left-width'))), parseFloat(convert(elem.css('border-top-width')))]; }, /* Check positioning to remain on the screen. @param inst (object) the current instance settings @return (object) the updated offset for the datepicker */ _checkOffset: function(inst) { var base = (inst.target.is(':hidden') && inst.trigger ? inst.trigger : inst.target); var offset = base.offset(); var isFixed = false; $(inst.target).parents().each(function() { isFixed |= $(this).css('position') == 'fixed'; return !isFixed; }); if (isFixed && $.browser.opera) { // Correction for Opera when fixed and scrolled offset.left -= document.documentElement.scrollLeft; offset.top -= document.documentElement.scrollTop; } var browserWidth = (!$.browser.mozilla || document.doctype ? document.documentElement.clientWidth : 0) || document.body.clientWidth; var browserHeight = (!$.browser.mozilla || document.doctype ? document.documentElement.clientHeight : 0) || document.body.clientHeight; if (browserWidth == 0) { return offset; } var alignment = inst.get('alignment'); var isRTL = inst.get('isRTL'); var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; var scrollY = document.documentElement.scrollTop || document.body.scrollTop; var above = offset.top - inst.div.outerHeight() - (isFixed && $.browser.opera ? document.documentElement.scrollTop : 0); var below = offset.top + base.outerHeight(); var alignL = offset.left; var alignR = offset.left + base.outerWidth() - inst.div.outerWidth() - (isFixed && $.browser.opera ? document.documentElement.scrollLeft : 0); var tooWide = (offset.left + inst.div.outerWidth() - scrollX) > browserWidth; var tooHigh = (offset.top + inst.target.outerHeight() + inst.div.outerHeight() - scrollY) > browserHeight; if (alignment == 'topLeft') { offset = {left: alignL, top: above}; } else if (alignment == 'topRight') { offset = {left: alignR, top: above}; } else if (alignment == 'bottomLeft') { offset = {left: alignL, top: below}; } else if (alignment == 'bottomRight') { offset = {left: alignR, top: below}; } else if (alignment == 'top') { offset = {left: (isRTL || tooWide ? alignR : alignL), top: above}; } else { // bottom offset = {left: (isRTL || tooWide ? alignR : alignL), top: (tooHigh ? above : below)}; } offset.left = Math.max((isFixed ? 0 : scrollX), offset.left - (isFixed ? scrollX : 0)); offset.top = Math.max((isFixed ? 0 : scrollY), offset.top - (isFixed ? scrollY : 0)); return offset; }, /* Close date picker if clicked elsewhere. @param event (MouseEvent) the mouse click to check */ _checkExternalClick: function(event) { if (!$.datepick.curInst) { return; } var target = $(event.target); if (!target.parents().andSelf().hasClass($.datepick._popupClass) && !target.hasClass($.datepick.markerClass) && !target.parents().andSelf().hasClass($.datepick._triggerClass)) { $.datepick.hide($.datepick.curInst); } }, /* Hide a popup datepicker. @param target (element) the control to use or (object) the current instance settings @param immediate (boolean) true to close immediately without animation */ hide: function(target, immediate) { var inst = $.data(target, this.dataName) || target; if (inst && inst == $.datepick.curInst) { var showAnim = (immediate ? '' : inst.get('showAnim')); var showSpeed = inst.get('showSpeed'); showSpeed = (showSpeed == 'normal' && $.ui && $.ui.version >= '1.8' ? '_default' : showSpeed); var postProcess = function() { inst.div.remove(); inst.div = null; $.datepick.curInst = null; var onClose = inst.get('onClose'); if (onClose) { onClose.apply(target, [inst.selectedDates]); } }; inst.div.stop(); if ($.effects && $.effects[showAnim]) { inst.div.hide(showAnim, inst.get('showOptions'), showSpeed, postProcess); } else { var hideAnim = (showAnim == 'slideDown' ? 'slideUp' : (showAnim == 'fadeIn' ? 'fadeOut' : 'hide')); inst.div[hideAnim]((showAnim ? showSpeed : ''), postProcess); } if (!showAnim) { postProcess(); } } }, /* Handle keystrokes in the datepicker. @param event (KeyEvent) the keystroke @return (boolean) true if not handled, false if handled */ _keyDown: function(event) { var target = event.target; var inst = $.data(target, $.datepick.dataName); var handled = false; if (inst.div) { if (event.keyCode == 9) { // Tab - close $.datepick.hide(target); } else if (event.keyCode == 13) { // Enter - select $.datepick.selectDate(target, $('a.' + inst.get('renderer').highlightedClass, inst.div)[0]); handled = true; } else { // Command keystrokes var commands = inst.get('commands'); for (var name in commands) { var command = commands[name]; if (command.keystroke.keyCode == event.keyCode && !!command.keystroke.ctrlKey == !!(event.ctrlKey || event.metaKey) && !!command.keystroke.altKey == event.altKey && !!command.keystroke.shiftKey == event.shiftKey) { $.datepick.performAction(target, name); handled = true; break; } } } } else { // Show on 'current' keystroke var command = inst.get('commands').current; if (command.keystroke.keyCode == event.keyCode && !!command.keystroke.ctrlKey == !!(event.ctrlKey || event.metaKey) && !!command.keystroke.altKey == event.altKey && !!command.keystroke.shiftKey == event.shiftKey) { $.datepick.show(target); handled = true; } } inst.ctrlKey = ((event.keyCode < 48 && event.keyCode != 32) || event.ctrlKey || event.metaKey); if (handled) { event.preventDefault(); event.stopPropagation(); } return !handled; }, /* Filter keystrokes in the datepicker. @param event (KeyEvent) the keystroke @return (boolean) true if allowed, false if not allowed */ _keyPress: function(event) { var target = event.target; var inst = $.data(target, $.datepick.dataName); if (inst && inst.get('constrainInput')) { var ch = String.fromCharCode(event.keyCode || event.charCode); var allowedChars = $.datepick._allowedChars(inst); return (event.metaKey || inst.ctrlKey || ch < ' ' || !allowedChars || allowedChars.indexOf(ch) > -1); } return true; }, /* Determine the set of characters allowed by the date format. @param inst (object) the current instance settings @return (string) the set of allowed characters, or null if anything allowed */ _allowedChars: function(inst) { var dateFormat = inst.get('dateFormat'); var allowedChars = (inst.get('multiSelect') ? inst.get('multiSeparator') : (inst.get('rangeSelect') ? inst.get('rangeSeparator') : '')); var literal = false; var hasNum = false; for (var i = 0; i < dateFormat.length; i++) { var ch = dateFormat.charAt(i); if (literal) { if (ch == "'" && dateFormat.charAt(i + 1) != "'") { literal = false; } else { allowedChars += ch; } } else { switch (ch) { case 'd': case 'm': case 'o': case 'w': allowedChars += (hasNum ? '' : '0123456789'); hasNum = true; break; case 'y': case '@': case '!': allowedChars += (hasNum ? '' : '0123456789') + '-'; hasNum = true; break; case 'J': allowedChars += (hasNum ? '' : '0123456789') + '-.'; hasNum = true; break; case 'D': case 'M': case 'Y': return null; // Accept anything case "'": if (dateFormat.charAt(i + 1) == "'") { allowedChars += "'"; } else { literal = true; } break; default: allowedChars += ch; } } } return allowedChars; }, /* Synchronise datepicker with the field. @param event (KeyEvent) the keystroke @return (boolean) true if allowed, false if not allowed */ _keyUp: function(event) { var target = event.target; var inst = $.data(target, $.datepick.dataName); if (inst && !inst.ctrlKey && inst.lastVal != inst.target.val()) { try { var dates = $.datepick._extractDates(inst, inst.target.val()); if (dates.length > 0) { $.datepick.setDate(target, dates, null, true); } } catch (event) { // Ignore } } return true; }, /* Increment/decrement month/year on mouse wheel activity. @param event (event) the mouse wheel event @param delta (number) the amount of change */ _doMouseWheel: function(event, delta) { var target = ($.datepick.curInst && $.datepick.curInst.target[0]) || $(event.target).closest('.' + $.datepick.markerClass)[0]; if ($.datepick.isDisabled(target)) { return; } var inst = $.data(target, $.datepick.dataName); if (inst.get('useMouseWheel')) { delta = ($.browser.opera ? -delta : delta); delta = (delta < 0 ? -1 : +1); $.datepick.changeMonth(target, -inst.get(event.ctrlKey ? 'monthsToJump' : 'monthsToStep') * delta); } event.preventDefault(); }, /* Clear an input and close a popup datepicker. @param target (element) the control to use */ clear: function(target) { var inst = $.data(target, this.dataName); if (inst) { inst.selectedDates = []; this.hide(target); if (inst.get('selectDefaultDate') && inst.get('defaultDate')) { this.setDate(target, $.datepick.newDate(inst.get('defaultDate') ||$.datepick.today())); } else { this._updateInput(target); } } }, /* Retrieve the selected date(s) for a datepicker. @param target (element) the control to examine @return (CDate[]) the selected date(s) */ getDate: function(target) { var inst = $.data(target, this.dataName); return (inst ? inst.selectedDates : []); }, /* Set the selected date(s) for a datepicker. @param target (element) the control to examine @param dates (CDate or number or string or [] of these) the selected date(s) @param endDate (CDate or number or string) the ending date for a range (optional) @param keyUp (boolean, internal) true if coming from keyUp processing @param setOpt (boolean, internal) true if coming from option processing */ setDate: function(target, dates, endDate, keyUp, setOpt) { var inst = $.data(target, this.dataName); if (inst) { if (!$.isArray(dates)) { dates = [dates]; if (endDate) { dates.push(endDate); } } var dateFormat = inst.get('dateFormat'); var minDate = inst.get('minDate'); var maxDate = inst.get('maxDate'); var curDate = inst.selectedDates[0]; inst.selectedDates = []; for (var i = 0; i < dates.length; i++) { var date = $.datepick.determineDate( dates[i], null, curDate, dateFormat, inst.getConfig()); if (date) { if ((!minDate || date.getTime() >= minDate.getTime()) && (!maxDate || date.getTime() <= maxDate.getTime())) { var found = false; for (var j = 0; j < inst.selectedDates.length; j++) { if (inst.selectedDates[j].getTime() == date.getTime()) { found = true; break; } } if (!found) { inst.selectedDates.push(date); } } } } var rangeSelect = inst.get('rangeSelect'); inst.selectedDates.splice(inst.get('multiSelect') || (rangeSelect ? 2 : 1), inst.selectedDates.length); if (rangeSelect) { switch (inst.selectedDates.length) { case 1: inst.selectedDates[1] = inst.selectedDates[0]; break; case 2: inst.selectedDates[1] = (inst.selectedDates[0].getTime() > inst.selectedDates[1].getTime() ? inst.selectedDates[0] : inst.selectedDates[1]); break; } inst.pickingRange = false; } inst.prevDate = (inst.drawDate ? $.datepick.newDate(inst.drawDate) : null); inst.drawDate = this._checkMinMax($.datepick.newDate(inst.selectedDates[0] || inst.get('defaultDate') || $.datepick.today()), inst); if (!setOpt) { this._update(target); this._updateInput(target, keyUp); } } }, /* Determine whether a date is selectable for this datepicker. @param target (element) the control to check @param date (Date or string or number) the date to check @return (boolean) true if selectable, false if not */ isSelectable: function(target, date) { var inst = $.data(target, this.dataName); if (!inst) { return false; } date = $.datepick.determineDate(date, inst.selectedDates[0] || this.today(), null, inst.get('dateFormat'), inst.getConfig()); return this._isSelectable(target, date, inst.get('onDate'), inst.get('minDate'), inst.get('maxDate')); }, /* Internally determine whether a date is selectable for this datepicker. @param target (element) the control to check @param date (Date) the date to check @param onDate (function or boolean) any onDate callback or callback.selectable @param mindate (Date) the minimum allowed date @param maxdate (Date) the maximum allowed date @return (boolean) true if selectable, false if not */ _isSelectable: function(target, date, onDate, minDate, maxDate) { var dateInfo = (typeof onDate == 'boolean' ? {selectable: onDate} : (!onDate ? {} : onDate.apply(target, [date, true]))); return (dateInfo.selectable != false) && (!minDate || date.getTime() >= minDate.getTime()) && (!maxDate || date.getTime() <= maxDate.getTime()); }, /* Perform a named action for a datepicker. @param target (element) the control to affect @param action (string) the name of the action */ performAction: function(target, action) { var inst = $.data(target, this.dataName); if (inst && !this.isDisabled(target)) { var commands = inst.get('commands'); if (commands[action] && commands[action].enabled.apply(target, [inst])) { commands[action].action.apply(target, [inst]); } } }, /* Set the currently shown month, defaulting to today's. @param target (element) the control to affect @param year (number) the year to show (optional) @param month (number) the month to show (1-12) (optional) @param day (number) the day to show (optional) */ showMonth: function(target, year, month, day) { var inst = $.data(target, this.dataName); if (inst && (day != null || (inst.drawDate.getFullYear() != year || inst.drawDate.getMonth() + 1 != month))) { inst.prevDate = $.datepick.newDate(inst.drawDate); var show = this._checkMinMax((year != null ? $.datepick.newDate(year, month, 1) : $.datepick.today()), inst); inst.drawDate = $.datepick.newDate(show.getFullYear(), show.getMonth() + 1, (day != null ? day : Math.min(inst.drawDate.getDate(), $.datepick.daysInMonth(show.getFullYear(), show.getMonth() + 1)))); this._update(target); } }, /* Adjust the currently shown month. @param target (element) the control to affect @param offset (number) the number of months to change by */ changeMonth: function(target, offset) { var inst = $.data(target, this.dataName); if (inst) { var date = $.datepick.add($.datepick.newDate(inst.drawDate), offset, 'm'); this.showMonth(target, date.getFullYear(), date.getMonth() + 1); } }, /* Adjust the currently shown day. @param target (element) the control to affect @param offset (number) the number of days to change by */ changeDay: function(target, offset) { var inst = $.data(target, this.dataName); if (inst) { var date = $.datepick.add($.datepick.newDate(inst.drawDate), offset, 'd'); this.showMonth(target, date.getFullYear(), date.getMonth() + 1, date.getDate()); } }, /* Restrict a date to the minimum/maximum specified. @param date (CDate) the date to check @param inst (object) the current instance settings */ _checkMinMax: function(date, inst) { var minDate = inst.get('minDate'); var maxDate = inst.get('maxDate'); date = (minDate && date.getTime() < minDate.getTime() ? $.datepick.newDate(minDate) : date); date = (maxDate && date.getTime() > maxDate.getTime() ? $.datepick.newDate(maxDate) : date); return date; }, /* Retrieve the date associated with an entry in the datepicker. @param target (element) the control to examine @param elem (element) the selected datepicker element @return (CDate) the corresponding date, or null */ retrieveDate: function(target, elem) { var inst = $.data(target, this.dataName); return (!inst ? null : this._normaliseDate( new Date(parseInt(elem.className.replace(/^.*dp(-?\d+).*$/, '$1'), 10)))); }, /* Select a date for this datepicker. @param target (element) the control to examine @param elem (element) the selected datepicker element */ selectDate: function(target, elem) { var inst = $.data(target, this.dataName); if (inst && !this.isDisabled(target)) { var date = this.retrieveDate(target, elem); var multiSelect = inst.get('multiSelect'); var rangeSelect = inst.get('rangeSelect'); if (multiSelect) { var found = false; for (var i = 0; i < inst.selectedDates.length; i++) { if (date.getTime() == inst.selectedDates[i].getTime()) { inst.selectedDates.splice(i, 1); found = true; break; } } if (!found && inst.selectedDates.length < multiSelect) { inst.selectedDates.push(date); } } else if (rangeSelect) { if (inst.pickingRange) { inst.selectedDates[1] = date; } else { inst.selectedDates = [date, date]; } inst.pickingRange = !inst.pickingRange; } else { inst.selectedDates = [date]; } inst.prevDate = $.datepick.newDate(date); this._updateInput(target); if (inst.inline || inst.pickingRange || inst.selectedDates.length < (multiSelect || (rangeSelect ? 2 : 1))) { this._update(target); } else { this.hide(target); } } }, /* Generate the datepicker content for this control. @param target (element) the control to affect @param inst (object) the current instance settings @return (jQuery) the datepicker content */ _generateContent: function(target, inst) { var renderer = inst.get('renderer'); var monthsToShow = inst.get('monthsToShow'); monthsToShow = ($.isArray(monthsToShow) ? monthsToShow : [1, monthsToShow]); inst.drawDate = this._checkMinMax( inst.drawDate || inst.get('defaultDate') || $.datepick.today(), inst); var drawDate = $.datepick.add( $.datepick.newDate(inst.drawDate), -inst.get('monthsOffset'), 'm'); // Generate months var monthRows = ''; for (var row = 0; row < monthsToShow[0]; row++) { var months = ''; for (var col = 0; col < monthsToShow[1]; col++) { months += this._generateMonth(target, inst, drawDate.getFullYear(), drawDate.getMonth() + 1, renderer, (row == 0 && col == 0)); $.datepick.add(drawDate, 1, 'm'); } monthRows += this._prepare(renderer.monthRow, inst).replace(/\{months\}/, months); } var picker = this._prepare(renderer.picker, inst).replace(/\{months\}/, monthRows). replace(/\{weekHeader\}/g, this._generateDayHeaders(inst, renderer)) + ($.browser.msie && parseInt($.browser.version, 10) < 7 && !inst.inline ? '<iframe src="javascript:void(0);" class="' + this._coverClass + '"></iframe>' : ''); // Add commands var commands = inst.get('commands'); var asDateFormat = inst.get('commandsAsDateFormat'); var addCommand = function(type, open, close, name, classes) { if (picker.indexOf('{' + type + ':' + name + '}') == -1) { return; } var command = commands[name]; var date = (asDateFormat ? command.date.apply(target, [inst]) : null); picker = picker.replace(new RegExp('\\{' + type + ':' + name + '\\}', 'g'), '<' + open + (command.status ? ' title="' + inst.get(command.status) + '"' : '') + ' class="' + renderer.commandClass + ' ' + renderer.commandClass + '-' + name + ' ' + classes + (command.enabled(inst) ? '' : ' ' + renderer.disabledClass) + '">' + (date ? $.datepick.formatDate(inst.get(command.text), date, inst.getConfig()) : inst.get(command.text)) + '</' + close + '>'); }; for (var name in commands) { addCommand('button', 'button type="button"', 'button', name, renderer.commandButtonClass); addCommand('link', 'a href="javascript:void(0)"', 'a', name, renderer.commandLinkClass); } picker = $(picker); if (monthsToShow[1] > 1) { var count = 0; $(renderer.monthSelector, picker).each(function() { var nth = ++count % monthsToShow[1]; $(this).addClass(nth == 1 ? 'first' : (nth == 0 ? 'last' : '')); }); } // Add datepicker behaviour var self = this; picker.find(renderer.daySelector + ' a').hover( function() { $(this).addClass(renderer.highlightedClass); }, function() { (inst.inline ? $(this).parents('.' + self.markerClass) : inst.div). find(renderer.daySelector + ' a'). removeClass(renderer.highlightedClass); }). click(function() { self.selectDate(target, this); }).end(). find('select.' + this._monthYearClass + ':not(.' + this._anyYearClass + ')'). change(function() { var monthYear = $(this).val().split('/'); self.showMonth(target, parseInt(monthYear[1], 10), parseInt(monthYear[0], 10)); }).end(). find('select.' + this._anyYearClass). click(function() { $(this).css('visibility', 'hidden'). next('input').css({left: this.offsetLeft, top: this.offsetTop, width: this.offsetWidth, height: this.offsetHeight}).show().focus(); }).end(). find('input.' + self._monthYearClass). change(function() { try { var year = parseInt($(this).val(), 10); year = (isNaN(year) ? inst.drawDate.getFullYear() : year); self.showMonth(target, year, inst.drawDate.getMonth() + 1, inst.drawDate.getDate()); } catch (e) { alert(e); } }).keydown(function(event) { if (event.keyCode == 13) { // Enter $(event.target).change(); } else if (event.keyCode == 27) { // Escape $(event.target).hide().prev('select').css('visibility', 'visible'); inst.target.focus(); } }); // Add command behaviour picker.find('.' + renderer.commandClass).click(function() { if (!$(this).hasClass(renderer.disabledClass)) { var action = this.className.replace( new RegExp('^.*' + renderer.commandClass + '-([^ ]+).*$'), '$1'); $.datepick.performAction(target, action); } }); // Add classes if (inst.get('isRTL')) { picker.addClass(renderer.rtlClass); } if (monthsToShow[0] * monthsToShow[1] > 1) { picker.addClass(renderer.multiClass); } var pickerClass = inst.get('pickerClass'); if (pickerClass) { picker.addClass(pickerClass); } // Resize $('body').append(picker); var width = 0; picker.find(renderer.monthSelector).each(function() { width += $(this).outerWidth(); }); picker.width(width / monthsToShow[0]); // Pre-show customisation var onShow = inst.get('onShow'); if (onShow) { onShow.apply(target, [picker, inst]); } return picker; }, /* Generate the content for a single month. @param target (element) the control to affect @param inst (object) the current instance settings @param year (number) the year to generate @param month (number) the month to generate @param renderer (object) the rendering templates @param first (boolean) true if first of multiple months @return (string) the month content */ _generateMonth: function(target, inst, year, month, renderer, first) { var daysInMonth = $.datepick.daysInMonth(year, month); var monthsToShow = inst.get('monthsToShow'); monthsToShow = ($.isArray(monthsToShow) ? monthsToShow : [1, monthsToShow]); var fixedWeeks = inst.get('fixedWeeks') || (monthsToShow[0] * monthsToShow[1] > 1); var firstDay = inst.get('firstDay'); var leadDays = ($.datepick.newDate(year, month, 1).getDay() - firstDay + 7) % 7; var numWeeks = (fixedWeeks ? 6 : Math.ceil((leadDays + daysInMonth) / 7)); var showOtherMonths = inst.get('showOtherMonths'); var selectOtherMonths = inst.get('selectOtherMonths') && showOtherMonths; var dayStatus = inst.get('dayStatus'); var minDate = (inst.pickingRange ? inst.selectedDates[0] : inst.get('minDate')); var maxDate = inst.get('maxDate'); var rangeSelect = inst.get('rangeSelect'); var onDate = inst.get('onDate'); var showWeeks = renderer.week.indexOf('{weekOfYear}') > -1; var calculateWeek = inst.get('calculateWeek'); var today = $.datepick.today(); var drawDate = $.datepick.newDate(year, month, 1); $.datepick.add(drawDate, -leadDays - (fixedWeeks && (drawDate.getDay() == firstDay) ? 7 : 0), 'd'); var ts = drawDate.getTime(); // Generate weeks var weeks = ''; for (var week = 0; week < numWeeks; week++) { var weekOfYear = (!showWeeks ? '' : '<span class="dp' + ts + '">' + (calculateWeek ? calculateWeek(drawDate) : 0) + '</span>'); var days = ''; for (var day = 0; day < 7; day++) { var selected = false; if (rangeSelect && inst.selectedDates.length > 0) { selected = (drawDate.getTime() >= inst.selectedDates[0] && drawDate.getTime() <= inst.selectedDates[1]); } else { for (var i = 0; i < inst.selectedDates.length; i++) { if (inst.selectedDates[i].getTime() == drawDate.getTime()) { selected = true; break; } } } var dateInfo = (!onDate ? {} : onDate.apply(target, [drawDate, drawDate.getMonth() + 1 == month])); var selectable = (selectOtherMonths || drawDate.getMonth() + 1 == month) && this._isSelectable(target, drawDate, dateInfo.selectable, minDate, maxDate); days += this._prepare(renderer.day, inst).replace(/\{day\}/g, (selectable ? '<a href="javascript:void(0)"' : '<span') + ' class="dp' + ts + ' ' + (dateInfo.dateClass || '') + (selected && (selectOtherMonths || drawDate.getMonth() + 1 == month) ? ' ' + renderer.selectedClass : '') + (selectable ? ' ' + renderer.defaultClass : '') + ((drawDate.getDay() || 7) < 6 ? '' : ' ' + renderer.weekendClass) + (drawDate.getMonth() + 1 == month ? '' : ' ' + renderer.otherMonthClass) + (drawDate.getTime() == today.getTime() && (drawDate.getMonth() + 1) == month ? ' ' + renderer.todayClass : '') + (drawDate.getTime() == inst.drawDate.getTime() && (drawDate.getMonth() + 1) == month ? ' ' + renderer.highlightedClass : '') + '"' + (dateInfo.title || (dayStatus && selectable) ? ' title="' + (dateInfo.title || $.datepick.formatDate( dayStatus, drawDate, inst.getConfig())) + '"' : '') + '>' + (showOtherMonths || (drawDate.getMonth() + 1) == month ? dateInfo.content || drawDate.getDate() : '&nbsp;') + (selectable ? '</a>' : '</span>')); $.datepick.add(drawDate, 1, 'd'); ts = drawDate.getTime(); } weeks += this._prepare(renderer.week, inst).replace(/\{days\}/g, days). replace(/\{weekOfYear\}/g, weekOfYear); } var monthHeader = this._prepare(renderer.month, inst).match(/\{monthHeader(:[^\}]+)?\}/); monthHeader = (monthHeader[0].length <= 13 ? 'MM yyyy' : monthHeader[0].substring(13, monthHeader[0].length - 1)); monthHeader = (first ? this._generateMonthSelection( inst, year, month, minDate, maxDate, monthHeader, renderer) : $.datepick.formatDate(monthHeader, $.datepick.newDate(year, month, 1), inst.getConfig())); var weekHeader = this._prepare(renderer.weekHeader, inst). replace(/\{days\}/g, this._generateDayHeaders(inst, renderer)); return this._prepare(renderer.month, inst).replace(/\{monthHeader(:[^\}]+)?\}/g, monthHeader). replace(/\{weekHeader\}/g, weekHeader).replace(/\{weeks\}/g, weeks); }, /* Generate the HTML for the day headers. @param inst (object) the current instance settings @param renderer (object) the rendering templates @return (string) a week's worth of day headers */ _generateDayHeaders: function(inst, renderer) { var firstDay = inst.get('firstDay'); var dayNames = inst.get('dayNames'); var dayNamesMin = inst.get('dayNamesMin'); var header = ''; for (var day = 0; day < 7; day++) { var dow = (day + firstDay) % 7; header += this._prepare(renderer.dayHeader, inst).replace(/\{day\}/g, '<span class="' + this._curDoWClass + dow + '" title="' + dayNames[dow] + '">' + dayNamesMin[dow] + '</span>'); } return header; }, /* Generate selection controls for month. @param inst (object) the current instance settings @param year (number) the year to generate @param month (number) the month to generate @param minDate (CDate) the minimum date allowed @param maxDate (CDate) the maximum date allowed @param monthHeader (string) the month/year format @return (string) the month selection content */ _generateMonthSelection: function(inst, year, month, minDate, maxDate, monthHeader) { if (!inst.get('changeMonth')) { return $.datepick.formatDate( monthHeader, $.datepick.newDate(year, month, 1), inst.getConfig()); } // Months var monthNames = inst.get('monthNames' + (monthHeader.match(/mm/i) ? '' : 'Short')); var html = monthHeader.replace(/m+/i, '\\x2E').replace(/y+/i, '\\x2F'); var selector = '<select class="' + this._monthYearClass + '" title="' + inst.get('monthStatus') + '">'; for (var m = 1; m <= 12; m++) { if ((!minDate || $.datepick.newDate(year, m, $.datepick.daysInMonth(year, m)). getTime() >= minDate.getTime()) && (!maxDate || $.datepick.newDate(year, m, 1).getTime() <= maxDate.getTime())) { selector += '<option value="' + m + '/' + year + '"' + (month == m ? ' selected="selected"' : '') + '>' + monthNames[m - 1] + '</option>'; } } selector += '</select>'; html = html.replace(/\\x2E/, selector); // Years var yearRange = inst.get('yearRange'); if (yearRange == 'any') { selector = '<select class="' + this._monthYearClass + ' ' + this._anyYearClass + '" title="' + inst.get('yearStatus') + '">' + '<option>' + year + '</option></select>' + '<input class="' + this._monthYearClass + ' ' + this._curMonthClass + month + '" value="' + year + '">'; } else { yearRange = yearRange.split(':'); var todayYear = $.datepick.today().getFullYear(); var start = (yearRange[0].match('c[+-].*') ? year + parseInt(yearRange[0].substring(1), 10) : ((yearRange[0].match('[+-].*') ? todayYear : 0) + parseInt(yearRange[0], 10))); var end = (yearRange[1].match('c[+-].*') ? year + parseInt(yearRange[1].substring(1), 10) : ((yearRange[1].match('[+-].*') ? todayYear : 0) + parseInt(yearRange[1], 10))); selector = '<select class="' + this._monthYearClass + '" title="' + inst.get('yearStatus') + '">'; start = $.datepick.add($.datepick.newDate(start + 1, 1, 1), -1, 'd'); end = $.datepick.newDate(end, 1, 1); var addYear = function(y) { if (y != 0) { selector += '<option value="' + month + '/' + y + '"' + (year == y ? ' selected="selected"' : '') + '>' + y + '</option>'; } }; if (start.getTime() < end.getTime()) { start = (minDate && minDate.getTime() > start.getTime() ? minDate : start).getFullYear(); end = (maxDate && maxDate.getTime() < end.getTime() ? maxDate : end).getFullYear(); for (var y = start; y <= end; y++) { addYear(y); } } else { start = (maxDate && maxDate.getTime() < start.getTime() ? maxDate : start).getFullYear(); end = (minDate && minDate.getTime() > end.getTime() ? minDate : end).getFullYear(); for (var y = start; y >= end; y--) { addYear(y); } } selector += '</select>'; } html = html.replace(/\\x2F/, selector); return html; }, /* Prepare a render template for use. Exclude popup/inline sections that are not applicable. Localise text of the form: {l10n:name}. @param text (string) the text to localise @param inst (object) the current instance settings @return (string) the localised text */ _prepare: function(text, inst) { var replaceSection = function(type, retain) { while (true) { var start = text.indexOf('{' + type + ':start}'); if (start == -1) { return; } var end = text.substring(start).indexOf('{' + type + ':end}'); if (end > -1) { text = text.substring(0, start) + (retain ? text.substr(start + type.length + 8, end - type.length - 8) : '') + text.substring(start + end + type.length + 6); } } }; replaceSection('inline', inst.inline); replaceSection('popup', !inst.inline); var pattern = /\{l10n:([^\}]+)\}/; var matches = null; while (matches = pattern.exec(text)) { text = text.replace(matches[0], inst.get(matches[1])); } return text; } }); /* jQuery extend now ignores nulls! @param target (object) the object to extend @param props (object) the new settings @return (object) the updated object */ function extendRemove(target, props) { $.extend(target, props); for (var name in props) if (props[name] == null || props[name] == undefined) target[name] = props[name]; return target; }; /* Attach the datepicker functionality to a jQuery selection. @param command (string) the command to run (optional, default 'attach') @param options (object) the new settings to use for these instances (optional) @return (jQuery) for chaining further calls */ $.fn.datepick = function(options) { var otherArgs = Array.prototype.slice.call(arguments, 1); if ($.inArray(options, ['getDate', 'isDisabled', 'isSelectable', 'options', 'retrieveDate']) > -1) { return $.datepick[options].apply($.datepick, [this[0]].concat(otherArgs)); } return this.each(function() { if (typeof options == 'string') { $.datepick[options].apply($.datepick, [this].concat(otherArgs)); } else { $.datepick._attachPicker(this, options || {}); } }); }; /* Initialise the datepicker functionality. */ $.datepick = new Datepicker(); // singleton instance $(function() { $(document).mousedown($.datepick._checkExternalClick). resize(function() { $.datepick.hide($.datepick.curInst); }); }); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Arabic localisation for jQuery Datepicker. Khaled Al Horani -- koko.dw@gmail.com خالد الحوراني -- koko.dw@gmail.com NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */ (function($) { $.datepick.regional['ar'] = { monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'آذار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'], monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'], dayNames: ['السبت', 'الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة'], dayNamesShort: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], dayNamesMin: ['سبت', 'أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'], dateFormat: 'dd/mm/yyyy', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;السابق', prevStatus: 'عرض الشهر السابق', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'التالي&#x3e;', nextStatus: 'عرض الشهر القادم', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'اليوم', currentStatus: 'عرض الشهر الحالي', todayText: 'اليوم', todayStatus: 'عرض الشهر الحالي', clearText: 'مسح', clearStatus: 'امسح التاريخ الحالي', closeText: 'إغلاق', closeStatus: 'إغلاق بدون حفظ', yearStatus: 'عرض سنة آخرى', monthStatus: 'عرض شهر آخر', weekText: 'أسبوع', weekStatus: 'أسبوع السنة', dayStatus: 'اختر D, M d', defaultStatus: 'اختر يوم', isRTL: true }; $.datepick.setDefaults($.datepick.regional['ar']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Croatian localisation for jQuery Datepicker. Written by Vjekoslav Nesek. */ (function($) { $.datepick.regional['hr'] = { monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj', 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'], monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip', 'Srp','Kol','Ruj','Lis','Stu','Pro'], dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'], dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'], dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'], dateFormat: 'dd.mm.yyyy.', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;', prevStatus: 'Prikaži prethodni mjesec', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: '&#x3e;', nextStatus: 'Prikaži slijedeći mjesec', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Danas', currentStatus: 'Današnji datum', todayText: 'Danas', todayStatus: 'Današnji datum', clearText: 'izbriši', clearStatus: 'Izbriši trenutni datum', closeText: 'Zatvori', closeStatus: 'Zatvori kalendar', yearStatus: 'Prikaži godine', monthStatus: 'Prikaži mjesece', weekText: 'Tje', weekStatus: 'Tjedan', dayStatus: '\'Datum\' D, M d', defaultStatus: 'Odaberi datum', isRTL: false }; $.datepick.setDefaults($.datepick.regional['hr']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Spanish/Argentina localisation for jQuery Datepicker. Written by Esteban Acosta Villafane (esteban.acosta@globant.com) of Globant (http://www.globant.com). */ (function($) { $.datepick.regional['es-AR'] = { monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio', 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun', 'Jul','Ago','Sep','Oct','Nov','Dic'], dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'], dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'], dateFormat: 'dd/mm/yyyy', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Ant', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Sig&#x3e;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Hoy', currentStatus: '', todayText: 'Hoy', todayStatus: '', clearText: 'Limpiar', clearStatus: '', closeText: 'Cerrar', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Sm', weekStatus: '', dayStatus: 'D, M d', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['es-AR']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Danish localisation for jQuery Datepicker. Written by Jan Christensen ( deletestuff@gmail.com). */ (function($) { $.datepick.regional['da'] = { monthNames: ['Januar','Februar','Marts','April','Maj','Juni', 'Juli','August','September','Oktober','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Aug','Sep','Okt','Nov','Dec'], dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'], dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'], dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'], dateFormat: 'dd-mm-yyyy', firstDay: 0, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Forrige', prevStatus: 'Vis forrige måned', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Næste&#x3e;', nextStatus: 'Vis næste måned', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Idag', currentStatus: 'Vis aktuel måned', todayText: 'Idag', todayStatus: 'Vis aktuel måned', clearText: 'Nulstil', clearStatus: 'Nulstil den aktuelle dato', closeText: 'Luk', closeStatus: 'Luk uden ændringer', yearStatus: 'Vis et andet år', monthStatus: 'Vis en anden måned', weekText: 'Uge', weekStatus: 'Årets uge', dayStatus: 'Vælg D, M d', defaultStatus: 'Vælg en dato', isRTL: false }; $.datepick.setDefaults($.datepick.regional['da']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html German localisation for jQuery Datepicker. Written by Milian Wolff (mail@milianw.de). */ (function($) { $.datepick.regional['de'] = { monthNames: ['Januar','Februar','März','April','Mai','Juni', 'Juli','August','September','Oktober','November','Dezember'], monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun', 'Jul','Aug','Sep','Okt','Nov','Dez'], dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'], dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'], dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;zurück', prevStatus: 'letzten Monat zeigen', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Vor&#x3e;', nextStatus: 'nächsten Monat zeigen', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'heute', currentStatus: '', todayText: 'heute', todayStatus: '', clearText: 'löschen', clearStatus: 'aktuelles Datum löschen', closeText: 'schließen', closeStatus: 'ohne Änderungen schließen', yearStatus: 'anderes Jahr anzeigen', monthStatus: 'anderen Monat anzeigen', weekText: 'Wo', weekStatus: 'Woche des Monats', dayStatus: 'Wähle D, M d', defaultStatus: 'Wähle ein Datum', isRTL: false }; $.datepick.setDefaults($.datepick.regional['de']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Estonian localisation for jQuery Datepicker. Written by Mart Sõmermaa (mrts.pydev at gmail com). */ (function($) { $.datepick.regional['et'] = { monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni', 'Juuli','August','September','Oktoober','November','Detsember'], monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni', 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'], dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'], dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'], dayNamesMin: ['P','E','T','K','N','R','L'], dateFormat: 'dd.mm.yyyy', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: 'Eelnev', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Järgnev', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Täna', currentStatus: '', todayText: 'Täna', todayStatus: '', clearText: '', clearStatus: '', closeText: 'Sulge', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Sm', weekStatus: '', dayStatus: '', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['et']); })(jQuery);
JavaScript
/* http://keith-wood.name/datepick.html Lithuanian localisation for jQuery Datepicker. Written by Arturas Paleicikas <arturas@avalon.lt> */ (function($) { $.datepick.regional['lt'] = { monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis', 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'], monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir', 'Lie','Rugp','Rugs','Spa','Lap','Gru'], dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'], dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'], dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'], dateFormat: 'yyyy-mm-dd', firstDay: 1, renderer: $.datepick.defaultRenderer, prevText: '&#x3c;Atgal', prevStatus: '', prevJumpText: '&#x3c;&#x3c;', prevJumpStatus: '', nextText: 'Pirmyn&#x3e;', nextStatus: '', nextJumpText: '&#x3e;&#x3e;', nextJumpStatus: '', currentText: 'Šiandien', currentStatus: '', todayText: 'Šiandien', todayStatus: '', clearText: 'Išvalyti', clearStatus: '', closeText: 'Uždaryti', closeStatus: '', yearStatus: '', monthStatus: '', weekText: 'Wk', weekStatus: '', dayStatus: 'D, M d', defaultStatus: '', isRTL: false }; $.datepick.setDefaults($.datepick.regional['lt']); })(jQuery);
JavaScript