code
stringlengths
1
2.08M
language
stringclasses
1 value
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Debug window control and operations. */ // Public function defined here must be declared in fckdebug_empty.js. var FCKDebug = { Output : function( message, color, noParse ) { if ( ! FCKConfig.Debug ) return ; try { this._GetWindow().Output( message, color, noParse ) ; } catch ( e ) {} // Ignore errors }, OutputObject : function( anyObject, color ) { if ( ! FCKConfig.Debug ) return ; try { this._GetWindow().OutputObject( anyObject, color ) ; } catch ( e ) {} // Ignore errors }, _GetWindow : function() { if ( !this.DebugWindow || this.DebugWindow.closed ) this.DebugWindow = window.open( FCKConfig.BasePath + 'fckdebug.html', 'FCKeditorDebug', 'menubar=no,scrollbars=yes,resizable=yes,location=no,toolbar=no,width=600,height=500', true ) ; return this.DebugWindow ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines the FCKLanguageManager object that is used for language * operations. */ var FCKLanguageManager = FCK.Language = { AvailableLanguages : { af : 'Afrikaans', ar : 'Arabic', bg : 'Bulgarian', bn : 'Bengali/Bangla', bs : 'Bosnian', ca : 'Catalan', cs : 'Czech', da : 'Danish', de : 'German', el : 'Greek', en : 'English', 'en-au' : 'English (Australia)', 'en-ca' : 'English (Canadian)', 'en-uk' : 'English (United Kingdom)', eo : 'Esperanto', es : 'Spanish', et : 'Estonian', eu : 'Basque', fa : 'Persian', fi : 'Finnish', fo : 'Faroese', fr : 'French', 'fr-ca' : 'French (Canada)', gl : 'Galician', gu : 'Gujarati', he : 'Hebrew', hi : 'Hindi', hr : 'Croatian', hu : 'Hungarian', is : 'Icelandic', it : 'Italian', ja : 'Japanese', km : 'Khmer', ko : 'Korean', lt : 'Lithuanian', lv : 'Latvian', mn : 'Mongolian', ms : 'Malay', nb : 'Norwegian Bokmal', nl : 'Dutch', no : 'Norwegian', pl : 'Polish', pt : 'Portuguese (Portugal)', 'pt-br' : 'Portuguese (Brazil)', ro : 'Romanian', ru : 'Russian', sk : 'Slovak', sl : 'Slovenian', sr : 'Serbian (Cyrillic)', 'sr-latn' : 'Serbian (Latin)', sv : 'Swedish', th : 'Thai', tr : 'Turkish', uk : 'Ukrainian', vi : 'Vietnamese', zh : 'Chinese Traditional', 'zh-cn' : 'Chinese Simplified' }, GetActiveLanguage : function() { if ( FCKConfig.AutoDetectLanguage ) { var sUserLang ; // IE accepts "navigator.userLanguage" while Gecko "navigator.language". if ( navigator.userLanguage ) sUserLang = navigator.userLanguage.toLowerCase() ; else if ( navigator.language ) sUserLang = navigator.language.toLowerCase() ; else { // Firefox 1.0 PR has a bug: it doens't support the "language" property. return FCKConfig.DefaultLanguage ; } // Some language codes are set in 5 characters, // like "pt-br" for Brazilian Portuguese. if ( sUserLang.length >= 5 ) { sUserLang = sUserLang.substr(0,5) ; if ( this.AvailableLanguages[sUserLang] ) return sUserLang ; } // If the user's browser is set to, for example, "pt-br" but only the // "pt" language file is available then get that file. if ( sUserLang.length >= 2 ) { sUserLang = sUserLang.substr(0,2) ; if ( this.AvailableLanguages[sUserLang] ) return sUserLang ; } } return this.DefaultLanguage ; }, TranslateElements : function( targetDocument, tag, propertyToSet, encode ) { var e = targetDocument.getElementsByTagName(tag) ; var sKey, s ; for ( var i = 0 ; i < e.length ; i++ ) { // The extra () is to avoid a warning with strict error checking. This is ok. if ( (sKey = e[i].getAttribute( 'fckLang' )) ) { // The extra () is to avoid a warning with strict error checking. This is ok. if ( (s = FCKLang[ sKey ]) ) { if ( encode ) s = FCKTools.HTMLEncode( s ) ; e[i][ propertyToSet ] = s ; } } } }, TranslatePage : function( targetDocument ) { this.TranslateElements( targetDocument, 'INPUT', 'value' ) ; this.TranslateElements( targetDocument, 'SPAN', 'innerHTML' ) ; this.TranslateElements( targetDocument, 'LABEL', 'innerHTML' ) ; this.TranslateElements( targetDocument, 'OPTION', 'innerHTML', true ) ; this.TranslateElements( targetDocument, 'LEGEND', 'innerHTML' ) ; }, Initialize : function() { if ( this.AvailableLanguages[ FCKConfig.DefaultLanguage ] ) this.DefaultLanguage = FCKConfig.DefaultLanguage ; else this.DefaultLanguage = 'en' ; this.ActiveLanguage = new Object() ; this.ActiveLanguage.Code = this.GetActiveLanguage() ; this.ActiveLanguage.Name = this.AvailableLanguages[ this.ActiveLanguage.Code ] ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * These are some Regular Expressions used by the editor. */ var FCKRegexLib = { // This is the Regular expression used by the SetData method for the "&apos;" entity. AposEntity : /&apos;/gi , // Used by the Styles combo to identify styles that can't be applied to text. ObjectElements : /^(?:IMG|TABLE|TR|TD|TH|INPUT|SELECT|TEXTAREA|HR|OBJECT|A|UL|OL|LI)$/i , // List all named commands (commands that can be interpreted by the browser "execCommand" method. NamedCommands : /^(?:Cut|Copy|Paste|Print|SelectAll|RemoveFormat|Unlink|Undo|Redo|Bold|Italic|Underline|StrikeThrough|Subscript|Superscript|JustifyLeft|JustifyCenter|JustifyRight|JustifyFull|Outdent|Indent|InsertOrderedList|InsertUnorderedList|InsertHorizontalRule)$/i , BeforeBody : /(^[\s\S]*\<body[^\>]*\>)/i, AfterBody : /(\<\/body\>[\s\S]*$)/i, // Temporary text used to solve some browser specific limitations. ToReplace : /___fcktoreplace:([\w]+)/ig , // Get the META http-equiv attribute from the tag. MetaHttpEquiv : /http-equiv\s*=\s*["']?([^"' ]+)/i , HasBaseTag : /<base /i , HasBodyTag : /<body[\s|>]/i , HtmlOpener : /<html\s?[^>]*>/i , HeadOpener : /<head\s?[^>]*>/i , HeadCloser : /<\/head\s*>/i , // Temporary classes (Tables without border, Anchors with content) used in IE FCK_Class : /\s*FCK__[^ ]*(?=\s+|$)/ , // Validate element names (it must be in lowercase). ElementName : /(^[a-z_:][\w.\-:]*\w$)|(^[a-z_]$)/ , // Used in conjunction with the FCKConfig.ForceSimpleAmpersand configuration option. ForceSimpleAmpersand : /___FCKAmp___/g , // Get the closing parts of the tags with no closing tags, like <br/>... gets the "/>" part. SpaceNoClose : /\/>/g , // Empty elements may be <p></p> or even a simple opening <p> (see #211). EmptyParagraph : /^<(p|div|address|h\d|center)(?=[ >])[^>]*>\s*(<\/\1>)?$/ , EmptyOutParagraph : /^<(p|div|address|h\d|center)(?=[ >])[^>]*>(?:\s*|&nbsp;)(<\/\1>)?$/ , TagBody : /></ , GeckoEntitiesMarker : /#\?-\:/g , // We look for the "src" and href attribute with the " or ' or without one of // them. We have to do all in one, otherwise we will have problems with URLs // like "thumbnail.php?src=someimage.jpg" (SF-BUG 1554141). ProtectUrlsImg : /<img(?=\s).*?\ssrc=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi , ProtectUrlsA : /<a(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi , ProtectUrlsArea : /<area(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi , Html4DocType : /HTML 4\.0 Transitional/i , DocTypeTag : /<!DOCTYPE[^>]*>/i , HtmlDocType : /DTD HTML/ , // These regex are used to save the original event attributes in the HTML. TagsWithEvent : /<[^\>]+ on\w+[\s\r\n]*=[\s\r\n]*?('|")[\s\S]+?\>/g , EventAttributes : /\s(on\w+)[\s\r\n]*=[\s\r\n]*?('|")([\s\S]*?)\2/g, ProtectedEvents : /\s\w+_fckprotectedatt="([^"]+)"/g, StyleProperties : /\S+\s*:/g, // [a-zA-Z0-9:]+ seams to be more efficient than [\w:]+ InvalidSelfCloseTags : /(<(?!base|meta|link|hr|br|param|img|area|input)([a-zA-Z0-9:]+)[^>]*)\/>/gi, // All variables defined in a style attribute or style definition. The variable // name is returned with $2. StyleVariableAttName : /#\(\s*("|')(.+?)\1[^\)]*\s*\)/g, RegExp : /^\/(.*)\/([gim]*)$/, HtmlTag : /<[^\s<>](?:"[^"]*"|'[^']*'|[^<])*>/ } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Advanced document processors. */ var FCKDocumentProcessor = new Object() ; FCKDocumentProcessor._Items = new Array() ; FCKDocumentProcessor.AppendNew = function() { var oNewItem = new Object() ; this._Items.push( oNewItem ) ; return oNewItem ; } FCKDocumentProcessor.Process = function( document ) { var bIsDirty = FCK.IsDirty() ; var oProcessor, i = 0 ; while( ( oProcessor = this._Items[i++] ) ) oProcessor.ProcessDocument( document ) ; if ( !bIsDirty ) FCK.ResetIsDirty() ; } var FCKDocumentProcessor_CreateFakeImage = function( fakeClass, realElement ) { var oImg = FCKTools.GetElementDocument( realElement ).createElement( 'IMG' ) ; oImg.className = fakeClass ; oImg.src = FCKConfig.BasePath + 'images/spacer.gif' ; oImg.setAttribute( '_fckfakelement', 'true', 0 ) ; oImg.setAttribute( '_fckrealelement', FCKTempBin.AddElement( realElement ), 0 ) ; return oImg ; } // Link Anchors if ( FCKBrowserInfo.IsIE || FCKBrowserInfo.IsOpera ) { var FCKAnchorsProcessor = FCKDocumentProcessor.AppendNew() ; FCKAnchorsProcessor.ProcessDocument = function( document ) { var aLinks = document.getElementsByTagName( 'A' ) ; var oLink ; var i = aLinks.length - 1 ; while ( i >= 0 && ( oLink = aLinks[i--] ) ) { // If it is anchor. Doesn't matter if it's also a link (even better: we show that it's both a link and an anchor) if ( oLink.name.length > 0 ) { //if the anchor has some content then we just add a temporary class if ( oLink.innerHTML !== '' ) { if ( FCKBrowserInfo.IsIE ) oLink.className += ' FCK__AnchorC' ; } else { var oImg = FCKDocumentProcessor_CreateFakeImage( 'FCK__Anchor', oLink.cloneNode(true) ) ; oImg.setAttribute( '_fckanchor', 'true', 0 ) ; oLink.parentNode.insertBefore( oImg, oLink ) ; oLink.parentNode.removeChild( oLink ) ; } } } } } // Page Breaks var FCKPageBreaksProcessor = FCKDocumentProcessor.AppendNew() ; FCKPageBreaksProcessor.ProcessDocument = function( document ) { var aDIVs = document.getElementsByTagName( 'DIV' ) ; var eDIV ; var i = aDIVs.length - 1 ; while ( i >= 0 && ( eDIV = aDIVs[i--] ) ) { if ( eDIV.style.pageBreakAfter == 'always' && eDIV.childNodes.length == 1 && eDIV.childNodes[0].style && eDIV.childNodes[0].style.display == 'none' ) { var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', eDIV.cloneNode(true) ) ; eDIV.parentNode.insertBefore( oFakeImage, eDIV ) ; eDIV.parentNode.removeChild( eDIV ) ; } } /* var aCenters = document.getElementsByTagName( 'CENTER' ) ; var oCenter ; var i = aCenters.length - 1 ; while ( i >= 0 && ( oCenter = aCenters[i--] ) ) { if ( oCenter.style.pageBreakAfter == 'always' && oCenter.innerHTML.Trim().length == 0 ) { var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', oCenter.cloneNode(true) ) ; oCenter.parentNode.insertBefore( oFakeImage, oCenter ) ; oCenter.parentNode.removeChild( oCenter ) ; } } */ } // EMBED and OBJECT tags. var FCKEmbedAndObjectProcessor = (function() { var customProcessors = [] ; var processElement = function( el ) { var clone = el.cloneNode( true ) ; var replaceElement ; var fakeImg = replaceElement = FCKDocumentProcessor_CreateFakeImage( 'FCK__UnknownObject', clone ) ; FCKEmbedAndObjectProcessor.RefreshView( fakeImg, el ) ; for ( var i = 0 ; i < customProcessors.length ; i++ ) replaceElement = customProcessors[i]( el, replaceElement ) || replaceElement ; if ( replaceElement != fakeImg ) FCKTempBin.RemoveElement( fakeImg.getAttribute( '_fckrealelement' ) ) ; el.parentNode.replaceChild( replaceElement, el ) ; } var processElementsByName = function( elementName, doc ) { var aObjects = doc.getElementsByTagName( elementName ); for ( var i = aObjects.length - 1 ; i >= 0 ; i-- ) processElement( aObjects[i] ) ; } var processObjectAndEmbed = function( doc ) { processElementsByName( 'object', doc ); processElementsByName( 'embed', doc ); } return FCKTools.Merge( FCKDocumentProcessor.AppendNew(), { ProcessDocument : function( doc ) { // Firefox 3 would sometimes throw an unknown exception while accessing EMBEDs and OBJECTs // without the setTimeout(). if ( FCKBrowserInfo.IsGecko ) FCKTools.RunFunction( processObjectAndEmbed, this, [ doc ] ) ; else processObjectAndEmbed( doc ) ; }, RefreshView : function( placeHolder, original ) { if ( original.getAttribute( 'width' ) > 0 ) placeHolder.style.width = FCKTools.ConvertHtmlSizeToStyle( original.getAttribute( 'width' ) ) ; if ( original.getAttribute( 'height' ) > 0 ) placeHolder.style.height = FCKTools.ConvertHtmlSizeToStyle( original.getAttribute( 'height' ) ) ; }, AddCustomHandler : function( func ) { customProcessors.push( func ) ; } } ) ; } )() ; FCK.GetRealElement = function( fakeElement ) { var e = FCKTempBin.Elements[ fakeElement.getAttribute('_fckrealelement') ] ; if ( fakeElement.getAttribute('_fckflash') ) { if ( fakeElement.style.width.length > 0 ) e.width = FCKTools.ConvertStyleSizeToHtml( fakeElement.style.width ) ; if ( fakeElement.style.height.length > 0 ) e.height = FCKTools.ConvertStyleSizeToHtml( fakeElement.style.height ) ; } return e ; } // HR Processor. // This is a IE only (tricky) thing. We protect all HR tags before loading them // (see FCK.ProtectTags). Here we put the HRs back. if ( FCKBrowserInfo.IsIE ) { FCKDocumentProcessor.AppendNew().ProcessDocument = function( document ) { var aHRs = document.getElementsByTagName( 'HR' ) ; var eHR ; var i = aHRs.length - 1 ; while ( i >= 0 && ( eHR = aHRs[i--] ) ) { // Create the replacement HR. var newHR = document.createElement( 'hr' ) ; newHR.mergeAttributes( eHR, true ) ; // We must insert the new one after it. insertBefore will not work in all cases. FCKDomTools.InsertAfterNode( eHR, newHR ) ; eHR.parentNode.removeChild( eHR ) ; } } } // INPUT:hidden Processor. FCKDocumentProcessor.AppendNew().ProcessDocument = function( document ) { var aInputs = document.getElementsByTagName( 'INPUT' ) ; var oInput ; var i = aInputs.length - 1 ; while ( i >= 0 && ( oInput = aInputs[i--] ) ) { if ( oInput.type == 'hidden' ) { var oImg = FCKDocumentProcessor_CreateFakeImage( 'FCK__InputHidden', oInput.cloneNode(true) ) ; oImg.setAttribute( '_fckinputhidden', 'true', 0 ) ; oInput.parentNode.insertBefore( oImg, oInput ) ; oInput.parentNode.removeChild( oInput ) ; } } } // Flash handler. FCKEmbedAndObjectProcessor.AddCustomHandler( function( el, fakeImg ) { if ( ! ( el.nodeName.IEquals( 'embed' ) && ( el.type == 'application/x-shockwave-flash' || /\.swf($|#|\?)/i.test( el.src ) ) ) ) return ; fakeImg.className = 'FCK__Flash' ; fakeImg.setAttribute( '_fckflash', 'true', 0 ); } ) ; // Buggy <span class="Apple-style-span"> tags added by Safari. if ( FCKBrowserInfo.IsSafari ) { FCKDocumentProcessor.AppendNew().ProcessDocument = function( doc ) { var spans = doc.getElementsByClassName ? doc.getElementsByClassName( 'Apple-style-span' ) : Array.prototype.filter.call( doc.getElementsByTagName( 'span' ), function( item ){ return item.className == 'Apple-style-span' ; } ) ; for ( var i = spans.length - 1 ; i >= 0 ; i-- ) FCKDomTools.RemoveNode( spans[i], true ) ; } }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Manage table operations (IE specific). */ FCKTableHandler.GetSelectedCells = function() { if ( FCKSelection.GetType() == 'Control' ) { var td = FCKSelection.MoveToAncestorNode( ['TD', 'TH'] ) ; return td ? [ td ] : [] ; } var aCells = new Array() ; var oRange = FCKSelection.GetSelection().createRange() ; // var oParent = oRange.parentElement() ; var oParent = FCKSelection.GetParentElement() ; if ( oParent && oParent.tagName.Equals( 'TD', 'TH' ) ) aCells[0] = oParent ; else { oParent = FCKSelection.MoveToAncestorNode( 'TABLE' ) ; if ( oParent ) { // Loops throw all cells checking if the cell is, or part of it, is inside the selection // and then add it to the selected cells collection. for ( var i = 0 ; i < oParent.cells.length ; i++ ) { var oCellRange = FCK.EditorDocument.body.createTextRange() ; oCellRange.moveToElementText( oParent.cells[i] ) ; if ( oRange.inRange( oCellRange ) || ( oRange.compareEndPoints('StartToStart',oCellRange) >= 0 && oRange.compareEndPoints('StartToEnd',oCellRange) <= 0 ) || ( oRange.compareEndPoints('EndToStart',oCellRange) >= 0 && oRange.compareEndPoints('EndToEnd',oCellRange) <= 0 ) ) { aCells[aCells.length] = oParent.cells[i] ; } } } } return aCells ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Creates and initializes the FCKConfig object. */ var FCKConfig = FCK.Config = new Object() ; /* For the next major version (probably 3.0) we should move all this stuff to another dedicated object and leave FCKConfig as a holder object for settings only). */ // Editor Base Path if ( document.location.protocol == 'file:' ) { FCKConfig.BasePath = decodeURIComponent( document.location.pathname.substr(1) ) ; FCKConfig.BasePath = FCKConfig.BasePath.replace( /\\/gi, '/' ) ; // The way to address local files is different according to the OS. // In Windows it is file:// but in MacOs it is file:/// so let's get it automatically var sFullProtocol = document.location.href.match( /^(file\:\/{2,3})/ )[1] ; // #945 Opera does strange things with files loaded from the disk, and it fails in Mac to load xml files if ( FCKBrowserInfo.IsOpera ) sFullProtocol += 'localhost/' ; FCKConfig.BasePath = sFullProtocol + FCKConfig.BasePath.substring( 0, FCKConfig.BasePath.lastIndexOf( '/' ) + 1) ; } else FCKConfig.BasePath = document.location.protocol + '//' + document.location.host + document.location.pathname.substring( 0, document.location.pathname.lastIndexOf( '/' ) + 1) ; FCKConfig.FullBasePath = FCKConfig.BasePath ; FCKConfig.EditorPath = FCKConfig.BasePath.replace( /editor\/$/, '' ) ; // There is a bug in Gecko. If the editor is hidden on startup, an error is // thrown when trying to get the screen dimensions. try { FCKConfig.ScreenWidth = screen.width ; FCKConfig.ScreenHeight = screen.height ; } catch (e) { FCKConfig.ScreenWidth = 800 ; FCKConfig.ScreenHeight = 600 ; } // Override the actual configuration values with the values passed throw the // hidden field "<InstanceName>___Config". FCKConfig.ProcessHiddenField = function() { this.PageConfig = new Object() ; // Get the hidden field. var oConfigField = window.parent.document.getElementById( FCK.Name + '___Config' ) ; // Do nothing if the config field was not defined. if ( ! oConfigField ) return ; var aCouples = oConfigField.value.split('&') ; for ( var i = 0 ; i < aCouples.length ; i++ ) { if ( aCouples[i].length == 0 ) continue ; var aConfig = aCouples[i].split( '=' ) ; var sKey = decodeURIComponent( aConfig[0] ) ; var sVal = decodeURIComponent( aConfig[1] ) ; if ( sKey == 'CustomConfigurationsPath' ) // The Custom Config File path must be loaded immediately. FCKConfig[ sKey ] = sVal ; else if ( sVal.toLowerCase() == "true" ) // If it is a boolean TRUE. this.PageConfig[ sKey ] = true ; else if ( sVal.toLowerCase() == "false" ) // If it is a boolean FALSE. this.PageConfig[ sKey ] = false ; else if ( sVal.length > 0 && !isNaN( sVal ) ) // If it is a number. this.PageConfig[ sKey ] = parseInt( sVal, 10 ) ; else // In any other case it is a string. this.PageConfig[ sKey ] = sVal ; } } function FCKConfig_LoadPageConfig() { var oPageConfig = FCKConfig.PageConfig ; for ( var sKey in oPageConfig ) FCKConfig[ sKey ] = oPageConfig[ sKey ] ; } function FCKConfig_PreProcess() { var oConfig = FCKConfig ; // Force debug mode if fckdebug=true in the QueryString (main page). if ( oConfig.AllowQueryStringDebug ) { try { if ( (/fckdebug=true/i).test( window.top.location.search ) ) oConfig.Debug = true ; } catch (e) { /* Ignore it. Much probably we are inside a FRAME where the "top" is in another domain (security error). */ } } // Certifies that the "PluginsPath" configuration ends with a slash. if ( !oConfig.PluginsPath.EndsWith('/') ) oConfig.PluginsPath += '/' ; // If no ToolbarComboPreviewCSS, point it to EditorAreaCSS. var sComboPreviewCSS = oConfig.ToolbarComboPreviewCSS ; if ( !sComboPreviewCSS || sComboPreviewCSS.length == 0 ) oConfig.ToolbarComboPreviewCSS = oConfig.EditorAreaCSS ; // Turn the attributes that will be removed in the RemoveFormat from a string to an array oConfig.RemoveAttributesArray = (oConfig.RemoveAttributes || '').split( ',' ); if ( !FCKConfig.SkinEditorCSS || FCKConfig.SkinEditorCSS.length == 0 ) FCKConfig.SkinEditorCSS = FCKConfig.SkinPath + 'fck_editor.css' ; if ( !FCKConfig.SkinDialogCSS || FCKConfig.SkinDialogCSS.length == 0 ) FCKConfig.SkinDialogCSS = FCKConfig.SkinPath + 'fck_dialog.css' ; } // Define toolbar sets collection. FCKConfig.ToolbarSets = new Object() ; // Defines the plugins collection. FCKConfig.Plugins = new Object() ; FCKConfig.Plugins.Items = new Array() ; FCKConfig.Plugins.Add = function( name, langs, path ) { FCKConfig.Plugins.Items.push( [name, langs, path] ) ; } // FCKConfig.ProtectedSource: object that holds a collection of Regular // Expressions that defined parts of the raw HTML that must remain untouched // like custom tags, scripts, server side code, etc... FCKConfig.ProtectedSource = new Object() ; // Generates a string used to identify and locate the Protected Tags comments. FCKConfig.ProtectedSource._CodeTag = (new Date()).valueOf() ; // Initialize the regex array with the default ones. FCKConfig.ProtectedSource.RegexEntries = [ // First of any other protection, we must protect all comments to avoid // loosing them (of course, IE related). /<!--[\s\S]*?-->/g , // Script tags will also be forced to be protected, otherwise IE will execute them. /<script[\s\S]*?<\/script>/gi, // <noscript> tags (get lost in IE and messed up in FF). /<noscript[\s\S]*?<\/noscript>/gi ] ; FCKConfig.ProtectedSource.Add = function( regexPattern ) { this.RegexEntries.push( regexPattern ) ; } FCKConfig.ProtectedSource.Protect = function( html ) { var codeTag = this._CodeTag ; function _Replace( protectedSource ) { var index = FCKTempBin.AddElement( protectedSource ) ; return '<!--{' + codeTag + index + '}-->' ; } for ( var i = 0 ; i < this.RegexEntries.length ; i++ ) { html = html.replace( this.RegexEntries[i], _Replace ) ; } return html ; } FCKConfig.ProtectedSource.Revert = function( html, clearBin ) { function _Replace( m, opener, index ) { var protectedValue = clearBin ? FCKTempBin.RemoveElement( index ) : FCKTempBin.Elements[ index ] ; // There could be protected source inside another one. return FCKConfig.ProtectedSource.Revert( protectedValue, clearBin ) ; } var regex = new RegExp( "(<|&lt;)!--\\{" + this._CodeTag + "(\\d+)\\}--(>|&gt;)", "g" ) ; return html.replace( regex, _Replace ) ; } // Returns a string with the attributes that must be appended to the body FCKConfig.GetBodyAttributes = function() { var bodyAttributes = '' ; // Add id and class to the body. if ( this.BodyId && this.BodyId.length > 0 ) bodyAttributes += ' id="' + this.BodyId + '"' ; if ( this.BodyClass && this.BodyClass.length > 0 ) bodyAttributes += ' class="' + this.BodyClass + '"' ; return bodyAttributes ; } // Sets the body attributes directly on the node FCKConfig.ApplyBodyAttributes = function( oBody ) { // Add ID and Class to the body if ( this.BodyId && this.BodyId.length > 0 ) oBody.id = FCKConfig.BodyId ; if ( this.BodyClass && this.BodyClass.length > 0 ) oBody.className += ' ' + FCKConfig.BodyClass ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Utility functions. (Gecko version). */ FCKTools.CancelEvent = function( e ) { if ( e ) e.preventDefault() ; } FCKTools.DisableSelection = function( element ) { if ( FCKBrowserInfo.IsGecko ) element.style.MozUserSelect = 'none' ; // Gecko only. else if ( FCKBrowserInfo.IsSafari ) element.style.KhtmlUserSelect = 'none' ; // WebKit only. else element.style.userSelect = 'none' ; // CSS3 (not supported yet). } // Appends a CSS file to a document. FCKTools._AppendStyleSheet = function( documentElement, cssFileUrl ) { var e = documentElement.createElement( 'LINK' ) ; e.rel = 'stylesheet' ; e.type = 'text/css' ; e.href = cssFileUrl ; documentElement.getElementsByTagName("HEAD")[0].appendChild( e ) ; return e ; } // Appends a CSS style string to a document. FCKTools.AppendStyleString = function( documentElement, cssStyles ) { if ( !cssStyles ) return null ; var e = documentElement.createElement( "STYLE" ) ; e.appendChild( documentElement.createTextNode( cssStyles ) ) ; documentElement.getElementsByTagName( "HEAD" )[0].appendChild( e ) ; return e ; } // Removes all attributes and values from the element. FCKTools.ClearElementAttributes = function( element ) { // Loop throw all attributes in the element for ( var i = 0 ; i < element.attributes.length ; i++ ) { // Remove the element by name. element.removeAttribute( element.attributes[i].name, 0 ) ; // 0 : Case Insensitive } } // Returns an Array of strings with all defined in the elements inside another element. FCKTools.GetAllChildrenIds = function( parentElement ) { // Create the array that will hold all Ids. var aIds = new Array() ; // Define a recursive function that search for the Ids. var fGetIds = function( parent ) { for ( var i = 0 ; i < parent.childNodes.length ; i++ ) { var sId = parent.childNodes[i].id ; // Check if the Id is defined for the element. if ( sId && sId.length > 0 ) aIds[ aIds.length ] = sId ; // Recursive call. fGetIds( parent.childNodes[i] ) ; } } // Start the recursive calls. fGetIds( parentElement ) ; return aIds ; } // Replaces a tag with its contents. For example "<span>My <b>tag</b></span>" // will be replaced with "My <b>tag</b>". FCKTools.RemoveOuterTags = function( e ) { var oFragment = e.ownerDocument.createDocumentFragment() ; for ( var i = 0 ; i < e.childNodes.length ; i++ ) oFragment.appendChild( e.childNodes[i].cloneNode(true) ) ; e.parentNode.replaceChild( oFragment, e ) ; } FCKTools.CreateXmlObject = function( object ) { switch ( object ) { case 'XmlHttp' : return new XMLHttpRequest() ; case 'DOMDocument' : // Originaly, we were had the following here: // return document.implementation.createDocument( '', '', null ) ; // But that doesn't work if we're running under domain relaxation mode, so we need a workaround. // See http://ajaxian.com/archives/xml-messages-with-cross-domain-json about the trick we're using. var doc = ( new DOMParser() ).parseFromString( '<tmp></tmp>', 'text/xml' ) ; FCKDomTools.RemoveNode( doc.firstChild ) ; return doc ; } return null ; } FCKTools.GetScrollPosition = function( relativeWindow ) { return { X : relativeWindow.pageXOffset, Y : relativeWindow.pageYOffset } ; } FCKTools.AddEventListener = function( sourceObject, eventName, listener ) { sourceObject.addEventListener( eventName, listener, false ) ; } FCKTools.RemoveEventListener = function( sourceObject, eventName, listener ) { sourceObject.removeEventListener( eventName, listener, false ) ; } // Listeners attached with this function cannot be detached. FCKTools.AddEventListenerEx = function( sourceObject, eventName, listener, paramsArray ) { sourceObject.addEventListener( eventName, function( e ) { listener.apply( sourceObject, [ e ].concat( paramsArray || [] ) ) ; }, false ) ; } // Returns and object with the "Width" and "Height" properties. FCKTools.GetViewPaneSize = function( win ) { return { Width : win.innerWidth, Height : win.innerHeight } ; } FCKTools.SaveStyles = function( element ) { var data = FCKTools.ProtectFormStyles( element ) ; var oSavedStyles = new Object() ; if ( element.className.length > 0 ) { oSavedStyles.Class = element.className ; element.className = '' ; } var sInlineStyle = element.getAttribute( 'style' ) ; if ( sInlineStyle && sInlineStyle.length > 0 ) { oSavedStyles.Inline = sInlineStyle ; element.setAttribute( 'style', '', 0 ) ; // 0 : Case Insensitive } FCKTools.RestoreFormStyles( element, data ) ; return oSavedStyles ; } FCKTools.RestoreStyles = function( element, savedStyles ) { var data = FCKTools.ProtectFormStyles( element ) ; element.className = savedStyles.Class || '' ; if ( savedStyles.Inline ) element.setAttribute( 'style', savedStyles.Inline, 0 ) ; // 0 : Case Insensitive else element.removeAttribute( 'style', 0 ) ; FCKTools.RestoreFormStyles( element, data ) ; } FCKTools.RegisterDollarFunction = function( targetWindow ) { targetWindow.$ = function( id ) { return targetWindow.document.getElementById( id ) ; } ; } FCKTools.AppendElement = function( target, elementName ) { return target.appendChild( target.ownerDocument.createElement( elementName ) ) ; } // Get the coordinates of an element. // @el : The element to get the position. // @relativeWindow: The window to which we want the coordinates relative to. FCKTools.GetElementPosition = function( el, relativeWindow ) { // Initializes the Coordinates object that will be returned by the function. var c = { X:0, Y:0 } ; var oWindow = relativeWindow || window ; var oOwnerWindow = FCKTools.GetElementWindow( el ) ; var previousElement = null ; // Loop throw the offset chain. while ( el ) { var sPosition = oOwnerWindow.getComputedStyle(el, '').position ; // Check for non "static" elements. // 'FCKConfig.FloatingPanelsZIndex' -- Submenus are under a positioned IFRAME. if ( sPosition && sPosition != 'static' && el.style.zIndex != FCKConfig.FloatingPanelsZIndex ) break ; /* FCKDebug.Output( el.tagName + ":" + "offset=" + el.offsetLeft + "," + el.offsetTop + " " + "scroll=" + el.scrollLeft + "," + el.scrollTop ) ; */ c.X += el.offsetLeft - el.scrollLeft ; c.Y += el.offsetTop - el.scrollTop ; // Backtrack due to offsetParent's calculation by the browser ignores scrollLeft and scrollTop. // Backtracking is not needed for Opera if ( ! FCKBrowserInfo.IsOpera ) { var scrollElement = previousElement ; while ( scrollElement && scrollElement != el ) { c.X -= scrollElement.scrollLeft ; c.Y -= scrollElement.scrollTop ; scrollElement = scrollElement.parentNode ; } } previousElement = el ; if ( el.offsetParent ) el = el.offsetParent ; else { if ( oOwnerWindow != oWindow ) { el = oOwnerWindow.frameElement ; previousElement = null ; if ( el ) oOwnerWindow = FCKTools.GetElementWindow( el ) ; } else { c.X += el.scrollLeft ; c.Y += el.scrollTop ; break ; } } } // Return the Coordinates object return c ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Dialog windows operations. */ var FCKDialog = ( function() { var topDialog ; var baseZIndex ; var cover ; // The document that holds the dialog. var topWindow = window.parent ; while ( topWindow.parent && topWindow.parent != topWindow ) { try { if ( topWindow.parent.document.domain != document.domain ) break ; if ( topWindow.parent.document.getElementsByTagName( 'frameset' ).length > 0 ) break ; } catch ( e ) { break ; } topWindow = topWindow.parent ; } var topDocument = topWindow.document ; var getZIndex = function() { if ( !baseZIndex ) baseZIndex = FCKConfig.FloatingPanelsZIndex + 999 ; return ++baseZIndex ; } // TODO : This logic is not actually working when reducing the window, only // when enlarging it. var resizeHandler = function() { if ( !cover ) return ; var relElement = FCKTools.IsStrictMode( topDocument ) ? topDocument.documentElement : topDocument.body ; FCKDomTools.SetElementStyles( cover, { 'width' : Math.max( relElement.scrollWidth, relElement.clientWidth, topDocument.scrollWidth || 0 ) - 1 + 'px', 'height' : Math.max( relElement.scrollHeight, relElement.clientHeight, topDocument.scrollHeight || 0 ) - 1 + 'px' } ) ; } return { /** * Opens a dialog window using the standard dialog template. */ OpenDialog : function( dialogName, dialogTitle, dialogPage, width, height, customValue, parentWindow, resizable ) { if ( !topDialog ) this.DisplayMainCover() ; // Setup the dialog info to be passed to the dialog. var dialogInfo = { Title : dialogTitle, Page : dialogPage, Editor : window, CustomValue : customValue, // Optional TopWindow : topWindow } FCK.ToolbarSet.CurrentInstance.Selection.Save( true ) ; // Calculate the dialog position, centering it on the screen. var viewSize = FCKTools.GetViewPaneSize( topWindow ) ; var scrollPosition = { 'X' : 0, 'Y' : 0 } ; var useAbsolutePosition = FCKBrowserInfo.IsIE && ( !FCKBrowserInfo.IsIE7 || !FCKTools.IsStrictMode( topWindow.document ) ) ; if ( useAbsolutePosition ) scrollPosition = FCKTools.GetScrollPosition( topWindow ) ; var iTop = Math.max( scrollPosition.Y + ( viewSize.Height - height - 20 ) / 2, 0 ) ; var iLeft = Math.max( scrollPosition.X + ( viewSize.Width - width - 20 ) / 2, 0 ) ; // Setup the IFRAME that will hold the dialog. var dialog = topDocument.createElement( 'iframe' ) ; FCKTools.ResetStyles( dialog ) ; dialog.src = FCKConfig.BasePath + 'fckdialog.html' ; // Dummy URL for testing whether the code in fckdialog.js alone leaks memory. // dialog.src = 'about:blank'; dialog.frameBorder = 0 ; dialog.allowTransparency = true ; FCKDomTools.SetElementStyles( dialog, { 'position' : ( useAbsolutePosition ) ? 'absolute' : 'fixed', 'top' : iTop + 'px', 'left' : iLeft + 'px', 'width' : width + 'px', 'height' : height + 'px', 'zIndex' : getZIndex() } ) ; // Save the dialog info to be used by the dialog page once loaded. dialog._DialogArguments = dialogInfo ; // Append the IFRAME to the target document. topDocument.body.appendChild( dialog ) ; // Keep record of the dialog's parent/child relationships. dialog._ParentDialog = topDialog ; topDialog = dialog ; }, /** * (For internal use) * Called when the top dialog is closed. */ OnDialogClose : function( dialogWindow ) { var dialog = dialogWindow.frameElement ; FCKDomTools.RemoveNode( dialog ) ; if ( dialog._ParentDialog ) // Nested Dialog. { topDialog = dialog._ParentDialog ; dialog._ParentDialog.contentWindow.SetEnabled( true ) ; } else // First Dialog. { // Set the Focus in the browser, so the "OnBlur" event is not // fired. In IE, there is no need to do that because the dialog // already moved the selection to the editing area before // closing (EnsureSelection). Also, the Focus() call here // causes memory leak on IE7 (weird). if ( !FCKBrowserInfo.IsIE ) FCK.Focus() ; this.HideMainCover() ; // Bug #1918: Assigning topDialog = null directly causes IE6 to crash. setTimeout( function(){ topDialog = null ; }, 0 ) ; // Release the previously saved selection. FCK.ToolbarSet.CurrentInstance.Selection.Release() ; } }, DisplayMainCover : function() { // Setup the DIV that will be used to cover. cover = topDocument.createElement( 'div' ) ; FCKTools.ResetStyles( cover ) ; FCKDomTools.SetElementStyles( cover, { 'position' : 'absolute', 'zIndex' : getZIndex(), 'top' : '0px', 'left' : '0px', 'backgroundColor' : FCKConfig.BackgroundBlockerColor } ) ; FCKDomTools.SetOpacity( cover, FCKConfig.BackgroundBlockerOpacity ) ; // For IE6-, we need to fill the cover with a transparent IFRAME, // to properly block <select> fields. if ( FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsIE7 ) { var iframe = topDocument.createElement( 'iframe' ) ; FCKTools.ResetStyles( iframe ) ; iframe.hideFocus = true ; iframe.frameBorder = 0 ; iframe.src = FCKTools.GetVoidUrl() ; FCKDomTools.SetElementStyles( iframe, { 'width' : '100%', 'height' : '100%', 'position' : 'absolute', 'left' : '0px', 'top' : '0px', 'filter' : 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)' } ) ; cover.appendChild( iframe ) ; } // We need to manually adjust the cover size on resize. FCKTools.AddEventListener( topWindow, 'resize', resizeHandler ) ; resizeHandler() ; topDocument.body.appendChild( cover ) ; FCKFocusManager.Lock() ; // Prevent the user from refocusing the disabled // editing window by pressing Tab. (Bug #2065) var el = FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'frameElement' ) ; el._fck_originalTabIndex = el.tabIndex ; el.tabIndex = -1 ; }, HideMainCover : function() { FCKDomTools.RemoveNode( cover ) ; FCKFocusManager.Unlock() ; // Revert the tab index hack. (Bug #2065) var el = FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'frameElement' ) ; el.tabIndex = el._fck_originalTabIndex ; FCKDomTools.ClearElementJSProperty( el, '_fck_originalTabIndex' ) ; }, GetCover : function() { return cover ; } } ; } )() ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Tool object to manage HTML lists items (UL, OL and LI). */ var FCKListHandler = { OutdentListItem : function( listItem ) { var eParent = listItem.parentNode ; // It may happen that a LI is not in a UL or OL (Orphan). if ( eParent.tagName.toUpperCase().Equals( 'UL','OL' ) ) { var oDocument = FCKTools.GetElementDocument( listItem ) ; var oDogFrag = new FCKDocumentFragment( oDocument ) ; // All children and successive siblings will be moved to a a DocFrag. var eNextSiblings = oDogFrag.RootNode ; var eHasLiSibling = false ; // If we have nested lists inside it, let's move it to the list of siblings. var eChildList = FCKDomTools.GetFirstChild( listItem, ['UL','OL'] ) ; if ( eChildList ) { eHasLiSibling = true ; var eChild ; // The extra () is to avoid a warning with strict error checking. This is ok. while ( (eChild = eChildList.firstChild) ) eNextSiblings.appendChild( eChildList.removeChild( eChild ) ) ; FCKDomTools.RemoveNode( eChildList ) ; } // Move all successive siblings. var eSibling ; var eHasSuccessiveLiSibling = false ; // The extra () is to avoid a warning with strict error checking. This is ok. while ( (eSibling = listItem.nextSibling) ) { if ( !eHasLiSibling && eSibling.nodeType == 1 && eSibling.nodeName.toUpperCase() == 'LI' ) eHasSuccessiveLiSibling = eHasLiSibling = true ; eNextSiblings.appendChild( eSibling.parentNode.removeChild( eSibling ) ) ; // If a sibling is a incorrectly nested UL or OL, consider only its children. if ( !eHasSuccessiveLiSibling && eSibling.nodeType == 1 && eSibling.nodeName.toUpperCase().Equals( 'UL','OL' ) ) FCKDomTools.RemoveNode( eSibling, true ) ; } // If we are in a list chain. var sParentParentTag = eParent.parentNode.tagName.toUpperCase() ; var bWellNested = ( sParentParentTag == 'LI' ) ; if ( bWellNested || sParentParentTag.Equals( 'UL','OL' ) ) { if ( eHasLiSibling ) { var eChildList = eParent.cloneNode( false ) ; oDogFrag.AppendTo( eChildList ) ; listItem.appendChild( eChildList ) ; } else if ( bWellNested ) oDogFrag.InsertAfterNode( eParent.parentNode ) ; else oDogFrag.InsertAfterNode( eParent ) ; // Move the LI after its parent.parentNode (the upper LI in the hierarchy). if ( bWellNested ) FCKDomTools.InsertAfterNode( eParent.parentNode, eParent.removeChild( listItem ) ) ; else FCKDomTools.InsertAfterNode( eParent, eParent.removeChild( listItem ) ) ; } else { if ( eHasLiSibling ) { var eNextList = eParent.cloneNode( false ) ; oDogFrag.AppendTo( eNextList ) ; FCKDomTools.InsertAfterNode( eParent, eNextList ) ; } var eBlock = oDocument.createElement( FCKConfig.EnterMode == 'p' ? 'p' : 'div' ) ; FCKDomTools.MoveChildren( eParent.removeChild( listItem ), eBlock ) ; FCKDomTools.InsertAfterNode( eParent, eBlock ) ; if ( FCKConfig.EnterMode == 'br' ) { // We need the bogus to make it work properly. In Gecko, we // need it before the new block, on IE, after it. if ( FCKBrowserInfo.IsGecko ) eBlock.parentNode.insertBefore( FCKTools.CreateBogusBR( oDocument ), eBlock ) ; else FCKDomTools.InsertAfterNode( eBlock, FCKTools.CreateBogusBR( oDocument ) ) ; FCKDomTools.RemoveNode( eBlock, true ) ; } } if ( this.CheckEmptyList( eParent ) ) FCKDomTools.RemoveNode( eParent, true ) ; } }, CheckEmptyList : function( listElement ) { return ( FCKDomTools.GetFirstChild( listElement, 'LI' ) == null ) ; }, // Check if the list has contents (excluding nested lists). CheckListHasContents : function( listElement ) { var eChildNode = listElement.firstChild ; while ( eChildNode ) { switch ( eChildNode.nodeType ) { case 1 : if ( !eChildNode.nodeName.IEquals( 'UL','LI' ) ) return true ; break ; case 3 : if ( eChildNode.nodeValue.Trim().length > 0 ) return true ; } eChildNode = eChildNode.nextSibling ; } return false ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines the FCKXHtml object, responsible for the XHTML operations. */ var FCKXHtml = new Object() ; FCKXHtml.CurrentJobNum = 0 ; FCKXHtml.GetXHTML = function( node, includeNode, format ) { FCKDomTools.CheckAndRemovePaddingNode( FCKTools.GetElementDocument( node ), FCKConfig.EnterMode ) ; FCKXHtmlEntities.Initialize() ; // Set the correct entity to use for empty blocks. this._NbspEntity = ( FCKConfig.ProcessHTMLEntities? 'nbsp' : '#160' ) ; // Save the current IsDirty state. The XHTML processor may change the // original HTML, dirtying it. var bIsDirty = FCK.IsDirty() ; // Special blocks are blocks of content that remain untouched during the // process. It is used for SCRIPTs and STYLEs. FCKXHtml.SpecialBlocks = new Array() ; // Create the XML DOMDocument object. this.XML = FCKTools.CreateXmlObject( 'DOMDocument' ) ; // Add a root element that holds all child nodes. this.MainNode = this.XML.appendChild( this.XML.createElement( 'xhtml' ) ) ; FCKXHtml.CurrentJobNum++ ; // var dTimer = new Date() ; if ( includeNode ) this._AppendNode( this.MainNode, node ) ; else this._AppendChildNodes( this.MainNode, node, false ) ; // Get the resulting XHTML as a string. var sXHTML = this._GetMainXmlString() ; // alert( 'Time: ' + ( ( ( new Date() ) - dTimer ) ) + ' ms' ) ; this.XML = null ; // Safari adds xmlns="http://www.w3.org/1999/xhtml" to the root node (#963) if ( FCKBrowserInfo.IsSafari ) sXHTML = sXHTML.replace( /^<xhtml.*?>/, '<xhtml>' ) ; // Strip the "XHTML" root node. sXHTML = sXHTML.substr( 7, sXHTML.length - 15 ).Trim() ; // According to the doctype set the proper end for self-closing tags // HTML: <br> // XHTML: Add a space, like <br/> -> <br /> if (FCKConfig.DocType.length > 0 && FCKRegexLib.HtmlDocType.test( FCKConfig.DocType ) ) sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, '>'); else sXHTML = sXHTML.replace( FCKRegexLib.SpaceNoClose, ' />'); if ( FCKConfig.ForceSimpleAmpersand ) sXHTML = sXHTML.replace( FCKRegexLib.ForceSimpleAmpersand, '&' ) ; if ( format ) sXHTML = FCKCodeFormatter.Format( sXHTML ) ; // Now we put back the SpecialBlocks contents. for ( var i = 0 ; i < FCKXHtml.SpecialBlocks.length ; i++ ) { var oRegex = new RegExp( '___FCKsi___' + i ) ; sXHTML = sXHTML.replace( oRegex, FCKXHtml.SpecialBlocks[i] ) ; } // Replace entities marker with the ampersand. sXHTML = sXHTML.replace( FCKRegexLib.GeckoEntitiesMarker, '&' ) ; // Restore the IsDirty state if it was not dirty. if ( !bIsDirty ) FCK.ResetIsDirty() ; FCKDomTools.EnforcePaddingNode( FCKTools.GetElementDocument( node ), FCKConfig.EnterMode ) ; return sXHTML ; } FCKXHtml._AppendAttribute = function( xmlNode, attributeName, attributeValue ) { try { if ( attributeValue == undefined || attributeValue == null ) attributeValue = '' ; else if ( attributeValue.replace ) { if ( FCKConfig.ForceSimpleAmpersand ) attributeValue = attributeValue.replace( /&/g, '___FCKAmp___' ) ; // Entities must be replaced in the attribute values. attributeValue = attributeValue.replace( FCKXHtmlEntities.EntitiesRegex, FCKXHtml_GetEntity ) ; } // Create the attribute. var oXmlAtt = this.XML.createAttribute( attributeName ) ; oXmlAtt.value = attributeValue ; // Set the attribute in the node. xmlNode.attributes.setNamedItem( oXmlAtt ) ; } catch (e) {} } FCKXHtml._AppendChildNodes = function( xmlNode, htmlNode, isBlockElement ) { var oNode = htmlNode.firstChild ; while ( oNode ) { this._AppendNode( xmlNode, oNode ) ; oNode = oNode.nextSibling ; } // Trim block elements. This is also needed to avoid Firefox leaving extra // BRs at the end of them. if ( isBlockElement && htmlNode.tagName && htmlNode.tagName.toLowerCase() != 'pre' ) { FCKDomTools.TrimNode( xmlNode ) ; if ( FCKConfig.FillEmptyBlocks ) { var lastChild = xmlNode.lastChild ; if ( lastChild && lastChild.nodeType == 1 && lastChild.nodeName == 'br' ) this._AppendEntity( xmlNode, this._NbspEntity ) ; } } // If the resulting node is empty. if ( xmlNode.childNodes.length == 0 ) { if ( isBlockElement && FCKConfig.FillEmptyBlocks ) { this._AppendEntity( xmlNode, this._NbspEntity ) ; return xmlNode ; } var sNodeName = xmlNode.nodeName ; // Some inline elements are required to have something inside (span, strong, etc...). if ( FCKListsLib.InlineChildReqElements[ sNodeName ] ) return null ; // We can't use short representation of empty elements that are not marked // as empty in th XHTML DTD. if ( !FCKListsLib.EmptyElements[ sNodeName ] ) xmlNode.appendChild( this.XML.createTextNode('') ) ; } return xmlNode ; } FCKXHtml._AppendNode = function( xmlNode, htmlNode ) { if ( !htmlNode ) return false ; switch ( htmlNode.nodeType ) { // Element Node. case 1 : // If we detect a <br> inside a <pre> in Gecko, turn it into a line break instead. // This is a workaround for the Gecko bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=92921 if ( FCKBrowserInfo.IsGecko && htmlNode.tagName.toLowerCase() == 'br' && htmlNode.parentNode.tagName.toLowerCase() == 'pre' ) { var val = '\r' ; if ( htmlNode == htmlNode.parentNode.firstChild ) val += '\r' ; return FCKXHtml._AppendNode( xmlNode, this.XML.createTextNode( val ) ) ; } // Here we found an element that is not the real element, but a // fake one (like the Flash placeholder image), so we must get the real one. if ( htmlNode.getAttribute('_fckfakelement') ) return FCKXHtml._AppendNode( xmlNode, FCK.GetRealElement( htmlNode ) ) ; // Ignore bogus BR nodes in the DOM. if ( FCKBrowserInfo.IsGecko && ( htmlNode.hasAttribute('_moz_editor_bogus_node') || htmlNode.getAttribute( 'type' ) == '_moz' ) ) { if ( htmlNode.nextSibling ) return false ; else { htmlNode.removeAttribute( '_moz_editor_bogus_node' ) ; htmlNode.removeAttribute( 'type' ) ; } } // This is for elements that are instrumental to FCKeditor and // must be removed from the final HTML. if ( htmlNode.getAttribute('_fcktemp') ) return false ; // Get the element name. var sNodeName = htmlNode.tagName.toLowerCase() ; if ( FCKBrowserInfo.IsIE ) { // IE doens't include the scope name in the nodeName. So, add the namespace. if ( htmlNode.scopeName && htmlNode.scopeName != 'HTML' && htmlNode.scopeName != 'FCK' ) sNodeName = htmlNode.scopeName.toLowerCase() + ':' + sNodeName ; } else { if ( sNodeName.StartsWith( 'fck:' ) ) sNodeName = sNodeName.Remove( 0,4 ) ; } // Check if the node name is valid, otherwise ignore this tag. // If the nodeName starts with a slash, it is a orphan closing tag. // On some strange cases, the nodeName is empty, even if the node exists. if ( !FCKRegexLib.ElementName.test( sNodeName ) ) return false ; // The already processed nodes must be marked to avoid then to be duplicated (bad formatted HTML). // So here, the "mark" is checked... if the element is Ok, then mark it. if ( htmlNode._fckxhtmljob && htmlNode._fckxhtmljob == FCKXHtml.CurrentJobNum ) return false ; var oNode = this.XML.createElement( sNodeName ) ; // Add all attributes. FCKXHtml._AppendAttributes( xmlNode, htmlNode, oNode, sNodeName ) ; htmlNode._fckxhtmljob = FCKXHtml.CurrentJobNum ; // Tag specific processing. var oTagProcessor = FCKXHtml.TagProcessors[ sNodeName ] ; if ( oTagProcessor ) oNode = oTagProcessor( oNode, htmlNode, xmlNode ) ; else oNode = this._AppendChildNodes( oNode, htmlNode, Boolean( FCKListsLib.NonEmptyBlockElements[ sNodeName ] ) ) ; if ( !oNode ) return false ; xmlNode.appendChild( oNode ) ; break ; // Text Node. case 3 : if ( htmlNode.parentNode && htmlNode.parentNode.nodeName.IEquals( 'pre' ) ) return this._AppendTextNode( xmlNode, htmlNode.nodeValue ) ; return this._AppendTextNode( xmlNode, htmlNode.nodeValue.ReplaceNewLineChars(' ') ) ; // Comment case 8 : // IE catches the <!DOTYPE ... > as a comment, but it has no // innerHTML, so we can catch it, and ignore it. if ( FCKBrowserInfo.IsIE && !htmlNode.innerHTML ) break ; try { xmlNode.appendChild( this.XML.createComment( htmlNode.nodeValue ) ) ; } catch (e) { /* Do nothing... probably this is a wrong format comment. */ } break ; // Unknown Node type. default : xmlNode.appendChild( this.XML.createComment( "Element not supported - Type: " + htmlNode.nodeType + " Name: " + htmlNode.nodeName ) ) ; break ; } return true ; } // Append an item to the SpecialBlocks array and returns the tag to be used. FCKXHtml._AppendSpecialItem = function( item ) { return '___FCKsi___' + ( FCKXHtml.SpecialBlocks.push( item ) - 1 ) ; } FCKXHtml._AppendEntity = function( xmlNode, entity ) { xmlNode.appendChild( this.XML.createTextNode( '#?-:' + entity + ';' ) ) ; } FCKXHtml._AppendTextNode = function( targetNode, textValue ) { var bHadText = textValue.length > 0 ; if ( bHadText ) targetNode.appendChild( this.XML.createTextNode( textValue.replace( FCKXHtmlEntities.EntitiesRegex, FCKXHtml_GetEntity ) ) ) ; return bHadText ; } // Retrieves a entity (internal format) for a given character. function FCKXHtml_GetEntity( character ) { // We cannot simply place the entities in the text, because the XML parser // will translate & to &amp;. So we use a temporary marker which is replaced // in the end of the processing. var sEntity = FCKXHtmlEntities.Entities[ character ] || ( '#' + character.charCodeAt(0) ) ; return '#?-:' + sEntity + ';' ; } // An object that hold tag specific operations. FCKXHtml.TagProcessors = { a : function( node, htmlNode ) { // Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1556878). if ( htmlNode.innerHTML.Trim().length == 0 && !htmlNode.name ) return false ; var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ; if ( sSavedUrl != null ) FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ; // Anchors with content has been marked with an additional class, now we must remove it. if ( FCKBrowserInfo.IsIE ) { // Buggy IE, doesn't copy the name of changed anchors. if ( htmlNode.name ) FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ; } node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ; return node ; }, area : function( node, htmlNode ) { var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ; if ( sSavedUrl != null ) FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ; // IE ignores the "COORDS" and "SHAPE" attribute so we must add it manually. if ( FCKBrowserInfo.IsIE ) { if ( ! node.attributes.getNamedItem( 'coords' ) ) { var sCoords = htmlNode.getAttribute( 'coords', 2 ) ; if ( sCoords && sCoords != '0,0,0' ) FCKXHtml._AppendAttribute( node, 'coords', sCoords ) ; } if ( ! node.attributes.getNamedItem( 'shape' ) ) { var sShape = htmlNode.getAttribute( 'shape', 2 ) ; if ( sShape && sShape.length > 0 ) FCKXHtml._AppendAttribute( node, 'shape', sShape.toLowerCase() ) ; } } return node ; }, body : function( node, htmlNode ) { node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ; // Remove spellchecker attributes added for Firefox when converting to HTML code (Bug #1351). node.removeAttribute( 'spellcheck' ) ; return node ; }, // IE loses contents of iframes, and Gecko does give it back HtmlEncoded // Note: Opera does lose the content and doesn't provide it in the innerHTML string iframe : function( node, htmlNode ) { var sHtml = htmlNode.innerHTML ; // Gecko does give back the encoded html if ( FCKBrowserInfo.IsGecko ) sHtml = FCKTools.HTMLDecode( sHtml ); // Remove the saved urls here as the data won't be processed as nodes sHtml = sHtml.replace( /\s_fcksavedurl="[^"]*"/g, '' ) ; node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( sHtml ) ) ) ; return node ; }, img : function( node, htmlNode ) { // The "ALT" attribute is required in XHTML. if ( ! node.attributes.getNamedItem( 'alt' ) ) FCKXHtml._AppendAttribute( node, 'alt', '' ) ; var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ; if ( sSavedUrl != null ) FCKXHtml._AppendAttribute( node, 'src', sSavedUrl ) ; // Bug #768 : If the width and height are defined inline CSS, // don't define it again in the HTML attributes. if ( htmlNode.style.width ) node.removeAttribute( 'width' ) ; if ( htmlNode.style.height ) node.removeAttribute( 'height' ) ; return node ; }, // Fix orphaned <li> nodes (Bug #503). li : function( node, htmlNode, targetNode ) { // If the XML parent node is already a <ul> or <ol>, then add the <li> as usual. if ( targetNode.nodeName.IEquals( ['ul', 'ol'] ) ) return FCKXHtml._AppendChildNodes( node, htmlNode, true ) ; var newTarget = FCKXHtml.XML.createElement( 'ul' ) ; // Reset the _fckxhtmljob so the HTML node is processed again. htmlNode._fckxhtmljob = null ; // Loop through all sibling LIs, adding them to the <ul>. do { FCKXHtml._AppendNode( newTarget, htmlNode ) ; // Look for the next element following this <li>. do { htmlNode = FCKDomTools.GetNextSibling( htmlNode ) ; } while ( htmlNode && htmlNode.nodeType == 3 && htmlNode.nodeValue.Trim().length == 0 ) } while ( htmlNode && htmlNode.nodeName.toLowerCase() == 'li' ) return newTarget ; }, // Fix nested <ul> and <ol>. ol : function( node, htmlNode, targetNode ) { if ( htmlNode.innerHTML.Trim().length == 0 ) return false ; var ePSibling = targetNode.lastChild ; if ( ePSibling && ePSibling.nodeType == 3 ) ePSibling = ePSibling.previousSibling ; if ( ePSibling && ePSibling.nodeName.toUpperCase() == 'LI' ) { htmlNode._fckxhtmljob = null ; FCKXHtml._AppendNode( ePSibling, htmlNode ) ; return false ; } node = FCKXHtml._AppendChildNodes( node, htmlNode ) ; return node ; }, pre : function ( node, htmlNode ) { var firstChild = htmlNode.firstChild ; if ( firstChild && firstChild.nodeType == 3 ) node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' ) ) ) ; FCKXHtml._AppendChildNodes( node, htmlNode, true ) ; return node ; }, script : function( node, htmlNode ) { // The "TYPE" attribute is required in XHTML. if ( ! node.attributes.getNamedItem( 'type' ) ) FCKXHtml._AppendAttribute( node, 'type', 'text/javascript' ) ; node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( htmlNode.text ) ) ) ; return node ; }, span : function( node, htmlNode ) { // Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1084404). if ( htmlNode.innerHTML.length == 0 ) return false ; node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ; return node ; }, style : function( node, htmlNode ) { // The "TYPE" attribute is required in XHTML. if ( ! node.attributes.getNamedItem( 'type' ) ) FCKXHtml._AppendAttribute( node, 'type', 'text/css' ) ; var cssText = htmlNode.innerHTML ; if ( FCKBrowserInfo.IsIE ) // Bug #403 : IE always appends a \r\n to the beginning of StyleNode.innerHTML cssText = cssText.replace( /^(\r\n|\n|\r)/, '' ) ; node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( cssText ) ) ) ; return node ; }, title : function( node, htmlNode ) { node.appendChild( FCKXHtml.XML.createTextNode( FCK.EditorDocument.title ) ) ; return node ; } } ; FCKXHtml.TagProcessors.ul = FCKXHtml.TagProcessors.ol ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Manage table operations (non-IE). */ FCKTableHandler.GetSelectedCells = function() { var aCells = new Array() ; var oSelection = FCKSelection.GetSelection() ; // If the selection is a text. if ( oSelection.rangeCount == 1 && oSelection.anchorNode.nodeType == 3 ) { var oParent = FCKTools.GetElementAscensor( oSelection.anchorNode, 'TD,TH' ) ; if ( oParent ) aCells[0] = oParent ; return aCells ; } for ( var i = 0 ; i < oSelection.rangeCount ; i++ ) { var oRange = oSelection.getRangeAt(i) ; var oCell ; if ( oRange.startContainer.tagName.Equals( 'TD', 'TH' ) ) oCell = oRange.startContainer ; else oCell = oRange.startContainer.childNodes[ oRange.startOffset ] ; if ( oCell.nodeName.Equals( 'TD', 'TH' ) ) aCells[aCells.length] = oCell ; } return aCells ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Library of keys collections. * * Test have shown that check for the existence of a key in an object is the * most efficient list entry check (10x faster that regex). Example: * if ( FCKListsLib.<ListName>[key] != null ) */ var FCKListsLib = { // We are not handling <ins> and <del> as block elements, for now. BlockElements : { address:1,blockquote:1,center:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,marquee:1,noscript:1,ol:1,p:1,pre:1,script:1,table:1,ul:1 }, // Block elements that may be filled with &nbsp; if empty. NonEmptyBlockElements : { p:1,div:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,address:1,pre:1,ol:1,ul:1,li:1,td:1,th:1 }, // Inline elements which MUST have child nodes. 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 }, // Inline elements which are not marked as empty "Empty" in the XHTML DTD. InlineNonEmptyElements : { a:1,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 }, // Elements marked as empty "Empty" in the XHTML DTD. EmptyElements : { base:1,col:1,meta:1,link:1,hr:1,br:1,param:1,img:1,area:1,input:1 }, // Elements that may be considered the "Block boundary" in an element path. 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,de:1 }, // Elements that may be considered the "Block limit" in an element path. PathBlockLimitElements : { body:1,div:1,td:1,th:1,caption:1,form:1 }, // Block elements for the Styles System. StyleBlockElements : { address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1 }, // Object elements for the Styles System. StyleObjectElements : { img:1,hr:1,li:1,table:1,tr:1,td:1,embed:1,object:1,ol:1,ul:1 }, // Elements that accept text nodes, but are not possible to edit in the browser. NonEditableElements : { button:1,option:1,script:1,iframe:1,textarea:1,object:1,embed:1,map:1,applet:1 }, // Elements used to separate block contents. BlockBoundaries : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1 }, ListBoundaries : { p:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,address:1,pre:1,ol:1,ul:1,li:1,dt:1,de:1,table:1,thead:1,tbody:1,tfoot:1,tr:1,th:1,td:1,caption:1,col:1,colgroup:1,blockquote:1,body:1,br:1 } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Creation and initialization of the "FCK" object. This is the main * object that represents an editor instance. * (IE specific implementations) */ FCK.Description = "FCKeditor for Internet Explorer 5.5+" ; FCK._GetBehaviorsStyle = function() { if ( !FCK._BehaviorsStyle ) { var sBasePath = FCKConfig.BasePath ; var sTableBehavior = '' ; var sStyle ; // The behaviors should be pointed using the BasePath to avoid security // errors when using a different BaseHref. sStyle = '<style type="text/css" _fcktemp="true">' ; if ( FCKConfig.ShowBorders ) sTableBehavior = 'url(' + sBasePath + 'css/behaviors/showtableborders.htc)' ; // Disable resize handlers. sStyle += 'INPUT,TEXTAREA,SELECT,.FCK__Anchor,.FCK__PageBreak,.FCK__InputHidden' ; if ( FCKConfig.DisableObjectResizing ) { sStyle += ',IMG' ; sTableBehavior += ' url(' + sBasePath + 'css/behaviors/disablehandles.htc)' ; } sStyle += ' { behavior: url(' + sBasePath + 'css/behaviors/disablehandles.htc) ; }' ; if ( sTableBehavior.length > 0 ) sStyle += 'TABLE { behavior: ' + sTableBehavior + ' ; }' ; sStyle += '</style>' ; FCK._BehaviorsStyle = sStyle ; } return FCK._BehaviorsStyle ; } function Doc_OnMouseUp() { if ( FCK.EditorWindow.event.srcElement.tagName == 'HTML' ) { FCK.Focus() ; FCK.EditorWindow.event.cancelBubble = true ; FCK.EditorWindow.event.returnValue = false ; } } function Doc_OnPaste() { var body = FCK.EditorDocument.body ; body.detachEvent( 'onpaste', Doc_OnPaste ) ; var ret = FCK.Paste( !FCKConfig.ForcePasteAsPlainText && !FCKConfig.AutoDetectPasteFromWord ) ; body.attachEvent( 'onpaste', Doc_OnPaste ) ; return ret ; } function Doc_OnDblClick() { FCK.OnDoubleClick( FCK.EditorWindow.event.srcElement ) ; FCK.EditorWindow.event.cancelBubble = true ; } function Doc_OnSelectionChange() { // Don't fire the event if no document is loaded. if ( !FCK.IsSelectionChangeLocked && FCK.EditorDocument ) FCK.Events.FireEvent( "OnSelectionChange" ) ; } function Doc_OnDrop() { if ( FCK.MouseDownFlag ) { FCK.MouseDownFlag = false ; return ; } if ( FCKConfig.ForcePasteAsPlainText ) { var evt = FCK.EditorWindow.event ; if ( FCK._CheckIsPastingEnabled() || FCKConfig.ShowDropDialog ) FCK.PasteAsPlainText( evt.dataTransfer.getData( 'Text' ) ) ; evt.returnValue = false ; evt.cancelBubble = true ; } } FCK.InitializeBehaviors = function( dontReturn ) { // Set the focus to the editable area when clicking in the document area. // TODO: The cursor must be positioned at the end. this.EditorDocument.attachEvent( 'onmouseup', Doc_OnMouseUp ) ; // Intercept pasting operations this.EditorDocument.body.attachEvent( 'onpaste', Doc_OnPaste ) ; // Intercept drop operations this.EditorDocument.body.attachEvent( 'ondrop', Doc_OnDrop ) ; // Reset the context menu. FCK.ContextMenu._InnerContextMenu.AttachToElement( FCK.EditorDocument.body ) ; this.EditorDocument.attachEvent("onkeydown", FCK._KeyDownListener ) ; this.EditorDocument.attachEvent("ondblclick", Doc_OnDblClick ) ; this.EditorDocument.attachEvent("onbeforedeactivate", function(){ FCKSelection.Save() ; } ) ; // Catch cursor selection changes. this.EditorDocument.attachEvent("onselectionchange", Doc_OnSelectionChange ) ; FCKTools.AddEventListener( FCK.EditorDocument, 'mousedown', Doc_OnMouseDown ) ; } FCK.InsertHtml = function( html ) { html = FCKConfig.ProtectedSource.Protect( html ) ; html = FCK.ProtectEvents( html ) ; html = FCK.ProtectUrls( html ) ; html = FCK.ProtectTags( html ) ; // FCK.Focus() ; FCKSelection.Restore() ; FCK.EditorWindow.focus() ; FCKUndo.SaveUndoStep() ; // Gets the actual selection. var oSel = FCKSelection.GetSelection() ; // Deletes the actual selection contents. if ( oSel.type.toLowerCase() == 'control' ) oSel.clear() ; // Using the following trick, any comment in the beginning of the HTML will // be preserved. html = '<span id="__fakeFCKRemove__" style="display:none;">fakeFCKRemove</span>' + html ; // Insert the HTML. oSel.createRange().pasteHTML( html ) ; // Remove the fake node FCK.EditorDocument.getElementById('__fakeFCKRemove__').removeNode( true ) ; FCKDocumentProcessor.Process( FCK.EditorDocument ) ; // For some strange reason the SaveUndoStep() call doesn't activate the undo button at the first InsertHtml() call. this.Events.FireEvent( "OnSelectionChange" ) ; } FCK.SetInnerHtml = function( html ) // IE Only { var oDoc = FCK.EditorDocument ; // Using the following trick, any comment in the beginning of the HTML will // be preserved. oDoc.body.innerHTML = '<div id="__fakeFCKRemove__">&nbsp;</div>' + html ; oDoc.getElementById('__fakeFCKRemove__').removeNode( true ) ; } function FCK_PreloadImages() { var oPreloader = new FCKImagePreloader() ; // Add the configured images. oPreloader.AddImages( FCKConfig.PreloadImages ) ; // Add the skin icons strip. oPreloader.AddImages( FCKConfig.SkinPath + 'fck_strip.gif' ) ; oPreloader.OnComplete = LoadToolbarSetup ; oPreloader.Start() ; } // Disable the context menu in the editor (outside the editing area). function Document_OnContextMenu() { return ( event.srcElement._FCKShowContextMenu == true ) ; } document.oncontextmenu = Document_OnContextMenu ; function FCK_Cleanup() { this.LinkedField = null ; this.EditorWindow = null ; this.EditorDocument = null ; } FCK._ExecPaste = function() { // As we call ExecuteNamedCommand('Paste'), it would enter in a loop. So, let's use a semaphore. if ( FCK._PasteIsRunning ) return true ; if ( FCKConfig.ForcePasteAsPlainText ) { FCK.PasteAsPlainText() ; return false ; } var sHTML = FCK._CheckIsPastingEnabled( true ) ; if ( sHTML === false ) FCKTools.RunFunction( FCKDialog.OpenDialog, FCKDialog, ['FCKDialog_Paste', FCKLang.Paste, 'dialog/fck_paste.html', 400, 330, 'Security'] ) ; else { if ( FCKConfig.AutoDetectPasteFromWord && sHTML.length > 0 ) { var re = /<\w[^>]*(( class="?MsoNormal"?)|(="mso-))/gi ; if ( re.test( sHTML ) ) { if ( confirm( FCKLang.PasteWordConfirm ) ) { FCK.PasteFromWord() ; return false ; } } } // Instead of inserting the retrieved HTML, let's leave the OS work for us, // by calling FCK.ExecuteNamedCommand( 'Paste' ). It could give better results. // Enable the semaphore to avoid a loop. FCK._PasteIsRunning = true ; FCK.ExecuteNamedCommand( 'Paste' ) ; // Removes the semaphore. delete FCK._PasteIsRunning ; } // Let's always make a custom implementation (return false), otherwise // the new Keyboard Handler may conflict with this code, and the CTRL+V code // could result in a simple "V" being pasted. return false ; } FCK.PasteAsPlainText = function( forceText ) { if ( !FCK._CheckIsPastingEnabled() ) { FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteAsText, 'dialog/fck_paste.html', 400, 330, 'PlainText' ) ; return ; } // Get the data available in the clipboard in text format. var sText = null ; if ( ! forceText ) sText = clipboardData.getData("Text") ; else sText = forceText ; if ( sText && sText.length > 0 ) { // Replace the carriage returns with <BR> sText = FCKTools.HTMLEncode( sText ) ; sText = FCKTools.ProcessLineBreaks( window, FCKConfig, sText ) ; var closeTagIndex = sText.search( '</p>' ) ; var startTagIndex = sText.search( '<p>' ) ; if ( ( closeTagIndex != -1 && startTagIndex != -1 && closeTagIndex < startTagIndex ) || ( closeTagIndex != -1 && startTagIndex == -1 ) ) { var prefix = sText.substr( 0, closeTagIndex ) ; sText = sText.substr( closeTagIndex + 4 ) ; this.InsertHtml( prefix ) ; } // Insert the resulting data in the editor. FCKUndo.SaveLocked = true ; this.InsertHtml( sText ) ; FCKUndo.SaveLocked = false ; } } FCK._CheckIsPastingEnabled = function( returnContents ) { // The following seams to be the only reliable way to check is script // pasting operations are enabled in the security settings of IE6 and IE7. // It adds a little bit of overhead to the check, but so far that's the // only way, mainly because of IE7. FCK._PasteIsEnabled = false ; document.body.attachEvent( 'onpaste', FCK_CheckPasting_Listener ) ; // The execCommand in GetClipboardHTML will fire the "onpaste", only if the // security settings are enabled. var oReturn = FCK.GetClipboardHTML() ; document.body.detachEvent( 'onpaste', FCK_CheckPasting_Listener ) ; if ( FCK._PasteIsEnabled ) { if ( !returnContents ) oReturn = true ; } else oReturn = false ; delete FCK._PasteIsEnabled ; return oReturn ; } function FCK_CheckPasting_Listener() { FCK._PasteIsEnabled = true ; } FCK.GetClipboardHTML = function() { var oDiv = document.getElementById( '___FCKHiddenDiv' ) ; if ( !oDiv ) { oDiv = document.createElement( 'DIV' ) ; oDiv.id = '___FCKHiddenDiv' ; var oDivStyle = oDiv.style ; oDivStyle.position = 'absolute' ; oDivStyle.visibility = oDivStyle.overflow = 'hidden' ; oDivStyle.width = oDivStyle.height = 1 ; document.body.appendChild( oDiv ) ; } oDiv.innerHTML = '' ; var oTextRange = document.body.createTextRange() ; oTextRange.moveToElementText( oDiv ) ; oTextRange.execCommand( 'Paste' ) ; var sData = oDiv.innerHTML ; oDiv.innerHTML = '' ; return sData ; } FCK.CreateLink = function( url, noUndo ) { // Creates the array that will be returned. It contains one or more created links (see #220). var aCreatedLinks = new Array() ; // Remove any existing link in the selection. FCK.ExecuteNamedCommand( 'Unlink', null, false, !!noUndo ) ; if ( url.length > 0 ) { // If there are several images, and you try to link each one, all the images get inside the link: // <img><img> -> <a><img></a><img> -> <a><img><img></a> due to the call to 'CreateLink' (bug in IE) if (FCKSelection.GetType() == 'Control') { // Create a link var oLink = this.EditorDocument.createElement( 'A' ) ; oLink.href = url ; // Get the selected object var oControl = FCKSelection.GetSelectedElement() ; // Put the link just before the object oControl.parentNode.insertBefore(oLink, oControl) ; // Move the object inside the link oControl.parentNode.removeChild( oControl ) ; oLink.appendChild( oControl ) ; return [ oLink ] ; } // Generate a temporary name for the link. var sTempUrl = 'javascript:void(0);/*' + ( new Date().getTime() ) + '*/' ; // Use the internal "CreateLink" command to create the link. FCK.ExecuteNamedCommand( 'CreateLink', sTempUrl, false, !!noUndo ) ; // Look for the just create link. var oLinks = this.EditorDocument.links ; for ( i = 0 ; i < oLinks.length ; i++ ) { var oLink = oLinks[i] ; // Check it this a newly created link. // getAttribute must be used. oLink.url may cause problems with IE7 (#555). if ( oLink.getAttribute( 'href', 2 ) == sTempUrl ) { var sInnerHtml = oLink.innerHTML ; // Save the innerHTML (IE changes it if it is like an URL). oLink.href = url ; oLink.innerHTML = sInnerHtml ; // Restore the innerHTML. // If the last child is a <br> move it outside the link or it // will be too easy to select this link again #388. var oLastChild = oLink.lastChild ; if ( oLastChild && oLastChild.nodeName == 'BR' ) { // Move the BR after the link. FCKDomTools.InsertAfterNode( oLink, oLink.removeChild( oLastChild ) ) ; } aCreatedLinks.push( oLink ) ; } } } return aCreatedLinks ; } function _FCK_RemoveDisabledAtt() { this.removeAttribute( 'disabled' ) ; } function Doc_OnMouseDown( evt ) { var e = evt.srcElement ; // Radio buttons and checkboxes should not be allowed to be triggered in IE // in editable mode. Otherwise the whole browser window may be locked by // the buttons. (#1782) if ( e.nodeName.IEquals( 'input' ) && e.type.IEquals( ['radio', 'checkbox'] ) && !e.disabled ) { e.disabled = true ; FCKTools.SetTimeout( _FCK_RemoveDisabledAtt, 1, e ) ; } }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Creation and initialization of the "FCK" object. This is the main object * that represents an editor instance. */ // FCK represents the active editor instance. var FCK = { Name : FCKURLParams[ 'InstanceName' ], Status : FCK_STATUS_NOTLOADED, EditMode : FCK_EDITMODE_WYSIWYG, Toolbar : null, HasFocus : false, DataProcessor : new FCKDataProcessor(), GetInstanceObject : (function() { var w = window ; return function( name ) { return w[name] ; } })(), AttachToOnSelectionChange : function( functionPointer ) { this.Events.AttachEvent( 'OnSelectionChange', functionPointer ) ; }, GetLinkedFieldValue : function() { return this.LinkedField.value ; }, GetParentForm : function() { return this.LinkedField.form ; } , // # START : IsDirty implementation StartupValue : '', IsDirty : function() { if ( this.EditMode == FCK_EDITMODE_SOURCE ) return ( this.StartupValue != this.EditingArea.Textarea.value ) ; else { // It can happen switching between design and source mode in Gecko if ( ! this.EditorDocument ) return false ; return ( this.StartupValue != this.EditorDocument.body.innerHTML ) ; } }, ResetIsDirty : function() { if ( this.EditMode == FCK_EDITMODE_SOURCE ) this.StartupValue = this.EditingArea.Textarea.value ; else if ( this.EditorDocument.body ) this.StartupValue = this.EditorDocument.body.innerHTML ; }, // # END : IsDirty implementation StartEditor : function() { this.TempBaseTag = FCKConfig.BaseHref.length > 0 ? '<base href="' + FCKConfig.BaseHref + '" _fcktemp="true"></base>' : '' ; // Setup the keystroke handler. var oKeystrokeHandler = FCK.KeystrokeHandler = new FCKKeystrokeHandler() ; oKeystrokeHandler.OnKeystroke = _FCK_KeystrokeHandler_OnKeystroke ; // Set the config keystrokes. oKeystrokeHandler.SetKeystrokes( FCKConfig.Keystrokes ) ; // In IE7, if the editor tries to access the clipboard by code, a dialog is // shown to the user asking if the application is allowed to access or not. // Due to the IE implementation of it, the KeystrokeHandler will not work //well in this case, so we must leave the pasting keys to have their default behavior. if ( FCKBrowserInfo.IsIE7 ) { if ( ( CTRL + 86 /*V*/ ) in oKeystrokeHandler.Keystrokes ) oKeystrokeHandler.SetKeystrokes( [ CTRL + 86, true ] ) ; if ( ( SHIFT + 45 /*INS*/ ) in oKeystrokeHandler.Keystrokes ) oKeystrokeHandler.SetKeystrokes( [ SHIFT + 45, true ] ) ; } // Retain default behavior for Ctrl-Backspace. (Bug #362) oKeystrokeHandler.SetKeystrokes( [ CTRL + 8, true ] ) ; this.EditingArea = new FCKEditingArea( document.getElementById( 'xEditingArea' ) ) ; this.EditingArea.FFSpellChecker = FCKConfig.FirefoxSpellChecker ; // Set the editor's startup contents. this.SetData( this.GetLinkedFieldValue(), true ) ; // Tab key handling for source mode. FCKTools.AddEventListener( document, "keydown", this._TabKeyHandler ) ; // Add selection change listeners. They must be attached only once. this.AttachToOnSelectionChange( _FCK_PaddingNodeListener ) ; if ( FCKBrowserInfo.IsGecko ) this.AttachToOnSelectionChange( this._ExecCheckEmptyBlock ) ; }, Focus : function() { FCK.EditingArea.Focus() ; }, SetStatus : function( newStatus ) { this.Status = newStatus ; if ( newStatus == FCK_STATUS_ACTIVE ) { FCKFocusManager.AddWindow( window, true ) ; if ( FCKBrowserInfo.IsIE ) FCKFocusManager.AddWindow( window.frameElement, true ) ; // Force the focus in the editor. if ( FCKConfig.StartupFocus ) FCK.Focus() ; } this.Events.FireEvent( 'OnStatusChange', newStatus ) ; }, // Fixes the body by moving all inline and text nodes to appropriate block // elements. FixBody : function() { var sBlockTag = FCKConfig.EnterMode ; // In 'br' mode, no fix must be done. if ( sBlockTag != 'p' && sBlockTag != 'div' ) return ; var oDocument = this.EditorDocument ; if ( !oDocument ) return ; var oBody = oDocument.body ; if ( !oBody ) return ; FCKDomTools.TrimNode( oBody ) ; var oNode = oBody.firstChild ; var oNewBlock ; while ( oNode ) { var bMoveNode = false ; switch ( oNode.nodeType ) { // Element Node. case 1 : var nodeName = oNode.nodeName.toLowerCase() ; if ( !FCKListsLib.BlockElements[ nodeName ] && nodeName != 'li' && !oNode.getAttribute('_fckfakelement') && oNode.getAttribute('_moz_dirty') == null ) bMoveNode = true ; break ; // Text Node. case 3 : // Ignore space only or empty text. if ( oNewBlock || oNode.nodeValue.Trim().length > 0 ) bMoveNode = true ; break; // Comment Node case 8 : if ( oNewBlock ) bMoveNode = true ; break; } if ( bMoveNode ) { var oParent = oNode.parentNode ; if ( !oNewBlock ) oNewBlock = oParent.insertBefore( oDocument.createElement( sBlockTag ), oNode ) ; oNewBlock.appendChild( oParent.removeChild( oNode ) ) ; oNode = oNewBlock.nextSibling ; } else { if ( oNewBlock ) { FCKDomTools.TrimNode( oNewBlock ) ; oNewBlock = null ; } oNode = oNode.nextSibling ; } } if ( oNewBlock ) FCKDomTools.TrimNode( oNewBlock ) ; }, GetData : function( format ) { // We assume that if the user is in source editing, the editor value must // represent the exact contents of the source, as the user wanted it to be. if ( FCK.EditMode == FCK_EDITMODE_SOURCE ) return FCK.EditingArea.Textarea.value ; this.FixBody() ; var oDoc = FCK.EditorDocument ; if ( !oDoc ) return null ; var isFullPage = FCKConfig.FullPage ; // Call the Data Processor to generate the output data. var data = FCK.DataProcessor.ConvertToDataFormat( isFullPage ? oDoc.documentElement : oDoc.body, !isFullPage, FCKConfig.IgnoreEmptyParagraphValue, format ) ; // Restore protected attributes. data = FCK.ProtectEventsRestore( data ) ; if ( FCKBrowserInfo.IsIE ) data = data.replace( FCKRegexLib.ToReplace, '$1' ) ; if ( isFullPage ) { if ( FCK.DocTypeDeclaration && FCK.DocTypeDeclaration.length > 0 ) data = FCK.DocTypeDeclaration + '\n' + data ; if ( FCK.XmlDeclaration && FCK.XmlDeclaration.length > 0 ) data = FCK.XmlDeclaration + '\n' + data ; } return FCKConfig.ProtectedSource.Revert( data ) ; }, UpdateLinkedField : function() { var value = FCK.GetXHTML( FCKConfig.FormatOutput ) ; if ( FCKConfig.HtmlEncodeOutput ) value = FCKTools.HTMLEncode( value ) ; FCK.LinkedField.value = value ; FCK.Events.FireEvent( 'OnAfterLinkedFieldUpdate' ) ; }, RegisteredDoubleClickHandlers : new Object(), OnDoubleClick : function( element ) { var oCalls = FCK.RegisteredDoubleClickHandlers[ element.tagName.toUpperCase() ] ; if ( oCalls ) { for ( var i = 0 ; i < oCalls.length ; i++ ) oCalls[ i ]( element ) ; } // Generic handler for any element oCalls = FCK.RegisteredDoubleClickHandlers[ '*' ] ; if ( oCalls ) { for ( var i = 0 ; i < oCalls.length ; i++ ) oCalls[ i ]( element ) ; } }, // Register objects that can handle double click operations. RegisterDoubleClickHandler : function( handlerFunction, tag ) { var nodeName = tag || '*' ; nodeName = nodeName.toUpperCase() ; var aTargets ; if ( !( aTargets = FCK.RegisteredDoubleClickHandlers[ nodeName ] ) ) FCK.RegisteredDoubleClickHandlers[ nodeName ] = [ handlerFunction ] ; else { // Check that the event handler isn't already registered with the same listener // It doesn't detect function pointers belonging to an object (at least in Gecko) if ( aTargets.IndexOf( handlerFunction ) == -1 ) aTargets.push( handlerFunction ) ; } }, OnAfterSetHTML : function() { FCKDocumentProcessor.Process( FCK.EditorDocument ) ; FCKUndo.SaveUndoStep() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; FCK.Events.FireEvent( 'OnAfterSetHTML' ) ; }, // Saves URLs on links and images on special attributes, so they don't change when // moving around. ProtectUrls : function( html ) { // <A> href html = html.replace( FCKRegexLib.ProtectUrlsA , '$& _fcksavedurl=$1' ) ; // <IMG> src html = html.replace( FCKRegexLib.ProtectUrlsImg , '$& _fcksavedurl=$1' ) ; // <AREA> href html = html.replace( FCKRegexLib.ProtectUrlsArea , '$& _fcksavedurl=$1' ) ; return html ; }, // Saves event attributes (like onclick) so they don't get executed while // editing. ProtectEvents : function( html ) { return html.replace( FCKRegexLib.TagsWithEvent, _FCK_ProtectEvents_ReplaceTags ) ; }, ProtectEventsRestore : function( html ) { return html.replace( FCKRegexLib.ProtectedEvents, _FCK_ProtectEvents_RestoreEvents ) ; }, ProtectTags : function( html ) { var sTags = FCKConfig.ProtectedTags ; // IE doesn't support <abbr> and it breaks it. Let's protect it. if ( FCKBrowserInfo.IsIE ) sTags += sTags.length > 0 ? '|ABBR|XML|EMBED|OBJECT' : 'ABBR|XML|EMBED|OBJECT' ; var oRegex ; if ( sTags.length > 0 ) { oRegex = new RegExp( '<(' + sTags + ')(?!\w|:)', 'gi' ) ; html = html.replace( oRegex, '<FCK:$1' ) ; oRegex = new RegExp( '<\/(' + sTags + ')>', 'gi' ) ; html = html.replace( oRegex, '<\/FCK:$1>' ) ; } // Protect some empty elements. We must do it separately because the // original tag may not contain the closing slash, like <hr>: // - <meta> tags get executed, so if you have a redirect meta, the // content will move to the target page. // - <hr> may destroy the document structure if not well // positioned. The trick is protect it here and restore them in // the FCKDocumentProcessor. sTags = 'META' ; if ( FCKBrowserInfo.IsIE ) sTags += '|HR' ; oRegex = new RegExp( '<((' + sTags + ')(?=\\s|>|/)[\\s\\S]*?)/?>', 'gi' ) ; html = html.replace( oRegex, '<FCK:$1 />' ) ; return html ; }, SetData : function( data, resetIsDirty ) { this.EditingArea.Mode = FCK.EditMode ; // If there was an onSelectionChange listener in IE we must remove it to avoid crashes #1498 if ( FCKBrowserInfo.IsIE && FCK.EditorDocument ) { FCK.EditorDocument.detachEvent("onselectionchange", Doc_OnSelectionChange ) ; } FCKTempBin.Reset() ; // Bug #2469: SelectionData.createRange becomes undefined after the editor // iframe is changed by FCK.SetData(). FCK.Selection.Release() ; if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) { // Save the resetIsDirty for later use (async) this._ForceResetIsDirty = ( resetIsDirty === true ) ; // Protect parts of the code that must remain untouched (and invisible) // during editing. data = FCKConfig.ProtectedSource.Protect( data ) ; // Call the Data Processor to transform the data. data = FCK.DataProcessor.ConvertToHtml( data ) ; // Fix for invalid self-closing tags (see #152). data = data.replace( FCKRegexLib.InvalidSelfCloseTags, '$1></$2>' ) ; // Protect event attributes (they could get fired in the editing area). data = FCK.ProtectEvents( data ) ; // Protect some things from the browser itself. data = FCK.ProtectUrls( data ) ; data = FCK.ProtectTags( data ) ; // Insert the base tag (FCKConfig.BaseHref), if not exists in the source. // The base must be the first tag in the HEAD, to get relative // links on styles, for example. if ( FCK.TempBaseTag.length > 0 && !FCKRegexLib.HasBaseTag.test( data ) ) data = data.replace( FCKRegexLib.HeadOpener, '$&' + FCK.TempBaseTag ) ; // Build the HTML for the additional things we need on <head>. var sHeadExtra = '' ; if ( !FCKConfig.FullPage ) sHeadExtra += _FCK_GetEditorAreaStyleTags() ; if ( FCKBrowserInfo.IsIE ) sHeadExtra += FCK._GetBehaviorsStyle() ; else if ( FCKConfig.ShowBorders ) sHeadExtra += FCKTools.GetStyleHtml( FCK_ShowTableBordersCSS, true ) ; sHeadExtra += FCKTools.GetStyleHtml( FCK_InternalCSS, true ) ; // Attention: do not change it before testing it well (sample07)! // This is tricky... if the head ends with <meta ... content type>, // Firefox will break. But, it works if we place our extra stuff as // the last elements in the HEAD. data = data.replace( FCKRegexLib.HeadCloser, sHeadExtra + '$&' ) ; // Load the HTML in the editing area. this.EditingArea.OnLoad = _FCK_EditingArea_OnLoad ; this.EditingArea.Start( data ) ; } else { // Remove the references to the following elements, as the editing area // IFRAME will be removed. FCK.EditorWindow = null ; FCK.EditorDocument = null ; FCKDomTools.PaddingNode = null ; this.EditingArea.OnLoad = null ; this.EditingArea.Start( data ) ; // Enables the context menu in the textarea. this.EditingArea.Textarea._FCKShowContextMenu = true ; // Removes the enter key handler. FCK.EnterKeyHandler = null ; if ( resetIsDirty ) this.ResetIsDirty() ; // Listen for keystroke events. FCK.KeystrokeHandler.AttachToElement( this.EditingArea.Textarea ) ; this.EditingArea.Textarea.focus() ; FCK.Events.FireEvent( 'OnAfterSetHTML' ) ; } if ( FCKBrowserInfo.IsGecko ) window.onresize() ; }, // This collection is used by the browser specific implementations to tell // which named commands must be handled separately. RedirectNamedCommands : new Object(), ExecuteNamedCommand : function( commandName, commandParameter, noRedirect, noSaveUndo ) { if ( !noSaveUndo ) FCKUndo.SaveUndoStep() ; if ( !noRedirect && FCK.RedirectNamedCommands[ commandName ] != null ) FCK.ExecuteRedirectedNamedCommand( commandName, commandParameter ) ; else { FCK.Focus() ; FCK.EditorDocument.execCommand( commandName, false, commandParameter ) ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; } if ( !noSaveUndo ) FCKUndo.SaveUndoStep() ; }, GetNamedCommandState : function( commandName ) { try { // Bug #50 : Safari never returns positive state for the Paste command, override that. if ( FCKBrowserInfo.IsSafari && FCK.EditorWindow && commandName.IEquals( 'Paste' ) ) return FCK_TRISTATE_OFF ; if ( !FCK.EditorDocument.queryCommandEnabled( commandName ) ) return FCK_TRISTATE_DISABLED ; else { return FCK.EditorDocument.queryCommandState( commandName ) ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ; } } catch ( e ) { return FCK_TRISTATE_OFF ; } }, GetNamedCommandValue : function( commandName ) { var sValue = '' ; var eState = FCK.GetNamedCommandState( commandName ) ; if ( eState == FCK_TRISTATE_DISABLED ) return null ; try { sValue = this.EditorDocument.queryCommandValue( commandName ) ; } catch(e) {} return sValue ? sValue : '' ; }, Paste : function( _callListenersOnly ) { // First call 'OnPaste' listeners. if ( FCK.Status != FCK_STATUS_COMPLETE || !FCK.Events.FireEvent( 'OnPaste' ) ) return false ; // Then call the default implementation. return _callListenersOnly || FCK._ExecPaste() ; }, PasteFromWord : function() { FCKDialog.OpenDialog( 'FCKDialog_Paste', FCKLang.PasteFromWord, 'dialog/fck_paste.html', 400, 330, 'Word' ) ; }, Preview : function() { var sHTML ; if ( FCKConfig.FullPage ) { if ( FCK.TempBaseTag.length > 0 ) sHTML = FCK.TempBaseTag + FCK.GetXHTML() ; else sHTML = FCK.GetXHTML() ; } else { sHTML = FCKConfig.DocType + '<html dir="' + FCKConfig.ContentLangDirection + '">' + '<head>' + FCK.TempBaseTag + '<title>' + FCKLang.Preview + '</title>' + _FCK_GetEditorAreaStyleTags() + '</head><body' + FCKConfig.GetBodyAttributes() + '>' + FCK.GetXHTML() + '</body></html>' ; } var iWidth = FCKConfig.ScreenWidth * 0.8 ; var iHeight = FCKConfig.ScreenHeight * 0.7 ; var iLeft = ( FCKConfig.ScreenWidth - iWidth ) / 2 ; var sOpenUrl = '' ; if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE) { window._FCKHtmlToLoad = sHTML ; sOpenUrl = 'javascript:void( (function(){' + 'document.open() ;' + 'document.domain="' + document.domain + '" ;' + 'document.write( window.opener._FCKHtmlToLoad );' + 'document.close() ;' + 'window.opener._FCKHtmlToLoad = null ;' + '})() )' ; } var oWindow = window.open( sOpenUrl, null, 'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + iWidth + ',height=' + iHeight + ',left=' + iLeft ) ; if ( !FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE) { oWindow.document.write( sHTML ); oWindow.document.close(); } }, SwitchEditMode : function( noUndo ) { var bIsWysiwyg = ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) ; // Save the current IsDirty state, so we may restore it after the switch. var bIsDirty = FCK.IsDirty() ; var sHtml ; // Update the HTML in the view output to show, also update // FCKTempBin for IE to avoid #2263. if ( bIsWysiwyg ) { FCKCommands.GetCommand( 'ShowBlocks' ).SaveState() ; if ( !noUndo && FCKBrowserInfo.IsIE ) FCKUndo.SaveUndoStep() ; sHtml = FCK.GetXHTML( FCKConfig.FormatSource ) ; if ( FCKBrowserInfo.IsIE ) FCKTempBin.ToHtml() ; if ( sHtml == null ) return false ; } else sHtml = this.EditingArea.Textarea.value ; FCK.EditMode = bIsWysiwyg ? FCK_EDITMODE_SOURCE : FCK_EDITMODE_WYSIWYG ; FCK.SetData( sHtml, !bIsDirty ) ; // Set the Focus. FCK.Focus() ; // Update the toolbar (Running it directly causes IE to fail). FCKTools.RunFunction( FCK.ToolbarSet.RefreshModeState, FCK.ToolbarSet ) ; return true ; }, InsertElement : function( element ) { // The parameter may be a string (element name), so transform it in an element. if ( typeof element == 'string' ) element = this.EditorDocument.createElement( element ) ; var elementName = element.nodeName.toLowerCase() ; FCKSelection.Restore() ; // Create a range for the selection. V3 will have a new selection // object that may internally supply this feature. var range = new FCKDomRange( this.EditorWindow ) ; // Move to the selection and delete it. range.MoveToSelection() ; range.DeleteContents() ; if ( FCKListsLib.BlockElements[ elementName ] != null ) { if ( range.StartBlock ) { if ( range.CheckStartOfBlock() ) range.MoveToPosition( range.StartBlock, 3 ) ; else if ( range.CheckEndOfBlock() ) range.MoveToPosition( range.StartBlock, 4 ) ; else range.SplitBlock() ; } range.InsertNode( element ) ; var next = FCKDomTools.GetNextSourceElement( element, false, null, [ 'hr','br','param','img','area','input' ], true ) ; // Be sure that we have something after the new element, so we can move the cursor there. if ( !next && FCKConfig.EnterMode != 'br') { next = this.EditorDocument.body.appendChild( this.EditorDocument.createElement( FCKConfig.EnterMode ) ) ; if ( FCKBrowserInfo.IsGeckoLike ) FCKTools.AppendBogusBr( next ) ; } if ( FCKListsLib.EmptyElements[ elementName ] == null ) range.MoveToElementEditStart( element ) ; else if ( next ) range.MoveToElementEditStart( next ) ; else range.MoveToPosition( element, 4 ) ; if ( FCKBrowserInfo.IsGeckoLike ) { if ( next ) FCKDomTools.ScrollIntoView( next, false ); FCKDomTools.ScrollIntoView( element, false ); } } else { // Insert the node. range.InsertNode( element ) ; // Move the selection right after the new element. // DISCUSSION: Should we select the element instead? range.SetStart( element, 4 ) ; range.SetEnd( element, 4 ) ; } range.Select() ; range.Release() ; // REMOVE IT: The focus should not really be set here. It is up to the // calling code to reset the focus if needed. this.Focus() ; return element ; }, _InsertBlockElement : function( blockElement ) { }, _IsFunctionKey : function( keyCode ) { // keys that are captured but do not change editor contents if ( keyCode >= 16 && keyCode <= 20 ) // shift, ctrl, alt, pause, capslock return true ; if ( keyCode == 27 || ( keyCode >= 33 && keyCode <= 40 ) ) // esc, page up, page down, end, home, left, up, right, down return true ; if ( keyCode == 45 ) // insert, no effect on FCKeditor, yet return true ; return false ; }, _KeyDownListener : function( evt ) { if (! evt) evt = FCK.EditorWindow.event ; if ( FCK.EditorWindow ) { if ( !FCK._IsFunctionKey(evt.keyCode) // do not capture function key presses, like arrow keys or shift/alt/ctrl && !(evt.ctrlKey || evt.metaKey) // do not capture Ctrl hotkeys, as they have their snapshot capture logic && !(evt.keyCode == 46) ) // do not capture Del, it has its own capture logic in fckenterkey.js FCK._KeyDownUndo() ; } return true ; }, _KeyDownUndo : function() { if ( !FCKUndo.Typing ) { FCKUndo.SaveUndoStep() ; FCKUndo.Typing = true ; FCK.Events.FireEvent( "OnSelectionChange" ) ; } FCKUndo.TypesCount++ ; FCKUndo.Changed = 1 ; if ( FCKUndo.TypesCount > FCKUndo.MaxTypes ) { FCKUndo.TypesCount = 0 ; FCKUndo.SaveUndoStep() ; } }, _TabKeyHandler : function( evt ) { if ( ! evt ) evt = window.event ; var keystrokeValue = evt.keyCode ; // Pressing <Tab> in source mode should produce a tab space in the text area, not // changing the focus to something else. if ( keystrokeValue == 9 && FCK.EditMode != FCK_EDITMODE_WYSIWYG ) { if ( FCKBrowserInfo.IsIE ) { var range = document.selection.createRange() ; if ( range.parentElement() != FCK.EditingArea.Textarea ) return true ; range.text = '\t' ; range.select() ; } else { var a = [] ; var el = FCK.EditingArea.Textarea ; var selStart = el.selectionStart ; var selEnd = el.selectionEnd ; a.push( el.value.substr(0, selStart ) ) ; a.push( '\t' ) ; a.push( el.value.substr( selEnd ) ) ; el.value = a.join( '' ) ; el.setSelectionRange( selStart + 1, selStart + 1 ) ; } if ( evt.preventDefault ) return evt.preventDefault() ; return evt.returnValue = false ; } return true ; } } ; FCK.Events = new FCKEvents( FCK ) ; // DEPRECATED in favor or "GetData". FCK.GetHTML = FCK.GetXHTML = FCK.GetData ; // DEPRECATED in favor of "SetData". FCK.SetHTML = FCK.SetData ; // InsertElementAndGetIt and CreateElement are Deprecated : returns the same value as InsertElement. FCK.InsertElementAndGetIt = FCK.CreateElement = FCK.InsertElement ; // Replace all events attributes (like onclick). function _FCK_ProtectEvents_ReplaceTags( tagMatch ) { return tagMatch.replace( FCKRegexLib.EventAttributes, _FCK_ProtectEvents_ReplaceEvents ) ; } // Replace an event attribute with its respective __fckprotectedatt attribute. // The original event markup will be encoded and saved as the value of the new // attribute. function _FCK_ProtectEvents_ReplaceEvents( eventMatch, attName ) { return ' ' + attName + '_fckprotectedatt="' + encodeURIComponent( eventMatch ) + '"' ; } function _FCK_ProtectEvents_RestoreEvents( match, encodedOriginal ) { return decodeURIComponent( encodedOriginal ) ; } function _FCK_MouseEventsListener( evt ) { if ( ! evt ) evt = window.event ; if ( evt.type == 'mousedown' ) FCK.MouseDownFlag = true ; else if ( evt.type == 'mouseup' ) FCK.MouseDownFlag = false ; else if ( evt.type == 'mousemove' ) FCK.Events.FireEvent( 'OnMouseMove', evt ) ; } function _FCK_PaddingNodeListener() { if ( FCKConfig.EnterMode.IEquals( 'br' ) ) return ; FCKDomTools.EnforcePaddingNode( FCK.EditorDocument, FCKConfig.EnterMode ) ; if ( ! FCKBrowserInfo.IsIE && FCKDomTools.PaddingNode ) { // Prevent the caret from going between the body and the padding node in Firefox. // i.e. <body>|<p></p></body> var sel = FCKSelection.GetSelection() ; if ( sel && sel.rangeCount == 1 ) { var range = sel.getRangeAt( 0 ) ; if ( range.collapsed && range.startContainer == FCK.EditorDocument.body && range.startOffset == 0 ) { range.selectNodeContents( FCKDomTools.PaddingNode ) ; range.collapse( true ) ; sel.removeAllRanges() ; sel.addRange( range ) ; } } } else if ( FCKDomTools.PaddingNode ) { // Prevent the caret from going into an empty body but not into the padding node in IE. // i.e. <body><p></p>|</body> var parentElement = FCKSelection.GetParentElement() ; var paddingNode = FCKDomTools.PaddingNode ; if ( parentElement && parentElement.nodeName.IEquals( 'body' ) ) { if ( FCK.EditorDocument.body.childNodes.length == 1 && FCK.EditorDocument.body.firstChild == paddingNode ) { /* * Bug #1764: Don't move the selection if the * current selection isn't in the editor * document. */ if ( FCKSelection._GetSelectionDocument( FCK.EditorDocument.selection ) != FCK.EditorDocument ) return ; var range = FCK.EditorDocument.body.createTextRange() ; var clearContents = false ; if ( !paddingNode.childNodes.firstChild ) { paddingNode.appendChild( FCKTools.GetElementDocument( paddingNode ).createTextNode( '\ufeff' ) ) ; clearContents = true ; } range.moveToElementText( paddingNode ) ; range.select() ; if ( clearContents ) range.pasteHTML( '' ) ; } } } } function _FCK_EditingArea_OnLoad() { // Get the editor's window and document (DOM) FCK.EditorWindow = FCK.EditingArea.Window ; FCK.EditorDocument = FCK.EditingArea.Document ; if ( FCKBrowserInfo.IsIE ) FCKTempBin.ToElements() ; FCK.InitializeBehaviors() ; // Listen for mousedown and mouseup events for tracking drag and drops. FCK.MouseDownFlag = false ; FCKTools.AddEventListener( FCK.EditorDocument, 'mousemove', _FCK_MouseEventsListener ) ; FCKTools.AddEventListener( FCK.EditorDocument, 'mousedown', _FCK_MouseEventsListener ) ; FCKTools.AddEventListener( FCK.EditorDocument, 'mouseup', _FCK_MouseEventsListener ) ; // Most of the CTRL key combos do not work under Safari for onkeydown and onkeypress (See #1119) // But we can use the keyup event to override some of these... if ( FCKBrowserInfo.IsSafari ) { var undoFunc = function( evt ) { if ( ! ( evt.ctrlKey || evt.metaKey ) ) return ; if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return ; switch ( evt.keyCode ) { case 89: FCKUndo.Redo() ; break ; case 90: FCKUndo.Undo() ; break ; } } FCKTools.AddEventListener( FCK.EditorDocument, 'keyup', undoFunc ) ; } // Create the enter key handler FCK.EnterKeyHandler = new FCKEnterKey( FCK.EditorWindow, FCKConfig.EnterMode, FCKConfig.ShiftEnterMode, FCKConfig.TabSpaces ) ; // Listen for keystroke events. FCK.KeystrokeHandler.AttachToElement( FCK.EditorDocument ) ; if ( FCK._ForceResetIsDirty ) FCK.ResetIsDirty() ; // This is a tricky thing for IE. In some cases, even if the cursor is // blinking in the editing, the keystroke handler doesn't catch keyboard // events. We must activate the editing area to make it work. (#142). if ( FCKBrowserInfo.IsIE && FCK.HasFocus ) FCK.EditorDocument.body.setActive() ; FCK.OnAfterSetHTML() ; // Restore show blocks status. FCKCommands.GetCommand( 'ShowBlocks' ).RestoreState() ; // Check if it is not a startup call, otherwise complete the startup. if ( FCK.Status != FCK_STATUS_NOTLOADED ) return ; FCK.SetStatus( FCK_STATUS_ACTIVE ) ; } function _FCK_GetEditorAreaStyleTags() { return FCKTools.GetStyleHtml( FCKConfig.EditorAreaCSS ) + FCKTools.GetStyleHtml( FCKConfig.EditorAreaStyles ) ; } function _FCK_KeystrokeHandler_OnKeystroke( keystroke, keystrokeValue ) { if ( FCK.Status != FCK_STATUS_COMPLETE ) return false ; if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) { switch ( keystrokeValue ) { case 'Paste' : return !FCK.Paste() ; case 'Cut' : FCKUndo.SaveUndoStep() ; return false ; } } else { // In source mode, some actions must have their default behavior. if ( keystrokeValue.Equals( 'Paste', 'Undo', 'Redo', 'SelectAll', 'Cut' ) ) return false ; } // The return value indicates if the default behavior of the keystroke must // be cancelled. Let's do that only if the Execute() call explicitly returns "false". var oCommand = FCK.Commands.GetCommand( keystrokeValue ) ; // If the command is disabled then ignore the keystroke if ( oCommand.GetState() == FCK_TRISTATE_DISABLED ) return false ; return ( oCommand.Execute.apply( oCommand, FCKTools.ArgumentsToArray( arguments, 2 ) ) !== false ) ; } // Set the FCK.LinkedField reference to the field that will be used to post the // editor data. (function() { // There is a bug on IE... getElementById returns any META tag that has the // name set to the ID you are looking for. So the best way in to get the array // by names and look for the correct one. // As ASP.Net generates a ID that is different from the Name, we must also // look for the field based on the ID (the first one is the ID). var oDocument = window.parent.document ; // Try to get the field using the ID. var eLinkedField = oDocument.getElementById( FCK.Name ) ; var i = 0; while ( eLinkedField || i == 0 ) { if ( eLinkedField && eLinkedField.tagName.toLowerCase().Equals( 'input', 'textarea' ) ) { FCK.LinkedField = eLinkedField ; break ; } eLinkedField = oDocument.getElementsByName( FCK.Name )[i++] ; } })() ; var FCKTempBin = { Elements : new Array(), AddElement : function( element ) { var iIndex = this.Elements.length ; this.Elements[ iIndex ] = element ; return iIndex ; }, RemoveElement : function( index ) { var e = this.Elements[ index ] ; this.Elements[ index ] = null ; return e ; }, Reset : function() { var i = 0 ; while ( i < this.Elements.length ) this.Elements[ i++ ] = null ; this.Elements.length = 0 ; }, ToHtml : function() { for ( var i = 0 ; i < this.Elements.length ; i++ ) { this.Elements[i] = '<div>&nbsp;' + this.Elements[i].outerHTML + '</div>' ; this.Elements[i].isHtml = true ; } }, ToElements : function() { var node = FCK.EditorDocument.createElement( 'div' ) ; for ( var i = 0 ; i < this.Elements.length ; i++ ) { if ( this.Elements[i].isHtml ) { node.innerHTML = this.Elements[i] ; this.Elements[i] = node.firstChild.removeChild( node.firstChild.lastChild ) ; } } } } ; // # Focus Manager: Manages the focus in the editor. var FCKFocusManager = FCK.FocusManager = { IsLocked : false, AddWindow : function( win, sendToEditingArea ) { var oTarget ; if ( FCKBrowserInfo.IsIE ) oTarget = win.nodeType == 1 ? win : win.frameElement ? win.frameElement : win.document ; else if ( FCKBrowserInfo.IsSafari ) oTarget = win ; else oTarget = win.document ; FCKTools.AddEventListener( oTarget, 'blur', FCKFocusManager_Win_OnBlur ) ; FCKTools.AddEventListener( oTarget, 'focus', sendToEditingArea ? FCKFocusManager_Win_OnFocus_Area : FCKFocusManager_Win_OnFocus ) ; }, RemoveWindow : function( win ) { if ( FCKBrowserInfo.IsIE ) oTarget = win.nodeType == 1 ? win : win.frameElement ? win.frameElement : win.document ; else oTarget = win.document ; FCKTools.RemoveEventListener( oTarget, 'blur', FCKFocusManager_Win_OnBlur ) ; FCKTools.RemoveEventListener( oTarget, 'focus', FCKFocusManager_Win_OnFocus_Area ) ; FCKTools.RemoveEventListener( oTarget, 'focus', FCKFocusManager_Win_OnFocus ) ; }, Lock : function() { this.IsLocked = true ; }, Unlock : function() { if ( this._HasPendingBlur ) FCKFocusManager._Timer = window.setTimeout( FCKFocusManager_FireOnBlur, 100 ) ; this.IsLocked = false ; }, _ResetTimer : function() { this._HasPendingBlur = false ; if ( this._Timer ) { window.clearTimeout( this._Timer ) ; delete this._Timer ; } } } ; function FCKFocusManager_Win_OnBlur() { if ( typeof(FCK) != 'undefined' && FCK.HasFocus ) { FCKFocusManager._ResetTimer() ; FCKFocusManager._Timer = window.setTimeout( FCKFocusManager_FireOnBlur, 100 ) ; } } function FCKFocusManager_FireOnBlur() { if ( FCKFocusManager.IsLocked ) FCKFocusManager._HasPendingBlur = true ; else { FCK.HasFocus = false ; FCK.Events.FireEvent( "OnBlur" ) ; } } function FCKFocusManager_Win_OnFocus_Area() { // Check if we are already focusing the editor (to avoid loops). if ( FCKFocusManager._IsFocusing ) return ; FCKFocusManager._IsFocusing = true ; FCK.Focus() ; FCKFocusManager_Win_OnFocus() ; // The above FCK.Focus() call may trigger other focus related functions. // So, to avoid a loop, we delay the focusing mark removal, so it get // executed after all othre functions have been run. FCKTools.RunFunction( function() { delete FCKFocusManager._IsFocusing ; } ) ; } function FCKFocusManager_Win_OnFocus() { FCKFocusManager._ResetTimer() ; if ( !FCK.HasFocus && !FCKFocusManager.IsLocked ) { FCK.HasFocus = true ; FCK.Events.FireEvent( "OnFocus" ) ; } } /* * #1633 : Protect the editor iframe from external styles. * Notice that we can't use FCKTools.ResetStyles here since FCKTools isn't * loaded yet. */ (function() { var el = window.frameElement ; var width = el.width ; var height = el.height ; if ( /^\d+$/.test( width ) ) width += 'px' ; if ( /^\d+$/.test( height ) ) height += 'px' ; var style = el.style ; style.border = style.padding = style.margin = 0 ; style.backgroundColor = 'transparent'; style.backgroundImage = 'none'; style.width = width ; style.height = height ; })() ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines the FCKXHtml object, responsible for the XHTML operations. * Gecko specific. */ FCKXHtml._GetMainXmlString = function() { return ( new XMLSerializer() ).serializeToString( this.MainNode ) ; } FCKXHtml._AppendAttributes = function( xmlNode, htmlNode, node ) { var aAttributes = htmlNode.attributes ; for ( var n = 0 ; n < aAttributes.length ; n++ ) { var oAttribute = aAttributes[n] ; if ( oAttribute.specified ) { var sAttName = oAttribute.nodeName.toLowerCase() ; var sAttValue ; // Ignore any attribute starting with "_fck". if ( sAttName.StartsWith( '_fck' ) ) continue ; // There is a bug in Mozilla that returns '_moz_xxx' attributes as specified. else if ( sAttName.indexOf( '_moz' ) == 0 ) continue ; // There are one cases (on Gecko) when the oAttribute.nodeValue must be used: // - for the "class" attribute else if ( sAttName == 'class' ) { sAttValue = oAttribute.nodeValue.replace( FCKRegexLib.FCK_Class, '' ) ; if ( sAttValue.length == 0 ) continue ; } // XHTML doens't support attribute minimization like "CHECKED". It must be transformed to checked="checked". else if ( oAttribute.nodeValue === true ) sAttValue = sAttName ; else sAttValue = htmlNode.getAttribute( sAttName, 2 ) ; // We must use getAttribute to get it exactly as it is defined. this._AppendAttribute( node, sAttName, sAttValue ) ; } } } if ( FCKBrowserInfo.IsOpera ) { // Opera moves the <FCK:meta> element outside head (#1166). // Save a reference to the XML <head> node, so we can use it for // orphan <meta>s. FCKXHtml.TagProcessors['head'] = function( node, htmlNode ) { FCKXHtml.XML._HeadElement = node ; node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ; return node ; } // Check whether a <meta> element is outside <head>, and move it to the // proper place. FCKXHtml.TagProcessors['meta'] = function( node, htmlNode, xmlNode ) { if ( htmlNode.parentNode.nodeName.toLowerCase() != 'head' ) { var headElement = FCKXHtml.XML._HeadElement ; if ( headElement && xmlNode != headElement ) { delete htmlNode._fckxhtmljob ; FCKXHtml._AppendNode( headElement, htmlNode ) ; return null ; } } return node ; } } if ( FCKBrowserInfo.IsGecko ) { // #2162, some Firefox extensions might add references to internal links FCKXHtml.TagProcessors['link'] = function( node, htmlNode ) { if ( htmlNode.href.substr(0, 9).toLowerCase() == 'chrome://' ) return false ; return node ; } }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == */ var FCKUndo = new Object() ; FCKUndo.SavedData = new Array() ; FCKUndo.CurrentIndex = -1 ; FCKUndo.TypesCount = 0 ; FCKUndo.Changed = false ; // Is the document changed in respect to its initial image? FCKUndo.MaxTypes = 25 ; FCKUndo.Typing = false ; FCKUndo.SaveLocked = false ; FCKUndo._GetBookmark = function() { FCKSelection.Restore() ; var range = new FCKDomRange( FCK.EditorWindow ) ; try { // There are some tricky cases where this might fail (e.g. having a lone empty table in IE) range.MoveToSelection() ; } catch ( e ) { return null ; } if ( FCKBrowserInfo.IsIE ) { var bookmark = range.CreateBookmark() ; var dirtyHtml = FCK.EditorDocument.body.innerHTML ; range.MoveToBookmark( bookmark ) ; return [ bookmark, dirtyHtml ] ; } return range.CreateBookmark2() ; } FCKUndo._SelectBookmark = function( bookmark ) { if ( ! bookmark ) return ; var range = new FCKDomRange( FCK.EditorWindow ) ; if ( bookmark instanceof Object ) { if ( FCKBrowserInfo.IsIE ) range.MoveToBookmark( bookmark[0] ) ; else range.MoveToBookmark2( bookmark ) ; try { // this does not always succeed, there are still some tricky cases where it fails // e.g. add a special character at end of document, undo, redo -> error range.Select() ; } catch ( e ) { // if select restore fails, put the caret at the end of the document range.MoveToPosition( FCK.EditorDocument.body, 4 ) ; range.Select() ; } } } FCKUndo._CompareCursors = function( cursor1, cursor2 ) { for ( var i = 0 ; i < Math.min( cursor1.length, cursor2.length ) ; i++ ) { if ( cursor1[i] < cursor2[i] ) return -1; else if (cursor1[i] > cursor2[i] ) return 1; } if ( cursor1.length < cursor2.length ) return -1; else if (cursor1.length > cursor2.length ) return 1; return 0; } FCKUndo._CheckIsBookmarksEqual = function( bookmark1, bookmark2 ) { if ( ! ( bookmark1 && bookmark2 ) ) return false ; if ( FCKBrowserInfo.IsIE ) { var startOffset1 = bookmark1[1].search( bookmark1[0].StartId ) ; var startOffset2 = bookmark2[1].search( bookmark2[0].StartId ) ; var endOffset1 = bookmark1[1].search( bookmark1[0].EndId ) ; var endOffset2 = bookmark2[1].search( bookmark2[0].EndId ) ; return startOffset1 == startOffset2 && endOffset1 == endOffset2 ; } else { return this._CompareCursors( bookmark1.Start, bookmark2.Start ) == 0 && this._CompareCursors( bookmark1.End, bookmark2.End ) == 0 ; } } FCKUndo.SaveUndoStep = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || this.SaveLocked ) return ; // Assume the editor content is changed when SaveUndoStep() is called after the first time. // This also enables the undo button in toolbar. if ( this.SavedData.length ) this.Changed = true ; // Get the HTML content. var sHtml = FCK.EditorDocument.body.innerHTML ; var bookmark = this._GetBookmark() ; // Shrink the array to the current level. this.SavedData = this.SavedData.slice( 0, this.CurrentIndex + 1 ) ; // Cancel operation if the new step is identical to the previous one. if ( this.CurrentIndex > 0 && sHtml == this.SavedData[ this.CurrentIndex ][0] && this._CheckIsBookmarksEqual( bookmark, this.SavedData[ this.CurrentIndex ][1] ) ) return ; // Save the selection and caret position in the first undo level for the first change. else if ( this.CurrentIndex == 0 && this.SavedData.length && sHtml == this.SavedData[0][0] ) { this.SavedData[0][1] = bookmark ; return ; } // If we reach the Maximum number of undo levels, we must remove the first // entry of the list shifting all elements. if ( this.CurrentIndex + 1 >= FCKConfig.MaxUndoLevels ) this.SavedData.shift() ; else this.CurrentIndex++ ; // Save the new level in front of the actual position. this.SavedData[ this.CurrentIndex ] = [ sHtml, bookmark ] ; FCK.Events.FireEvent( "OnSelectionChange" ) ; } FCKUndo.CheckUndoState = function() { return ( this.Changed || this.CurrentIndex > 0 ) ; } FCKUndo.CheckRedoState = function() { return ( this.CurrentIndex < ( this.SavedData.length - 1 ) ) ; } FCKUndo.Undo = function() { if ( this.CheckUndoState() ) { // If it is the first step. if ( this.CurrentIndex == ( this.SavedData.length - 1 ) ) { // Save the actual state for a possible "Redo" call. this.SaveUndoStep() ; } // Go a step back. this._ApplyUndoLevel( --this.CurrentIndex ) ; FCK.Events.FireEvent( "OnSelectionChange" ) ; } } FCKUndo.Redo = function() { if ( this.CheckRedoState() ) { // Go a step forward. this._ApplyUndoLevel( ++this.CurrentIndex ) ; FCK.Events.FireEvent( "OnSelectionChange" ) ; } } FCKUndo._ApplyUndoLevel = function( level ) { var oData = this.SavedData[ level ] ; if ( !oData ) return ; // Update the editor contents with that step data. if ( FCKBrowserInfo.IsIE ) { if ( oData[1] && oData[1][1] ) FCK.SetInnerHtml( oData[1][1] ) ; else FCK.SetInnerHtml( oData[0] ) ; } else FCK.EditorDocument.body.innerHTML = oData[0] ; // Restore the selection this._SelectBookmark( oData[1] ) ; this.TypesCount = 0 ; this.Changed = false ; this.Typing = false ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines the FCKToolbarSet object that is used to load and draw the * toolbar. */ function FCKToolbarSet_Create( overhideLocation ) { var oToolbarSet ; var sLocation = overhideLocation || FCKConfig.ToolbarLocation ; switch ( sLocation ) { case 'In' : document.getElementById( 'xToolbarRow' ).style.display = '' ; oToolbarSet = new FCKToolbarSet( document ) ; break ; case 'None' : oToolbarSet = new FCKToolbarSet( document ) ; break ; // case 'OutTop' : // Not supported. default : FCK.Events.AttachEvent( 'OnBlur', FCK_OnBlur ) ; FCK.Events.AttachEvent( 'OnFocus', FCK_OnFocus ) ; var eToolbarTarget ; // Out:[TargetWindow]([TargetId]) var oOutMatch = sLocation.match( /^Out:(.+)\((\w+)\)$/ ) ; if ( oOutMatch ) { if ( FCKBrowserInfo.IsAIR ) FCKAdobeAIR.ToolbarSet_GetOutElement( window, oOutMatch ) ; else eToolbarTarget = eval( 'parent.' + oOutMatch[1] ).document.getElementById( oOutMatch[2] ) ; } else { // Out:[TargetId] oOutMatch = sLocation.match( /^Out:(\w+)$/ ) ; if ( oOutMatch ) eToolbarTarget = parent.document.getElementById( oOutMatch[1] ) ; } if ( !eToolbarTarget ) { alert( 'Invalid value for "ToolbarLocation"' ) ; return arguments.callee( 'In' ); } // If it is a shared toolbar, it may be already available in the target element. oToolbarSet = eToolbarTarget.__FCKToolbarSet ; if ( oToolbarSet ) break ; // Create the IFRAME that will hold the toolbar inside the target element. var eToolbarIFrame = FCKTools.GetElementDocument( eToolbarTarget ).createElement( 'iframe' ) ; eToolbarIFrame.src = 'javascript:void(0)' ; eToolbarIFrame.frameBorder = 0 ; eToolbarIFrame.width = '100%' ; eToolbarIFrame.height = '10' ; eToolbarTarget.appendChild( eToolbarIFrame ) ; eToolbarIFrame.unselectable = 'on' ; // Write the basic HTML for the toolbar (copy from the editor main page). var eTargetDocument = eToolbarIFrame.contentWindow.document ; // Workaround for Safari 12256. Ticket #63 var sBase = '' ; if ( FCKBrowserInfo.IsSafari ) sBase = '<base href="' + window.document.location + '">' ; // Initialize the IFRAME document body. eTargetDocument.open() ; eTargetDocument.write( '<html><head>' + sBase + '<script type="text/javascript"> var adjust = function() { window.frameElement.height = document.body.scrollHeight ; }; ' + 'window.onresize = window.onload = ' + 'function(){' // poll scrollHeight until it no longer changes for 1 sec. + 'var timer = null;' + 'var lastHeight = -1;' + 'var lastChange = 0;' + 'var poller = function(){' + 'var currentHeight = document.body.scrollHeight || 0;' + 'var currentTime = (new Date()).getTime();' + 'if (currentHeight != lastHeight){' + 'lastChange = currentTime;' + 'adjust();' + 'lastHeight = document.body.scrollHeight;' + '}' + 'if (lastChange < currentTime - 1000) clearInterval(timer);' + '};' + 'timer = setInterval(poller, 100);' + '}' + '</script></head><body style="overflow: hidden">' + document.getElementById( 'xToolbarSpace' ).innerHTML + '</body></html>' ) ; eTargetDocument.close() ; if( FCKBrowserInfo.IsAIR ) FCKAdobeAIR.ToolbarSet_InitOutFrame( eTargetDocument ) ; FCKTools.AddEventListener( eTargetDocument, 'contextmenu', FCKTools.CancelEvent ) ; // Load external resources (must be done here, otherwise Firefox will not // have the document DOM ready to be used right away. FCKTools.AppendStyleSheet( eTargetDocument, FCKConfig.SkinEditorCSS ) ; oToolbarSet = eToolbarTarget.__FCKToolbarSet = new FCKToolbarSet( eTargetDocument ) ; oToolbarSet._IFrame = eToolbarIFrame ; if ( FCK.IECleanup ) FCK.IECleanup.AddItem( eToolbarTarget, FCKToolbarSet_Target_Cleanup ) ; } oToolbarSet.CurrentInstance = FCK ; if ( !oToolbarSet.ToolbarItems ) oToolbarSet.ToolbarItems = FCKToolbarItems ; FCK.AttachToOnSelectionChange( oToolbarSet.RefreshItemsState ) ; return oToolbarSet ; } function FCK_OnBlur( editorInstance ) { var eToolbarSet = editorInstance.ToolbarSet ; if ( eToolbarSet.CurrentInstance == editorInstance ) eToolbarSet.Disable() ; } function FCK_OnFocus( editorInstance ) { var oToolbarset = editorInstance.ToolbarSet ; var oInstance = editorInstance || FCK ; // Unregister the toolbar window from the current instance. oToolbarset.CurrentInstance.FocusManager.RemoveWindow( oToolbarset._IFrame.contentWindow ) ; // Set the new current instance. oToolbarset.CurrentInstance = oInstance ; // Register the toolbar window in the current instance. oInstance.FocusManager.AddWindow( oToolbarset._IFrame.contentWindow, true ) ; oToolbarset.Enable() ; } function FCKToolbarSet_Cleanup() { this._TargetElement = null ; this._IFrame = null ; } function FCKToolbarSet_Target_Cleanup() { this.__FCKToolbarSet = null ; } var FCKToolbarSet = function( targetDocument ) { this._Document = targetDocument ; // Get the element that will hold the elements structure. this._TargetElement = targetDocument.getElementById( 'xToolbar' ) ; // Setup the expand and collapse handlers. var eExpandHandle = targetDocument.getElementById( 'xExpandHandle' ) ; var eCollapseHandle = targetDocument.getElementById( 'xCollapseHandle' ) ; eExpandHandle.title = FCKLang.ToolbarExpand ; FCKTools.AddEventListener( eExpandHandle, 'click', FCKToolbarSet_Expand_OnClick ) ; eCollapseHandle.title = FCKLang.ToolbarCollapse ; FCKTools.AddEventListener( eCollapseHandle, 'click', FCKToolbarSet_Collapse_OnClick ) ; // Set the toolbar state at startup. if ( !FCKConfig.ToolbarCanCollapse || FCKConfig.ToolbarStartExpanded ) this.Expand() ; else this.Collapse() ; // Enable/disable the collapse handler eCollapseHandle.style.display = FCKConfig.ToolbarCanCollapse ? '' : 'none' ; if ( FCKConfig.ToolbarCanCollapse ) eCollapseHandle.style.display = '' ; else targetDocument.getElementById( 'xTBLeftBorder' ).style.display = '' ; // Set the default properties. this.Toolbars = new Array() ; this.IsLoaded = false ; if ( FCK.IECleanup ) FCK.IECleanup.AddItem( this, FCKToolbarSet_Cleanup ) ; } function FCKToolbarSet_Expand_OnClick() { FCK.ToolbarSet.Expand() ; } function FCKToolbarSet_Collapse_OnClick() { FCK.ToolbarSet.Collapse() ; } FCKToolbarSet.prototype.Expand = function() { this._ChangeVisibility( false ) ; } FCKToolbarSet.prototype.Collapse = function() { this._ChangeVisibility( true ) ; } FCKToolbarSet.prototype._ChangeVisibility = function( collapse ) { this._Document.getElementById( 'xCollapsed' ).style.display = collapse ? '' : 'none' ; this._Document.getElementById( 'xExpanded' ).style.display = collapse ? 'none' : '' ; if ( FCKBrowserInfo.IsGecko ) { // I had to use "setTimeout" because Gecko was not responding in a right // way when calling window.onresize() directly. FCKTools.RunFunction( window.onresize ) ; } } FCKToolbarSet.prototype.Load = function( toolbarSetName ) { this.Name = toolbarSetName ; this.Items = new Array() ; // Reset the array of toolbar items that are active only on WYSIWYG mode. this.ItemsWysiwygOnly = new Array() ; // Reset the array of toolbar items that are sensitive to the cursor position. this.ItemsContextSensitive = new Array() ; // Cleanup the target element. this._TargetElement.innerHTML = '' ; var ToolbarSet = FCKConfig.ToolbarSets[toolbarSetName] ; if ( !ToolbarSet ) { alert( FCKLang.UnknownToolbarSet.replace( /%1/g, toolbarSetName ) ) ; return ; } this.Toolbars = new Array() ; for ( var x = 0 ; x < ToolbarSet.length ; x++ ) { var oToolbarItems = ToolbarSet[x] ; // If the configuration for the toolbar is missing some element or has any extra comma // this item won't be valid, so skip it and keep on processing. if ( !oToolbarItems ) continue ; var oToolbar ; if ( typeof( oToolbarItems ) == 'string' ) { if ( oToolbarItems == '/' ) oToolbar = new FCKToolbarBreak() ; } else { oToolbar = new FCKToolbar() ; for ( var j = 0 ; j < oToolbarItems.length ; j++ ) { var sItem = oToolbarItems[j] ; if ( sItem == '-') oToolbar.AddSeparator() ; else { var oItem = FCKToolbarItems.GetItem( sItem ) ; if ( oItem ) { oToolbar.AddItem( oItem ) ; this.Items.push( oItem ) ; if ( !oItem.SourceView ) this.ItemsWysiwygOnly.push( oItem ) ; if ( oItem.ContextSensitive ) this.ItemsContextSensitive.push( oItem ) ; } } } // oToolbar.AddTerminator() ; } oToolbar.Create( this._TargetElement ) ; this.Toolbars[ this.Toolbars.length ] = oToolbar ; } FCKTools.DisableSelection( this._Document.getElementById( 'xCollapseHandle' ).parentNode ) ; if ( FCK.Status != FCK_STATUS_COMPLETE ) FCK.Events.AttachEvent( 'OnStatusChange', this.RefreshModeState ) ; else this.RefreshModeState() ; this.IsLoaded = true ; this.IsEnabled = true ; FCKTools.RunFunction( this.OnLoad ) ; } FCKToolbarSet.prototype.Enable = function() { if ( this.IsEnabled ) return ; this.IsEnabled = true ; var aItems = this.Items ; for ( var i = 0 ; i < aItems.length ; i++ ) aItems[i].RefreshState() ; } FCKToolbarSet.prototype.Disable = function() { if ( !this.IsEnabled ) return ; this.IsEnabled = false ; var aItems = this.Items ; for ( var i = 0 ; i < aItems.length ; i++ ) aItems[i].Disable() ; } FCKToolbarSet.prototype.RefreshModeState = function( editorInstance ) { if ( FCK.Status != FCK_STATUS_COMPLETE ) return ; var oToolbarSet = editorInstance ? editorInstance.ToolbarSet : this ; var aItems = oToolbarSet.ItemsWysiwygOnly ; if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) { // Enable all buttons that are available on WYSIWYG mode only. for ( var i = 0 ; i < aItems.length ; i++ ) aItems[i].Enable() ; // Refresh the buttons state. oToolbarSet.RefreshItemsState( editorInstance ) ; } else { // Refresh the buttons state. oToolbarSet.RefreshItemsState( editorInstance ) ; // Disable all buttons that are available on WYSIWYG mode only. for ( var j = 0 ; j < aItems.length ; j++ ) aItems[j].Disable() ; } } FCKToolbarSet.prototype.RefreshItemsState = function( editorInstance ) { var aItems = ( editorInstance ? editorInstance.ToolbarSet : this ).ItemsContextSensitive ; for ( var i = 0 ; i < aItems.length ; i++ ) aItems[i].RefreshState() ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines the FCK.ContextMenu object that is responsible for all * Context Menu operations in the editing area. */ FCK.ContextMenu = new Object() ; FCK.ContextMenu.Listeners = new Array() ; FCK.ContextMenu.RegisterListener = function( listener ) { if ( listener ) this.Listeners.push( listener ) ; } function FCK_ContextMenu_Init() { var oInnerContextMenu = FCK.ContextMenu._InnerContextMenu = new FCKContextMenu( FCKBrowserInfo.IsIE ? window : window.parent, FCKLang.Dir ) ; oInnerContextMenu.CtrlDisable = FCKConfig.BrowserContextMenuOnCtrl ; oInnerContextMenu.OnBeforeOpen = FCK_ContextMenu_OnBeforeOpen ; oInnerContextMenu.OnItemClick = FCK_ContextMenu_OnItemClick ; // Get the registering function. var oMenu = FCK.ContextMenu ; // Register all configured context menu listeners. for ( var i = 0 ; i < FCKConfig.ContextMenu.length ; i++ ) oMenu.RegisterListener( FCK_ContextMenu_GetListener( FCKConfig.ContextMenu[i] ) ) ; } function FCK_ContextMenu_GetListener( listenerName ) { switch ( listenerName ) { case 'Generic' : return { AddItems : function( menu, tag, tagName ) { menu.AddItem( 'Cut' , FCKLang.Cut , 7, FCKCommands.GetCommand( 'Cut' ).GetState() == FCK_TRISTATE_DISABLED ) ; menu.AddItem( 'Copy' , FCKLang.Copy , 8, FCKCommands.GetCommand( 'Copy' ).GetState() == FCK_TRISTATE_DISABLED ) ; menu.AddItem( 'Paste' , FCKLang.Paste , 9, FCKCommands.GetCommand( 'Paste' ).GetState() == FCK_TRISTATE_DISABLED ) ; }} ; case 'Table' : return { AddItems : function( menu, tag, tagName ) { var bIsTable = ( tagName == 'TABLE' ) ; var bIsCell = ( !bIsTable && FCKSelection.HasAncestorNode( 'TABLE' ) ) ; if ( bIsCell ) { menu.AddSeparator() ; var oItem = menu.AddItem( 'Cell' , FCKLang.CellCM ) ; oItem.AddItem( 'TableInsertCellBefore' , FCKLang.InsertCellBefore, 69 ) ; oItem.AddItem( 'TableInsertCellAfter' , FCKLang.InsertCellAfter, 58 ) ; oItem.AddItem( 'TableDeleteCells' , FCKLang.DeleteCells, 59 ) ; if ( FCKBrowserInfo.IsGecko ) oItem.AddItem( 'TableMergeCells' , FCKLang.MergeCells, 60, FCKCommands.GetCommand( 'TableMergeCells' ).GetState() == FCK_TRISTATE_DISABLED ) ; else { oItem.AddItem( 'TableMergeRight' , FCKLang.MergeRight, 60, FCKCommands.GetCommand( 'TableMergeRight' ).GetState() == FCK_TRISTATE_DISABLED ) ; oItem.AddItem( 'TableMergeDown' , FCKLang.MergeDown, 60, FCKCommands.GetCommand( 'TableMergeDown' ).GetState() == FCK_TRISTATE_DISABLED ) ; } oItem.AddItem( 'TableHorizontalSplitCell' , FCKLang.HorizontalSplitCell, 61, FCKCommands.GetCommand( 'TableHorizontalSplitCell' ).GetState() == FCK_TRISTATE_DISABLED ) ; oItem.AddItem( 'TableVerticalSplitCell' , FCKLang.VerticalSplitCell, 61, FCKCommands.GetCommand( 'TableVerticalSplitCell' ).GetState() == FCK_TRISTATE_DISABLED ) ; oItem.AddSeparator() ; oItem.AddItem( 'TableCellProp' , FCKLang.CellProperties, 57, FCKCommands.GetCommand( 'TableCellProp' ).GetState() == FCK_TRISTATE_DISABLED ) ; menu.AddSeparator() ; oItem = menu.AddItem( 'Row' , FCKLang.RowCM ) ; oItem.AddItem( 'TableInsertRowBefore' , FCKLang.InsertRowBefore, 70 ) ; oItem.AddItem( 'TableInsertRowAfter' , FCKLang.InsertRowAfter, 62 ) ; oItem.AddItem( 'TableDeleteRows' , FCKLang.DeleteRows, 63 ) ; menu.AddSeparator() ; oItem = menu.AddItem( 'Column' , FCKLang.ColumnCM ) ; oItem.AddItem( 'TableInsertColumnBefore', FCKLang.InsertColumnBefore, 71 ) ; oItem.AddItem( 'TableInsertColumnAfter' , FCKLang.InsertColumnAfter, 64 ) ; oItem.AddItem( 'TableDeleteColumns' , FCKLang.DeleteColumns, 65 ) ; } if ( bIsTable || bIsCell ) { menu.AddSeparator() ; menu.AddItem( 'TableDelete' , FCKLang.TableDelete ) ; menu.AddItem( 'TableProp' , FCKLang.TableProperties, 39 ) ; } }} ; case 'Link' : return { AddItems : function( menu, tag, tagName ) { var bInsideLink = ( tagName == 'A' || FCKSelection.HasAncestorNode( 'A' ) ) ; if ( bInsideLink || FCK.GetNamedCommandState( 'Unlink' ) != FCK_TRISTATE_DISABLED ) { // Go up to the anchor to test its properties var oLink = FCKSelection.MoveToAncestorNode( 'A' ) ; var bIsAnchor = ( oLink && oLink.name.length > 0 && oLink.href.length == 0 ) ; // If it isn't a link then don't add the Link context menu if ( bIsAnchor ) return ; menu.AddSeparator() ; menu.AddItem( 'VisitLink', FCKLang.VisitLink ) ; menu.AddSeparator() ; if ( bInsideLink ) menu.AddItem( 'Link', FCKLang.EditLink , 34 ) ; menu.AddItem( 'Unlink' , FCKLang.RemoveLink , 35 ) ; } }} ; case 'Image' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'IMG' && !tag.getAttribute( '_fckfakelement' ) ) { menu.AddSeparator() ; menu.AddItem( 'Image', FCKLang.ImageProperties, 37 ) ; } }} ; case 'Anchor' : return { AddItems : function( menu, tag, tagName ) { // Go up to the anchor to test its properties var oLink = FCKSelection.MoveToAncestorNode( 'A' ) ; var bIsAnchor = ( oLink && oLink.name.length > 0 ) ; if ( bIsAnchor || ( tagName == 'IMG' && tag.getAttribute( '_fckanchor' ) ) ) { menu.AddSeparator() ; menu.AddItem( 'Anchor', FCKLang.AnchorProp, 36 ) ; menu.AddItem( 'AnchorDelete', FCKLang.AnchorDelete ) ; } }} ; case 'Flash' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'IMG' && tag.getAttribute( '_fckflash' ) ) { menu.AddSeparator() ; menu.AddItem( 'Flash', FCKLang.FlashProperties, 38 ) ; } }} ; case 'Form' : return { AddItems : function( menu, tag, tagName ) { if ( FCKSelection.HasAncestorNode('FORM') ) { menu.AddSeparator() ; menu.AddItem( 'Form', FCKLang.FormProp, 48 ) ; } }} ; case 'Checkbox' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'INPUT' && tag.type == 'checkbox' ) { menu.AddSeparator() ; menu.AddItem( 'Checkbox', FCKLang.CheckboxProp, 49 ) ; } }} ; case 'Radio' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'INPUT' && tag.type == 'radio' ) { menu.AddSeparator() ; menu.AddItem( 'Radio', FCKLang.RadioButtonProp, 50 ) ; } }} ; case 'TextField' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'INPUT' && ( tag.type == 'text' || tag.type == 'password' ) ) { menu.AddSeparator() ; menu.AddItem( 'TextField', FCKLang.TextFieldProp, 51 ) ; } }} ; case 'HiddenField' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'IMG' && tag.getAttribute( '_fckinputhidden' ) ) { menu.AddSeparator() ; menu.AddItem( 'HiddenField', FCKLang.HiddenFieldProp, 56 ) ; } }} ; case 'ImageButton' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'INPUT' && tag.type == 'image' ) { menu.AddSeparator() ; menu.AddItem( 'ImageButton', FCKLang.ImageButtonProp, 55 ) ; } }} ; case 'Button' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'INPUT' && ( tag.type == 'button' || tag.type == 'submit' || tag.type == 'reset' ) ) { menu.AddSeparator() ; menu.AddItem( 'Button', FCKLang.ButtonProp, 54 ) ; } }} ; case 'Select' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'SELECT' ) { menu.AddSeparator() ; menu.AddItem( 'Select', FCKLang.SelectionFieldProp, 53 ) ; } }} ; case 'Textarea' : return { AddItems : function( menu, tag, tagName ) { if ( tagName == 'TEXTAREA' ) { menu.AddSeparator() ; menu.AddItem( 'Textarea', FCKLang.TextareaProp, 52 ) ; } }} ; case 'BulletedList' : return { AddItems : function( menu, tag, tagName ) { if ( FCKSelection.HasAncestorNode('UL') ) { menu.AddSeparator() ; menu.AddItem( 'BulletedList', FCKLang.BulletedListProp, 27 ) ; } }} ; case 'NumberedList' : return { AddItems : function( menu, tag, tagName ) { if ( FCKSelection.HasAncestorNode('OL') ) { menu.AddSeparator() ; menu.AddItem( 'NumberedList', FCKLang.NumberedListProp, 26 ) ; } }} ; case 'DivContainer': return { AddItems : function( menu, tag, tagName ) { var currentBlocks = FCKDomTools.GetSelectedDivContainers() ; if ( currentBlocks.length > 0 ) { menu.AddSeparator() ; menu.AddItem( 'EditDiv', FCKLang.EditDiv, 75 ) ; menu.AddItem( 'DeleteDiv', FCKLang.DeleteDiv, 76 ) ; } }} ; } return null ; } function FCK_ContextMenu_OnBeforeOpen() { // Update the UI. FCK.Events.FireEvent( 'OnSelectionChange' ) ; // Get the actual selected tag (if any). var oTag, sTagName ; // The extra () is to avoid a warning with strict error checking. This is ok. if ( (oTag = FCKSelection.GetSelectedElement()) ) sTagName = oTag.tagName ; // Cleanup the current menu items. var oMenu = FCK.ContextMenu._InnerContextMenu ; oMenu.RemoveAllItems() ; // Loop through the listeners. var aListeners = FCK.ContextMenu.Listeners ; for ( var i = 0 ; i < aListeners.length ; i++ ) aListeners[i].AddItems( oMenu, oTag, sTagName ) ; } function FCK_ContextMenu_OnItemClick( item ) { // IE might work incorrectly if we refocus the editor #798 if ( !FCKBrowserInfo.IsIE ) FCK.Focus() ; FCKCommands.GetCommand( item.Name ).Execute( item.CustomData ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Define all commands available in the editor. */ var FCKCommands = FCK.Commands = new Object() ; FCKCommands.LoadedCommands = new Object() ; FCKCommands.RegisterCommand = function( commandName, command ) { this.LoadedCommands[ commandName ] = command ; } FCKCommands.GetCommand = function( commandName ) { var oCommand = FCKCommands.LoadedCommands[ commandName ] ; if ( oCommand ) return oCommand ; switch ( commandName ) { case 'Bold' : case 'Italic' : case 'Underline' : case 'StrikeThrough': case 'Subscript' : case 'Superscript' : oCommand = new FCKCoreStyleCommand( commandName ) ; break ; case 'RemoveFormat' : oCommand = new FCKRemoveFormatCommand() ; break ; case 'DocProps' : oCommand = new FCKDialogCommand( 'DocProps' , FCKLang.DocProps , 'dialog/fck_docprops.html' , 400, 380, FCKCommands.GetFullPageState ) ; break ; case 'Templates' : oCommand = new FCKDialogCommand( 'Templates' , FCKLang.DlgTemplatesTitle , 'dialog/fck_template.html' , 380, 450 ) ; break ; case 'Link' : oCommand = new FCKDialogCommand( 'Link' , FCKLang.DlgLnkWindowTitle , 'dialog/fck_link.html' , 400, 300 ) ; break ; case 'Unlink' : oCommand = new FCKUnlinkCommand() ; break ; case 'VisitLink' : oCommand = new FCKVisitLinkCommand() ; break ; case 'Anchor' : oCommand = new FCKDialogCommand( 'Anchor' , FCKLang.DlgAnchorTitle , 'dialog/fck_anchor.html' , 370, 160 ) ; break ; case 'AnchorDelete' : oCommand = new FCKAnchorDeleteCommand() ; break ; case 'BulletedList' : oCommand = new FCKDialogCommand( 'BulletedList', FCKLang.BulletedListProp , 'dialog/fck_listprop.html?UL' , 370, 160 ) ; break ; case 'NumberedList' : oCommand = new FCKDialogCommand( 'NumberedList', FCKLang.NumberedListProp , 'dialog/fck_listprop.html?OL' , 370, 160 ) ; break ; case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 420, 330, function(){ return FCK_TRISTATE_OFF ; } ) ; break ; case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindAndReplaceTitle, 'dialog/fck_replace.html' , 340, 230, null, null, 'Find' ) ; break ; case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgFindAndReplaceTitle, 'dialog/fck_replace.html' , 340, 230, null, null, 'Replace' ) ; break ; case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html' , 450, 390 ) ; break ; case 'Flash' : oCommand = new FCKDialogCommand( 'Flash' , FCKLang.DlgFlashTitle , 'dialog/fck_flash.html' , 450, 390 ) ; break ; case 'SpecialChar' : oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle , 'dialog/fck_specialchar.html' , 400, 290 ) ; break ; case 'Smiley' : oCommand = new FCKDialogCommand( 'Smiley' , FCKLang.DlgSmileyTitle , 'dialog/fck_smiley.html' , FCKConfig.SmileyWindowWidth, FCKConfig.SmileyWindowHeight ) ; break ; case 'Table' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html' , 480, 250 ) ; break ; case 'TableProp' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html?Parent', 480, 250 ) ; break ; case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell' , FCKLang.DlgCellTitle , 'dialog/fck_tablecell.html' , 550, 240 ) ; break ; case 'Style' : oCommand = new FCKStyleCommand() ; break ; case 'FontName' : oCommand = new FCKFontNameCommand() ; break ; case 'FontSize' : oCommand = new FCKFontSizeCommand() ; break ; case 'FontFormat' : oCommand = new FCKFormatBlockCommand() ; break ; case 'Source' : oCommand = new FCKSourceCommand() ; break ; case 'Preview' : oCommand = new FCKPreviewCommand() ; break ; case 'Save' : oCommand = new FCKSaveCommand() ; break ; case 'NewPage' : oCommand = new FCKNewPageCommand() ; break ; case 'PageBreak' : oCommand = new FCKPageBreakCommand() ; break ; case 'Rule' : oCommand = new FCKRuleCommand() ; break ; case 'Nbsp' : oCommand = new FCKNbsp() ; break ; case 'TextColor' : oCommand = new FCKTextColorCommand('ForeColor') ; break ; case 'BGColor' : oCommand = new FCKTextColorCommand('BackColor') ; break ; case 'Paste' : oCommand = new FCKPasteCommand() ; break ; case 'PasteText' : oCommand = new FCKPastePlainTextCommand() ; break ; case 'PasteWord' : oCommand = new FCKPasteWordCommand() ; break ; case 'JustifyLeft' : oCommand = new FCKJustifyCommand( 'left' ) ; break ; case 'JustifyCenter' : oCommand = new FCKJustifyCommand( 'center' ) ; break ; case 'JustifyRight' : oCommand = new FCKJustifyCommand( 'right' ) ; break ; case 'JustifyFull' : oCommand = new FCKJustifyCommand( 'justify' ) ; break ; case 'Indent' : oCommand = new FCKIndentCommand( 'indent', FCKConfig.IndentLength ) ; break ; case 'Outdent' : oCommand = new FCKIndentCommand( 'outdent', FCKConfig.IndentLength * -1 ) ; break ; case 'Blockquote' : oCommand = new FCKBlockQuoteCommand() ; break ; case 'CreateDiv' : oCommand = new FCKDialogCommand( 'CreateDiv', FCKLang.CreateDiv, 'dialog/fck_div.html', 380, 210, null, null, true ) ; break ; case 'EditDiv' : oCommand = new FCKDialogCommand( 'EditDiv', FCKLang.EditDiv, 'dialog/fck_div.html', 380, 210, null, null, false ) ; break ; case 'DeleteDiv' : oCommand = new FCKDeleteDivCommand() ; break ; case 'TableInsertRowAfter' : oCommand = new FCKTableCommand('TableInsertRowAfter') ; break ; case 'TableInsertRowBefore' : oCommand = new FCKTableCommand('TableInsertRowBefore') ; break ; case 'TableDeleteRows' : oCommand = new FCKTableCommand('TableDeleteRows') ; break ; case 'TableInsertColumnAfter' : oCommand = new FCKTableCommand('TableInsertColumnAfter') ; break ; case 'TableInsertColumnBefore' : oCommand = new FCKTableCommand('TableInsertColumnBefore') ; break ; case 'TableDeleteColumns' : oCommand = new FCKTableCommand('TableDeleteColumns') ; break ; case 'TableInsertCellAfter' : oCommand = new FCKTableCommand('TableInsertCellAfter') ; break ; case 'TableInsertCellBefore' : oCommand = new FCKTableCommand('TableInsertCellBefore') ; break ; case 'TableDeleteCells' : oCommand = new FCKTableCommand('TableDeleteCells') ; break ; case 'TableMergeCells' : oCommand = new FCKTableCommand('TableMergeCells') ; break ; case 'TableMergeRight' : oCommand = new FCKTableCommand('TableMergeRight') ; break ; case 'TableMergeDown' : oCommand = new FCKTableCommand('TableMergeDown') ; break ; case 'TableHorizontalSplitCell' : oCommand = new FCKTableCommand('TableHorizontalSplitCell') ; break ; case 'TableVerticalSplitCell' : oCommand = new FCKTableCommand('TableVerticalSplitCell') ; break ; case 'TableDelete' : oCommand = new FCKTableCommand('TableDelete') ; break ; case 'Form' : oCommand = new FCKDialogCommand( 'Form' , FCKLang.Form , 'dialog/fck_form.html' , 380, 210 ) ; break ; case 'Checkbox' : oCommand = new FCKDialogCommand( 'Checkbox' , FCKLang.Checkbox , 'dialog/fck_checkbox.html' , 380, 200 ) ; break ; case 'Radio' : oCommand = new FCKDialogCommand( 'Radio' , FCKLang.RadioButton , 'dialog/fck_radiobutton.html' , 380, 200 ) ; break ; case 'TextField' : oCommand = new FCKDialogCommand( 'TextField' , FCKLang.TextField , 'dialog/fck_textfield.html' , 380, 210 ) ; break ; case 'Textarea' : oCommand = new FCKDialogCommand( 'Textarea' , FCKLang.Textarea , 'dialog/fck_textarea.html' , 380, 210 ) ; break ; case 'HiddenField' : oCommand = new FCKDialogCommand( 'HiddenField', FCKLang.HiddenField , 'dialog/fck_hiddenfield.html' , 380, 190 ) ; break ; case 'Button' : oCommand = new FCKDialogCommand( 'Button' , FCKLang.Button , 'dialog/fck_button.html' , 380, 210 ) ; break ; case 'Select' : oCommand = new FCKDialogCommand( 'Select' , FCKLang.SelectionField, 'dialog/fck_select.html' , 400, 340 ) ; break ; case 'ImageButton' : oCommand = new FCKDialogCommand( 'ImageButton', FCKLang.ImageButton , 'dialog/fck_image.html?ImageButton', 450, 390 ) ; break ; case 'SpellCheck' : oCommand = new FCKSpellCheckCommand() ; break ; case 'FitWindow' : oCommand = new FCKFitWindow() ; break ; case 'Undo' : oCommand = new FCKUndoCommand() ; break ; case 'Redo' : oCommand = new FCKRedoCommand() ; break ; case 'Copy' : oCommand = new FCKCutCopyCommand( false ) ; break ; case 'Cut' : oCommand = new FCKCutCopyCommand( true ) ; break ; case 'SelectAll' : oCommand = new FCKSelectAllCommand() ; break ; case 'InsertOrderedList' : oCommand = new FCKListCommand( 'insertorderedlist', 'ol' ) ; break ; case 'InsertUnorderedList' : oCommand = new FCKListCommand( 'insertunorderedlist', 'ul' ) ; break ; case 'ShowBlocks' : oCommand = new FCKShowBlockCommand( 'ShowBlocks', FCKConfig.StartupShowBlocks ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ) ; break ; // Generic Undefined command (usually used when a command is under development). case 'Undefined' : oCommand = new FCKUndefinedCommand() ; break ; // By default we assume that it is a named command. default: if ( FCKRegexLib.NamedCommands.test( commandName ) ) oCommand = new FCKNamedCommand( commandName ) ; else { alert( FCKLang.UnknownCommand.replace( /%1/g, commandName ) ) ; return null ; } } FCKCommands.LoadedCommands[ commandName ] = oCommand ; return oCommand ; } // Gets the state of the "Document Properties" button. It must be enabled only // when "Full Page" editing is available. FCKCommands.GetFullPageState = function() { return FCKConfig.FullPage ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; } FCKCommands.GetBooleanState = function( isDisabled ) { return isDisabled ? FCK_TRISTATE_DISABLED : FCK_TRISTATE_OFF ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Extensions to the JavaScript Core. * * All custom extensions functions are PascalCased to differ from the standard * camelCased ones. */ String.prototype.Contains = function( textToCheck ) { return ( this.indexOf( textToCheck ) > -1 ) ; } String.prototype.Equals = function() { var aArgs = arguments ; // The arguments could also be a single array. if ( aArgs.length == 1 && aArgs[0].pop ) aArgs = aArgs[0] ; for ( var i = 0 ; i < aArgs.length ; i++ ) { if ( this == aArgs[i] ) return true ; } return false ; } String.prototype.IEquals = function() { var thisUpper = this.toUpperCase() ; var aArgs = arguments ; // The arguments could also be a single array. if ( aArgs.length == 1 && aArgs[0].pop ) aArgs = aArgs[0] ; for ( var i = 0 ; i < aArgs.length ; i++ ) { if ( thisUpper == aArgs[i].toUpperCase() ) return true ; } return false ; } String.prototype.ReplaceAll = function( searchArray, replaceArray ) { var replaced = this ; for ( var i = 0 ; i < searchArray.length ; i++ ) { replaced = replaced.replace( searchArray[i], replaceArray[i] ) ; } return replaced ; } String.prototype.StartsWith = function( value ) { return ( this.substr( 0, value.length ) == value ) ; } // Extends the String object, creating a "EndsWith" method on it. String.prototype.EndsWith = function( value, ignoreCase ) { var L1 = this.length ; var L2 = value.length ; if ( L2 > L1 ) return false ; if ( ignoreCase ) { var oRegex = new RegExp( value + '$' , 'i' ) ; return oRegex.test( this ) ; } else return ( L2 == 0 || this.substr( L1 - L2, L2 ) == value ) ; } String.prototype.Remove = function( start, length ) { var s = '' ; if ( start > 0 ) s = this.substring( 0, start ) ; if ( start + length < this.length ) s += this.substring( start + length , this.length ) ; return s ; } String.prototype.Trim = function() { // We are not using \s because we don't want "non-breaking spaces to be caught". return this.replace( /(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '' ) ; } String.prototype.LTrim = function() { // We are not using \s because we don't want "non-breaking spaces to be caught". return this.replace( /^[ \t\n\r]*/g, '' ) ; } String.prototype.RTrim = function() { // We are not using \s because we don't want "non-breaking spaces to be caught". return this.replace( /[ \t\n\r]*$/g, '' ) ; } String.prototype.ReplaceNewLineChars = function( replacement ) { return this.replace( /\n/g, replacement ) ; } String.prototype.Replace = function( regExp, replacement, thisObj ) { if ( typeof replacement == 'function' ) { return this.replace( regExp, function() { return replacement.apply( thisObj || this, arguments ) ; } ) ; } else return this.replace( regExp, replacement ) ; } Array.prototype.IndexOf = function( value ) { for ( var i = 0 ; i < this.length ; i++ ) { if ( this[i] == value ) return i ; } return -1 ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * The Data Processor is responsible for transforming the input and output data * in the editor. For more info: * http://dev.fckeditor.net/wiki/Components/DataProcessor * * The default implementation offers the base XHTML compatibility features of * FCKeditor. Further Data Processors may be implemented for other purposes. * */ var FCKDataProcessor = function() {} FCKDataProcessor.prototype = { /* * Returns a string representing the HTML format of "data". The returned * value will be loaded in the editor. * The HTML must be from <html> to </html>, including <head>, <body> and * eventually the DOCTYPE. * Note: HTML comments may already be part of the data because of the * pre-processing made with ProtectedSource. * @param {String} data The data to be converted in the * DataProcessor specific format. */ ConvertToHtml : function( data ) { // The default data processor must handle two different cases depending // on the FullPage setting. Custom Data Processors will not be // compatible with FullPage, much probably. if ( FCKConfig.FullPage ) { // Save the DOCTYPE. FCK.DocTypeDeclaration = data.match( FCKRegexLib.DocTypeTag ) ; // Check if the <body> tag is available. if ( !FCKRegexLib.HasBodyTag.test( data ) ) data = '<body>' + data + '</body>' ; // Check if the <html> tag is available. if ( !FCKRegexLib.HtmlOpener.test( data ) ) data = '<html dir="' + FCKConfig.ContentLangDirection + '">' + data + '</html>' ; // Check if the <head> tag is available. if ( !FCKRegexLib.HeadOpener.test( data ) ) data = data.replace( FCKRegexLib.HtmlOpener, '$&<head><title></title></head>' ) ; return data ; } else { var html = FCKConfig.DocType + '<html dir="' + FCKConfig.ContentLangDirection + '"' ; // On IE, if you are using a DOCTYPE different of HTML 4 (like // XHTML), you must force the vertical scroll to show, otherwise // the horizontal one may appear when the page needs vertical scrolling. // TODO : Check it with IE7 and make it IE6- if it is the case. if ( FCKBrowserInfo.IsIE && FCKConfig.DocType.length > 0 && !FCKRegexLib.Html4DocType.test( FCKConfig.DocType ) ) html += ' style="overflow-y: scroll"' ; html += '><head><title></title></head>' + '<body' + FCKConfig.GetBodyAttributes() + '>' + data + '</body></html>' ; return html ; } }, /* * Converts a DOM (sub-)tree to a string in the data format. * @param {Object} rootNode The node that contains the DOM tree to be * converted to the data format. * @param {Boolean} excludeRoot Indicates that the root node must not * be included in the conversion, only its children. * @param {Boolean} format Indicates that the data must be formatted * for human reading. Not all Data Processors may provide it. */ ConvertToDataFormat : function( rootNode, excludeRoot, ignoreIfEmptyParagraph, format ) { var data = FCKXHtml.GetXHTML( rootNode, !excludeRoot, format ) ; if ( ignoreIfEmptyParagraph && FCKRegexLib.EmptyOutParagraph.test( data ) ) return '' ; return data ; }, /* * Makes any necessary changes to a piece of HTML for insertion in the * editor selection position. * @param {String} html The HTML to be fixed. */ FixHtml : function( html ) { return html ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Class for working with a selection range, much like the W3C DOM Range, but * it is not intended to be an implementation of the W3C interface. * (IE Implementation) */ FCKDomRange.prototype.MoveToSelection = function() { this.Release( true ) ; this._Range = new FCKW3CRange( this.Window.document ) ; var oSel = this.Window.document.selection ; if ( oSel.type != 'Control' ) { var eMarkerStart = this._GetSelectionMarkerTag( true ) ; var eMarkerEnd = this._GetSelectionMarkerTag( false ) ; if ( !eMarkerStart && !eMarkerEnd ) { this._Range.setStart( this.Window.document.body, 0 ) ; this._UpdateElementInfo() ; return ; } // Set the start boundary. this._Range.setStart( eMarkerStart.parentNode, FCKDomTools.GetIndexOf( eMarkerStart ) ) ; eMarkerStart.parentNode.removeChild( eMarkerStart ) ; // Set the end boundary. this._Range.setEnd( eMarkerEnd.parentNode, FCKDomTools.GetIndexOf( eMarkerEnd ) ) ; eMarkerEnd.parentNode.removeChild( eMarkerEnd ) ; this._UpdateElementInfo() ; } else { var oControl = oSel.createRange().item(0) ; if ( oControl ) { this._Range.setStartBefore( oControl ) ; this._Range.setEndAfter( oControl ) ; this._UpdateElementInfo() ; } } } FCKDomRange.prototype.Select = function( forceExpand ) { if ( this._Range ) this.SelectBookmark( this.CreateBookmark( true ), forceExpand ) ; } // Not compatible with bookmark created with CreateBookmark2. // The bookmark nodes will be deleted from the document. FCKDomRange.prototype.SelectBookmark = function( bookmark, forceExpand ) { var bIsCollapsed = this.CheckIsCollapsed() ; var bIsStartMakerAlone ; var dummySpan ; // Create marker tags for the start and end boundaries. var eStartMarker = this.GetBookmarkNode( bookmark, true ) ; if ( !eStartMarker ) return ; var eEndMarker ; if ( !bIsCollapsed ) eEndMarker = this.GetBookmarkNode( bookmark, false ) ; // Create the main range which will be used for the selection. var oIERange = this.Window.document.body.createTextRange() ; // Position the range at the start boundary. oIERange.moveToElementText( eStartMarker ) ; oIERange.moveStart( 'character', 1 ) ; if ( eEndMarker ) { // Create a tool range for the end. var oIERangeEnd = this.Window.document.body.createTextRange() ; // Position the tool range at the end. oIERangeEnd.moveToElementText( eEndMarker ) ; // Move the end boundary of the main range to match the tool range. oIERange.setEndPoint( 'EndToEnd', oIERangeEnd ) ; oIERange.moveEnd( 'character', -1 ) ; } else { bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ; // Append a temporary <span>&#65279;</span> before the selection. // This is needed to avoid IE destroying selections inside empty // inline elements, like <b></b> (#253). // It is also needed when placing the selection right after an inline // element to avoid the selection moving inside of it. dummySpan = this.Window.document.createElement( 'span' ) ; dummySpan.innerHTML = '&#65279;' ; // Zero Width No-Break Space (U+FEFF). See #1359. eStartMarker.parentNode.insertBefore( dummySpan, eStartMarker ) ; if ( bIsStartMakerAlone ) { // To expand empty blocks or line spaces after <br>, we need // instead to have any char, which will be later deleted using the // selection. // \ufeff = Zero Width No-Break Space (U+FEFF). See #1359. eStartMarker.parentNode.insertBefore( this.Window.document.createTextNode( '\ufeff' ), eStartMarker ) ; } } if ( !this._Range ) this._Range = this.CreateRange() ; // Remove the markers (reset the position, because of the changes in the DOM tree). this._Range.setStartBefore( eStartMarker ) ; eStartMarker.parentNode.removeChild( eStartMarker ) ; if ( bIsCollapsed ) { if ( bIsStartMakerAlone ) { // Move the selection start to include the temporary &#65279;. oIERange.moveStart( 'character', -1 ) ; oIERange.select() ; // Remove our temporary stuff. this.Window.document.selection.clear() ; } else oIERange.select() ; FCKDomTools.RemoveNode( dummySpan ) ; } else { this._Range.setEndBefore( eEndMarker ) ; eEndMarker.parentNode.removeChild( eEndMarker ) ; oIERange.select() ; } } FCKDomRange.prototype._GetSelectionMarkerTag = function( toStart ) { var doc = this.Window.document ; var selection = doc.selection ; // Get a range for the start boundary. var oRange ; // IE may throw an "unspecified error" on some cases (it happened when // loading _samples/default.html), so try/catch. try { oRange = selection.createRange() ; } catch (e) { return null ; } // IE might take the range object to the main window instead of inside the editor iframe window. // This is known to happen when the editor window has not been selected before (See #933). // We need to avoid that. if ( oRange.parentElement().document != doc ) return null ; oRange.collapse( toStart === true ) ; // Paste a marker element at the collapsed range and get it from the DOM. var sMarkerId = 'fck_dom_range_temp_' + (new Date()).valueOf() + '_' + Math.floor(Math.random()*1000) ; oRange.pasteHTML( '<span id="' + sMarkerId + '"></span>' ) ; return doc.getElementById( sMarkerId ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarPanelButton Class: Handles the Fonts combo selector. */ var FCKToolbarFontsCombo = function( tooltip, style ) { this.CommandName = 'FontName' ; this.Label = this.GetLabel() ; this.Tooltip = tooltip ? tooltip : this.Label ; this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ; this.DefaultLabel = FCKConfig.DefaultFontLabel || '' ; } // Inherit from FCKToolbarSpecialCombo. FCKToolbarFontsCombo.prototype = new FCKToolbarFontFormatCombo( false ) ; FCKToolbarFontsCombo.prototype.GetLabel = function() { return FCKLang.Font ; } FCKToolbarFontsCombo.prototype.GetStyles = function() { var baseStyle = FCKStyles.GetStyle( '_FCK_FontFace' ) ; if ( !baseStyle ) { alert( "The FCKConfig.CoreStyles['Size'] setting was not found. Please check the fckconfig.js file" ) ; return {} ; } var styles = {} ; var fonts = FCKConfig.FontNames.split(';') ; for ( var i = 0 ; i < fonts.length ; i++ ) { var fontParts = fonts[i].split('/') ; var font = fontParts[0] ; var caption = fontParts[1] || font ; var style = FCKTools.CloneObject( baseStyle ) ; style.SetVariable( 'Font', font ) ; style.Label = caption ; styles[ caption ] = style ; } return styles ; } FCKToolbarFontsCombo.prototype.RefreshActiveItems = FCKToolbarStyleCombo.prototype.RefreshActiveItems ; FCKToolbarFontsCombo.prototype.StyleCombo_OnBeforeClick = function( targetSpecialCombo ) { // Clear the current selection. targetSpecialCombo.DeselectAll() ; var startElement = FCKSelection.GetBoundaryParentElement( true ) ; if ( startElement ) { var path = new FCKElementPath( startElement ) ; for ( var i in targetSpecialCombo.Items ) { var item = targetSpecialCombo.Items[i] ; var style = item.Style ; if ( style.CheckActive( path ) ) { targetSpecialCombo.SelectItem( item ) ; return ; } } } }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Controls the [Enter] keystroke behavior in a document. */ /* * Constructor. * @targetDocument : the target document. * @enterMode : the behavior for the <Enter> keystroke. * May be "p", "div", "br". Default is "p". * @shiftEnterMode : the behavior for the <Shift>+<Enter> keystroke. * May be "p", "div", "br". Defaults to "br". */ var FCKEnterKey = function( targetWindow, enterMode, shiftEnterMode, tabSpaces ) { this.Window = targetWindow ; this.EnterMode = enterMode || 'p' ; this.ShiftEnterMode = shiftEnterMode || 'br' ; // Setup the Keystroke Handler. var oKeystrokeHandler = new FCKKeystrokeHandler( false ) ; oKeystrokeHandler._EnterKey = this ; oKeystrokeHandler.OnKeystroke = FCKEnterKey_OnKeystroke ; oKeystrokeHandler.SetKeystrokes( [ [ 13 , 'Enter' ], [ SHIFT + 13, 'ShiftEnter' ], [ 8 , 'Backspace' ], [ CTRL + 8 , 'CtrlBackspace' ], [ 46 , 'Delete' ] ] ) ; this.TabText = '' ; // Safari by default inserts 4 spaces on TAB, while others make the editor // loose focus. So, we need to handle it here to not include those spaces. if ( tabSpaces > 0 || FCKBrowserInfo.IsSafari ) { while ( tabSpaces-- ) this.TabText += '\xa0' ; oKeystrokeHandler.SetKeystrokes( [ 9, 'Tab' ] ); } oKeystrokeHandler.AttachToElement( targetWindow.document ) ; } function FCKEnterKey_OnKeystroke( keyCombination, keystrokeValue ) { var oEnterKey = this._EnterKey ; try { switch ( keystrokeValue ) { case 'Enter' : return oEnterKey.DoEnter() ; break ; case 'ShiftEnter' : return oEnterKey.DoShiftEnter() ; break ; case 'Backspace' : return oEnterKey.DoBackspace() ; break ; case 'Delete' : return oEnterKey.DoDelete() ; break ; case 'Tab' : return oEnterKey.DoTab() ; break ; case 'CtrlBackspace' : return oEnterKey.DoCtrlBackspace() ; break ; } } catch (e) { // If for any reason we are not able to handle it, go // ahead with the browser default behavior. } return false ; } /* * Executes the <Enter> key behavior. */ FCKEnterKey.prototype.DoEnter = function( mode, hasShift ) { // Save an undo snapshot before doing anything FCKUndo.SaveUndoStep() ; this._HasShift = ( hasShift === true ) ; var parentElement = FCKSelection.GetParentElement() ; var parentPath = new FCKElementPath( parentElement ) ; var sMode = mode || this.EnterMode ; if ( sMode == 'br' || parentPath.Block && parentPath.Block.tagName.toLowerCase() == 'pre' ) return this._ExecuteEnterBr() ; else return this._ExecuteEnterBlock( sMode ) ; } /* * Executes the <Shift>+<Enter> key behavior. */ FCKEnterKey.prototype.DoShiftEnter = function() { return this.DoEnter( this.ShiftEnterMode, true ) ; } /* * Executes the <Backspace> key behavior. */ FCKEnterKey.prototype.DoBackspace = function() { var bCustom = false ; // Get the current selection. var oRange = new FCKDomRange( this.Window ) ; oRange.MoveToSelection() ; // Kludge for #247 if ( FCKBrowserInfo.IsIE && this._CheckIsAllContentsIncluded( oRange, this.Window.document.body ) ) { this._FixIESelectAllBug( oRange ) ; return true ; } var isCollapsed = oRange.CheckIsCollapsed() ; if ( !isCollapsed ) { // Bug #327, Backspace with an img selection would activate the default action in IE. // Let's override that with our logic here. if ( FCKBrowserInfo.IsIE && this.Window.document.selection.type.toLowerCase() == "control" ) { var controls = this.Window.document.selection.createRange() ; for ( var i = controls.length - 1 ; i >= 0 ; i-- ) { var el = controls.item( i ) ; el.parentNode.removeChild( el ) ; } return true ; } return false ; } // On IE, it is better for us handle the deletion if the caret is preceeded // by a <br> (#1383). if ( FCKBrowserInfo.IsIE ) { var previousElement = FCKDomTools.GetPreviousSourceElement( oRange.StartNode, true ) ; if ( previousElement && previousElement.nodeName.toLowerCase() == 'br' ) { // Create a range that starts after the <br> and ends at the // current range position. var testRange = oRange.Clone() ; testRange.SetStart( previousElement, 4 ) ; // If that range is empty, we can proceed cleaning that <br> manually. if ( testRange.CheckIsEmpty() ) { previousElement.parentNode.removeChild( previousElement ) ; return true ; } } } var oStartBlock = oRange.StartBlock ; var oEndBlock = oRange.EndBlock ; // The selection boundaries must be in the same "block limit" element if ( oRange.StartBlockLimit == oRange.EndBlockLimit && oStartBlock && oEndBlock ) { if ( !isCollapsed ) { var bEndOfBlock = oRange.CheckEndOfBlock() ; oRange.DeleteContents() ; if ( oStartBlock != oEndBlock ) { oRange.SetStart(oEndBlock,1) ; oRange.SetEnd(oEndBlock,1) ; // if ( bEndOfBlock ) // oEndBlock.parentNode.removeChild( oEndBlock ) ; } oRange.Select() ; bCustom = ( oStartBlock == oEndBlock ) ; } if ( oRange.CheckStartOfBlock() ) { var oCurrentBlock = oRange.StartBlock ; var ePrevious = FCKDomTools.GetPreviousSourceElement( oCurrentBlock, true, [ 'BODY', oRange.StartBlockLimit.nodeName ], ['UL','OL'] ) ; bCustom = this._ExecuteBackspace( oRange, ePrevious, oCurrentBlock ) ; } else if ( FCKBrowserInfo.IsGeckoLike ) { // Firefox and Opera (#1095) loose the selection when executing // CheckStartOfBlock, so we must reselect. oRange.Select() ; } } oRange.Release() ; return bCustom ; } FCKEnterKey.prototype.DoCtrlBackspace = function() { FCKUndo.SaveUndoStep() ; var oRange = new FCKDomRange( this.Window ) ; oRange.MoveToSelection() ; if ( FCKBrowserInfo.IsIE && this._CheckIsAllContentsIncluded( oRange, this.Window.document.body ) ) { this._FixIESelectAllBug( oRange ) ; return true ; } return false ; } FCKEnterKey.prototype._ExecuteBackspace = function( range, previous, currentBlock ) { var bCustom = false ; // We could be in a nested LI. if ( !previous && currentBlock && currentBlock.nodeName.IEquals( 'LI' ) && currentBlock.parentNode.parentNode.nodeName.IEquals( 'LI' ) ) { this._OutdentWithSelection( currentBlock, range ) ; return true ; } if ( previous && previous.nodeName.IEquals( 'LI' ) ) { var oNestedList = FCKDomTools.GetLastChild( previous, ['UL','OL'] ) ; while ( oNestedList ) { previous = FCKDomTools.GetLastChild( oNestedList, 'LI' ) ; oNestedList = FCKDomTools.GetLastChild( previous, ['UL','OL'] ) ; } } if ( previous && currentBlock ) { // If we are in a LI, and the previous block is not an LI, we must outdent it. if ( currentBlock.nodeName.IEquals( 'LI' ) && !previous.nodeName.IEquals( 'LI' ) ) { this._OutdentWithSelection( currentBlock, range ) ; return true ; } // Take a reference to the parent for post processing cleanup. var oCurrentParent = currentBlock.parentNode ; var sPreviousName = previous.nodeName.toLowerCase() ; if ( FCKListsLib.EmptyElements[ sPreviousName ] != null || sPreviousName == 'table' ) { FCKDomTools.RemoveNode( previous ) ; bCustom = true ; } else { // Remove the current block. FCKDomTools.RemoveNode( currentBlock ) ; // Remove any empty tag left by the block removal. while ( oCurrentParent.innerHTML.Trim().length == 0 ) { var oParent = oCurrentParent.parentNode ; oParent.removeChild( oCurrentParent ) ; oCurrentParent = oParent ; } // Cleanup the previous and the current elements. FCKDomTools.LTrimNode( currentBlock ) ; FCKDomTools.RTrimNode( previous ) ; // Append a space to the previous. // Maybe it is not always desirable... // previous.appendChild( this.Window.document.createTextNode( ' ' ) ) ; // Set the range to the end of the previous element and bookmark it. range.SetStart( previous, 2, true ) ; range.Collapse( true ) ; var oBookmark = range.CreateBookmark( true ) ; // Move the contents of the block to the previous element and delete it. // But for some block types (e.g. table), moving the children to the previous block makes no sense. // So a check is needed. (See #1081) if ( ! currentBlock.tagName.IEquals( [ 'TABLE' ] ) ) FCKDomTools.MoveChildren( currentBlock, previous ) ; // Place the selection at the bookmark. range.SelectBookmark( oBookmark ) ; bCustom = true ; } } return bCustom ; } /* * Executes the <Delete> key behavior. */ FCKEnterKey.prototype.DoDelete = function() { // Save an undo snapshot before doing anything // This is to conform with the behavior seen in MS Word FCKUndo.SaveUndoStep() ; // The <Delete> has the same effect as the <Backspace>, so we have the same // results if we just move to the next block and apply the same <Backspace> logic. var bCustom = false ; // Get the current selection. var oRange = new FCKDomRange( this.Window ) ; oRange.MoveToSelection() ; // Kludge for #247 if ( FCKBrowserInfo.IsIE && this._CheckIsAllContentsIncluded( oRange, this.Window.document.body ) ) { this._FixIESelectAllBug( oRange ) ; return true ; } // There is just one special case for collapsed selections at the end of a block. if ( oRange.CheckIsCollapsed() && oRange.CheckEndOfBlock( FCKBrowserInfo.IsGeckoLike ) ) { var oCurrentBlock = oRange.StartBlock ; var eCurrentCell = FCKTools.GetElementAscensor( oCurrentBlock, 'td' ); var eNext = FCKDomTools.GetNextSourceElement( oCurrentBlock, true, [ oRange.StartBlockLimit.nodeName ], ['UL','OL','TR'], true ) ; // Bug #1323 : if we're in a table cell, and the next node belongs to a different cell, then don't // delete anything. if ( eCurrentCell ) { var eNextCell = FCKTools.GetElementAscensor( eNext, 'td' ); if ( eNextCell != eCurrentCell ) return true ; } bCustom = this._ExecuteBackspace( oRange, oCurrentBlock, eNext ) ; } oRange.Release() ; return bCustom ; } /* * Executes the <Tab> key behavior. */ FCKEnterKey.prototype.DoTab = function() { var oRange = new FCKDomRange( this.Window ); oRange.MoveToSelection() ; // If the user pressed <tab> inside a table, we should give him the default behavior ( moving between cells ) // instead of giving him more non-breaking spaces. (Bug #973) var node = oRange._Range.startContainer ; while ( node ) { if ( node.nodeType == 1 ) { var tagName = node.tagName.toLowerCase() ; if ( tagName == "tr" || tagName == "td" || tagName == "th" || tagName == "tbody" || tagName == "table" ) return false ; else break ; } node = node.parentNode ; } if ( this.TabText ) { oRange.DeleteContents() ; oRange.InsertNode( this.Window.document.createTextNode( this.TabText ) ) ; oRange.Collapse( false ) ; oRange.Select() ; } return true ; } FCKEnterKey.prototype._ExecuteEnterBlock = function( blockTag, range ) { // Get the current selection. var oRange = range || new FCKDomRange( this.Window ) ; var oSplitInfo = oRange.SplitBlock( blockTag ) ; if ( oSplitInfo ) { // Get the current blocks. var ePreviousBlock = oSplitInfo.PreviousBlock ; var eNextBlock = oSplitInfo.NextBlock ; var bIsStartOfBlock = oSplitInfo.WasStartOfBlock ; var bIsEndOfBlock = oSplitInfo.WasEndOfBlock ; // If there is one block under a list item, modify the split so that the list item gets split as well. (Bug #1647) if ( eNextBlock ) { if ( eNextBlock.parentNode.nodeName.IEquals( 'li' ) ) { FCKDomTools.BreakParent( eNextBlock, eNextBlock.parentNode ) ; FCKDomTools.MoveNode( eNextBlock, eNextBlock.nextSibling, true ) ; } } else if ( ePreviousBlock && ePreviousBlock.parentNode.nodeName.IEquals( 'li' ) ) { FCKDomTools.BreakParent( ePreviousBlock, ePreviousBlock.parentNode ) ; oRange.MoveToElementEditStart( ePreviousBlock.nextSibling ); FCKDomTools.MoveNode( ePreviousBlock, ePreviousBlock.previousSibling ) ; } // If we have both the previous and next blocks, it means that the // boundaries were on separated blocks, or none of them where on the // block limits (start/end). if ( !bIsStartOfBlock && !bIsEndOfBlock ) { // If the next block is an <li> with another list tree as the first child // We'll need to append a placeholder or the list item wouldn't be editable. (Bug #1420) if ( eNextBlock.nodeName.IEquals( 'li' ) && eNextBlock.firstChild && eNextBlock.firstChild.nodeName.IEquals( ['ul', 'ol'] ) ) eNextBlock.insertBefore( FCKTools.GetElementDocument( eNextBlock ).createTextNode( '\xa0' ), eNextBlock.firstChild ) ; // Move the selection to the end block. if ( eNextBlock ) oRange.MoveToElementEditStart( eNextBlock ) ; } else { if ( bIsStartOfBlock && bIsEndOfBlock && ePreviousBlock.tagName.toUpperCase() == 'LI' ) { oRange.MoveToElementStart( ePreviousBlock ) ; this._OutdentWithSelection( ePreviousBlock, oRange ) ; oRange.Release() ; return true ; } var eNewBlock ; if ( ePreviousBlock ) { var sPreviousBlockTag = ePreviousBlock.tagName.toUpperCase() ; // If is a header tag, or we are in a Shift+Enter (#77), // create a new block element (later in the code). if ( !this._HasShift && !(/^H[1-6]$/).test( sPreviousBlockTag ) ) { // Otherwise, duplicate the previous block. eNewBlock = FCKDomTools.CloneElement( ePreviousBlock ) ; } } else if ( eNextBlock ) eNewBlock = FCKDomTools.CloneElement( eNextBlock ) ; if ( !eNewBlock ) eNewBlock = this.Window.document.createElement( blockTag ) ; // Recreate the inline elements tree, which was available // before the hitting enter, so the same styles will be // available in the new block. var elementPath = oSplitInfo.ElementPath ; if ( elementPath ) { for ( var i = 0, len = elementPath.Elements.length ; i < len ; i++ ) { var element = elementPath.Elements[i] ; if ( element == elementPath.Block || element == elementPath.BlockLimit ) break ; if ( FCKListsLib.InlineChildReqElements[ element.nodeName.toLowerCase() ] ) { element = FCKDomTools.CloneElement( element ) ; FCKDomTools.MoveChildren( eNewBlock, element ) ; eNewBlock.appendChild( element ) ; } } } if ( FCKBrowserInfo.IsGeckoLike ) FCKTools.AppendBogusBr( eNewBlock ) ; oRange.InsertNode( eNewBlock ) ; // This is tricky, but to make the new block visible correctly // we must select it. if ( FCKBrowserInfo.IsIE ) { // Move the selection to the new block. oRange.MoveToElementEditStart( eNewBlock ) ; oRange.Select() ; } // Move the selection to the new block. oRange.MoveToElementEditStart( bIsStartOfBlock && !bIsEndOfBlock ? eNextBlock : eNewBlock ) ; } if ( FCKBrowserInfo.IsGeckoLike ) { if ( eNextBlock ) { // If we have split the block, adds a temporary span at the // range position and scroll relatively to it. var tmpNode = this.Window.document.createElement( 'span' ) ; // We need some content for Safari. tmpNode.innerHTML = '&nbsp;'; oRange.InsertNode( tmpNode ) ; FCKDomTools.ScrollIntoView( tmpNode, false ) ; oRange.DeleteContents() ; } else { // We may use the above scroll logic for the new block case // too, but it gives some weird result with Opera. FCKDomTools.ScrollIntoView( eNextBlock || eNewBlock, false ) ; } } oRange.Select() ; } // Release the resources used by the range. oRange.Release() ; return true ; } FCKEnterKey.prototype._ExecuteEnterBr = function( blockTag ) { // Get the current selection. var oRange = new FCKDomRange( this.Window ) ; oRange.MoveToSelection() ; // The selection boundaries must be in the same "block limit" element. if ( oRange.StartBlockLimit == oRange.EndBlockLimit ) { oRange.DeleteContents() ; // Get the new selection (it is collapsed at this point). oRange.MoveToSelection() ; var bIsStartOfBlock = oRange.CheckStartOfBlock() ; var bIsEndOfBlock = oRange.CheckEndOfBlock() ; var sStartBlockTag = oRange.StartBlock ? oRange.StartBlock.tagName.toUpperCase() : '' ; var bHasShift = this._HasShift ; var bIsPre = false ; if ( !bHasShift && sStartBlockTag == 'LI' ) return this._ExecuteEnterBlock( null, oRange ) ; // If we are at the end of a header block. if ( !bHasShift && bIsEndOfBlock && (/^H[1-6]$/).test( sStartBlockTag ) ) { // Insert a BR after the current paragraph. FCKDomTools.InsertAfterNode( oRange.StartBlock, this.Window.document.createElement( 'br' ) ) ; // The space is required by Gecko only to make the cursor blink. if ( FCKBrowserInfo.IsGecko ) FCKDomTools.InsertAfterNode( oRange.StartBlock, this.Window.document.createTextNode( '' ) ) ; // IE and Gecko have different behaviors regarding the position. oRange.SetStart( oRange.StartBlock.nextSibling, FCKBrowserInfo.IsIE ? 3 : 1 ) ; } else { var eLineBreak ; bIsPre = sStartBlockTag.IEquals( 'pre' ) ; if ( bIsPre ) eLineBreak = this.Window.document.createTextNode( FCKBrowserInfo.IsIE ? '\r' : '\n' ) ; else eLineBreak = this.Window.document.createElement( 'br' ) ; oRange.InsertNode( eLineBreak ) ; // The space is required by Gecko only to make the cursor blink. if ( FCKBrowserInfo.IsGecko ) FCKDomTools.InsertAfterNode( eLineBreak, this.Window.document.createTextNode( '' ) ) ; // If we are at the end of a block, we must be sure the bogus node is available in that block. if ( bIsEndOfBlock && FCKBrowserInfo.IsGeckoLike ) FCKTools.AppendBogusBr( eLineBreak.parentNode ) ; if ( FCKBrowserInfo.IsIE ) oRange.SetStart( eLineBreak, 4 ) ; else oRange.SetStart( eLineBreak.nextSibling, 1 ) ; if ( ! FCKBrowserInfo.IsIE ) { var dummy = null ; if ( FCKBrowserInfo.IsOpera ) dummy = this.Window.document.createElement( 'span' ) ; else dummy = this.Window.document.createElement( 'br' ) ; eLineBreak.parentNode.insertBefore( dummy, eLineBreak.nextSibling ) ; FCKDomTools.ScrollIntoView( dummy, false ) ; dummy.parentNode.removeChild( dummy ) ; } } // This collapse guarantees the cursor will be blinking. oRange.Collapse( true ) ; oRange.Select( bIsPre ) ; } // Release the resources used by the range. oRange.Release() ; return true ; } // Outdents a LI, maintaining the selection defined on a range. FCKEnterKey.prototype._OutdentWithSelection = function( li, range ) { var oBookmark = range.CreateBookmark() ; FCKListHandler.OutdentListItem( li ) ; range.MoveToBookmark( oBookmark ) ; range.Select() ; } // Is all the contents under a node included by a range? FCKEnterKey.prototype._CheckIsAllContentsIncluded = function( range, node ) { var startOk = false ; var endOk = false ; /* FCKDebug.Output( 'sc='+range.StartContainer.nodeName+ ',so='+range._Range.startOffset+ ',ec='+range.EndContainer.nodeName+ ',eo='+range._Range.endOffset ) ; */ if ( range.StartContainer == node || range.StartContainer == node.firstChild ) startOk = ( range._Range.startOffset == 0 ) ; if ( range.EndContainer == node || range.EndContainer == node.lastChild ) { var nodeLength = range.EndContainer.nodeType == 3 ? range.EndContainer.length : range.EndContainer.childNodes.length ; endOk = ( range._Range.endOffset == nodeLength ) ; } return startOk && endOk ; } // Kludge for #247 FCKEnterKey.prototype._FixIESelectAllBug = function( range ) { var doc = this.Window.document ; doc.body.innerHTML = '' ; var editBlock ; if ( FCKConfig.EnterMode.IEquals( ['div', 'p'] ) ) { editBlock = doc.createElement( FCKConfig.EnterMode ) ; doc.body.appendChild( editBlock ) ; } else editBlock = doc.body ; range.MoveToNodeContents( editBlock ) ; range.Collapse( true ) ; range.Select() ; range.Release() ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarButton Class: represents a button in the toolbar. */ var FCKToolbarButton = function( commandName, label, tooltip, style, sourceView, contextSensitive, icon ) { this.CommandName = commandName ; this.Label = label ; this.Tooltip = tooltip ; this.Style = style ; this.SourceView = sourceView ? true : false ; this.ContextSensitive = contextSensitive ? true : false ; if ( icon == null ) this.IconPath = FCKConfig.SkinPath + 'toolbar/' + commandName.toLowerCase() + '.gif' ; else if ( typeof( icon ) == 'number' ) this.IconPath = [ FCKConfig.SkinPath + 'fck_strip.gif', 16, icon ] ; else this.IconPath = icon ; } FCKToolbarButton.prototype.Create = function( targetElement ) { this._UIButton = new FCKToolbarButtonUI( this.CommandName, this.Label, this.Tooltip, this.IconPath, this.Style ) ; this._UIButton.OnClick = this.Click ; this._UIButton._ToolbarButton = this ; this._UIButton.Create( targetElement ) ; } FCKToolbarButton.prototype.RefreshState = function() { var uiButton = this._UIButton ; if ( !uiButton ) return ; // Gets the actual state. var eState = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).GetState() ; // If there are no state changes than do nothing and return. if ( eState == uiButton.State ) return ; // Sets the actual state. uiButton.ChangeState( eState ) ; } FCKToolbarButton.prototype.Click = function() { var oToolbarButton = this._ToolbarButton || this ; FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oToolbarButton.CommandName ).Execute() ; } FCKToolbarButton.prototype.Enable = function() { this.RefreshState() ; } FCKToolbarButton.prototype.Disable = function() { // Sets the actual state. this._UIButton.ChangeState( FCK_TRISTATE_DISABLED ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarButtonUI Class: interface representation of a toolbar button. */ var FCKToolbarButtonUI = function( name, label, tooltip, iconPathOrStripInfoArray, style, state ) { this.Name = name ; this.Label = label || name ; this.Tooltip = tooltip || this.Label ; this.Style = style || FCK_TOOLBARITEM_ONLYICON ; this.State = state || FCK_TRISTATE_OFF ; this.Icon = new FCKIcon( iconPathOrStripInfoArray ) ; if ( FCK.IECleanup ) FCK.IECleanup.AddItem( this, FCKToolbarButtonUI_Cleanup ) ; } FCKToolbarButtonUI.prototype._CreatePaddingElement = function( document ) { var oImg = document.createElement( 'IMG' ) ; oImg.className = 'TB_Button_Padding' ; oImg.src = FCK_SPACER_PATH ; return oImg ; } FCKToolbarButtonUI.prototype.Create = function( parentElement ) { var oDoc = FCKTools.GetElementDocument( parentElement ) ; // Create the Main Element. var oMainElement = this.MainElement = oDoc.createElement( 'DIV' ) ; oMainElement.title = this.Tooltip ; // The following will prevent the button from catching the focus. if ( FCKBrowserInfo.IsGecko ) oMainElement.onmousedown = FCKTools.CancelEvent ; FCKTools.AddEventListenerEx( oMainElement, 'mouseover', FCKToolbarButtonUI_OnMouseOver, this ) ; FCKTools.AddEventListenerEx( oMainElement, 'mouseout', FCKToolbarButtonUI_OnMouseOut, this ) ; FCKTools.AddEventListenerEx( oMainElement, 'click', FCKToolbarButtonUI_OnClick, this ) ; this.ChangeState( this.State, true ) ; if ( this.Style == FCK_TOOLBARITEM_ONLYICON && !this.ShowArrow ) { // <td><div class="TB_Button_On" title="Smiley">{Image}</div></td> oMainElement.appendChild( this.Icon.CreateIconElement( oDoc ) ) ; } else { // <td><div class="TB_Button_On" title="Smiley"><table cellpadding="0" cellspacing="0"><tr><td>{Image}</td><td nowrap>Toolbar Button</td><td><img class="TB_Button_Padding"></td></tr></table></div></td> // <td><div class="TB_Button_On" title="Smiley"><table cellpadding="0" cellspacing="0"><tr><td><img class="TB_Button_Padding"></td><td nowrap>Toolbar Button</td><td><img class="TB_Button_Padding"></td></tr></table></div></td> var oTable = oMainElement.appendChild( oDoc.createElement( 'TABLE' ) ) ; oTable.cellPadding = 0 ; oTable.cellSpacing = 0 ; var oRow = oTable.insertRow(-1) ; // The Image cell (icon or padding). var oCell = oRow.insertCell(-1) ; if ( this.Style == FCK_TOOLBARITEM_ONLYICON || this.Style == FCK_TOOLBARITEM_ICONTEXT ) oCell.appendChild( this.Icon.CreateIconElement( oDoc ) ) ; else oCell.appendChild( this._CreatePaddingElement( oDoc ) ) ; if ( this.Style == FCK_TOOLBARITEM_ONLYTEXT || this.Style == FCK_TOOLBARITEM_ICONTEXT ) { // The Text cell. oCell = oRow.insertCell(-1) ; oCell.className = 'TB_Button_Text' ; oCell.noWrap = true ; oCell.appendChild( oDoc.createTextNode( this.Label ) ) ; } if ( this.ShowArrow ) { if ( this.Style != FCK_TOOLBARITEM_ONLYICON ) { // A padding cell. oRow.insertCell(-1).appendChild( this._CreatePaddingElement( oDoc ) ) ; } oCell = oRow.insertCell(-1) ; var eImg = oCell.appendChild( oDoc.createElement( 'IMG' ) ) ; eImg.src = FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ; eImg.width = 5 ; eImg.height = 3 ; } // The last padding cell. oCell = oRow.insertCell(-1) ; oCell.appendChild( this._CreatePaddingElement( oDoc ) ) ; } parentElement.appendChild( oMainElement ) ; } FCKToolbarButtonUI.prototype.ChangeState = function( newState, force ) { if ( !force && this.State == newState ) return ; var e = this.MainElement ; // In IE it can happen when the page is reloaded that MainElement is null, so exit here if ( !e ) return ; switch ( parseInt( newState, 10 ) ) { case FCK_TRISTATE_OFF : e.className = 'TB_Button_Off' ; break ; case FCK_TRISTATE_ON : e.className = 'TB_Button_On' ; break ; case FCK_TRISTATE_DISABLED : e.className = 'TB_Button_Disabled' ; break ; } this.State = newState ; } function FCKToolbarButtonUI_OnMouseOver( ev, button ) { if ( button.State == FCK_TRISTATE_OFF ) this.className = 'TB_Button_Off_Over' ; else if ( button.State == FCK_TRISTATE_ON ) this.className = 'TB_Button_On_Over' ; } function FCKToolbarButtonUI_OnMouseOut( ev, button ) { if ( button.State == FCK_TRISTATE_OFF ) this.className = 'TB_Button_Off' ; else if ( button.State == FCK_TRISTATE_ON ) this.className = 'TB_Button_On' ; } function FCKToolbarButtonUI_OnClick( ev, button ) { if ( button.OnClick && button.State != FCK_TRISTATE_DISABLED ) button.OnClick( button ) ; } function FCKToolbarButtonUI_Cleanup() { // This one should not cause memory leak, but just for safety, let's clean // it up. this.MainElement = null ; } /* Sample outputs: This is the base structure. The variation is the image that is marked as {Image}: <td><div class="TB_Button_On" title="Smiley">{Image}</div></td> <td><div class="TB_Button_On" title="Smiley"><table cellpadding="0" cellspacing="0"><tr><td>{Image}</td><td nowrap>Toolbar Button</td><td><img class="TB_Button_Padding"></td></tr></table></div></td> <td><div class="TB_Button_On" title="Smiley"><table cellpadding="0" cellspacing="0"><tr><td><img class="TB_Button_Padding"></td><td nowrap>Toolbar Button</td><td><img class="TB_Button_Padding"></td></tr></table></div></td> These are samples of possible {Image} values: Strip - IE version: <div class="TB_Button_Image"><img src="strip.gif" style="top:-16px"></div> Strip : Firefox, Safari and Opera version <img class="TB_Button_Image" style="background-position: 0px -16px;background-image: url(strip.gif);"> No-Strip : Browser independent: <img class="TB_Button_Image" src="smiley.gif"> */
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKSpecialCombo Class: represents a special combo. */ var FCKSpecialCombo = function( caption, fieldWidth, panelWidth, panelMaxHeight, parentWindow ) { // Default properties values. this.FieldWidth = fieldWidth || 100 ; this.PanelWidth = panelWidth || 150 ; this.PanelMaxHeight = panelMaxHeight || 150 ; this.Label = '&nbsp;' ; this.Caption = caption ; this.Tooltip = caption ; this.Style = FCK_TOOLBARITEM_ICONTEXT ; this.Enabled = true ; this.Items = new Object() ; this._Panel = new FCKPanel( parentWindow || window ) ; this._Panel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; this._PanelBox = this._Panel.MainNode.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ; this._PanelBox.className = 'SC_Panel' ; this._PanelBox.style.width = this.PanelWidth + 'px' ; this._PanelBox.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ; this._ItemsHolderEl = this._PanelBox.getElementsByTagName('TD')[0] ; if ( FCK.IECleanup ) FCK.IECleanup.AddItem( this, FCKSpecialCombo_Cleanup ) ; // this._Panel.StyleSheet = FCKConfig.SkinPath + 'fck_contextmenu.css' ; // this._Panel.Create() ; // this._Panel.PanelDiv.className += ' SC_Panel' ; // this._Panel.PanelDiv.innerHTML = '<table cellpadding="0" cellspacing="0" width="100%" style="TABLE-LAYOUT: fixed"><tr><td nowrap></td></tr></table>' ; // this._ItemsHolderEl = this._Panel.PanelDiv.getElementsByTagName('TD')[0] ; } function FCKSpecialCombo_ItemOnMouseOver() { this.className += ' SC_ItemOver' ; } function FCKSpecialCombo_ItemOnMouseOut() { this.className = this.originalClass ; } function FCKSpecialCombo_ItemOnClick( ev, specialCombo, itemId ) { this.className = this.originalClass ; specialCombo._Panel.Hide() ; specialCombo.SetLabel( this.FCKItemLabel ) ; if ( typeof( specialCombo.OnSelect ) == 'function' ) specialCombo.OnSelect( itemId, this ) ; } FCKSpecialCombo.prototype.ClearItems = function () { if ( this.Items ) this.Items = {} ; var itemsholder = this._ItemsHolderEl ; while ( itemsholder.firstChild ) itemsholder.removeChild( itemsholder.firstChild ) ; } FCKSpecialCombo.prototype.AddItem = function( id, html, label, bgColor ) { // <div class="SC_Item" onmouseover="this.className='SC_Item SC_ItemOver';" onmouseout="this.className='SC_Item';"><b>Bold 1</b></div> var oDiv = this._ItemsHolderEl.appendChild( this._Panel.Document.createElement( 'DIV' ) ) ; oDiv.className = oDiv.originalClass = 'SC_Item' ; oDiv.innerHTML = html ; oDiv.FCKItemLabel = label || id ; oDiv.Selected = false ; // In IE, the width must be set so the borders are shown correctly when the content overflows. if ( FCKBrowserInfo.IsIE ) oDiv.style.width = '100%' ; if ( bgColor ) oDiv.style.backgroundColor = bgColor ; FCKTools.AddEventListenerEx( oDiv, 'mouseover', FCKSpecialCombo_ItemOnMouseOver ) ; FCKTools.AddEventListenerEx( oDiv, 'mouseout', FCKSpecialCombo_ItemOnMouseOut ) ; FCKTools.AddEventListenerEx( oDiv, 'click', FCKSpecialCombo_ItemOnClick, [ this, id ] ) ; this.Items[ id.toString().toLowerCase() ] = oDiv ; return oDiv ; } FCKSpecialCombo.prototype.SelectItem = function( item ) { if ( typeof item == 'string' ) item = this.Items[ item.toString().toLowerCase() ] ; if ( item ) { item.className = item.originalClass = 'SC_ItemSelected' ; item.Selected = true ; } } FCKSpecialCombo.prototype.SelectItemByLabel = function( itemLabel, setLabel ) { for ( var id in this.Items ) { var oDiv = this.Items[id] ; if ( oDiv.FCKItemLabel == itemLabel ) { oDiv.className = oDiv.originalClass = 'SC_ItemSelected' ; oDiv.Selected = true ; if ( setLabel ) this.SetLabel( itemLabel ) ; } } } FCKSpecialCombo.prototype.DeselectAll = function( clearLabel ) { for ( var i in this.Items ) { if ( !this.Items[i] ) continue; this.Items[i].className = this.Items[i].originalClass = 'SC_Item' ; this.Items[i].Selected = false ; } if ( clearLabel ) this.SetLabel( '' ) ; } FCKSpecialCombo.prototype.SetLabelById = function( id ) { id = id ? id.toString().toLowerCase() : '' ; var oDiv = this.Items[ id ] ; this.SetLabel( oDiv ? oDiv.FCKItemLabel : '' ) ; } FCKSpecialCombo.prototype.SetLabel = function( text ) { text = ( !text || text.length == 0 ) ? '&nbsp;' : text ; if ( text == this.Label ) return ; this.Label = text ; var labelEl = this._LabelEl ; if ( labelEl ) { labelEl.innerHTML = text ; // It may happen that the label is some HTML, including tags. This // would be a problem because when the user click on those tags, the // combo will get the selection from the editing area. So we must // disable any kind of selection here. FCKTools.DisableSelection( labelEl ) ; } } FCKSpecialCombo.prototype.SetEnabled = function( isEnabled ) { this.Enabled = isEnabled ; // In IE it can happen when the page is reloaded that _OuterTable is null, so check its existence if ( this._OuterTable ) this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ; } FCKSpecialCombo.prototype.Create = function( targetElement ) { var oDoc = FCKTools.GetElementDocument( targetElement ) ; var eOuterTable = this._OuterTable = targetElement.appendChild( oDoc.createElement( 'TABLE' ) ) ; eOuterTable.cellPadding = 0 ; eOuterTable.cellSpacing = 0 ; eOuterTable.insertRow(-1) ; var sClass ; var bShowLabel ; switch ( this.Style ) { case FCK_TOOLBARITEM_ONLYICON : sClass = 'TB_ButtonType_Icon' ; bShowLabel = false; break ; case FCK_TOOLBARITEM_ONLYTEXT : sClass = 'TB_ButtonType_Text' ; bShowLabel = false; break ; case FCK_TOOLBARITEM_ICONTEXT : bShowLabel = true; break ; } if ( this.Caption && this.Caption.length > 0 && bShowLabel ) { var oCaptionCell = eOuterTable.rows[0].insertCell(-1) ; oCaptionCell.innerHTML = this.Caption ; oCaptionCell.className = 'SC_FieldCaption' ; } // Create the main DIV element. var oField = FCKTools.AppendElement( eOuterTable.rows[0].insertCell(-1), 'div' ) ; if ( bShowLabel ) { oField.className = 'SC_Field' ; oField.style.width = this.FieldWidth + 'px' ; oField.innerHTML = '<table width="100%" cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldLabel"><label>&nbsp;</label></td><td class="SC_FieldButton">&nbsp;</td></tr></tbody></table>' ; this._LabelEl = oField.getElementsByTagName('label')[0] ; // Memory Leak this._LabelEl.innerHTML = this.Label ; } else { oField.className = 'TB_Button_Off' ; //oField.innerHTML = '<span className="SC_FieldCaption">' + this.Caption + '<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldButton" style="border-left: none;">&nbsp;</td></tr></tbody></table>' ; //oField.innerHTML = '<table cellpadding="0" cellspacing="0" style="TABLE-LAYOUT: fixed;"><tbody><tr><td class="SC_FieldButton" style="border-left: none;">&nbsp;</td></tr></tbody></table>' ; // Gets the correct CSS class to use for the specified style (param). oField.innerHTML = '<table title="' + this.Tooltip + '" class="' + sClass + '" cellspacing="0" cellpadding="0" border="0">' + '<tr>' + //'<td class="TB_Icon"><img src="' + FCKConfig.SkinPath + 'toolbar/' + this.Command.Name.toLowerCase() + '.gif" width="21" height="21"></td>' + '<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' + '<td class="TB_Text">' + this.Caption + '</td>' + '<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' + '<td class="TB_ButtonArrow"><img src="' + FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif" width="5" height="3"></td>' + '<td><img class="TB_Button_Padding" src="' + FCK_SPACER_PATH + '" /></td>' + '</tr>' + '</table>' ; } // Events Handlers FCKTools.AddEventListenerEx( oField, 'mouseover', FCKSpecialCombo_OnMouseOver, this ) ; FCKTools.AddEventListenerEx( oField, 'mouseout', FCKSpecialCombo_OnMouseOut, this ) ; FCKTools.AddEventListenerEx( oField, 'click', FCKSpecialCombo_OnClick, this ) ; FCKTools.DisableSelection( this._Panel.Document.body ) ; } function FCKSpecialCombo_Cleanup() { this._LabelEl = null ; this._OuterTable = null ; this._ItemsHolderEl = null ; this._PanelBox = null ; if ( this.Items ) { for ( var key in this.Items ) this.Items[key] = null ; } } function FCKSpecialCombo_OnMouseOver( ev, specialCombo ) { if ( specialCombo.Enabled ) { switch ( specialCombo.Style ) { case FCK_TOOLBARITEM_ONLYICON : this.className = 'TB_Button_On_Over'; break ; case FCK_TOOLBARITEM_ONLYTEXT : this.className = 'TB_Button_On_Over'; break ; case FCK_TOOLBARITEM_ICONTEXT : this.className = 'SC_Field SC_FieldOver' ; break ; } } } function FCKSpecialCombo_OnMouseOut( ev, specialCombo ) { switch ( specialCombo.Style ) { case FCK_TOOLBARITEM_ONLYICON : this.className = 'TB_Button_Off'; break ; case FCK_TOOLBARITEM_ONLYTEXT : this.className = 'TB_Button_Off'; break ; case FCK_TOOLBARITEM_ICONTEXT : this.className='SC_Field' ; break ; } } function FCKSpecialCombo_OnClick( e, specialCombo ) { // For Mozilla we must stop the event propagation to avoid it hiding // the panel because of a click outside of it. // if ( e ) // { // e.stopPropagation() ; // FCKPanelEventHandlers.OnDocumentClick( e ) ; // } if ( specialCombo.Enabled ) { var oPanel = specialCombo._Panel ; var oPanelBox = specialCombo._PanelBox ; var oItemsHolder = specialCombo._ItemsHolderEl ; var iMaxHeight = specialCombo.PanelMaxHeight ; if ( specialCombo.OnBeforeClick ) specialCombo.OnBeforeClick( specialCombo ) ; // This is a tricky thing. We must call the "Load" function, otherwise // it will not be possible to retrieve "oItemsHolder.offsetHeight" (IE only). if ( FCKBrowserInfo.IsIE ) oPanel.Preload( 0, this.offsetHeight, this ) ; if ( oItemsHolder.offsetHeight > iMaxHeight ) // { oPanelBox.style.height = iMaxHeight + 'px' ; // if ( FCKBrowserInfo.IsGecko ) // oPanelBox.style.overflow = '-moz-scrollbars-vertical' ; // } else oPanelBox.style.height = '' ; // oPanel.PanelDiv.style.width = specialCombo.PanelWidth + 'px' ; oPanel.Show( 0, this.offsetHeight, this ) ; } // return false ; } /* Sample Combo Field HTML output: <div class="SC_Field" style="width: 80px;"> <table width="100%" cellpadding="0" cellspacing="0" style="table-layout: fixed;"> <tbody> <tr> <td class="SC_FieldLabel"><label>&nbsp;</label></td> <td class="SC_FieldButton">&nbsp;</td> </tr> </tbody> </table> </div> */
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarPanelButton Class: Handles the Fonts combo selector. */ var FCKToolbarFontFormatCombo = function( tooltip, style ) { if ( tooltip === false ) return ; this.CommandName = 'FontFormat' ; this.Label = this.GetLabel() ; this.Tooltip = tooltip ? tooltip : this.Label ; this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ; this.NormalLabel = 'Normal' ; this.PanelWidth = 190 ; this.DefaultLabel = FCKConfig.DefaultFontFormatLabel || '' ; } // Inherit from FCKToolbarSpecialCombo. FCKToolbarFontFormatCombo.prototype = new FCKToolbarStyleCombo( false ) ; FCKToolbarFontFormatCombo.prototype.GetLabel = function() { return FCKLang.FontFormat ; } FCKToolbarFontFormatCombo.prototype.GetStyles = function() { var styles = {} ; // Get the format names from the language file. var aNames = FCKLang['FontFormats'].split(';') ; var oNames = { p : aNames[0], pre : aNames[1], address : aNames[2], h1 : aNames[3], h2 : aNames[4], h3 : aNames[5], h4 : aNames[6], h5 : aNames[7], h6 : aNames[8], div : aNames[9] || ( aNames[0] + ' (DIV)') } ; // Get the available formats from the configuration file. var elements = FCKConfig.FontFormats.split(';') ; for ( var i = 0 ; i < elements.length ; i++ ) { var elementName = elements[ i ] ; var style = FCKStyles.GetStyle( '_FCK_' + elementName ) ; if ( style ) { style.Label = oNames[ elementName ] ; styles[ '_FCK_' + elementName ] = style ; } else alert( "The FCKConfig.CoreStyles['" + elementName + "'] setting was not found. Please check the fckconfig.js file" ) ; } return styles ; } FCKToolbarFontFormatCombo.prototype.RefreshActiveItems = function( targetSpecialCombo ) { var startElement = FCK.ToolbarSet.CurrentInstance.Selection.GetBoundaryParentElement( true ) ; if ( startElement ) { var path = new FCKElementPath( startElement ) ; var blockElement = path.Block ; if ( blockElement ) { for ( var i in targetSpecialCombo.Items ) { var item = targetSpecialCombo.Items[i] ; var style = item.Style ; if ( style.CheckElementRemovable( blockElement ) ) { targetSpecialCombo.SetLabel( style.Label ) ; return ; } } } } targetSpecialCombo.SetLabel( this.DefaultLabel ) ; } FCKToolbarFontFormatCombo.prototype.StyleCombo_OnBeforeClick = function( targetSpecialCombo ) { // Clear the current selection. targetSpecialCombo.DeselectAll() ; var startElement = FCK.ToolbarSet.CurrentInstance.Selection.GetBoundaryParentElement( true ) ; if ( startElement ) { var path = new FCKElementPath( startElement ) ; var blockElement = path.Block ; for ( var i in targetSpecialCombo.Items ) { var item = targetSpecialCombo.Items[i] ; var style = item.Style ; if ( style.CheckElementRemovable( blockElement ) ) { targetSpecialCombo.SelectItem( item ) ; return ; } } } }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKStyle Class: contains a style definition, and all methods to work with * the style in a document. */ /** * @param {Object} styleDesc A "style descriptor" object, containing the raw * style definition in the following format: * '<style name>' : { * Element : '<element name>', * Attributes : { * '<att name>' : '<att value>', * ... * }, * Styles : { * '<style name>' : '<style value>', * ... * }, * Overrides : '<element name>'|{ * Element : '<element name>', * Attributes : { * '<att name>' : '<att value>'|/<att regex>/ * }, * Styles : { * '<style name>' : '<style value>'|/<style regex>/ * }, * } * } */ var FCKStyle = function( styleDesc ) { this.Element = ( styleDesc.Element || 'span' ).toLowerCase() ; this._StyleDesc = styleDesc ; } FCKStyle.prototype = { /** * Get the style type, based on its element name: * - FCK_STYLE_BLOCK (0): Block Style * - FCK_STYLE_INLINE (1): Inline Style * - FCK_STYLE_OBJECT (2): Object Style */ GetType : function() { var type = this.GetType_$ ; if ( type != undefined ) return type ; var elementName = this.Element ; if ( elementName == '#' || FCKListsLib.StyleBlockElements[ elementName ] ) type = FCK_STYLE_BLOCK ; else if ( FCKListsLib.StyleObjectElements[ elementName ] ) type = FCK_STYLE_OBJECT ; else type = FCK_STYLE_INLINE ; return ( this.GetType_$ = type ) ; }, /** * Apply the style to the current selection. */ ApplyToSelection : function( targetWindow ) { // Create a range for the current selection. var range = new FCKDomRange( targetWindow ) ; range.MoveToSelection() ; this.ApplyToRange( range, true ) ; }, /** * Apply the style to a FCKDomRange. */ ApplyToRange : function( range, selectIt, updateRange ) { // ApplyToRange is not valid for FCK_STYLE_OBJECT types. // Use ApplyToObject instead. switch ( this.GetType() ) { case FCK_STYLE_BLOCK : this.ApplyToRange = this._ApplyBlockStyle ; break ; case FCK_STYLE_INLINE : this.ApplyToRange = this._ApplyInlineStyle ; break ; default : return ; } this.ApplyToRange( range, selectIt, updateRange ) ; }, /** * Apply the style to an object. Valid for FCK_STYLE_BLOCK types only. */ ApplyToObject : function( objectElement ) { if ( !objectElement ) return ; this.BuildElement( null, objectElement ) ; }, /** * Remove the style from the current selection. */ RemoveFromSelection : function( targetWindow ) { // Create a range for the current selection. var range = new FCKDomRange( targetWindow ) ; range.MoveToSelection() ; this.RemoveFromRange( range, true ) ; }, /** * Remove the style from a FCKDomRange. Block type styles will have no * effect. */ RemoveFromRange : function( range, selectIt, updateRange ) { var bookmark ; // Create the attribute list to be used later for element comparisons. var styleAttribs = this._GetAttribsForComparison() ; var styleOverrides = this._GetOverridesForComparison() ; // If collapsed, we are removing all conflicting styles from the range // parent tree. if ( range.CheckIsCollapsed() ) { // Bookmark the range so we can re-select it after processing. var bookmark = range.CreateBookmark( true ) ; // Let's start from the bookmark <span> parent. var bookmarkStart = range.GetBookmarkNode( bookmark, true ) ; var path = new FCKElementPath( bookmarkStart.parentNode ) ; // While looping through the path, we'll be saving references to // parent elements if the range is in one of their boundaries. In // this way, we are able to create a copy of those elements when // removing a style if the range is in a boundary limit (see #1270). var boundaryElements = [] ; // Check if the range is in the boundary limits of an element // (related to #1270). var isBoundaryRight = !FCKDomTools.GetNextSibling( bookmarkStart ) ; var isBoundary = isBoundaryRight || !FCKDomTools.GetPreviousSibling( bookmarkStart ) ; // This is the last element to be removed in the boundary situation // described at #1270. var lastBoundaryElement ; var boundaryLimitIndex = -1 ; for ( var i = 0 ; i < path.Elements.length ; i++ ) { var pathElement = path.Elements[i] ; if ( this.CheckElementRemovable( pathElement ) ) { if ( isBoundary && !FCKDomTools.CheckIsEmptyElement( pathElement, function( el ) { return ( el != bookmarkStart ) ; } ) ) { lastBoundaryElement = pathElement ; // We'll be continuously including elements in the // boundaryElements array, but only those added before // setting lastBoundaryElement must be used later, so // let's mark the current index here. boundaryLimitIndex = boundaryElements.length - 1 ; } else { var pathElementName = pathElement.nodeName.toLowerCase() ; if ( pathElementName == this.Element ) { // Remove any attribute that conflict with this style, no // matter their values. for ( var att in styleAttribs ) { if ( FCKDomTools.HasAttribute( pathElement, att ) ) { switch ( att ) { case 'style' : this._RemoveStylesFromElement( pathElement ) ; break ; case 'class' : // The 'class' element value must match (#1318). if ( FCKDomTools.GetAttributeValue( pathElement, att ) != this.GetFinalAttributeValue( att ) ) continue ; /*jsl:fallthru*/ default : FCKDomTools.RemoveAttribute( pathElement, att ) ; } } } } // Remove overrides defined to the same element name. this._RemoveOverrides( pathElement, styleOverrides[ pathElementName ] ) ; // Remove the element if no more attributes are available and it's an inline style element if ( this.GetType() == FCK_STYLE_INLINE) this._RemoveNoAttribElement( pathElement ) ; } } else if ( isBoundary ) boundaryElements.push( pathElement ) ; // Check if we are still in a boundary (at the same side). isBoundary = isBoundary && ( ( isBoundaryRight && !FCKDomTools.GetNextSibling( pathElement ) ) || ( !isBoundaryRight && !FCKDomTools.GetPreviousSibling( pathElement ) ) ) ; // If we are in an element that is not anymore a boundary, or // we are at the last element, let's move things outside the // boundary (if available). if ( lastBoundaryElement && ( !isBoundary || ( i == path.Elements.length - 1 ) ) ) { // Remove the bookmark node from the DOM. var currentElement = FCKDomTools.RemoveNode( bookmarkStart ) ; // Build the collapsed group of elements that are not // removed by this style, but share the boundary. // (see comment 1 and 2 at #1270) for ( var j = 0 ; j <= boundaryLimitIndex ; j++ ) { var newElement = FCKDomTools.CloneElement( boundaryElements[j] ) ; newElement.appendChild( currentElement ) ; currentElement = newElement ; } // Re-insert the bookmark node (and the collapsed elements) // in the DOM, in the new position next to the styled element. if ( isBoundaryRight ) FCKDomTools.InsertAfterNode( lastBoundaryElement, currentElement ) ; else lastBoundaryElement.parentNode.insertBefore( currentElement, lastBoundaryElement ) ; isBoundary = false ; lastBoundaryElement = null ; } } // Re-select the original range. if ( selectIt ) range.SelectBookmark( bookmark ) ; if ( updateRange ) range.MoveToBookmark( bookmark ) ; return ; } // Expand the range, if inside inline element boundaries. range.Expand( 'inline_elements' ) ; // Bookmark the range so we can re-select it after processing. bookmark = range.CreateBookmark( true ) ; // The style will be applied within the bookmark boundaries. var startNode = range.GetBookmarkNode( bookmark, true ) ; var endNode = range.GetBookmarkNode( bookmark, false ) ; range.Release( true ) ; // We need to check the selection boundaries (bookmark spans) to break // the code in a way that we can properly remove partially selected nodes. // For example, removing a <b> style from // <b>This is [some text</b> to show <b>the] problem</b> // ... where [ and ] represent the selection, must result: // <b>This is </b>[some text to show the]<b> problem</b> // The strategy is simple, we just break the partial nodes before the // removal logic, having something that could be represented this way: // <b>This is </b>[<b>some text</b> to show <b>the</b>]<b> problem</b> // Let's start checking the start boundary. var path = new FCKElementPath( startNode ) ; var pathElements = path.Elements ; var pathElement ; for ( var i = 1 ; i < pathElements.length ; i++ ) { pathElement = pathElements[i] ; if ( pathElement == path.Block || pathElement == path.BlockLimit ) break ; // If this element can be removed (even partially). if ( this.CheckElementRemovable( pathElement ) ) FCKDomTools.BreakParent( startNode, pathElement, range ) ; } // Now the end boundary. path = new FCKElementPath( endNode ) ; pathElements = path.Elements ; for ( var i = 1 ; i < pathElements.length ; i++ ) { pathElement = pathElements[i] ; if ( pathElement == path.Block || pathElement == path.BlockLimit ) break ; elementName = pathElement.nodeName.toLowerCase() ; // If this element can be removed (even partially). if ( this.CheckElementRemovable( pathElement ) ) FCKDomTools.BreakParent( endNode, pathElement, range ) ; } // Navigate through all nodes between the bookmarks. var currentNode = FCKDomTools.GetNextSourceNode( startNode, true ) ; while ( currentNode ) { // Cache the next node to be processed. Do it now, because // currentNode may be removed. var nextNode = FCKDomTools.GetNextSourceNode( currentNode ) ; // Remove elements nodes that match with this style rules. if ( currentNode.nodeType == 1 ) { var elementName = currentNode.nodeName.toLowerCase() ; var mayRemove = ( elementName == this.Element ) ; if ( mayRemove ) { // Remove any attribute that conflict with this style, no matter // their values. for ( var att in styleAttribs ) { if ( FCKDomTools.HasAttribute( currentNode, att ) ) { switch ( att ) { case 'style' : this._RemoveStylesFromElement( currentNode ) ; break ; case 'class' : // The 'class' element value must match (#1318). if ( FCKDomTools.GetAttributeValue( currentNode, att ) != this.GetFinalAttributeValue( att ) ) continue ; /*jsl:fallthru*/ default : FCKDomTools.RemoveAttribute( currentNode, att ) ; } } } } else mayRemove = !!styleOverrides[ elementName ] ; if ( mayRemove ) { // Remove overrides defined to the same element name. this._RemoveOverrides( currentNode, styleOverrides[ elementName ] ) ; // Remove the element if no more attributes are available. this._RemoveNoAttribElement( currentNode ) ; } } // If we have reached the end of the selection, stop looping. if ( nextNode == endNode ) break ; currentNode = nextNode ; } this._FixBookmarkStart( startNode ) ; // Re-select the original range. if ( selectIt ) range.SelectBookmark( bookmark ) ; if ( updateRange ) range.MoveToBookmark( bookmark ) ; }, /** * Checks if an element, or any of its attributes, is removable by the * current style definition. */ CheckElementRemovable : function( element, fullMatch ) { if ( !element ) return false ; var elementName = element.nodeName.toLowerCase() ; // If the element name is the same as the style name. if ( elementName == this.Element ) { // If no attributes are defined in the element. if ( !fullMatch && !FCKDomTools.HasAttributes( element ) ) return true ; // If any attribute conflicts with the style attributes. var attribs = this._GetAttribsForComparison() ; var allMatched = ( attribs._length == 0 ) ; for ( var att in attribs ) { if ( att == '_length' ) continue ; if ( this._CompareAttributeValues( att, FCKDomTools.GetAttributeValue( element, att ), ( this.GetFinalAttributeValue( att ) || '' ) ) ) { allMatched = true ; if ( !fullMatch ) break ; } else { allMatched = false ; if ( fullMatch ) return false ; } } if ( allMatched ) return true ; } // Check if the element can be somehow overriden. var override = this._GetOverridesForComparison()[ elementName ] ; if ( override ) { // If no attributes have been defined, remove the element. if ( !( attribs = override.Attributes ) ) // Only one "=" return true ; for ( var i = 0 ; i < attribs.length ; i++ ) { var attName = attribs[i][0] ; if ( FCKDomTools.HasAttribute( element, attName ) ) { var attValue = attribs[i][1] ; // Remove the attribute if: // - The override definition value is null ; // - The override definition valie is a string that // matches the attribute value exactly. // - The override definition value is a regex that // has matches in the attribute value. if ( attValue == null || ( typeof attValue == 'string' && FCKDomTools.GetAttributeValue( element, attName ) == attValue ) || attValue.test( FCKDomTools.GetAttributeValue( element, attName ) ) ) return true ; } } } return false ; }, /** * Get the style state for an element path. Returns "true" if the element * is active in the path. */ CheckActive : function( elementPath ) { switch ( this.GetType() ) { case FCK_STYLE_BLOCK : return this.CheckElementRemovable( elementPath.Block || elementPath.BlockLimit, true ) ; case FCK_STYLE_INLINE : var elements = elementPath.Elements ; for ( var i = 0 ; i < elements.length ; i++ ) { var element = elements[i] ; if ( element == elementPath.Block || element == elementPath.BlockLimit ) continue ; if ( this.CheckElementRemovable( element, true ) ) return true ; } } return false ; }, /** * Removes an inline style from inside an element tree. The element node * itself is not checked or removed, only the child tree inside of it. */ RemoveFromElement : function( element ) { var attribs = this._GetAttribsForComparison() ; var overrides = this._GetOverridesForComparison() ; // Get all elements with the same name. var innerElements = element.getElementsByTagName( this.Element ) ; for ( var i = innerElements.length - 1 ; i >= 0 ; i-- ) { var innerElement = innerElements[i] ; // Remove any attribute that conflict with this style, no matter // their values. for ( var att in attribs ) { if ( FCKDomTools.HasAttribute( innerElement, att ) ) { switch ( att ) { case 'style' : this._RemoveStylesFromElement( innerElement ) ; break ; case 'class' : // The 'class' element value must match (#1318). if ( FCKDomTools.GetAttributeValue( innerElement, att ) != this.GetFinalAttributeValue( att ) ) continue ; /*jsl:fallthru*/ default : FCKDomTools.RemoveAttribute( innerElement, att ) ; } } } // Remove overrides defined to the same element name. this._RemoveOverrides( innerElement, overrides[ this.Element ] ) ; // Remove the element if no more attributes are available. this._RemoveNoAttribElement( innerElement ) ; } // Now remove any other element with different name that is // defined to be overriden. for ( var overrideElement in overrides ) { if ( overrideElement != this.Element ) { // Get all elements. innerElements = element.getElementsByTagName( overrideElement ) ; for ( var i = innerElements.length - 1 ; i >= 0 ; i-- ) { var innerElement = innerElements[i] ; this._RemoveOverrides( innerElement, overrides[ overrideElement ] ) ; this._RemoveNoAttribElement( innerElement ) ; } } } }, _RemoveStylesFromElement : function( element ) { var elementStyle = element.style.cssText ; var pattern = this.GetFinalStyleValue() ; if ( elementStyle.length > 0 && pattern.length == 0 ) return ; pattern = '(^|;)\\s*(' + pattern.replace( /\s*([^ ]+):.*?(;|$)/g, '$1|' ).replace( /\|$/, '' ) + '):[^;]+' ; var regex = new RegExp( pattern, 'gi' ) ; elementStyle = elementStyle.replace( regex, '' ).Trim() ; if ( elementStyle.length == 0 || elementStyle == ';' ) FCKDomTools.RemoveAttribute( element, 'style' ) ; else element.style.cssText = elementStyle.replace( regex, '' ) ; }, /** * Remove all attributes that are defined to be overriden, */ _RemoveOverrides : function( element, override ) { var attributes = override && override.Attributes ; if ( attributes ) { for ( var i = 0 ; i < attributes.length ; i++ ) { var attName = attributes[i][0] ; if ( FCKDomTools.HasAttribute( element, attName ) ) { var attValue = attributes[i][1] ; // Remove the attribute if: // - The override definition value is null ; // - The override definition valie is a string that // matches the attribute value exactly. // - The override definition value is a regex that // has matches in the attribute value. if ( attValue == null || ( attValue.test && attValue.test( FCKDomTools.GetAttributeValue( element, attName ) ) ) || ( typeof attValue == 'string' && FCKDomTools.GetAttributeValue( element, attName ) == attValue ) ) FCKDomTools.RemoveAttribute( element, attName ) ; } } } }, /** * If the element has no more attributes, remove it. */ _RemoveNoAttribElement : function( element ) { // If no more attributes remained in the element, remove it, // leaving its children. if ( !FCKDomTools.HasAttributes( element ) ) { // Removing elements may open points where merging is possible, // so let's cache the first and last nodes for later checking. var firstChild = element.firstChild ; var lastChild = element.lastChild ; FCKDomTools.RemoveNode( element, true ) ; // Check the cached nodes for merging. this._MergeSiblings( firstChild ) ; if ( firstChild != lastChild ) this._MergeSiblings( lastChild ) ; } }, /** * Creates a DOM element for this style object. */ BuildElement : function( targetDoc, element ) { // Create the element. var el = element || targetDoc.createElement( this.Element ) ; // Assign all defined attributes. var attribs = this._StyleDesc.Attributes ; var attValue ; if ( attribs ) { for ( var att in attribs ) { attValue = this.GetFinalAttributeValue( att ) ; if ( att.toLowerCase() == 'class' ) el.className = attValue ; else el.setAttribute( att, attValue ) ; } } // Assign the style attribute. if ( this._GetStyleText().length > 0 ) el.style.cssText = this.GetFinalStyleValue() ; return el ; }, _CompareAttributeValues : function( attName, valueA, valueB ) { if ( attName == 'style' && valueA && valueB ) { valueA = valueA.replace( /;$/, '' ).toLowerCase() ; valueB = valueB.replace( /;$/, '' ).toLowerCase() ; } // Return true if they match or if valueA is null and valueB is an empty string return ( valueA == valueB || ( ( valueA === null || valueA === '' ) && ( valueB === null || valueB === '' ) ) ) }, GetFinalAttributeValue : function( attName ) { var attValue = this._StyleDesc.Attributes ; var attValue = attValue ? attValue[ attName ] : null ; if ( !attValue && attName == 'style' ) return this.GetFinalStyleValue() ; if ( attValue && this._Variables ) // Using custom Replace() to guarantee the correct scope. attValue = attValue.Replace( FCKRegexLib.StyleVariableAttName, this._GetVariableReplace, this ) ; return attValue ; }, GetFinalStyleValue : function() { var attValue = this._GetStyleText() ; if ( attValue.length > 0 && this._Variables ) { // Using custom Replace() to guarantee the correct scope. attValue = attValue.Replace( FCKRegexLib.StyleVariableAttName, this._GetVariableReplace, this ) ; attValue = FCKTools.NormalizeCssText( attValue ) ; } return attValue ; }, _GetVariableReplace : function() { // The second group in the regex is the variable name. return this._Variables[ arguments[2] ] || arguments[0] ; }, /** * Set the value of a variable attribute or style, to be used when * appliying the style. */ SetVariable : function( name, value ) { var variables = this._Variables ; if ( !variables ) variables = this._Variables = {} ; this._Variables[ name ] = value ; }, /** * Converting from a PRE block to a non-PRE block in formatting operations. */ _FromPre : function( doc, block, newBlock ) { var innerHTML = block.innerHTML ; // Trim the first and last linebreaks immediately after and before <pre>, </pre>, // if they exist. // This is done because the linebreaks are not rendered. innerHTML = innerHTML.replace( /(\r\n|\r)/g, '\n' ) ; innerHTML = innerHTML.replace( /^[ \t]*\n/, '' ) ; innerHTML = innerHTML.replace( /\n$/, '' ) ; // 1. Convert spaces or tabs at the beginning or at the end to &nbsp; innerHTML = innerHTML.replace( /^[ \t]+|[ \t]+$/g, function( match, offset, s ) { if ( match.length == 1 ) // one space, preserve it return '&nbsp;' ; else if ( offset == 0 ) // beginning of block return new Array( match.length ).join( '&nbsp;' ) + ' ' ; else // end of block return ' ' + new Array( match.length ).join( '&nbsp;' ) ; } ) ; // 2. Convert \n to <BR>. // 3. Convert contiguous (i.e. non-singular) spaces or tabs to &nbsp; var htmlIterator = new FCKHtmlIterator( innerHTML ) ; var results = [] ; htmlIterator.Each( function( isTag, value ) { if ( !isTag ) { value = value.replace( /\n/g, '<br>' ) ; value = value.replace( /[ \t]{2,}/g, function ( match ) { return new Array( match.length ).join( '&nbsp;' ) + ' ' ; } ) ; } results.push( value ) ; } ) ; newBlock.innerHTML = results.join( '' ) ; return newBlock ; }, /** * Converting from a non-PRE block to a PRE block in formatting operations. */ _ToPre : function( doc, block, newBlock ) { // Handle converting from a regular block to a <pre> block. var innerHTML = block.innerHTML.Trim() ; // 1. Delete ANSI whitespaces immediately before and after <BR> because // they are not visible. // 2. Mark down any <BR /> nodes here so they can be turned into \n in // the next step and avoid being compressed. innerHTML = innerHTML.replace( /[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi, '<br />' ) ; // 3. Compress other ANSI whitespaces since they're only visible as one // single space previously. // 4. Convert &nbsp; to spaces since &nbsp; is no longer needed in <PRE>. // 5. Convert any <BR /> to \n. This must not be done earlier because // the \n would then get compressed. var htmlIterator = new FCKHtmlIterator( innerHTML ) ; var results = [] ; htmlIterator.Each( function( isTag, value ) { if ( !isTag ) value = value.replace( /([ \t\n\r]+|&nbsp;)/g, ' ' ) ; else if ( isTag && value == '<br />' ) value = '\n' ; results.push( value ) ; } ) ; // Assigning innerHTML to <PRE> in IE causes all linebreaks to be // reduced to spaces. // Assigning outerHTML to <PRE> in IE doesn't work if the <PRE> isn't // contained in another node since the node reference is changed after // outerHTML assignment. // So, we need some hacks to workaround IE bugs here. if ( FCKBrowserInfo.IsIE ) { var temp = doc.createElement( 'div' ) ; temp.appendChild( newBlock ) ; newBlock.outerHTML = '<pre>\n' + results.join( '' ) + '</pre>' ; newBlock = temp.removeChild( temp.firstChild ) ; } else newBlock.innerHTML = results.join( '' ) ; return newBlock ; }, /** * Merge a <pre> block with a previous <pre> block, if available. */ _CheckAndMergePre : function( previousBlock, preBlock ) { // Check if the previous block and the current block are next // to each other. if ( previousBlock != FCKDomTools.GetPreviousSourceElement( preBlock, true ) ) return ; // Merge the previous <pre> block contents into the current <pre> // block. // // Another thing to be careful here is that currentBlock might contain // a '\n' at the beginning, and previousBlock might contain a '\n' // towards the end. These new lines are not normally displayed but they // become visible after merging. var innerHTML = previousBlock.innerHTML.replace( /\n$/, '' ) + '\n\n' + preBlock.innerHTML.replace( /^\n/, '' ) ; // Buggy IE normalizes innerHTML from <pre>, breaking whitespaces. if ( FCKBrowserInfo.IsIE ) preBlock.outerHTML = '<pre>' + innerHTML + '</pre>' ; else preBlock.innerHTML = innerHTML ; // Remove the previous <pre> block. // // The preBlock must not be moved or deleted from the DOM tree. This // guarantees the FCKDomRangeIterator in _ApplyBlockStyle would not // get lost at the next iteration. FCKDomTools.RemoveNode( previousBlock ) ; }, _CheckAndSplitPre : function( newBlock ) { var lastNewBlock ; var cursor = newBlock.firstChild ; // We are not splitting <br><br> at the beginning of the block, so // we'll start from the second child. cursor = cursor && cursor.nextSibling ; while ( cursor ) { var next = cursor.nextSibling ; // If we have two <BR>s, and they're not at the beginning or the end, // then we'll split up the contents following them into another block. // Stop processing if we are at the last child couple. if ( next && next.nextSibling && cursor.nodeName.IEquals( 'br' ) && next.nodeName.IEquals( 'br' ) ) { // Remove the first <br>. FCKDomTools.RemoveNode( cursor ) ; // Move to the node after the second <br>. cursor = next.nextSibling ; // Remove the second <br>. FCKDomTools.RemoveNode( next ) ; // Create the block that will hold the child nodes from now on. lastNewBlock = FCKDomTools.InsertAfterNode( lastNewBlock || newBlock, FCKDomTools.CloneElement( newBlock ) ) ; continue ; } // If we split it, then start moving the nodes to the new block. if ( lastNewBlock ) { cursor = cursor.previousSibling ; FCKDomTools.MoveNode(cursor.nextSibling, lastNewBlock ) ; } cursor = cursor.nextSibling ; } }, /** * Apply an inline style to a FCKDomRange. * * TODO * - Implement the "#" style handling. * - Properly handle block containers like <div> and <blockquote>. */ _ApplyBlockStyle : function( range, selectIt, updateRange ) { // Bookmark the range so we can re-select it after processing. var bookmark ; if ( selectIt ) bookmark = range.CreateBookmark() ; var iterator = new FCKDomRangeIterator( range ) ; iterator.EnforceRealBlocks = true ; var block ; var doc = range.Window.document ; var previousPreBlock ; while( ( block = iterator.GetNextParagraph() ) ) // Only one = { // Create the new node right before the current one. var newBlock = this.BuildElement( doc ) ; // Check if we are changing from/to <pre>. var newBlockIsPre = newBlock.nodeName.IEquals( 'pre' ) ; var blockIsPre = block.nodeName.IEquals( 'pre' ) ; var toPre = newBlockIsPre && !blockIsPre ; var fromPre = !newBlockIsPre && blockIsPre ; // Move everything from the current node to the new one. if ( toPre ) newBlock = this._ToPre( doc, block, newBlock ) ; else if ( fromPre ) newBlock = this._FromPre( doc, block, newBlock ) ; else // Convering from a regular block to another regular block. FCKDomTools.MoveChildren( block, newBlock ) ; // Replace the current block. block.parentNode.insertBefore( newBlock, block ) ; FCKDomTools.RemoveNode( block ) ; // Complete other tasks after inserting the node in the DOM. if ( newBlockIsPre ) { if ( previousPreBlock ) this._CheckAndMergePre( previousPreBlock, newBlock ) ; // Merge successive <pre> blocks. previousPreBlock = newBlock ; } else if ( fromPre ) this._CheckAndSplitPre( newBlock ) ; // Split <br><br> in successive <pre>s. } // Re-select the original range. if ( selectIt ) range.SelectBookmark( bookmark ) ; if ( updateRange ) range.MoveToBookmark( bookmark ) ; }, /** * Apply an inline style to a FCKDomRange. * * TODO * - Merge elements, when applying styles to similar elements that enclose * the entire selection, outputing: * <span style="color: #ff0000; background-color: #ffffff">XYZ</span> * instead of: * <span style="color: #ff0000;"><span style="background-color: #ffffff">XYZ</span></span> */ _ApplyInlineStyle : function( range, selectIt, updateRange ) { var doc = range.Window.document ; if ( range.CheckIsCollapsed() ) { // Create the element to be inserted in the DOM. var collapsedElement = this.BuildElement( doc ) ; range.InsertNode( collapsedElement ) ; range.MoveToPosition( collapsedElement, 2 ) ; range.Select() ; return ; } // The general idea here is navigating through all nodes inside the // current selection, working on distinct range blocks, defined by the // DTD compatibility between the style element and the nodes inside the // ranges. // // For example, suppose we have the following selection (where [ and ] // are the boundaries), and we apply a <b> style there: // // <p>Here we [have <b>some</b> text.<p> // <p>And some here] here.</p> // // Two different ranges will be detected: // // "have <b>some</b> text." // "And some here" // // Both ranges will be extracted, moved to a <b> element, and // re-inserted, resulting in the following output: // // <p>Here we [<b>have some text.</b><p> // <p><b>And some here</b>] here.</p> // // Note that the <b> element at <b>some</b> is also removed because it // is not needed anymore. var elementName = this.Element ; // Get the DTD definition for the element. Defaults to "span". var elementDTD = FCK.DTD[ elementName ] || FCK.DTD.span ; // Create the attribute list to be used later for element comparisons. var styleAttribs = this._GetAttribsForComparison() ; var styleNode ; // Expand the range, if inside inline element boundaries. range.Expand( 'inline_elements' ) ; // Bookmark the range so we can re-select it after processing. var bookmark = range.CreateBookmark( true ) ; // The style will be applied within the bookmark boundaries. var startNode = range.GetBookmarkNode( bookmark, true ) ; var endNode = range.GetBookmarkNode( bookmark, false ) ; // We'll be reusing the range to apply the styles. So, release it here // to indicate that it has not been initialized. range.Release( true ) ; // Let's start the nodes lookup from the node right after the bookmark // span. var currentNode = FCKDomTools.GetNextSourceNode( startNode, true ) ; while ( currentNode ) { var applyStyle = false ; var nodeType = currentNode.nodeType ; var nodeName = nodeType == 1 ? currentNode.nodeName.toLowerCase() : null ; // Check if the current node can be a child of the style element. if ( !nodeName || elementDTD[ nodeName ] ) { // Check if the style element can be a child of the current // node parent or if the element is not defined in the DTD. if ( ( FCK.DTD[ currentNode.parentNode.nodeName.toLowerCase() ] || FCK.DTD.span )[ elementName ] || !FCK.DTD[ elementName ] ) { // This node will be part of our range, so if it has not // been started, place its start right before the node. if ( !range.CheckHasRange() ) range.SetStart( currentNode, 3 ) ; // Non element nodes, or empty elements can be added // completely to the range. if ( nodeType != 1 || currentNode.childNodes.length == 0 ) { var includedNode = currentNode ; var parentNode = includedNode.parentNode ; // This node is about to be included completelly, but, // if this is the last node in its parent, we must also // check if the parent itself can be added completelly // to the range. while ( includedNode == parentNode.lastChild && elementDTD[ parentNode.nodeName.toLowerCase() ] ) { includedNode = parentNode ; } range.SetEnd( includedNode, 4 ) ; // If the included node is the last node in its parent // and its parent can't be inside the style node, apply // the style immediately. if ( includedNode == includedNode.parentNode.lastChild && !elementDTD[ includedNode.parentNode.nodeName.toLowerCase() ] ) applyStyle = true ; } else { // Element nodes will not be added directly. We need to // check their children because the selection could end // inside the node, so let's place the range end right // before the element. range.SetEnd( currentNode, 3 ) ; } } else applyStyle = true ; } else applyStyle = true ; // Get the next node to be processed. currentNode = FCKDomTools.GetNextSourceNode( currentNode ) ; // If we have reached the end of the selection, just apply the // style ot the range, and stop looping. if ( currentNode == endNode ) { currentNode = null ; applyStyle = true ; } // Apply the style if we have something to which apply it. if ( applyStyle && range.CheckHasRange() && !range.CheckIsCollapsed() ) { // Build the style element, based on the style object definition. styleNode = this.BuildElement( doc ) ; // Move the contents of the range to the style element. range.ExtractContents().AppendTo( styleNode ) ; // If it is not empty. if ( styleNode.innerHTML.RTrim().length > 0 ) { // Insert it in the range position (it is collapsed after // ExtractContents. range.InsertNode( styleNode ) ; // Here we do some cleanup, removing all duplicated // elements from the style element. this.RemoveFromElement( styleNode ) ; // Let's merge our new style with its neighbors, if possible. this._MergeSiblings( styleNode, this._GetAttribsForComparison() ) ; // As the style system breaks text nodes constantly, let's normalize // things for performance. // With IE, some paragraphs get broken when calling normalize() // repeatedly. Also, for IE, we must normalize body, not documentElement. // IE is also known for having a "crash effect" with normalize(). // We should try to normalize with IE too in some way, somewhere. if ( !FCKBrowserInfo.IsIE ) styleNode.normalize() ; } // Style applied, let's release the range, so it gets marked to // re-initialization in the next loop. range.Release( true ) ; } } this._FixBookmarkStart( startNode ) ; // Re-select the original range. if ( selectIt ) range.SelectBookmark( bookmark ) ; if ( updateRange ) range.MoveToBookmark( bookmark ) ; }, _FixBookmarkStart : function( startNode ) { // After appliying or removing an inline style, the start boundary of // the selection must be placed inside all inline elements it is // bordering. var startSibling ; while ( ( startSibling = startNode.nextSibling ) ) // Only one "=". { if ( startSibling.nodeType == 1 && FCKListsLib.InlineNonEmptyElements[ startSibling.nodeName.toLowerCase() ] ) { // If it is an empty inline element, we can safely remove it. if ( !startSibling.firstChild ) FCKDomTools.RemoveNode( startSibling ) ; else FCKDomTools.MoveNode( startNode, startSibling, true ) ; continue ; } // Empty text nodes can be safely removed to not disturb. if ( startSibling.nodeType == 3 && startSibling.length == 0 ) { FCKDomTools.RemoveNode( startSibling ) ; continue ; } break ; } }, /** * Merge an element with its similar siblings. * "attribs" is and object computed with _CreateAttribsForComparison. */ _MergeSiblings : function( element, attribs ) { if ( !element || element.nodeType != 1 || !FCKListsLib.InlineNonEmptyElements[ element.nodeName.toLowerCase() ] ) return ; this._MergeNextSibling( element, attribs ) ; this._MergePreviousSibling( element, attribs ) ; }, /** * Merge an element with its similar siblings after it. * "attribs" is and object computed with _CreateAttribsForComparison. */ _MergeNextSibling : function( element, attribs ) { // Check the next sibling. var sibling = element.nextSibling ; // Check if the next sibling is a bookmark element. In this case, jump it. var hasBookmark = ( sibling && sibling.nodeType == 1 && sibling.getAttribute( '_fck_bookmark' ) ) ; if ( hasBookmark ) sibling = sibling.nextSibling ; if ( sibling && sibling.nodeType == 1 && sibling.nodeName == element.nodeName ) { if ( !attribs ) attribs = this._CreateElementAttribsForComparison( element ) ; if ( this._CheckAttributesMatch( sibling, attribs ) ) { // Save the last child to be checked too (to merge things like <b><i></i></b><b><i></i></b>). var innerSibling = element.lastChild ; if ( hasBookmark ) FCKDomTools.MoveNode( element.nextSibling, element ) ; // Move contents from the sibling. FCKDomTools.MoveChildren( sibling, element ) ; FCKDomTools.RemoveNode( sibling ) ; // Now check the last inner child (see two comments above). if ( innerSibling ) this._MergeNextSibling( innerSibling ) ; } } }, /** * Merge an element with its similar siblings before it. * "attribs" is and object computed with _CreateAttribsForComparison. */ _MergePreviousSibling : function( element, attribs ) { // Check the previous sibling. var sibling = element.previousSibling ; // Check if the previous sibling is a bookmark element. In this case, jump it. var hasBookmark = ( sibling && sibling.nodeType == 1 && sibling.getAttribute( '_fck_bookmark' ) ) ; if ( hasBookmark ) sibling = sibling.previousSibling ; if ( sibling && sibling.nodeType == 1 && sibling.nodeName == element.nodeName ) { if ( !attribs ) attribs = this._CreateElementAttribsForComparison( element ) ; if ( this._CheckAttributesMatch( sibling, attribs ) ) { // Save the first child to be checked too (to merge things like <b><i></i></b><b><i></i></b>). var innerSibling = element.firstChild ; if ( hasBookmark ) FCKDomTools.MoveNode( element.previousSibling, element, true ) ; // Move contents to the sibling. FCKDomTools.MoveChildren( sibling, element, true ) ; FCKDomTools.RemoveNode( sibling ) ; // Now check the first inner child (see two comments above). if ( innerSibling ) this._MergePreviousSibling( innerSibling ) ; } } }, /** * Build the cssText based on the styles definition. */ _GetStyleText : function() { var stylesDef = this._StyleDesc.Styles ; // Builds the StyleText. var stylesText = ( this._StyleDesc.Attributes ? this._StyleDesc.Attributes['style'] || '' : '' ) ; if ( stylesText.length > 0 ) stylesText += ';' ; for ( var style in stylesDef ) stylesText += style + ':' + stylesDef[style] + ';' ; // Browsers make some changes to the style when applying them. So, here // we normalize it to the browser format. We'll not do that if there // are variables inside the style. if ( stylesText.length > 0 && !( /#\(/.test( stylesText ) ) ) { stylesText = FCKTools.NormalizeCssText( stylesText ) ; } return (this._GetStyleText = function() { return stylesText ; })() ; }, /** * Get the the collection used to compare the attributes defined in this * style with attributes in an element. All information in it is lowercased. */ _GetAttribsForComparison : function() { // If we have already computed it, just return it. var attribs = this._GetAttribsForComparison_$ ; if ( attribs ) return attribs ; attribs = new Object() ; // Loop through all defined attributes. var styleAttribs = this._StyleDesc.Attributes ; if ( styleAttribs ) { for ( var styleAtt in styleAttribs ) { attribs[ styleAtt.toLowerCase() ] = styleAttribs[ styleAtt ].toLowerCase() ; } } // Includes the style definitions. if ( this._GetStyleText().length > 0 ) { attribs['style'] = this._GetStyleText().toLowerCase() ; } // Appends the "length" information to the object. FCKTools.AppendLengthProperty( attribs, '_length' ) ; // Return it, saving it to the next request. return ( this._GetAttribsForComparison_$ = attribs ) ; }, /** * Get the the collection used to compare the elements and attributes, * defined in this style overrides, with other element. All information in * it is lowercased. */ _GetOverridesForComparison : function() { // If we have already computed it, just return it. var overrides = this._GetOverridesForComparison_$ ; if ( overrides ) return overrides ; overrides = new Object() ; var overridesDesc = this._StyleDesc.Overrides ; if ( overridesDesc ) { // The override description can be a string, object or array. // Internally, well handle arrays only, so transform it if needed. if ( !FCKTools.IsArray( overridesDesc ) ) overridesDesc = [ overridesDesc ] ; // Loop through all override definitions. for ( var i = 0 ; i < overridesDesc.length ; i++ ) { var override = overridesDesc[i] ; var elementName ; var overrideEl ; var attrs ; // If can be a string with the element name. if ( typeof override == 'string' ) elementName = override.toLowerCase() ; // Or an object. else { elementName = override.Element ? override.Element.toLowerCase() : this.Element ; attrs = override.Attributes ; } // We can have more than one override definition for the same // element name, so we attempt to simply append information to // it if it already exists. overrideEl = overrides[ elementName ] || ( overrides[ elementName ] = {} ) ; if ( attrs ) { // The returning attributes list is an array, because we // could have different override definitions for the same // attribute name. var overrideAttrs = ( overrideEl.Attributes = overrideEl.Attributes || new Array() ) ; for ( var attName in attrs ) { // Each item in the attributes array is also an array, // where [0] is the attribute name and [1] is the // override value. overrideAttrs.push( [ attName.toLowerCase(), attrs[ attName ] ] ) ; } } } } return ( this._GetOverridesForComparison_$ = overrides ) ; }, /* * Create and object containing all attributes specified in an element, * added by a "_length" property. All values are lowercased. */ _CreateElementAttribsForComparison : function( element ) { var attribs = new Object() ; var attribsCount = 0 ; for ( var i = 0 ; i < element.attributes.length ; i++ ) { var att = element.attributes[i] ; if ( att.specified ) { attribs[ att.nodeName.toLowerCase() ] = FCKDomTools.GetAttributeValue( element, att ).toLowerCase() ; attribsCount++ ; } } attribs._length = attribsCount ; return attribs ; }, /** * Checks is the element attributes have a perfect match with the style * attributes. */ _CheckAttributesMatch : function( element, styleAttribs ) { // Loop through all specified attributes. The same number of // attributes must be found and their values must match to // declare them as equal. var elementAttrbs = element.attributes ; var matchCount = 0 ; for ( var i = 0 ; i < elementAttrbs.length ; i++ ) { var att = elementAttrbs[i] ; if ( att.specified ) { var attName = att.nodeName.toLowerCase() ; var styleAtt = styleAttribs[ attName ] ; // The attribute is not defined in the style. if ( !styleAtt ) break ; // The values are different. if ( styleAtt != FCKDomTools.GetAttributeValue( element, att ).toLowerCase() ) break ; matchCount++ ; } } return ( matchCount == styleAttribs._length ) ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKPlugin Class: Represents a single plugin. */ var FCKPlugin = function( name, availableLangs, basePath ) { this.Name = name ; this.BasePath = basePath ? basePath : FCKConfig.PluginsPath ; this.Path = this.BasePath + name + '/' ; if ( !availableLangs || availableLangs.length == 0 ) this.AvailableLangs = new Array() ; else this.AvailableLangs = availableLangs.split(',') ; } FCKPlugin.prototype.Load = function() { // Load the language file, if defined. if ( this.AvailableLangs.length > 0 ) { var sLang ; // Check if the plugin has the language file for the active language. if ( this.AvailableLangs.IndexOf( FCKLanguageManager.ActiveLanguage.Code ) >= 0 ) sLang = FCKLanguageManager.ActiveLanguage.Code ; else // Load the default language file (first one) if the current one is not available. sLang = this.AvailableLangs[0] ; // Add the main plugin script. LoadScript( this.Path + 'lang/' + sLang + '.js' ) ; } // Add the main plugin script. LoadScript( this.Path + 'fckplugin.js' ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Component that creates floating panels. It is used by many * other components, like the toolbar items, context menu, etc... */ var FCKPanel = function( parentWindow ) { this.IsRTL = ( FCKLang.Dir == 'rtl' ) ; this.IsContextMenu = false ; this._LockCounter = 0 ; this._Window = parentWindow || window ; var oDocument ; if ( FCKBrowserInfo.IsIE ) { // Create the Popup that will hold the panel. // The popup has to be created before playing with domain hacks, see #1666. this._Popup = this._Window.createPopup() ; // this._Window cannot be accessed while playing with domain hacks, but local variable is ok. // See #1666. var pDoc = this._Window.document ; // This is a trick to IE6 (not IE7). The original domain must be set // before creating the popup, so we are able to take a refence to the // document inside of it, and the set the proper domain for it. (#123) if ( FCK_IS_CUSTOM_DOMAIN && !FCKBrowserInfo.IsIE7 ) { pDoc.domain = FCK_ORIGINAL_DOMAIN ; document.domain = FCK_ORIGINAL_DOMAIN ; } oDocument = this.Document = this._Popup.document ; // Set the proper domain inside the popup. if ( FCK_IS_CUSTOM_DOMAIN ) { oDocument.domain = FCK_RUNTIME_DOMAIN ; pDoc.domain = FCK_RUNTIME_DOMAIN ; document.domain = FCK_RUNTIME_DOMAIN ; } FCK.IECleanup.AddItem( this, FCKPanel_Cleanup ) ; } else { var oIFrame = this._IFrame = this._Window.document.createElement('iframe') ; FCKTools.ResetStyles( oIFrame ); oIFrame.src = 'javascript:void(0)' ; oIFrame.allowTransparency = true ; oIFrame.frameBorder = '0' ; oIFrame.scrolling = 'no' ; oIFrame.style.width = oIFrame.style.height = '0px' ; FCKDomTools.SetElementStyles( oIFrame, { position : 'absolute', zIndex : FCKConfig.FloatingPanelsZIndex } ) ; this._Window.document.body.appendChild( oIFrame ) ; var oIFrameWindow = oIFrame.contentWindow ; oDocument = this.Document = oIFrameWindow.document ; // Workaround for Safari 12256. Ticket #63 var sBase = '' ; if ( FCKBrowserInfo.IsSafari ) sBase = '<base href="' + window.document.location + '">' ; // Initialize the IFRAME document body. oDocument.open() ; oDocument.write( '<html><head>' + sBase + '<\/head><body style="margin:0px;padding:0px;"><\/body><\/html>' ) ; oDocument.close() ; if( FCKBrowserInfo.IsAIR ) FCKAdobeAIR.Panel_Contructor( oDocument, window.document.location ) ; FCKTools.AddEventListenerEx( oIFrameWindow, 'focus', FCKPanel_Window_OnFocus, this ) ; FCKTools.AddEventListenerEx( oIFrameWindow, 'blur', FCKPanel_Window_OnBlur, this ) ; } oDocument.dir = FCKLang.Dir ; FCKTools.AddEventListener( oDocument, 'contextmenu', FCKTools.CancelEvent ) ; // Create the main DIV that is used as the panel base. this.MainNode = oDocument.body.appendChild( oDocument.createElement('DIV') ) ; // The "float" property must be set so Firefox calculates the size correctly. this.MainNode.style.cssFloat = this.IsRTL ? 'right' : 'left' ; } FCKPanel.prototype.AppendStyleSheet = function( styleSheet ) { FCKTools.AppendStyleSheet( this.Document, styleSheet ) ; } FCKPanel.prototype.Preload = function( x, y, relElement ) { // The offsetWidth and offsetHeight properties are not available if the // element is not visible. So we must "show" the popup with no size to // be able to use that values in the second call (IE only). if ( this._Popup ) this._Popup.show( x, y, 0, 0, relElement ) ; } // Workaround for IE7 problem. See #1982 // Submenus are restricted to the size of its parent, so we increase it as needed. // Returns true if the panel has been repositioned FCKPanel.prototype.ResizeForSubpanel = function( panel, width, height ) { if ( !FCKBrowserInfo.IsIE7 ) return false ; if ( !this._Popup.isOpen ) { this.Subpanel = null ; return false ; } // If we are resetting the extra space if ( width == 0 && height == 0 ) { // Another subpanel is being shown, so we must not shrink back if (this.Subpanel !== panel) return false ; // Reset values. // We leave the IncreasedY untouched to avoid vertical movement of the // menu if the submenu is higher than the main menu. this.Subpanel = null ; this.IncreasedX = 0 ; } else { this.Subpanel = panel ; // If the panel has already been increased enough, get out if ( ( this.IncreasedX >= width ) && ( this.IncreasedY >= height ) ) return false ; this.IncreasedX = Math.max( this.IncreasedX, width ) ; this.IncreasedY = Math.max( this.IncreasedY, height ) ; } var x = this.ShowRect.x ; var w = this.IncreasedX ; if ( this.IsRTL ) x = x - w ; // Horizontally increase as needed (sum of widths). // Vertically, use only the maximum of this menu or the submenu var finalWidth = this.ShowRect.w + w ; var finalHeight = Math.max( this.ShowRect.h, this.IncreasedY ) ; if ( this.ParentPanel ) this.ParentPanel.ResizeForSubpanel( this, finalWidth, finalHeight ) ; this._Popup.show( x, this.ShowRect.y, finalWidth, finalHeight, this.RelativeElement ) ; return this.IsRTL ; } FCKPanel.prototype.Show = function( x, y, relElement, width, height ) { var iMainWidth ; var eMainNode = this.MainNode ; if ( this._Popup ) { // The offsetWidth and offsetHeight properties are not available if the // element is not visible. So we must "show" the popup with no size to // be able to use that values in the second call. this._Popup.show( x, y, 0, 0, relElement ) ; // The following lines must be place after the above "show", otherwise it // doesn't has the desired effect. FCKDomTools.SetElementStyles( eMainNode, { width : width ? width + 'px' : '', height : height ? height + 'px' : '' } ) ; iMainWidth = eMainNode.offsetWidth ; if ( FCKBrowserInfo.IsIE7 ) { if (this.ParentPanel && this.ParentPanel.ResizeForSubpanel(this, iMainWidth, eMainNode.offsetHeight) ) { // As the parent has moved, allow the browser to update its internal data, so the new position is correct. FCKTools.RunFunction( this.Show, this, [x, y, relElement] ) ; return ; } } if ( this.IsRTL ) { if ( this.IsContextMenu ) x = x - iMainWidth + 1 ; else if ( relElement ) x = ( x * -1 ) + relElement.offsetWidth - iMainWidth ; } if ( FCKBrowserInfo.IsIE7 ) { // Store the values that will be used by the ResizeForSubpanel function this.ShowRect = {x:x, y:y, w:iMainWidth, h:eMainNode.offsetHeight} ; this.IncreasedX = 0 ; this.IncreasedY = 0 ; this.RelativeElement = relElement ; } // Second call: Show the Popup at the specified location, with the correct size. this._Popup.show( x, y, iMainWidth, eMainNode.offsetHeight, relElement ) ; if ( this.OnHide ) { if ( this._Timer ) CheckPopupOnHide.call( this, true ) ; this._Timer = FCKTools.SetInterval( CheckPopupOnHide, 100, this ) ; } } else { // Do not fire OnBlur while the panel is opened. if ( typeof( FCK.ToolbarSet.CurrentInstance.FocusManager ) != 'undefined' ) FCK.ToolbarSet.CurrentInstance.FocusManager.Lock() ; if ( this.ParentPanel ) { this.ParentPanel.Lock() ; // Due to a bug on FF3, we must ensure that the parent panel will // blur (#1584). FCKPanel_Window_OnBlur( null, this.ParentPanel ) ; } // Toggle the iframe scrolling attribute to prevent the panel // scrollbars from disappearing in FF Mac. (#191) if ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac ) { this._IFrame.scrolling = '' ; FCKTools.RunFunction( function(){ this._IFrame.scrolling = 'no'; }, this ) ; } // Be sure we'll not have more than one Panel opened at the same time. // Do not unlock focus manager here because we're displaying another floating panel // instead of returning the editor to a "no panel" state (Bug #1514). if ( FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel && FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel != this ) FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel.Hide( false, true ) ; FCKDomTools.SetElementStyles( eMainNode, { width : width ? width + 'px' : '', height : height ? height + 'px' : '' } ) ; iMainWidth = eMainNode.offsetWidth ; if ( !width ) this._IFrame.width = 1 ; if ( !height ) this._IFrame.height = 1 ; // This is weird... but with Firefox, we must get the offsetWidth before // setting the _IFrame size (which returns "0"), and then after that, // to return the correct width. Remove the first step and it will not // work when the editor is in RTL. // // The "|| eMainNode.firstChild.offsetWidth" part has been added // for Opera compatibility (see #570). iMainWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ; // Base the popup coordinates upon the coordinates of relElement. var oPos = FCKTools.GetDocumentPosition( this._Window, relElement.nodeType == 9 ? ( FCKTools.IsStrictMode( relElement ) ? relElement.documentElement : relElement.body ) : relElement ) ; // Minus the offsets provided by any positioned parent element of the panel iframe. var positionedAncestor = FCKDomTools.GetPositionedAncestor( this._IFrame.parentNode ) ; if ( positionedAncestor ) { var nPos = FCKTools.GetDocumentPosition( FCKTools.GetElementWindow( positionedAncestor ), positionedAncestor ) ; oPos.x -= nPos.x ; oPos.y -= nPos.y ; } if ( this.IsRTL && !this.IsContextMenu ) x = ( x * -1 ) ; x += oPos.x ; y += oPos.y ; if ( this.IsRTL ) { if ( this.IsContextMenu ) x = x - iMainWidth + 1 ; else if ( relElement ) x = x + relElement.offsetWidth - iMainWidth ; } else { var oViewPaneSize = FCKTools.GetViewPaneSize( this._Window ) ; var oScrollPosition = FCKTools.GetScrollPosition( this._Window ) ; var iViewPaneHeight = oViewPaneSize.Height + oScrollPosition.Y ; var iViewPaneWidth = oViewPaneSize.Width + oScrollPosition.X ; if ( ( x + iMainWidth ) > iViewPaneWidth ) x -= x + iMainWidth - iViewPaneWidth ; if ( ( y + eMainNode.offsetHeight ) > iViewPaneHeight ) y -= y + eMainNode.offsetHeight - iViewPaneHeight ; } // Set the context menu DIV in the specified location. FCKDomTools.SetElementStyles( this._IFrame, { left : x + 'px', top : y + 'px' } ) ; // Move the focus to the IFRAME so we catch the "onblur". this._IFrame.contentWindow.focus() ; this._IsOpened = true ; var me = this ; this._resizeTimer = setTimeout( function() { var iWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ; var iHeight = eMainNode.offsetHeight ; me._IFrame.style.width = iWidth + 'px' ; me._IFrame.style.height = iHeight + 'px' ; }, 0 ) ; FCK.ToolbarSet.CurrentInstance.GetInstanceObject( 'FCKPanel' )._OpenedPanel = this ; } FCKTools.RunFunction( this.OnShow, this ) ; } FCKPanel.prototype.Hide = function( ignoreOnHide, ignoreFocusManagerUnlock ) { if ( this._Popup ) this._Popup.hide() ; else { if ( !this._IsOpened || this._LockCounter > 0 ) return ; // Enable the editor to fire the "OnBlur". if ( typeof( FCKFocusManager ) != 'undefined' && !ignoreFocusManagerUnlock ) FCKFocusManager.Unlock() ; // It is better to set the sizes to 0, otherwise Firefox would have // rendering problems. this._IFrame.style.width = this._IFrame.style.height = '0px' ; this._IsOpened = false ; if ( this._resizeTimer ) { clearTimeout( this._resizeTimer ) ; this._resizeTimer = null ; } if ( this.ParentPanel ) this.ParentPanel.Unlock() ; if ( !ignoreOnHide ) FCKTools.RunFunction( this.OnHide, this ) ; } } FCKPanel.prototype.CheckIsOpened = function() { if ( this._Popup ) return this._Popup.isOpen ; else return this._IsOpened ; } FCKPanel.prototype.CreateChildPanel = function() { var oWindow = this._Popup ? FCKTools.GetDocumentWindow( this.Document ) : this._Window ; var oChildPanel = new FCKPanel( oWindow ) ; oChildPanel.ParentPanel = this ; return oChildPanel ; } FCKPanel.prototype.Lock = function() { this._LockCounter++ ; } FCKPanel.prototype.Unlock = function() { if ( --this._LockCounter == 0 && !this.HasFocus ) this.Hide() ; } /* Events */ function FCKPanel_Window_OnFocus( e, panel ) { panel.HasFocus = true ; } function FCKPanel_Window_OnBlur( e, panel ) { panel.HasFocus = false ; if ( panel._LockCounter == 0 ) FCKTools.RunFunction( panel.Hide, panel ) ; } function CheckPopupOnHide( forceHide ) { if ( forceHide || !this._Popup.isOpen ) { window.clearInterval( this._Timer ) ; this._Timer = null ; if (this._Popup && this.ParentPanel && !forceHide) this.ParentPanel.ResizeForSubpanel(this, 0, 0) ; FCKTools.RunFunction( this.OnHide, this ) ; } } function FCKPanel_Cleanup() { this._Popup = null ; this._Window = null ; this.Document = null ; this.MainNode = null ; this.RelativeElement = null ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarPanelButton Class: represents a special button in the toolbar * that shows a panel when pressed. */ var FCKToolbarPanelButton = function( commandName, label, tooltip, style, icon ) { this.CommandName = commandName ; var oIcon ; if ( icon == null ) oIcon = FCKConfig.SkinPath + 'toolbar/' + commandName.toLowerCase() + '.gif' ; else if ( typeof( icon ) == 'number' ) oIcon = [ FCKConfig.SkinPath + 'fck_strip.gif', 16, icon ] ; var oUIButton = this._UIButton = new FCKToolbarButtonUI( commandName, label, tooltip, oIcon, style ) ; oUIButton._FCKToolbarPanelButton = this ; oUIButton.ShowArrow = true ; oUIButton.OnClick = FCKToolbarPanelButton_OnButtonClick ; } FCKToolbarPanelButton.prototype.TypeName = 'FCKToolbarPanelButton' ; FCKToolbarPanelButton.prototype.Create = function( parentElement ) { parentElement.className += 'Menu' ; this._UIButton.Create( parentElement ) ; var oPanel = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName )._Panel ; this.RegisterPanel( oPanel ) ; } FCKToolbarPanelButton.prototype.RegisterPanel = function( oPanel ) { if ( oPanel._FCKToolbarPanelButton ) return ; oPanel._FCKToolbarPanelButton = this ; var eLineDiv = oPanel.Document.body.appendChild( oPanel.Document.createElement( 'div' ) ) ; eLineDiv.style.position = 'absolute' ; eLineDiv.style.top = '0px' ; var eLine = oPanel._FCKToolbarPanelButtonLineDiv = eLineDiv.appendChild( oPanel.Document.createElement( 'IMG' ) ) ; eLine.className = 'TB_ConnectionLine' ; eLine.style.position = 'absolute' ; // eLine.style.backgroundColor = 'Red' ; eLine.src = FCK_SPACER_PATH ; oPanel.OnHide = FCKToolbarPanelButton_OnPanelHide ; } /* Events */ function FCKToolbarPanelButton_OnButtonClick( toolbarButton ) { var oButton = this._FCKToolbarPanelButton ; var e = oButton._UIButton.MainElement ; oButton._UIButton.ChangeState( FCK_TRISTATE_ON ) ; // oButton.LineImg.style.width = ( e.offsetWidth - 2 ) + 'px' ; var oCommand = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( oButton.CommandName ) ; var oPanel = oCommand._Panel ; oPanel._FCKToolbarPanelButtonLineDiv.style.width = ( e.offsetWidth - 2 ) + 'px' ; oCommand.Execute( 0, e.offsetHeight - 1, e ) ; // -1 to be over the border } function FCKToolbarPanelButton_OnPanelHide() { var oMenuButton = this._FCKToolbarPanelButton ; oMenuButton._UIButton.ChangeState( FCK_TRISTATE_OFF ) ; } // The Panel Button works like a normal button so the refresh state functions // defined for the normal button can be reused here. FCKToolbarPanelButton.prototype.RefreshState = FCKToolbarButton.prototype.RefreshState ; FCKToolbarPanelButton.prototype.Enable = FCKToolbarButton.prototype.Enable ; FCKToolbarPanelButton.prototype.Disable = FCKToolbarButton.prototype.Disable ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarPanelButton Class: Handles the Fonts combo selector. */ var FCKToolbarStyleCombo = function( tooltip, style ) { if ( tooltip === false ) return ; this.CommandName = 'Style' ; this.Label = this.GetLabel() ; this.Tooltip = tooltip ? tooltip : this.Label ; this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ; this.DefaultLabel = FCKConfig.DefaultStyleLabel || '' ; } // Inherit from FCKToolbarSpecialCombo. FCKToolbarStyleCombo.prototype = new FCKToolbarSpecialCombo ; FCKToolbarStyleCombo.prototype.GetLabel = function() { return FCKLang.Style ; } FCKToolbarStyleCombo.prototype.GetStyles = function() { var styles = {} ; var allStyles = FCK.ToolbarSet.CurrentInstance.Styles.GetStyles() ; for ( var styleName in allStyles ) { var style = allStyles[ styleName ] ; if ( !style.IsCore ) styles[ styleName ] = style ; } return styles ; } FCKToolbarStyleCombo.prototype.CreateItems = function( targetSpecialCombo ) { var targetDoc = targetSpecialCombo._Panel.Document ; // Add the Editor Area CSS to the panel so the style classes are previewed correctly. FCKTools.AppendStyleSheet( targetDoc, FCKConfig.ToolbarComboPreviewCSS ) ; FCKTools.AppendStyleString( targetDoc, FCKConfig.EditorAreaStyles ) ; targetDoc.body.className += ' ForceBaseFont' ; // Add ID and Class to the body. FCKConfig.ApplyBodyAttributes( targetDoc.body ) ; // Get the styles list. var styles = this.GetStyles() ; for ( var styleName in styles ) { var style = styles[ styleName ] ; // Object type styles have no preview. var caption = style.GetType() == FCK_STYLE_OBJECT ? styleName : FCKToolbarStyleCombo_BuildPreview( style, style.Label || styleName ) ; var item = targetSpecialCombo.AddItem( styleName, caption ) ; item.Style = style ; } // We must prepare the list before showing it. targetSpecialCombo.OnBeforeClick = this.StyleCombo_OnBeforeClick ; } FCKToolbarStyleCombo.prototype.RefreshActiveItems = function( targetSpecialCombo ) { var startElement = FCK.ToolbarSet.CurrentInstance.Selection.GetBoundaryParentElement( true ) ; if ( startElement ) { var path = new FCKElementPath( startElement ) ; var elements = path.Elements ; for ( var e = 0 ; e < elements.length ; e++ ) { for ( var i in targetSpecialCombo.Items ) { var item = targetSpecialCombo.Items[i] ; var style = item.Style ; if ( style.CheckElementRemovable( elements[ e ], true ) ) { targetSpecialCombo.SetLabel( style.Label || style.Name ) ; return ; } } } } targetSpecialCombo.SetLabel( this.DefaultLabel ) ; } FCKToolbarStyleCombo.prototype.StyleCombo_OnBeforeClick = function( targetSpecialCombo ) { // Two things are done here: // - In a control selection, get the element name, so we'll display styles // for that element only. // - Select the styles that are active for the current selection. // Clear the current selection. targetSpecialCombo.DeselectAll() ; var startElement ; var path ; var tagName ; var selection = FCK.ToolbarSet.CurrentInstance.Selection ; if ( selection.GetType() == 'Control' ) { startElement = selection.GetSelectedElement() ; tagName = startElement.nodeName.toLowerCase() ; } else { startElement = selection.GetBoundaryParentElement( true ) ; path = new FCKElementPath( startElement ) ; } for ( var i in targetSpecialCombo.Items ) { var item = targetSpecialCombo.Items[i] ; var style = item.Style ; if ( ( tagName && style.Element == tagName ) || ( !tagName && style.GetType() != FCK_STYLE_OBJECT ) ) { item.style.display = '' ; if ( ( path && style.CheckActive( path ) ) || ( !path && style.CheckElementRemovable( startElement, true ) ) ) targetSpecialCombo.SelectItem( style.Name ) ; } else item.style.display = 'none' ; } } function FCKToolbarStyleCombo_BuildPreview( style, caption ) { var styleType = style.GetType() ; var html = [] ; if ( styleType == FCK_STYLE_BLOCK ) html.push( '<div class="BaseFont">' ) ; var elementName = style.Element ; // Avoid <bdo> in the preview. if ( elementName == 'bdo' ) elementName = 'span' ; html = [ '<', elementName ] ; // Assign all defined attributes. var attribs = style._StyleDesc.Attributes ; if ( attribs ) { for ( var att in attribs ) { html.push( ' ', att, '="', style.GetFinalAttributeValue( att ), '"' ) ; } } // Assign the style attribute. if ( style._GetStyleText().length > 0 ) html.push( ' style="', style.GetFinalStyleValue(), '"' ) ; html.push( '>', caption, '</', elementName, '>' ) ; if ( styleType == FCK_STYLE_BLOCK ) html.push( '</div>' ) ; return html.join( '' ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is a generic Document Fragment object. It is not intended to provide * the W3C implementation, but is a way to fix the missing of a real Document * Fragment in IE (where document.createDocumentFragment() returns a normal * document instead), giving a standard interface for it. * (IE Implementation) */ var FCKDocumentFragment = function( parentDocument ) { this._Document = parentDocument ; this.RootNode = parentDocument.createElement( 'div' ) ; } // Append the contents of this Document Fragment to another node. FCKDocumentFragment.prototype = { AppendTo : function( targetNode ) { FCKDomTools.MoveChildren( this.RootNode, targetNode ) ; }, AppendHtml : function( html ) { var eTmpDiv = this._Document.createElement( 'div' ) ; eTmpDiv.innerHTML = html ; FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ; }, InsertAfterNode : function( existingNode ) { var eRoot = this.RootNode ; var eLast ; while( ( eLast = eRoot.lastChild ) ) FCKDomTools.InsertAfterNode( existingNode, eRoot.removeChild( eLast ) ) ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKIECleanup Class: a generic class used as a tool to remove IE leaks. */ var FCKIECleanup = function( attachWindow ) { // If the attachWindow already have a cleanup object, just use that one. if ( attachWindow._FCKCleanupObj ) this.Items = attachWindow._FCKCleanupObj.Items ; else { this.Items = new Array() ; attachWindow._FCKCleanupObj = this ; FCKTools.AddEventListenerEx( attachWindow, 'unload', FCKIECleanup_Cleanup ) ; // attachWindow.attachEvent( 'onunload', FCKIECleanup_Cleanup ) ; } } FCKIECleanup.prototype.AddItem = function( dirtyItem, cleanupFunction ) { this.Items.push( [ dirtyItem, cleanupFunction ] ) ; } function FCKIECleanup_Cleanup() { if ( !this._FCKCleanupObj || ( FCKConfig.MsWebBrowserControlCompat && !window.FCKUnloadFlag ) ) return ; var aItems = this._FCKCleanupObj.Items ; while ( aItems.length > 0 ) { // It is important to remove from the end to the beginning (pop()), // because of the order things get created in the editor. In the code, // elements in deeper position in the DOM are placed at the end of the // cleanup function, so we must cleanup then first, otherwise IE could // throw some crazy memory errors (IE bug). var oItem = aItems.pop() ; if ( oItem ) oItem[1].call( oItem[0] ) ; } this._FCKCleanupObj = null ; if ( CollectGarbage ) CollectGarbage() ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Class for working with a selection range, much like the W3C DOM Range, but * it is not intended to be an implementation of the W3C interface. * (Gecko Implementation) */ FCKDomRange.prototype.MoveToSelection = function() { this.Release( true ) ; var oSel = this.Window.getSelection() ; if ( oSel && oSel.rangeCount > 0 ) { this._Range = FCKW3CRange.CreateFromRange( this.Window.document, oSel.getRangeAt(0) ) ; this._UpdateElementInfo() ; } else if ( this.Window.document ) this.MoveToElementStart( this.Window.document.body ) ; } FCKDomRange.prototype.Select = function() { var oRange = this._Range ; if ( oRange ) { var startContainer = oRange.startContainer ; // If we have a collapsed range, inside an empty element, we must add // something to it, otherwise the caret will not be visible. if ( oRange.collapsed && startContainer.nodeType == 1 && startContainer.childNodes.length == 0 ) startContainer.appendChild( oRange._Document.createTextNode('') ) ; var oDocRange = this.Window.document.createRange() ; oDocRange.setStart( startContainer, oRange.startOffset ) ; try { oDocRange.setEnd( oRange.endContainer, oRange.endOffset ) ; } catch ( e ) { // There is a bug in Firefox implementation (it would be too easy // otherwise). The new start can't be after the end (W3C says it can). // So, let's create a new range and collapse it to the desired point. if ( e.toString().Contains( 'NS_ERROR_ILLEGAL_VALUE' ) ) { oRange.collapse( true ) ; oDocRange.setEnd( oRange.endContainer, oRange.endOffset ) ; } else throw( e ) ; } var oSel = this.Window.getSelection() ; oSel.removeAllRanges() ; // We must add a clone otherwise Firefox will have rendering issues. oSel.addRange( oDocRange ) ; } } // Not compatible with bookmark created with CreateBookmark2. // The bookmark nodes will be deleted from the document. FCKDomRange.prototype.SelectBookmark = function( bookmark ) { var domRange = this.Window.document.createRange() ; var startNode = this.GetBookmarkNode( bookmark, true ) ; var endNode = this.GetBookmarkNode( bookmark, false ) ; domRange.setStart( startNode.parentNode, FCKDomTools.GetIndexOf( startNode ) ) ; FCKDomTools.RemoveNode( startNode ) ; if ( endNode ) { domRange.setEnd( endNode.parentNode, FCKDomTools.GetIndexOf( endNode ) ) ; FCKDomTools.RemoveNode( endNode ) ; } var selection = this.Window.getSelection() ; selection.removeAllRanges() ; selection.addRange( domRange ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarBreak Class: breaks the toolbars. * It makes it possible to force the toolbar to break to a new line. * This is the Gecko specific implementation. */ var FCKToolbarBreak = function() {} FCKToolbarBreak.prototype.Create = function( targetElement ) { var oBreakDiv = targetElement.ownerDocument.createElement( 'div' ) ; oBreakDiv.style.clear = oBreakDiv.style.cssFloat = FCKLang.Dir == 'rtl' ? 'right' : 'left' ; targetElement.appendChild( oBreakDiv ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is a generic Document Fragment object. It is not intended to provide * the W3C implementation, but is a way to fix the missing of a real Document * Fragment in IE (where document.createDocumentFragment() returns a normal * document instead), giving a standard interface for it. * (IE Implementation) */ var FCKDocumentFragment = function( parentDocument, baseDocFrag ) { this.RootNode = baseDocFrag || parentDocument.createDocumentFragment() ; } FCKDocumentFragment.prototype = { // Append the contents of this Document Fragment to another element. AppendTo : function( targetNode ) { targetNode.appendChild( this.RootNode ) ; }, AppendHtml : function( html ) { var eTmpDiv = this.RootNode.ownerDocument.createElement( 'div' ) ; eTmpDiv.innerHTML = html ; FCKDomTools.MoveChildren( eTmpDiv, this.RootNode ) ; }, InsertAfterNode : function( existingNode ) { FCKDomTools.InsertAfterNode( existingNode, this.RootNode ) ; } }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKIcon Class: renders an icon from a single image, a strip or even a * spacer. */ var FCKIcon = function( iconPathOrStripInfoArray ) { var sTypeOf = iconPathOrStripInfoArray ? typeof( iconPathOrStripInfoArray ) : 'undefined' ; switch ( sTypeOf ) { case 'number' : this.Path = FCKConfig.SkinPath + 'fck_strip.gif' ; this.Size = 16 ; this.Position = iconPathOrStripInfoArray ; break ; case 'undefined' : this.Path = FCK_SPACER_PATH ; break ; case 'string' : this.Path = iconPathOrStripInfoArray ; break ; default : // It is an array in the format [ StripFilePath, IconSize, IconPosition ] this.Path = iconPathOrStripInfoArray[0] ; this.Size = iconPathOrStripInfoArray[1] ; this.Position = iconPathOrStripInfoArray[2] ; } } FCKIcon.prototype.CreateIconElement = function( document ) { var eIcon, eIconImage ; if ( this.Position ) // It is using an icons strip image. { var sPos = '-' + ( ( this.Position - 1 ) * this.Size ) + 'px' ; if ( FCKBrowserInfo.IsIE ) { // <div class="TB_Button_Image"><img src="strip.gif" style="top:-16px"></div> eIcon = document.createElement( 'DIV' ) ; eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ; eIconImage.src = this.Path ; eIconImage.style.top = sPos ; } else { // <img class="TB_Button_Image" src="spacer.gif" style="background-position: 0px -16px;background-image: url(strip.gif);"> eIcon = document.createElement( 'IMG' ) ; eIcon.src = FCK_SPACER_PATH ; eIcon.style.backgroundPosition = '0px ' + sPos ; eIcon.style.backgroundImage = 'url("' + this.Path + '")' ; } } else // It is using a single icon image. { if ( FCKBrowserInfo.IsIE ) { // IE makes the button 1px higher if using the <img> directly, so we // are changing to the <div> system to clip the image correctly. eIcon = document.createElement( 'DIV' ) ; eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ; eIconImage.src = this.Path ? this.Path : FCK_SPACER_PATH ; } else { // This is not working well with IE. See notes above. // <img class="TB_Button_Image" src="smiley.gif"> eIcon = document.createElement( 'IMG' ) ; eIcon.src = this.Path ? this.Path : FCK_SPACER_PATH ; } } eIcon.className = 'TB_Button_Image' ; return eIcon ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKXml Class: class to load and manipulate XML files. */ FCKXml.prototype = { LoadUrl : function( urlToCall ) { this.Error = false ; var oXml ; var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ; oXmlHttp.open( 'GET', urlToCall, false ) ; oXmlHttp.send( null ) ; if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 || ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 ) ) { oXml = oXmlHttp.responseXML ; // #1426: Fallback if responseXML isn't set for some // reason (e.g. improperly configured web server) if ( !oXml ) oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ; } else oXml = null ; if ( oXml ) { // Try to access something on it. try { var test = oXml.firstChild ; } catch (e) { // If document.domain has been changed (#123), we'll have a security // error at this point. The workaround here is parsing the responseText: // http://alexander.kirk.at/2006/07/27/firefox-15-xmlhttprequest-reqresponsexml-and-documentdomain/ oXml = (new DOMParser()).parseFromString( oXmlHttp.responseText, 'text/xml' ) ; } } if ( !oXml || !oXml.firstChild ) { this.Error = true ; if ( window.confirm( 'Error loading "' + urlToCall + '" (HTTP Status: ' + oXmlHttp.status + ').\r\nDo you want to see the server response dump?' ) ) alert( oXmlHttp.responseText ) ; } this.DOMDocument = oXml ; }, SelectNodes : function( xpath, contextNode ) { if ( this.Error ) return new Array() ; var aNodeArray = new Array(); var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument, this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), XPathResult.ORDERED_NODE_ITERATOR_TYPE, null) ; if ( xPathResult ) { var oNode = xPathResult.iterateNext() ; while( oNode ) { aNodeArray[aNodeArray.length] = oNode ; oNode = xPathResult.iterateNext(); } } return aNodeArray ; }, SelectSingleNode : function( xpath, contextNode ) { if ( this.Error ) return null ; var xPathResult = this.DOMDocument.evaluate( xpath, contextNode ? contextNode : this.DOMDocument, this.DOMDocument.createNSResolver(this.DOMDocument.documentElement), 9, null); if ( xPathResult && xPathResult.singleNodeValue ) return xPathResult.singleNodeValue ; else return null ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Control keyboard keystroke combinations. */ var FCKKeystrokeHandler = function( cancelCtrlDefaults ) { this.Keystrokes = new Object() ; this.CancelCtrlDefaults = ( cancelCtrlDefaults !== false ) ; } /* * Listen to keystroke events in an element or DOM document object. * @target: The element or document to listen to keystroke events. */ FCKKeystrokeHandler.prototype.AttachToElement = function( target ) { // For newer browsers, it is enough to listen to the keydown event only. // Some browsers instead, don't cancel key events in the keydown, but in the // keypress. So we must do a longer trip in those cases. FCKTools.AddEventListenerEx( target, 'keydown', _FCKKeystrokeHandler_OnKeyDown, this ) ; if ( FCKBrowserInfo.IsGecko10 || FCKBrowserInfo.IsOpera || ( FCKBrowserInfo.IsGecko && FCKBrowserInfo.IsMac ) ) FCKTools.AddEventListenerEx( target, 'keypress', _FCKKeystrokeHandler_OnKeyPress, this ) ; } /* * Sets a list of keystrokes. It can receive either a single array or "n" * arguments, each one being an array of 1 or 2 elemenst. The first element * is the keystroke combination, and the second is the value to assign to it. * If the second element is missing, the keystroke definition is removed. */ FCKKeystrokeHandler.prototype.SetKeystrokes = function() { // Look through the arguments. for ( var i = 0 ; i < arguments.length ; i++ ) { var keyDef = arguments[i] ; // If the configuration for the keystrokes is missing some element or has any extra comma // this item won't be valid, so skip it and keep on processing. if ( !keyDef ) continue ; if ( typeof( keyDef[0] ) == 'object' ) // It is an array with arrays defining the keystrokes. this.SetKeystrokes.apply( this, keyDef ) ; else { if ( keyDef.length == 1 ) // If it has only one element, remove the keystroke. delete this.Keystrokes[ keyDef[0] ] ; else // Otherwise add it. this.Keystrokes[ keyDef[0] ] = keyDef[1] === true ? true : keyDef ; } } } function _FCKKeystrokeHandler_OnKeyDown( ev, keystrokeHandler ) { // Get the key code. var keystroke = ev.keyCode || ev.which ; // Combine it with the CTRL, SHIFT and ALT states. var keyModifiers = 0 ; if ( ev.ctrlKey || ev.metaKey ) keyModifiers += CTRL ; if ( ev.shiftKey ) keyModifiers += SHIFT ; if ( ev.altKey ) keyModifiers += ALT ; var keyCombination = keystroke + keyModifiers ; var cancelIt = keystrokeHandler._CancelIt = false ; // Look for its definition availability. var keystrokeValue = keystrokeHandler.Keystrokes[ keyCombination ] ; // FCKDebug.Output( 'KeyDown: ' + keyCombination + ' - Value: ' + keystrokeValue ) ; // If the keystroke is defined if ( keystrokeValue ) { // If the keystroke has been explicitly set to "true" OR calling the // "OnKeystroke" event, it doesn't return "true", the default behavior // must be preserved. if ( keystrokeValue === true || !( keystrokeHandler.OnKeystroke && keystrokeHandler.OnKeystroke.apply( keystrokeHandler, keystrokeValue ) ) ) return true ; cancelIt = true ; } // By default, it will cancel all combinations with the CTRL key only (except positioning keys). if ( cancelIt || ( keystrokeHandler.CancelCtrlDefaults && keyModifiers == CTRL && ( keystroke < 33 || keystroke > 40 ) ) ) { keystrokeHandler._CancelIt = true ; if ( ev.preventDefault ) return ev.preventDefault() ; ev.returnValue = false ; ev.cancelBubble = true ; return false ; } return true ; } function _FCKKeystrokeHandler_OnKeyPress( ev, keystrokeHandler ) { if ( keystrokeHandler._CancelIt ) { // FCKDebug.Output( 'KeyPress Cancel', 'Red') ; if ( ev.preventDefault ) return ev.preventDefault() ; return false ; } return true ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKEditingArea Class: renders an editable area. */ /** * @constructor * @param {String} targetElement The element that will hold the editing area. Any child element present in the target will be deleted. */ var FCKEditingArea = function( targetElement ) { this.TargetElement = targetElement ; this.Mode = FCK_EDITMODE_WYSIWYG ; if ( FCK.IECleanup ) FCK.IECleanup.AddItem( this, FCKEditingArea_Cleanup ) ; } /** * @param {String} html The complete HTML for the page, including DOCTYPE and the <html> tag. */ FCKEditingArea.prototype.Start = function( html, secondCall ) { var eTargetElement = this.TargetElement ; var oTargetDocument = FCKTools.GetElementDocument( eTargetElement ) ; // Remove all child nodes from the target. while( eTargetElement.firstChild ) eTargetElement.removeChild( eTargetElement.firstChild ) ; if ( this.Mode == FCK_EDITMODE_WYSIWYG ) { // For FF, document.domain must be set only when different, otherwhise // we'll strangely have "Permission denied" issues. if ( FCK_IS_CUSTOM_DOMAIN ) html = '<script>document.domain="' + FCK_RUNTIME_DOMAIN + '";</script>' + html ; // IE has a bug with the <base> tag... it must have a </base> closer, // otherwise the all successive tags will be set as children nodes of the <base>. if ( FCKBrowserInfo.IsIE ) html = html.replace( /(<base[^>]*?)\s*\/?>(?!\s*<\/base>)/gi, '$1></base>' ) ; else if ( !secondCall ) { // Gecko moves some tags out of the body to the head, so we must use // innerHTML to set the body contents (SF BUG 1526154). // Extract the BODY contents from the html. var oMatchBefore = html.match( FCKRegexLib.BeforeBody ) ; var oMatchAfter = html.match( FCKRegexLib.AfterBody ) ; if ( oMatchBefore && oMatchAfter ) { var sBody = html.substr( oMatchBefore[1].length, html.length - oMatchBefore[1].length - oMatchAfter[1].length ) ; // This is the BODY tag contents. html = oMatchBefore[1] + // This is the HTML until the <body...> tag, inclusive. '&nbsp;' + oMatchAfter[1] ; // This is the HTML from the </body> tag, inclusive. // If nothing in the body, place a BOGUS tag so the cursor will appear. if ( FCKBrowserInfo.IsGecko && ( sBody.length == 0 || FCKRegexLib.EmptyParagraph.test( sBody ) ) ) sBody = '<br type="_moz">' ; this._BodyHTML = sBody ; } else this._BodyHTML = html ; // Invalid HTML input. } // Create the editing area IFRAME. var oIFrame = this.IFrame = oTargetDocument.createElement( 'iframe' ) ; // IE: Avoid JavaScript errors thrown by the editing are source (like tags events). // See #1055. var sOverrideError = '<script type="text/javascript" _fcktemp="true">window.onerror=function(){return true;};</script>' ; oIFrame.frameBorder = 0 ; oIFrame.style.width = oIFrame.style.height = '100%' ; if ( FCK_IS_CUSTOM_DOMAIN && FCKBrowserInfo.IsIE ) { window._FCKHtmlToLoad = html.replace( /<head>/i, '<head>' + sOverrideError ) ; oIFrame.src = 'javascript:void( (function(){' + 'document.open() ;' + 'document.domain="' + document.domain + '" ;' + 'document.write( window.parent._FCKHtmlToLoad );' + 'document.close() ;' + 'window.parent._FCKHtmlToLoad = null ;' + '})() )' ; } else if ( !FCKBrowserInfo.IsGecko ) { // Firefox will render the tables inside the body in Quirks mode if the // source of the iframe is set to javascript. see #515 oIFrame.src = 'javascript:void(0)' ; } // Append the new IFRAME to the target. For IE, it must be done after // setting the "src", to avoid the "secure/unsecure" message under HTTPS. eTargetElement.appendChild( oIFrame ) ; // Get the window and document objects used to interact with the newly created IFRAME. this.Window = oIFrame.contentWindow ; // IE: Avoid JavaScript errors thrown by the editing are source (like tags events). // TODO: This error handler is not being fired. // this.Window.onerror = function() { alert( 'Error!' ) ; return true ; } if ( !FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ) { var oDoc = this.Window.document ; oDoc.open() ; oDoc.write( html.replace( /<head>/i, '<head>' + sOverrideError ) ) ; oDoc.close() ; } if ( FCKBrowserInfo.IsAIR ) FCKAdobeAIR.EditingArea_Start( oDoc, html ) ; // Firefox 1.0.x is buggy... ohh yes... so let's do it two times and it // will magically work. if ( FCKBrowserInfo.IsGecko10 && !secondCall ) { this.Start( html, true ) ; return ; } if ( oIFrame.readyState && oIFrame.readyState != 'completed' ) { var editArea = this ; // Using a IE alternative for DOMContentLoaded, similar to the // solution proposed at http://javascript.nwbox.com/IEContentLoaded/ setTimeout( function() { try { editArea.Window.document.documentElement.doScroll("left") ; } catch(e) { setTimeout( arguments.callee, 0 ) ; return ; } editArea.Window._FCKEditingArea = editArea ; FCKEditingArea_CompleteStart.call( editArea.Window ) ; }, 0 ) ; } else { this.Window._FCKEditingArea = this ; // FF 1.0.x is buggy... we must wait a lot to enable editing because // sometimes the content simply disappears, for example when pasting // "bla1!<img src='some_url'>!bla2" in the source and then switching // back to design. if ( FCKBrowserInfo.IsGecko10 ) this.Window.setTimeout( FCKEditingArea_CompleteStart, 500 ) ; else FCKEditingArea_CompleteStart.call( this.Window ) ; } } else { var eTextarea = this.Textarea = oTargetDocument.createElement( 'textarea' ) ; eTextarea.className = 'SourceField' ; eTextarea.dir = 'ltr' ; FCKDomTools.SetElementStyles( eTextarea, { width : '100%', height : '100%', border : 'none', resize : 'none', outline : 'none' } ) ; eTargetElement.appendChild( eTextarea ) ; eTextarea.value = html ; // Fire the "OnLoad" event. FCKTools.RunFunction( this.OnLoad ) ; } } // "this" here is FCKEditingArea.Window function FCKEditingArea_CompleteStart() { // On Firefox, the DOM takes a little to become available. So we must wait for it in a loop. if ( !this.document.body ) { this.setTimeout( FCKEditingArea_CompleteStart, 50 ) ; return ; } var oEditorArea = this._FCKEditingArea ; // Save this reference to be re-used later. oEditorArea.Document = oEditorArea.Window.document ; oEditorArea.MakeEditable() ; // Fire the "OnLoad" event. FCKTools.RunFunction( oEditorArea.OnLoad ) ; } FCKEditingArea.prototype.MakeEditable = function() { var oDoc = this.Document ; if ( FCKBrowserInfo.IsIE ) { // Kludge for #141 and #523 oDoc.body.disabled = true ; oDoc.body.contentEditable = true ; oDoc.body.removeAttribute( "disabled" ) ; /* The following commands don't throw errors, but have no effect. oDoc.execCommand( 'AutoDetect', false, false ) ; oDoc.execCommand( 'KeepSelection', false, true ) ; */ } else { try { // Disable Firefox 2 Spell Checker. oDoc.body.spellcheck = ( this.FFSpellChecker !== false ) ; if ( this._BodyHTML ) { oDoc.body.innerHTML = this._BodyHTML ; oDoc.body.offsetLeft ; // Don't remove, this is a hack to fix Opera 9.50, see #2264. this._BodyHTML = null ; } oDoc.designMode = 'on' ; // Tell Gecko (Firefox 1.5+) to enable or not live resizing of objects (by Alfonso Martinez) oDoc.execCommand( 'enableObjectResizing', false, !FCKConfig.DisableObjectResizing ) ; // Disable the standard table editing features of Firefox. oDoc.execCommand( 'enableInlineTableEditing', false, !FCKConfig.DisableFFTableHandles ) ; } catch (e) { // In Firefox if the iframe is initially hidden it can't be set to designMode and it raises an exception // So we set up a DOM Mutation event Listener on the HTML, as it will raise several events when the document is visible again FCKTools.AddEventListener( this.Window.frameElement, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ; } } } // This function processes the notifications of the DOM Mutation event on the document // We use it to know that the document will be ready to be editable again (or we hope so) function FCKEditingArea_Document_AttributeNodeModified( evt ) { var editingArea = evt.currentTarget.contentWindow._FCKEditingArea ; // We want to run our function after the events no longer fire, so we can know that it's a stable situation if ( editingArea._timer ) window.clearTimeout( editingArea._timer ) ; editingArea._timer = FCKTools.SetTimeout( FCKEditingArea_MakeEditableByMutation, 1000, editingArea ) ; } // This function ideally should be called after the document is visible, it does clean up of the // mutation tracking and tries again to make the area editable. function FCKEditingArea_MakeEditableByMutation() { // Clean up delete this._timer ; // Now we don't want to keep on getting this event FCKTools.RemoveEventListener( this.Window.frameElement, 'DOMAttrModified', FCKEditingArea_Document_AttributeNodeModified ) ; // Let's try now to set the editing area editable // If it fails it will set up the Mutation Listener again automatically this.MakeEditable() ; } FCKEditingArea.prototype.Focus = function() { try { if ( this.Mode == FCK_EDITMODE_WYSIWYG ) { if ( FCKBrowserInfo.IsIE ) this._FocusIE() ; else this.Window.focus() ; } else { var oDoc = FCKTools.GetElementDocument( this.Textarea ) ; if ( (!oDoc.hasFocus || oDoc.hasFocus() ) && oDoc.activeElement == this.Textarea ) return ; this.Textarea.focus() ; } } catch(e) {} } FCKEditingArea.prototype._FocusIE = function() { // In IE it can happen that the document is in theory focused but the // active element is outside of it. this.Document.body.setActive() ; this.Window.focus() ; // Kludge for #141... yet more code to workaround IE bugs var range = this.Document.selection.createRange() ; var parentNode = range.parentElement() ; var parentTag = parentNode.nodeName.toLowerCase() ; // Only apply the fix when in a block, and the block is empty. if ( parentNode.childNodes.length > 0 || !( FCKListsLib.BlockElements[parentTag] || FCKListsLib.NonEmptyBlockElements[parentTag] ) ) { return ; } // Force the selection to happen, in this way we guarantee the focus will // be there. range = new FCKDomRange( this.Window ) ; range.MoveToElementEditStart( parentNode ) ; range.Select() ; } function FCKEditingArea_Cleanup() { if ( this.Document ) this.Document.body.innerHTML = "" ; this.TargetElement = null ; this.IFrame = null ; this.Document = null ; this.Textarea = null ; if ( this.Window ) { this.Window._FCKEditingArea = null ; this.Window = null ; } }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Class for working with a selection range, much like the W3C DOM Range, but * it is not intended to be an implementation of the W3C interface. */ var FCKDomRange = function( sourceWindow ) { this.Window = sourceWindow ; this._Cache = {} ; } FCKDomRange.prototype = { _UpdateElementInfo : function() { var innerRange = this._Range ; if ( !innerRange ) this.Release( true ) ; else { // For text nodes, the node itself is the StartNode. var eStart = innerRange.startContainer ; var oElementPath = new FCKElementPath( eStart ) ; this.StartNode = eStart.nodeType == 3 ? eStart : eStart.childNodes[ innerRange.startOffset ] ; this.StartContainer = eStart ; this.StartBlock = oElementPath.Block ; this.StartBlockLimit = oElementPath.BlockLimit ; if ( innerRange.collapsed ) { this.EndNode = this.StartNode ; this.EndContainer = this.StartContainer ; this.EndBlock = this.StartBlock ; this.EndBlockLimit = this.StartBlockLimit ; } else { var eEnd = innerRange.endContainer ; if ( eStart != eEnd ) oElementPath = new FCKElementPath( eEnd ) ; // The innerRange.endContainer[ innerRange.endOffset ] is not // usually part of the range, but the marker for the range end. So, // let's get the previous available node as the real end. var eEndNode = eEnd ; if ( innerRange.endOffset == 0 ) { while ( eEndNode && !eEndNode.previousSibling ) eEndNode = eEndNode.parentNode ; if ( eEndNode ) eEndNode = eEndNode.previousSibling ; } else if ( eEndNode.nodeType == 1 ) eEndNode = eEndNode.childNodes[ innerRange.endOffset - 1 ] ; this.EndNode = eEndNode ; this.EndContainer = eEnd ; this.EndBlock = oElementPath.Block ; this.EndBlockLimit = oElementPath.BlockLimit ; } } this._Cache = {} ; }, CreateRange : function() { return new FCKW3CRange( this.Window.document ) ; }, DeleteContents : function() { if ( this._Range ) { this._Range.deleteContents() ; this._UpdateElementInfo() ; } }, ExtractContents : function() { if ( this._Range ) { var docFrag = this._Range.extractContents() ; this._UpdateElementInfo() ; return docFrag ; } return null ; }, CheckIsCollapsed : function() { if ( this._Range ) return this._Range.collapsed ; return false ; }, Collapse : function( toStart ) { if ( this._Range ) this._Range.collapse( toStart ) ; this._UpdateElementInfo() ; }, Clone : function() { var oClone = FCKTools.CloneObject( this ) ; if ( this._Range ) oClone._Range = this._Range.cloneRange() ; return oClone ; }, MoveToNodeContents : function( targetNode ) { if ( !this._Range ) this._Range = this.CreateRange() ; this._Range.selectNodeContents( targetNode ) ; this._UpdateElementInfo() ; }, MoveToElementStart : function( targetElement ) { this.SetStart(targetElement,1) ; this.SetEnd(targetElement,1) ; }, // Moves to the first editing point inside a element. For example, in a // element tree like "<p><b><i></i></b> Text</p>", the start editing point // is "<p><b><i>^</i></b> Text</p>" (inside <i>). MoveToElementEditStart : function( targetElement ) { var editableElement ; while ( targetElement && targetElement.nodeType == 1 ) { if ( FCKDomTools.CheckIsEditable( targetElement ) ) editableElement = targetElement ; else if ( editableElement ) break ; // If we already found an editable element, stop the loop. targetElement = targetElement.firstChild ; } if ( editableElement ) this.MoveToElementStart( editableElement ) ; }, InsertNode : function( node ) { if ( this._Range ) this._Range.insertNode( node ) ; }, CheckIsEmpty : function() { if ( this.CheckIsCollapsed() ) return true ; // Inserts the contents of the range in a div tag. var eToolDiv = this.Window.document.createElement( 'div' ) ; this._Range.cloneContents().AppendTo( eToolDiv ) ; FCKDomTools.TrimNode( eToolDiv ) ; return ( eToolDiv.innerHTML.length == 0 ) ; }, /** * Checks if the start boundary of the current range is "visually" (like a * selection caret) at the beginning of the block. It means that some * things could be brefore the range, like spaces or empty inline elements, * but it would still be considered at the beginning of the block. */ CheckStartOfBlock : function() { var cache = this._Cache ; var bIsStartOfBlock = cache.IsStartOfBlock ; if ( bIsStartOfBlock != undefined ) return bIsStartOfBlock ; // Take the block reference. var block = this.StartBlock || this.StartBlockLimit ; var container = this._Range.startContainer ; var offset = this._Range.startOffset ; var currentNode ; if ( offset > 0 ) { // First, check the start container. If it is a text node, get the // substring of the node value before the range offset. if ( container.nodeType == 3 ) { var textValue = container.nodeValue.substr( 0, offset ).Trim() ; // If we have some text left in the container, we are not at // the end for the block. if ( textValue.length != 0 ) return cache.IsStartOfBlock = false ; } else currentNode = container.childNodes[ offset - 1 ] ; } // We'll not have a currentNode if the container was a text node, or // the offset is zero. if ( !currentNode ) currentNode = FCKDomTools.GetPreviousSourceNode( container, true, null, block ) ; while ( currentNode ) { switch ( currentNode.nodeType ) { case 1 : // It's not an inline element. if ( !FCKListsLib.InlineChildReqElements[ currentNode.nodeName.toLowerCase() ] ) return cache.IsStartOfBlock = false ; break ; case 3 : // It's a text node with real text. if ( currentNode.nodeValue.Trim().length > 0 ) return cache.IsStartOfBlock = false ; } currentNode = FCKDomTools.GetPreviousSourceNode( currentNode, false, null, block ) ; } return cache.IsStartOfBlock = true ; }, /** * Checks if the end boundary of the current range is "visually" (like a * selection caret) at the end of the block. It means that some things * could be after the range, like spaces, empty inline elements, or a * single <br>, but it would still be considered at the end of the block. */ CheckEndOfBlock : function( refreshSelection ) { var isEndOfBlock = this._Cache.IsEndOfBlock ; if ( isEndOfBlock != undefined ) return isEndOfBlock ; // Take the block reference. var block = this.EndBlock || this.EndBlockLimit ; var container = this._Range.endContainer ; var offset = this._Range.endOffset ; var currentNode ; // First, check the end container. If it is a text node, get the // substring of the node value after the range offset. if ( container.nodeType == 3 ) { var textValue = container.nodeValue ; if ( offset < textValue.length ) { textValue = textValue.substr( offset ) ; // If we have some text left in the container, we are not at // the end for the block. if ( textValue.Trim().length != 0 ) return this._Cache.IsEndOfBlock = false ; } } else currentNode = container.childNodes[ offset ] ; // We'll not have a currentNode if the container was a text node, of // the offset is out the container children limits (after it probably). if ( !currentNode ) currentNode = FCKDomTools.GetNextSourceNode( container, true, null, block ) ; var hadBr = false ; while ( currentNode ) { switch ( currentNode.nodeType ) { case 1 : var nodeName = currentNode.nodeName.toLowerCase() ; // It's an inline element. if ( FCKListsLib.InlineChildReqElements[ nodeName ] ) break ; // It is the first <br> found. if ( nodeName == 'br' && !hadBr ) { hadBr = true ; break ; } return this._Cache.IsEndOfBlock = false ; case 3 : // It's a text node with real text. if ( currentNode.nodeValue.Trim().length > 0 ) return this._Cache.IsEndOfBlock = false ; } currentNode = FCKDomTools.GetNextSourceNode( currentNode, false, null, block ) ; } if ( refreshSelection ) this.Select() ; return this._Cache.IsEndOfBlock = true ; }, // 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. // For performance, includeNodes=true if intended to SelectBookmark. CreateBookmark : function( includeNodes ) { // Create the bookmark info (random IDs). var oBookmark = { StartId : (new Date()).valueOf() + Math.floor(Math.random()*1000) + 'S', EndId : (new Date()).valueOf() + Math.floor(Math.random()*1000) + 'E' } ; var oDoc = this.Window.document ; var eStartSpan ; var eEndSpan ; var oClone ; // For collapsed ranges, add just the start marker. if ( !this.CheckIsCollapsed() ) { eEndSpan = oDoc.createElement( 'span' ) ; eEndSpan.style.display = 'none' ; eEndSpan.id = oBookmark.EndId ; eEndSpan.setAttribute( '_fck_bookmark', true ) ; // For IE, it must have something inside, otherwise it may be // removed during DOM operations. // if ( FCKBrowserInfo.IsIE ) eEndSpan.innerHTML = '&nbsp;' ; oClone = this.Clone() ; oClone.Collapse( false ) ; oClone.InsertNode( eEndSpan ) ; } eStartSpan = oDoc.createElement( 'span' ) ; eStartSpan.style.display = 'none' ; eStartSpan.id = oBookmark.StartId ; eStartSpan.setAttribute( '_fck_bookmark', true ) ; // For IE, it must have something inside, otherwise it may be removed // during DOM operations. // if ( FCKBrowserInfo.IsIE ) eStartSpan.innerHTML = '&nbsp;' ; oClone = this.Clone() ; oClone.Collapse( true ) ; oClone.InsertNode( eStartSpan ) ; if ( includeNodes ) { oBookmark.StartNode = eStartSpan ; oBookmark.EndNode = eEndSpan ; } // Update the range position. if ( eEndSpan ) { this.SetStart( eStartSpan, 4 ) ; this.SetEnd( eEndSpan, 3 ) ; } else this.MoveToPosition( eStartSpan, 4 ) ; return oBookmark ; }, // This one should be a part of a hypothetic "bookmark" object. GetBookmarkNode : function( bookmark, start ) { var doc = this.Window.document ; if ( start ) return bookmark.StartNode || doc.getElementById( bookmark.StartId ) ; else return bookmark.EndNode || doc.getElementById( bookmark.EndId ) ; }, MoveToBookmark : function( bookmark, preserveBookmark ) { var eStartSpan = this.GetBookmarkNode( bookmark, true ) ; var eEndSpan = this.GetBookmarkNode( bookmark, false ) ; this.SetStart( eStartSpan, 3 ) ; if ( !preserveBookmark ) FCKDomTools.RemoveNode( eStartSpan ) ; // If collapsed, the end span will not be available. if ( eEndSpan ) { this.SetEnd( eEndSpan, 3 ) ; if ( !preserveBookmark ) FCKDomTools.RemoveNode( eEndSpan ) ; } else this.Collapse( true ) ; this._UpdateElementInfo() ; }, // Non-intrusive bookmark algorithm CreateBookmark2 : function() { // 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 ( ! this._Range ) return { "Start" : 0, "End" : 0 } ; // First, we record down the offset values var bookmark = { "Start" : [ this._Range.startOffset ], "End" : [ this._Range.endOffset ] } ; // Since we're treating the document tree as normalized, we need to backtrack the text lengths // of previous text nodes into the offset value. var curStart = this._Range.startContainer.previousSibling ; var curEnd = this._Range.endContainer.previousSibling ; // Also note that the node that we use for "address base" would change during backtracking. var addrStart = this._Range.startContainer ; var addrEnd = this._Range.endContainer ; while ( curStart && curStart.nodeType == 3 && addrStart.nodeType == 3 ) { bookmark.Start[0] += curStart.length ; addrStart = curStart ; curStart = curStart.previousSibling ; } while ( curEnd && curEnd.nodeType == 3 && addrEnd.nodeType == 3 ) { bookmark.End[0] += curEnd.length ; addrEnd = curEnd ; curEnd = curEnd.previousSibling ; } // If the object pointed to by the startOffset and endOffset are text nodes, we need // to backtrack and add in the text offset to the bookmark addresses. if ( addrStart.nodeType == 1 && addrStart.childNodes[bookmark.Start[0]] && addrStart.childNodes[bookmark.Start[0]].nodeType == 3 ) { var curNode = addrStart.childNodes[bookmark.Start[0]] ; var offset = 0 ; while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 ) { curNode = curNode.previousSibling ; offset += curNode.length ; } addrStart = curNode ; bookmark.Start[0] = offset ; } if ( addrEnd.nodeType == 1 && addrEnd.childNodes[bookmark.End[0]] && addrEnd.childNodes[bookmark.End[0]].nodeType == 3 ) { var curNode = addrEnd.childNodes[bookmark.End[0]] ; var offset = 0 ; while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 ) { curNode = curNode.previousSibling ; offset += curNode.length ; } addrEnd = curNode ; bookmark.End[0] = offset ; } // Then, we record down the precise position of the container nodes // by walking up the DOM tree and counting their childNode index bookmark.Start = FCKDomTools.GetNodeAddress( addrStart, true ).concat( bookmark.Start ) ; bookmark.End = FCKDomTools.GetNodeAddress( addrEnd, true ).concat( bookmark.End ) ; return bookmark; }, MoveToBookmark2 : function( bookmark ) { // Reverse the childNode counting algorithm in CreateBookmark2() var curStart = FCKDomTools.GetNodeFromAddress( this.Window.document, bookmark.Start.slice( 0, -1 ), true ) ; var curEnd = FCKDomTools.GetNodeFromAddress( this.Window.document, bookmark.End.slice( 0, -1 ), true ) ; // Generate the W3C Range object and update relevant data this.Release( true ) ; this._Range = new FCKW3CRange( this.Window.document ) ; var startOffset = bookmark.Start[ bookmark.Start.length - 1 ] ; var endOffset = bookmark.End[ bookmark.End.length - 1 ] ; while ( curStart.nodeType == 3 && startOffset > curStart.length ) { if ( ! curStart.nextSibling || curStart.nextSibling.nodeType != 3 ) break ; startOffset -= curStart.length ; curStart = curStart.nextSibling ; } while ( curEnd.nodeType == 3 && endOffset > curEnd.length ) { if ( ! curEnd.nextSibling || curEnd.nextSibling.nodeType != 3 ) break ; endOffset -= curEnd.length ; curEnd = curEnd.nextSibling ; } this._Range.setStart( curStart, startOffset ) ; this._Range.setEnd( curEnd, endOffset ) ; this._UpdateElementInfo() ; }, MoveToPosition : function( targetElement, position ) { this.SetStart( targetElement, position ) ; this.Collapse( true ) ; }, /* * Moves the position of the start boundary of the range to a specific position * relatively to a element. * @position: * 1 = After Start <target>^contents</target> * 2 = Before End <target>contents^</target> * 3 = Before Start ^<target>contents</target> * 4 = After End <target>contents</target>^ */ SetStart : function( targetElement, position, noInfoUpdate ) { var oRange = this._Range ; if ( !oRange ) oRange = this._Range = this.CreateRange() ; switch( position ) { case 1 : // After Start <target>^contents</target> oRange.setStart( targetElement, 0 ) ; break ; case 2 : // Before End <target>contents^</target> oRange.setStart( targetElement, targetElement.childNodes.length ) ; break ; case 3 : // Before Start ^<target>contents</target> oRange.setStartBefore( targetElement ) ; break ; case 4 : // After End <target>contents</target>^ oRange.setStartAfter( targetElement ) ; } if ( !noInfoUpdate ) this._UpdateElementInfo() ; }, /* * Moves the position of the start boundary of the range to a specific position * relatively to a element. * @position: * 1 = After Start <target>^contents</target> * 2 = Before End <target>contents^</target> * 3 = Before Start ^<target>contents</target> * 4 = After End <target>contents</target>^ */ SetEnd : function( targetElement, position, noInfoUpdate ) { var oRange = this._Range ; if ( !oRange ) oRange = this._Range = this.CreateRange() ; switch( position ) { case 1 : // After Start <target>^contents</target> oRange.setEnd( targetElement, 0 ) ; break ; case 2 : // Before End <target>contents^</target> oRange.setEnd( targetElement, targetElement.childNodes.length ) ; break ; case 3 : // Before Start ^<target>contents</target> oRange.setEndBefore( targetElement ) ; break ; case 4 : // After End <target>contents</target>^ oRange.setEndAfter( targetElement ) ; } if ( !noInfoUpdate ) this._UpdateElementInfo() ; }, Expand : function( unit ) { var oNode, oSibling ; switch ( unit ) { // Expand the range to include all inline parent elements if we are // are in their boundary limits. // For example (where [ ] are the range limits): // Before => Some <b>[<i>Some sample text]</i></b>. // After => Some [<b><i>Some sample text</i></b>]. case 'inline_elements' : // Expand the start boundary. if ( this._Range.startOffset == 0 ) { oNode = this._Range.startContainer ; if ( oNode.nodeType != 1 ) oNode = oNode.previousSibling ? null : oNode.parentNode ; if ( oNode ) { while ( FCKListsLib.InlineNonEmptyElements[ oNode.nodeName.toLowerCase() ] ) { this._Range.setStartBefore( oNode ) ; if ( oNode != oNode.parentNode.firstChild ) break ; oNode = oNode.parentNode ; } } } // Expand the end boundary. oNode = this._Range.endContainer ; var offset = this._Range.endOffset ; if ( ( oNode.nodeType == 3 && offset >= oNode.nodeValue.length ) || ( oNode.nodeType == 1 && offset >= oNode.childNodes.length ) || ( oNode.nodeType != 1 && oNode.nodeType != 3 ) ) { if ( oNode.nodeType != 1 ) oNode = oNode.nextSibling ? null : oNode.parentNode ; if ( oNode ) { while ( FCKListsLib.InlineNonEmptyElements[ oNode.nodeName.toLowerCase() ] ) { this._Range.setEndAfter( oNode ) ; if ( oNode != oNode.parentNode.lastChild ) break ; oNode = oNode.parentNode ; } } } break ; case 'block_contents' : case 'list_contents' : var boundarySet = FCKListsLib.BlockBoundaries ; if ( unit == 'list_contents' || FCKConfig.EnterMode == 'br' ) boundarySet = FCKListsLib.ListBoundaries ; if ( this.StartBlock && FCKConfig.EnterMode != 'br' && unit == 'block_contents' ) this.SetStart( this.StartBlock, 1 ) ; else { // Get the start node for the current range. oNode = this._Range.startContainer ; // If it is an element, get the node right before of it (in source order). if ( oNode.nodeType == 1 ) { var lastNode = oNode.childNodes[ this._Range.startOffset ] ; if ( lastNode ) oNode = FCKDomTools.GetPreviousSourceNode( lastNode, true ) ; else oNode = oNode.lastChild || oNode ; } // We must look for the left boundary, relative to the range // start, which is limited by a block element. while ( oNode && ( oNode.nodeType != 1 || ( oNode != this.StartBlockLimit && !boundarySet[ oNode.nodeName.toLowerCase() ] ) ) ) { this._Range.setStartBefore( oNode ) ; oNode = oNode.previousSibling || oNode.parentNode ; } } if ( this.EndBlock && FCKConfig.EnterMode != 'br' && unit == 'block_contents' && this.EndBlock.nodeName.toLowerCase() != 'li' ) this.SetEnd( this.EndBlock, 2 ) ; else { oNode = this._Range.endContainer ; if ( oNode.nodeType == 1 ) oNode = oNode.childNodes[ this._Range.endOffset ] || oNode.lastChild ; // We must look for the right boundary, relative to the range // end, which is limited by a block element. while ( oNode && ( oNode.nodeType != 1 || ( oNode != this.StartBlockLimit && !boundarySet[ oNode.nodeName.toLowerCase() ] ) ) ) { this._Range.setEndAfter( oNode ) ; oNode = oNode.nextSibling || oNode.parentNode ; } // In EnterMode='br', the end <br> boundary element must // be included in the expanded range. if ( oNode && oNode.nodeName.toLowerCase() == 'br' ) this._Range.setEndAfter( oNode ) ; } this._UpdateElementInfo() ; } }, /** * Split the block element for the current range. It deletes the contents * of the range and splits the block in the collapsed position, resulting * in two sucessive blocks. The range is then positioned in the middle of * them. * * It returns and object with the following properties: * - PreviousBlock : a reference to the block element that preceeds * the range after the split. * - NextBlock : a reference to the block element that follows the * range after the split. * - WasStartOfBlock : a boolean indicating that the range was * originaly at the start of the block. * - WasEndOfBlock : a boolean indicating that the range was originaly * at the end of the block. * * If the range was originaly at the start of the block, no split will happen * and the PreviousBlock value will be null. The same is valid for the * NextBlock value if the range was at the end of the block. */ SplitBlock : function( forceBlockTag ) { var blockTag = forceBlockTag || FCKConfig.EnterMode ; if ( !this._Range ) this.MoveToSelection() ; // The range boundaries must be in the same "block limit" element. if ( this.StartBlockLimit == this.EndBlockLimit ) { // Get the current blocks. var eStartBlock = this.StartBlock ; var eEndBlock = this.EndBlock ; var oElementPath = null ; if ( blockTag != 'br' ) { if ( !eStartBlock ) { eStartBlock = this.FixBlock( true, blockTag ) ; eEndBlock = this.EndBlock ; // FixBlock may have fixed the EndBlock too. } if ( !eEndBlock ) eEndBlock = this.FixBlock( false, blockTag ) ; } // Get the range position. var bIsStartOfBlock = ( eStartBlock != null && this.CheckStartOfBlock() ) ; var bIsEndOfBlock = ( eEndBlock != null && this.CheckEndOfBlock() ) ; // Delete the current contents. if ( !this.CheckIsEmpty() ) this.DeleteContents() ; if ( eStartBlock && eEndBlock && eStartBlock == eEndBlock ) { if ( bIsEndOfBlock ) { oElementPath = new FCKElementPath( this.StartContainer ) ; this.MoveToPosition( eEndBlock, 4 ) ; eEndBlock = null ; } else if ( bIsStartOfBlock ) { oElementPath = new FCKElementPath( this.StartContainer ) ; this.MoveToPosition( eStartBlock, 3 ) ; eStartBlock = null ; } else { // Extract the contents of the block from the selection point to the end of its contents. this.SetEnd( eStartBlock, 2 ) ; var eDocFrag = this.ExtractContents() ; // Duplicate the block element after it. eEndBlock = eStartBlock.cloneNode( false ) ; eEndBlock.removeAttribute( 'id', false ) ; // Place the extracted contents in the duplicated block. eDocFrag.AppendTo( eEndBlock ) ; FCKDomTools.InsertAfterNode( eStartBlock, eEndBlock ) ; this.MoveToPosition( eStartBlock, 4 ) ; // 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 ( FCKBrowserInfo.IsGecko && ! eStartBlock.nodeName.IEquals( ['ul', 'ol'] ) ) FCKTools.AppendBogusBr( eStartBlock ) ; } } return { PreviousBlock : eStartBlock, NextBlock : eEndBlock, WasStartOfBlock : bIsStartOfBlock, WasEndOfBlock : bIsEndOfBlock, ElementPath : oElementPath } ; } return null ; }, // Transform a block without a block tag in a valid block (orphan text in the body or td, usually). FixBlock : function( isStart, blockTag ) { // Bookmark the range so we can restore it later. var oBookmark = this.CreateBookmark() ; // Collapse the range to the requested ending boundary. this.Collapse( isStart ) ; // Expands it to the block contents. this.Expand( 'block_contents' ) ; // Create the fixed block. var oFixedBlock = this.Window.document.createElement( blockTag ) ; // Move the contents of the temporary range to the fixed block. this.ExtractContents().AppendTo( oFixedBlock ) ; FCKDomTools.TrimNode( oFixedBlock ) ; // If the fixed block is empty (not counting bookmark nodes) // Add a <br /> inside to expand it. if ( FCKDomTools.CheckIsEmptyElement(oFixedBlock, function( element ) { return element.getAttribute('_fck_bookmark') != 'true' ; } ) && FCKBrowserInfo.IsGeckoLike ) FCKTools.AppendBogusBr( oFixedBlock ) ; // Insert the fixed block into the DOM. this.InsertNode( oFixedBlock ) ; // Move the range back to the bookmarked place. this.MoveToBookmark( oBookmark ) ; return oFixedBlock ; }, Release : function( preserveWindow ) { if ( !preserveWindow ) this.Window = null ; this.StartNode = null ; this.StartContainer = null ; this.StartBlock = null ; this.StartBlockLimit = null ; this.EndNode = null ; this.EndContainer = null ; this.EndBlock = null ; this.EndBlockLimit = null ; this._Range = null ; this._Cache = null ; }, CheckHasRange : function() { return !!this._Range ; }, GetTouchedStartNode : function() { var range = this._Range ; var container = range.startContainer ; if ( range.collapsed || container.nodeType != 1 ) return container ; return container.childNodes[ range.startOffset ] || container ; }, GetTouchedEndNode : function() { var range = this._Range ; var container = range.endContainer ; if ( range.collapsed || container.nodeType != 1 ) return container ; return container.childNodes[ range.endOffset - 1 ] || container ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This class can be used to interate through nodes inside a range. * * During interation, the provided range can become invalid, due to document * mutations, so CreateBookmark() used to restore it after processing, if * needed. */ var FCKDomRangeIterator = function( range ) { /** * The FCKDomRange object that marks the interation boundaries. */ this.Range = range ; /** * Indicates that <br> elements must be used as paragraph boundaries. */ this.ForceBrBreak = false ; /** * Guarantees that the iterator will always return "real" block elements. * If "false", elements like <li>, <th> and <td> are returned. If "true", a * dedicated block element block element will be created inside those * elements to hold the selected content. */ this.EnforceRealBlocks = false ; } FCKDomRangeIterator.CreateFromSelection = function( targetWindow ) { var range = new FCKDomRange( targetWindow ) ; range.MoveToSelection() ; return new FCKDomRangeIterator( range ) ; } FCKDomRangeIterator.prototype = { /** * Get the next paragraph element. It automatically breaks the document * when necessary to generate block elements for the paragraphs. */ GetNextParagraph : function() { // The block element to be returned. var block ; // The range object used to identify the paragraph contents. var range ; // Indicated that the current element in the loop is the last one. var isLast ; // Instructs to cleanup remaining BRs. var removePreviousBr ; var removeLastBr ; var boundarySet = this.ForceBrBreak ? FCKListsLib.ListBoundaries : FCKListsLib.BlockBoundaries ; // This is the first iteration. Let's initialize it. if ( !this._LastNode ) { var range = this.Range.Clone() ; range.Expand( this.ForceBrBreak ? 'list_contents' : 'block_contents' ) ; this._NextNode = range.GetTouchedStartNode() ; this._LastNode = range.GetTouchedEndNode() ; // Let's reuse this variable. range = null ; } var currentNode = this._NextNode ; var lastNode = this._LastNode ; this._NextNode = null ; while ( currentNode ) { // closeRange indicates that a paragraph boundary has been found, // so the range can be closed. var closeRange = false ; // includeNode indicates that the current node is good to be part // of the range. By default, any non-element node is ok for it. var includeNode = ( currentNode.nodeType != 1 ) ; var continueFromSibling = false ; // If it is an element node, let's check if it can be part of the // range. if ( !includeNode ) { var nodeName = currentNode.nodeName.toLowerCase() ; if ( boundarySet[ nodeName ] && ( !FCKBrowserInfo.IsIE || currentNode.scopeName == 'HTML' ) ) { // <br> boundaries must be part of the range. It will // happen only if ForceBrBreak. if ( nodeName == 'br' ) includeNode = true ; else if ( !range && currentNode.childNodes.length == 0 && nodeName != 'hr' ) { // If we have found an empty block, and haven't started // the range yet, it means we must return this block. block = currentNode ; isLast = currentNode == lastNode ; break ; } // The range must finish right before the boundary, // including possibly skipped empty spaces. (#1603) if ( range ) { range.SetEnd( currentNode, 3, true ) ; // The found boundary must be set as the next one at this // point. (#1717) if ( nodeName != 'br' ) this._NextNode = FCKDomTools.GetNextSourceNode( currentNode, true, null, lastNode ) || currentNode ; } closeRange = true ; } else { // If we have child nodes, let's check them. if ( currentNode.firstChild ) { // If we don't have a range yet, let's start it. if ( !range ) { range = new FCKDomRange( this.Range.Window ) ; range.SetStart( currentNode, 3, true ) ; } currentNode = currentNode.firstChild ; continue ; } includeNode = true ; } } else if ( currentNode.nodeType == 3 ) { // Ignore normal whitespaces (i.e. not including &nbsp; or // other unicode whitespaces) before/after a block node. if ( /^[\r\n\t ]+$/.test( currentNode.nodeValue ) ) includeNode = false ; } // The current node is good to be part of the range and we are // starting a new range, initialize it first. if ( includeNode && !range ) { range = new FCKDomRange( this.Range.Window ) ; range.SetStart( currentNode, 3, true ) ; } // The last node has been found. isLast = ( ( !closeRange || includeNode ) && currentNode == lastNode ) ; // isLast = ( currentNode == lastNode && ( currentNode.nodeType != 1 || currentNode.childNodes.length == 0 ) ) ; // If we are in an element boundary, let's check if it is time // to close the range, otherwise we include the parent within it. if ( range && !closeRange ) { while ( !currentNode.nextSibling && !isLast ) { var parentNode = currentNode.parentNode ; if ( boundarySet[ parentNode.nodeName.toLowerCase() ] ) { closeRange = true ; isLast = isLast || ( parentNode == lastNode ) ; break ; } currentNode = parentNode ; includeNode = true ; isLast = ( currentNode == lastNode ) ; continueFromSibling = true ; } } // Now finally include the node. if ( includeNode ) range.SetEnd( currentNode, 4, true ) ; // We have found a block boundary. Let's close the range and move out of the // loop. if ( ( closeRange || isLast ) && range ) { range._UpdateElementInfo() ; if ( range.StartNode == range.EndNode && range.StartNode.parentNode == range.StartBlockLimit && range.StartNode.getAttribute && range.StartNode.getAttribute( '_fck_bookmark' ) ) range = null ; else break ; } if ( isLast ) break ; currentNode = FCKDomTools.GetNextSourceNode( currentNode, continueFromSibling, null, lastNode ) ; } // Now, based on the processed range, look for (or create) the block to be returned. if ( !block ) { // If no range has been found, this is the end. if ( !range ) { this._NextNode = null ; return null ; } block = range.StartBlock ; if ( !block && !this.EnforceRealBlocks && range.StartBlockLimit.nodeName.IEquals( 'DIV', 'TH', 'TD' ) && range.CheckStartOfBlock() && range.CheckEndOfBlock() ) { block = range.StartBlockLimit ; } else if ( !block || ( this.EnforceRealBlocks && block.nodeName.toLowerCase() == 'li' ) ) { // Create the fixed block. block = this.Range.Window.document.createElement( FCKConfig.EnterMode == 'p' ? 'p' : 'div' ) ; // Move the contents of the temporary range to the fixed block. range.ExtractContents().AppendTo( block ) ; FCKDomTools.TrimNode( block ) ; // Insert the fixed block into the DOM. range.InsertNode( block ) ; removePreviousBr = true ; removeLastBr = true ; } else if ( block.nodeName.toLowerCase() != 'li' ) { // If the range doesn't includes the entire contents of the // block, we must split it, isolating the range in a dedicated // block. if ( !range.CheckStartOfBlock() || !range.CheckEndOfBlock() ) { // The resulting block will be a clone of the current one. block = block.cloneNode( false ) ; // Extract the range contents, moving it to the new block. range.ExtractContents().AppendTo( block ) ; FCKDomTools.TrimNode( block ) ; // Split the block. At this point, the range will be in the // right position for our intents. var splitInfo = range.SplitBlock() ; removePreviousBr = !splitInfo.WasStartOfBlock ; removeLastBr = !splitInfo.WasEndOfBlock ; // Insert the new block into the DOM. range.InsertNode( block ) ; } } else if ( !isLast ) { // LIs are returned as is, with all their children (due to the // nested lists). But, the next node is the node right after // the current range, which could be an <li> child (nested // lists) or the next sibling <li>. this._NextNode = block == lastNode ? null : FCKDomTools.GetNextSourceNode( range.EndNode, true, null, lastNode ) ; return block ; } } if ( removePreviousBr ) { var previousSibling = block.previousSibling ; if ( previousSibling && previousSibling.nodeType == 1 ) { if ( previousSibling.nodeName.toLowerCase() == 'br' ) previousSibling.parentNode.removeChild( previousSibling ) ; else if ( previousSibling.lastChild && previousSibling.lastChild.nodeName.IEquals( 'br' ) ) previousSibling.removeChild( previousSibling.lastChild ) ; } } if ( removeLastBr ) { var lastChild = block.lastChild ; if ( lastChild && lastChild.nodeType == 1 && lastChild.nodeName.toLowerCase() == 'br' ) block.removeChild( lastChild ) ; } // Get a reference for the next element. This is important because the // above block can be removed or changed, so we can rely on it for the // next interation. if ( !this._NextNode ) this._NextNode = ( isLast || block == lastNode ) ? null : FCKDomTools.GetNextSourceNode( block, true, null, lastNode ) ; return block ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This class can be used to interate through nodes inside a range. * * During interation, the provided range can become invalid, due to document * mutations, so CreateBookmark() used to restore it after processing, if * needed. */ var FCKHtmlIterator = function( source ) { this._sourceHtml = source ; } FCKHtmlIterator.prototype = { Next : function() { var sourceHtml = this._sourceHtml ; if ( sourceHtml == null ) return null ; var match = FCKRegexLib.HtmlTag.exec( sourceHtml ) ; var isTag = false ; var value = "" ; if ( match ) { if ( match.index > 0 ) { value = sourceHtml.substr( 0, match.index ) ; this._sourceHtml = sourceHtml.substr( match.index ) ; } else { isTag = true ; value = match[0] ; this._sourceHtml = sourceHtml.substr( match[0].length ) ; } } else { value = sourceHtml ; this._sourceHtml = null ; } return { 'isTag' : isTag, 'value' : value } ; }, Each : function( func ) { var chunk ; while ( ( chunk = this.Next() ) ) func( chunk.isTag, chunk.value ) ; } } ; /* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This class can be used to interate through nodes inside a range. * * During interation, the provided range can become invalid, due to document * mutations, so CreateBookmark() used to restore it after processing, if * needed. */ var FCKHtmlIterator = function( source ) { this._sourceHtml = source ; } FCKHtmlIterator.prototype = { Next : function() { var sourceHtml = this._sourceHtml ; if ( sourceHtml == null ) return null ; var match = FCKRegexLib.HtmlTag.exec( sourceHtml ) ; var isTag = false ; var value = "" ; if ( match ) { if ( match.index > 0 ) { value = sourceHtml.substr( 0, match.index ) ; this._sourceHtml = sourceHtml.substr( match.index ) ; } else { isTag = true ; value = match[0] ; this._sourceHtml = sourceHtml.substr( match[0].length ) ; } } else { value = sourceHtml ; this._sourceHtml = null ; } return { 'isTag' : isTag, 'value' : value } ; }, Each : function( func ) { var chunk ; while ( ( chunk = this.Next() ) ) func( chunk.isTag, chunk.value ) ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKEvents Class: used to handle events is a advanced way. */ var FCKEvents = function( eventsOwner ) { this.Owner = eventsOwner ; this._RegisteredEvents = new Object() ; } FCKEvents.prototype.AttachEvent = function( eventName, functionPointer ) { var aTargets ; if ( !( aTargets = this._RegisteredEvents[ eventName ] ) ) this._RegisteredEvents[ eventName ] = [ functionPointer ] ; else { // Check that the event handler isn't already registered with the same listener // It doesn't detect function pointers belonging to an object (at least in Gecko) if ( aTargets.IndexOf( functionPointer ) == -1 ) aTargets.push( functionPointer ) ; } } FCKEvents.prototype.FireEvent = function( eventName, params ) { var bReturnValue = true ; var oCalls = this._RegisteredEvents[ eventName ] ; if ( oCalls ) { for ( var i = 0 ; i < oCalls.length ; i++ ) { try { bReturnValue = ( oCalls[ i ]( this.Owner, params ) && bReturnValue ) ; } catch(e) { // Ignore the following error. It may happen if pointing to a // script not anymore available (#934): // -2146823277 = Can't execute code from a freed script if ( e.number != -2146823277 ) throw e ; } } } return bReturnValue ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKXml Class: class to load and manipulate XML files. * (IE specific implementation) */ FCKXml.prototype = { LoadUrl : function( urlToCall ) { this.Error = false ; var oXmlHttp = FCKTools.CreateXmlObject( 'XmlHttp' ) ; if ( !oXmlHttp ) { this.Error = true ; return ; } oXmlHttp.open( "GET", urlToCall, false ) ; oXmlHttp.send( null ) ; if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 || ( oXmlHttp.status == 0 && oXmlHttp.readyState == 4 ) ) { this.DOMDocument = oXmlHttp.responseXML ; // #1426: Fallback if responseXML isn't set for some // reason (e.g. improperly configured web server) if ( !this.DOMDocument || this.DOMDocument.firstChild == null ) { this.DOMDocument = FCKTools.CreateXmlObject( 'DOMDocument' ) ; this.DOMDocument.async = false ; this.DOMDocument.resolveExternals = false ; this.DOMDocument.loadXML( oXmlHttp.responseText ) ; } } else { this.DOMDocument = null ; } if ( this.DOMDocument == null || this.DOMDocument.firstChild == null ) { this.Error = true ; if (window.confirm( 'Error loading "' + urlToCall + '"\r\nDo you want to see more info?' ) ) alert( 'URL requested: "' + urlToCall + '"\r\n' + 'Server response:\r\nStatus: ' + oXmlHttp.status + '\r\n' + 'Response text:\r\n' + oXmlHttp.responseText ) ; } }, SelectNodes : function( xpath, contextNode ) { if ( this.Error ) return new Array() ; if ( contextNode ) return contextNode.selectNodes( xpath ) ; else return this.DOMDocument.selectNodes( xpath ) ; }, SelectSingleNode : function( xpath, contextNode ) { if ( this.Error ) return null ; if ( contextNode ) return contextNode.selectSingleNode( xpath ) ; else return this.DOMDocument.selectSingleNode( xpath ) ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Preload a list of images, firing an event when complete. */ var FCKImagePreloader = function() { this._Images = new Array() ; } FCKImagePreloader.prototype = { AddImages : function( images ) { if ( typeof( images ) == 'string' ) images = images.split( ';' ) ; this._Images = this._Images.concat( images ) ; }, Start : function() { var aImages = this._Images ; this._PreloadCount = aImages.length ; for ( var i = 0 ; i < aImages.length ; i++ ) { var eImg = document.createElement( 'img' ) ; FCKTools.AddEventListenerEx( eImg, 'load', _FCKImagePreloader_OnImage, this ) ; FCKTools.AddEventListenerEx( eImg, 'error', _FCKImagePreloader_OnImage, this ) ; eImg.src = aImages[i] ; _FCKImagePreloader_ImageCache.push( eImg ) ; } } }; // All preloaded images must be placed in a global array, otherwise the preload // magic will not happen. var _FCKImagePreloader_ImageCache = new Array() ; function _FCKImagePreloader_OnImage( ev, imagePreloader ) { if ( (--imagePreloader._PreloadCount) == 0 && imagePreloader.OnComplete ) imagePreloader.OnComplete() ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKXml Class: class to load and manipulate XML files. * (IE specific implementation) */ var FCKXml = function() { this.Error = false ; } FCKXml.GetAttribute = function( node, attName, defaultValue ) { var attNode = node.attributes.getNamedItem( attName ) ; return attNode ? attNode.value : defaultValue ; } /** * Transforms a XML element node in a JavaScript object. Attributes defined for * the element will be available as properties, as long as child element * nodes, but the later will generate arrays with property names prefixed with "$". * * For example, the following XML element: * * <SomeNode name="Test" key="2"> * <MyChild id="10"> * <OtherLevel name="Level 3" /> * </MyChild> * <MyChild id="25" /> * <AnotherChild price="499" /> * </SomeNode> * * ... results in the following object: * * { * name : "Test", * key : "2", * $MyChild : * [ * { * id : "10", * $OtherLevel : * { * name : "Level 3" * } * }, * { * id : "25" * } * ], * $AnotherChild : * [ * { * price : "499" * } * ] * } */ FCKXml.TransformToObject = function( element ) { if ( !element ) return null ; var obj = {} ; var attributes = element.attributes ; for ( var i = 0 ; i < attributes.length ; i++ ) { var att = attributes[i] ; obj[ att.name ] = att.value ; } var childNodes = element.childNodes ; for ( i = 0 ; i < childNodes.length ; i++ ) { var child = childNodes[i] ; if ( child.nodeType == 1 ) { var childName = '$' + child.nodeName ; var childList = obj[ childName ] ; if ( !childList ) childList = obj[ childName ] = [] ; childList.push( this.TransformToObject( child ) ) ; } } return obj ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Renders a list of menu items. */ var FCKMenuBlock = function() { this._Items = new Array() ; } FCKMenuBlock.prototype.Count = function() { return this._Items.length ; } FCKMenuBlock.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) { var oItem = new FCKMenuItem( this, name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ; oItem.OnClick = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnClick, this ) ; oItem.OnActivate = FCKTools.CreateEventListener( FCKMenuBlock_Item_OnActivate, this ) ; this._Items.push( oItem ) ; return oItem ; } FCKMenuBlock.prototype.AddSeparator = function() { this._Items.push( new FCKMenuSeparator() ) ; } FCKMenuBlock.prototype.RemoveAllItems = function() { this._Items = new Array() ; var eItemsTable = this._ItemsTable ; if ( eItemsTable ) { while ( eItemsTable.rows.length > 0 ) eItemsTable.deleteRow( 0 ) ; } } FCKMenuBlock.prototype.Create = function( parentElement ) { if ( !this._ItemsTable ) { if ( FCK.IECleanup ) FCK.IECleanup.AddItem( this, FCKMenuBlock_Cleanup ) ; this._Window = FCKTools.GetElementWindow( parentElement ) ; var oDoc = FCKTools.GetElementDocument( parentElement ) ; var eTable = parentElement.appendChild( oDoc.createElement( 'table' ) ) ; eTable.cellPadding = 0 ; eTable.cellSpacing = 0 ; FCKTools.DisableSelection( eTable ) ; var oMainElement = eTable.insertRow(-1).insertCell(-1) ; oMainElement.className = 'MN_Menu' ; var eItemsTable = this._ItemsTable = oMainElement.appendChild( oDoc.createElement( 'table' ) ) ; eItemsTable.cellPadding = 0 ; eItemsTable.cellSpacing = 0 ; } for ( var i = 0 ; i < this._Items.length ; i++ ) this._Items[i].Create( this._ItemsTable ) ; } /* Events */ function FCKMenuBlock_Item_OnClick( clickedItem, menuBlock ) { if ( menuBlock.Hide ) menuBlock.Hide() ; FCKTools.RunFunction( menuBlock.OnClick, menuBlock, [ clickedItem ] ) ; } function FCKMenuBlock_Item_OnActivate( menuBlock ) { var oActiveItem = menuBlock._ActiveItem ; if ( oActiveItem && oActiveItem != this ) { // Set the focus to this menu block window (to fire OnBlur on opened panels). if ( !FCKBrowserInfo.IsIE && oActiveItem.HasSubMenu && !this.HasSubMenu ) { menuBlock._Window.focus() ; // Due to the event model provided by Opera, we need to set // HasFocus here as the above focus() call will not fire the focus // event in the panel immediately (#1200). menuBlock.Panel.HasFocus = true ; } oActiveItem.Deactivate() ; } menuBlock._ActiveItem = this ; } function FCKMenuBlock_Cleanup() { this._Window = null ; this._ItemsTable = null ; } // ################# // var FCKMenuSeparator = function() {} FCKMenuSeparator.prototype.Create = function( parentTable ) { var oDoc = FCKTools.GetElementDocument( parentTable ) ; var r = parentTable.insertRow(-1) ; var eCell = r.insertCell(-1) ; eCell.className = 'MN_Separator MN_Icon' ; eCell = r.insertCell(-1) ; eCell.className = 'MN_Separator' ; eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ; eCell = r.insertCell(-1) ; eCell.className = 'MN_Separator' ; eCell.appendChild( oDoc.createElement( 'DIV' ) ).className = 'MN_Separator_Line' ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Defines and renders a menu items in a menu block. */ var FCKMenuItem = function( parentMenuBlock, name, label, iconPathOrStripInfoArray, isDisabled, customData ) { this.Name = name ; this.Label = label || name ; this.IsDisabled = isDisabled ; this.Icon = new FCKIcon( iconPathOrStripInfoArray ) ; this.SubMenu = new FCKMenuBlockPanel() ; this.SubMenu.Parent = parentMenuBlock ; this.SubMenu.OnClick = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnClick, this ) ; this.CustomData = customData ; if ( FCK.IECleanup ) FCK.IECleanup.AddItem( this, FCKMenuItem_Cleanup ) ; } FCKMenuItem.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) { this.HasSubMenu = true ; return this.SubMenu.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ; } FCKMenuItem.prototype.AddSeparator = function() { this.SubMenu.AddSeparator() ; } FCKMenuItem.prototype.Create = function( parentTable ) { var bHasSubMenu = this.HasSubMenu ; var oDoc = FCKTools.GetElementDocument( parentTable ) ; // Add a row in the table to hold the menu item. var r = this.MainElement = parentTable.insertRow(-1) ; r.className = this.IsDisabled ? 'MN_Item_Disabled' : 'MN_Item' ; // Set the row behavior. if ( !this.IsDisabled ) { FCKTools.AddEventListenerEx( r, 'mouseover', FCKMenuItem_OnMouseOver, [ this ] ) ; FCKTools.AddEventListenerEx( r, 'click', FCKMenuItem_OnClick, [ this ] ) ; if ( !bHasSubMenu ) FCKTools.AddEventListenerEx( r, 'mouseout', FCKMenuItem_OnMouseOut, [ this ] ) ; } // Create the icon cell. var eCell = r.insertCell(-1) ; eCell.className = 'MN_Icon' ; eCell.appendChild( this.Icon.CreateIconElement( oDoc ) ) ; // Create the label cell. eCell = r.insertCell(-1) ; eCell.className = 'MN_Label' ; eCell.noWrap = true ; eCell.appendChild( oDoc.createTextNode( this.Label ) ) ; // Create the arrow cell and setup the sub menu panel (if needed). eCell = r.insertCell(-1) ; if ( bHasSubMenu ) { eCell.className = 'MN_Arrow' ; // The arrow is a fixed size image. var eArrowImg = eCell.appendChild( oDoc.createElement( 'IMG' ) ) ; eArrowImg.src = FCK_IMAGES_PATH + 'arrow_' + FCKLang.Dir + '.gif' ; eArrowImg.width = 4 ; eArrowImg.height = 7 ; this.SubMenu.Create() ; this.SubMenu.Panel.OnHide = FCKTools.CreateEventListener( FCKMenuItem_SubMenu_OnHide, this ) ; } } FCKMenuItem.prototype.Activate = function() { this.MainElement.className = 'MN_Item_Over' ; if ( this.HasSubMenu ) { // Show the child menu block. The ( +2, -2 ) correction is done because // of the padding in the skin. It is not a good solution because one // could change the skin and so the final result would not be accurate. // For now it is ok because we are controlling the skin. this.SubMenu.Show( this.MainElement.offsetWidth + 2, -2, this.MainElement ) ; } FCKTools.RunFunction( this.OnActivate, this ) ; } FCKMenuItem.prototype.Deactivate = function() { this.MainElement.className = 'MN_Item' ; if ( this.HasSubMenu ) this.SubMenu.Hide() ; } /* Events */ function FCKMenuItem_SubMenu_OnClick( clickedItem, listeningItem ) { FCKTools.RunFunction( listeningItem.OnClick, listeningItem, [ clickedItem ] ) ; } function FCKMenuItem_SubMenu_OnHide( menuItem ) { menuItem.Deactivate() ; } function FCKMenuItem_OnClick( ev, menuItem ) { if ( menuItem.HasSubMenu ) menuItem.Activate() ; else { menuItem.Deactivate() ; FCKTools.RunFunction( menuItem.OnClick, menuItem, [ menuItem ] ) ; } } function FCKMenuItem_OnMouseOver( ev, menuItem ) { menuItem.Activate() ; } function FCKMenuItem_OnMouseOut( ev, menuItem ) { menuItem.Deactivate() ; } function FCKMenuItem_Cleanup() { this.MainElement = null ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKContextMenu Class: renders an control a context menu. */ var FCKContextMenu = function( parentWindow, langDir ) { this.CtrlDisable = false ; var oPanel = this._Panel = new FCKPanel( parentWindow ) ; oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; oPanel.IsContextMenu = true ; // The FCKTools.DisableSelection doesn't seems to work to avoid dragging of the icons in Mozilla // so we stop the start of the dragging if ( FCKBrowserInfo.IsGecko ) oPanel.Document.addEventListener( 'draggesture', function(e) {e.preventDefault(); return false;}, true ) ; var oMenuBlock = this._MenuBlock = new FCKMenuBlock() ; oMenuBlock.Panel = oPanel ; oMenuBlock.OnClick = FCKTools.CreateEventListener( FCKContextMenu_MenuBlock_OnClick, this ) ; this._Redraw = true ; } FCKContextMenu.prototype.SetMouseClickWindow = function( mouseClickWindow ) { if ( !FCKBrowserInfo.IsIE ) { this._Document = mouseClickWindow.document ; if ( FCKBrowserInfo.IsOpera && !( 'oncontextmenu' in document.createElement('foo') ) ) { this._Document.addEventListener( 'mousedown', FCKContextMenu_Document_OnMouseDown, false ) ; this._Document.addEventListener( 'mouseup', FCKContextMenu_Document_OnMouseUp, false ) ; } this._Document.addEventListener( 'contextmenu', FCKContextMenu_Document_OnContextMenu, false ) ; } } /** The customData parameter is just a value that will be send to the command that is executed, so it's possible to reuse the same command for several items just by assigning different data for each one. */ FCKContextMenu.prototype.AddItem = function( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) { var oItem = this._MenuBlock.AddItem( name, label, iconPathOrStripInfoArrayOrIndex, isDisabled, customData ) ; this._Redraw = true ; return oItem ; } FCKContextMenu.prototype.AddSeparator = function() { this._MenuBlock.AddSeparator() ; this._Redraw = true ; } FCKContextMenu.prototype.RemoveAllItems = function() { this._MenuBlock.RemoveAllItems() ; this._Redraw = true ; } FCKContextMenu.prototype.AttachToElement = function( element ) { if ( FCKBrowserInfo.IsIE ) FCKTools.AddEventListenerEx( element, 'contextmenu', FCKContextMenu_AttachedElement_OnContextMenu, this ) ; else element._FCKContextMenu = this ; } function FCKContextMenu_Document_OnContextMenu( e ) { if ( FCKConfig.BrowserContextMenu ) return true ; var el = e.target ; while ( el ) { if ( el._FCKContextMenu ) { if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) ) return true ; FCKTools.CancelEvent( e ) ; FCKContextMenu_AttachedElement_OnContextMenu( e, el._FCKContextMenu, el ) ; return false ; } el = el.parentNode ; } return true ; } var FCKContextMenu_OverrideButton ; function FCKContextMenu_Document_OnMouseDown( e ) { if( !e || e.button != 2 ) return false ; if ( FCKConfig.BrowserContextMenu ) return true ; var el = e.target ; while ( el ) { if ( el._FCKContextMenu ) { if ( el._FCKContextMenu.CtrlDisable && ( e.ctrlKey || e.metaKey ) ) return true ; var overrideButton = FCKContextMenu_OverrideButton ; if( !overrideButton ) { var doc = FCKTools.GetElementDocument( e.target ) ; overrideButton = FCKContextMenu_OverrideButton = doc.createElement('input') ; overrideButton.type = 'button' ; var buttonHolder = doc.createElement('p') ; doc.body.appendChild( buttonHolder ) ; buttonHolder.appendChild( overrideButton ) ; } overrideButton.style.cssText = 'position:absolute;top:' + ( e.clientY - 2 ) + 'px;left:' + ( e.clientX - 2 ) + 'px;width:5px;height:5px;opacity:0.01' ; } el = el.parentNode ; } return false ; } function FCKContextMenu_Document_OnMouseUp( e ) { if ( FCKConfig.BrowserContextMenu ) return true ; var overrideButton = FCKContextMenu_OverrideButton ; if ( overrideButton ) { var parent = overrideButton.parentNode ; parent.parentNode.removeChild( parent ) ; FCKContextMenu_OverrideButton = undefined ; if( e && e.button == 2 ) { FCKContextMenu_Document_OnContextMenu( e ) ; return false ; } } return true ; } function FCKContextMenu_AttachedElement_OnContextMenu( ev, fckContextMenu, el ) { if ( ( fckContextMenu.CtrlDisable && ( ev.ctrlKey || ev.metaKey ) ) || FCKConfig.BrowserContextMenu ) return true ; var eTarget = el || this ; if ( fckContextMenu.OnBeforeOpen ) fckContextMenu.OnBeforeOpen.call( fckContextMenu, eTarget ) ; if ( fckContextMenu._MenuBlock.Count() == 0 ) return false ; if ( fckContextMenu._Redraw ) { fckContextMenu._MenuBlock.Create( fckContextMenu._Panel.MainNode ) ; fckContextMenu._Redraw = false ; } // This will avoid that the content of the context menu can be dragged in IE // as the content of the panel is recreated we need to do it every time FCKTools.DisableSelection( fckContextMenu._Panel.Document.body ) ; var x = 0 ; var y = 0 ; if ( FCKBrowserInfo.IsIE ) { x = ev.screenX ; y = ev.screenY ; } else if ( FCKBrowserInfo.IsSafari ) { x = ev.clientX ; y = ev.clientY ; } else { x = ev.pageX ; y = ev.pageY ; } fckContextMenu._Panel.Show( x, y, ev.currentTarget || null ) ; return false ; } function FCKContextMenu_MenuBlock_OnClick( menuItem, contextMenu ) { contextMenu._Panel.Hide() ; FCKTools.RunFunction( contextMenu.OnItemClick, contextMenu, menuItem ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbar Class: represents a toolbar in the toolbarset. It is a group of * toolbar items. */ var FCKToolbar = function() { this.Items = new Array() ; } FCKToolbar.prototype.AddItem = function( item ) { return this.Items[ this.Items.length ] = item ; } FCKToolbar.prototype.AddButton = function( name, label, tooltip, iconPathOrStripInfoArrayOrIndex, style, state ) { if ( typeof( iconPathOrStripInfoArrayOrIndex ) == 'number' ) iconPathOrStripInfoArrayOrIndex = [ this.DefaultIconsStrip, this.DefaultIconSize, iconPathOrStripInfoArrayOrIndex ] ; var oButton = new FCKToolbarButtonUI( name, label, tooltip, iconPathOrStripInfoArrayOrIndex, style, state ) ; oButton._FCKToolbar = this ; oButton.OnClick = FCKToolbar_OnItemClick ; return this.AddItem( oButton ) ; } function FCKToolbar_OnItemClick( item ) { var oToolbar = item._FCKToolbar ; if ( oToolbar.OnItemClick ) oToolbar.OnItemClick( oToolbar, item ) ; } FCKToolbar.prototype.AddSeparator = function() { this.AddItem( new FCKToolbarSeparator() ) ; } FCKToolbar.prototype.Create = function( parentElement ) { var oDoc = FCKTools.GetElementDocument( parentElement ) ; var e = oDoc.createElement( 'table' ) ; e.className = 'TB_Toolbar' ; e.style.styleFloat = e.style.cssFloat = ( FCKLang.Dir == 'ltr' ? 'left' : 'right' ) ; e.dir = FCKLang.Dir ; e.cellPadding = 0 ; e.cellSpacing = 0 ; var targetRow = e.insertRow(-1) ; // Insert the start cell. var eCell ; if ( !this.HideStart ) { eCell = targetRow.insertCell(-1) ; eCell.appendChild( oDoc.createElement( 'div' ) ).className = 'TB_Start' ; } for ( var i = 0 ; i < this.Items.length ; i++ ) { this.Items[i].Create( targetRow.insertCell(-1) ) ; } // Insert the ending cell. if ( !this.HideEnd ) { eCell = targetRow.insertCell(-1) ; eCell.appendChild( oDoc.createElement( 'div' ) ).className = 'TB_End' ; } parentElement.appendChild( e ) ; } var FCKToolbarSeparator = function() {} FCKToolbarSeparator.prototype.Create = function( parentElement ) { FCKTools.AppendElement( parentElement, 'div' ).className = 'TB_Separator' ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This class is a menu block that behaves like a panel. It's a mix of the * FCKMenuBlock and FCKPanel classes. */ var FCKMenuBlockPanel = function() { // Call the "base" constructor. FCKMenuBlock.call( this ) ; } FCKMenuBlockPanel.prototype = new FCKMenuBlock() ; // Override the create method. FCKMenuBlockPanel.prototype.Create = function() { var oPanel = this.Panel = ( this.Parent && this.Parent.Panel ? this.Parent.Panel.CreateChildPanel() : new FCKPanel() ) ; oPanel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; // Call the "base" implementation. FCKMenuBlock.prototype.Create.call( this, oPanel.MainNode ) ; } FCKMenuBlockPanel.prototype.Show = function( x, y, relElement ) { if ( !this.Panel.CheckIsOpened() ) this.Panel.Show( x, y, relElement ) ; } FCKMenuBlockPanel.prototype.Hide = function() { if ( this.Panel.CheckIsOpened() ) this.Panel.Hide() ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarPanelButton Class: Handles the Fonts combo selector. */ var FCKToolbarFontSizeCombo = function( tooltip, style ) { this.CommandName = 'FontSize' ; this.Label = this.GetLabel() ; this.Tooltip = tooltip ? tooltip : this.Label ; this.Style = style ? style : FCK_TOOLBARITEM_ICONTEXT ; this.DefaultLabel = FCKConfig.DefaultFontSizeLabel || '' ; this.FieldWidth = 70 ; } // Inherit from FCKToolbarSpecialCombo. FCKToolbarFontSizeCombo.prototype = new FCKToolbarFontFormatCombo( false ) ; FCKToolbarFontSizeCombo.prototype.GetLabel = function() { return FCKLang.FontSize ; } FCKToolbarFontSizeCombo.prototype.GetStyles = function() { var baseStyle = FCKStyles.GetStyle( '_FCK_Size' ) ; if ( !baseStyle ) { alert( "The FCKConfig.CoreStyles['FontFace'] setting was not found. Please check the fckconfig.js file" ) ; return {} ; } var styles = {} ; var fonts = FCKConfig.FontSizes.split(';') ; for ( var i = 0 ; i < fonts.length ; i++ ) { var fontParts = fonts[i].split('/') ; var font = fontParts[0] ; var caption = fontParts[1] || font ; var style = FCKTools.CloneObject( baseStyle ) ; style.SetVariable( 'Size', font ) ; style.Label = caption ; styles[ caption ] = style ; } return styles ; } FCKToolbarFontSizeCombo.prototype.RefreshActiveItems = FCKToolbarStyleCombo.prototype.RefreshActiveItems ; FCKToolbarFontSizeCombo.prototype.StyleCombo_OnBeforeClick = FCKToolbarFontsCombo.prototype.StyleCombo_OnBeforeClick ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarBreak Class: breaks the toolbars. * It makes it possible to force the toolbar to break to a new line. * This is the IE specific implementation. */ var FCKToolbarBreak = function() {} FCKToolbarBreak.prototype.Create = function( targetElement ) { var oBreakDiv = FCKTools.GetElementDocument( targetElement ).createElement( 'div' ) ; oBreakDiv.className = 'TB_Break' ; oBreakDiv.style.clear = FCKLang.Dir == 'rtl' ? 'left' : 'right' ; targetElement.appendChild( oBreakDiv ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKToolbarSpecialCombo Class: This is a "abstract" base class to be used * by the special combo toolbar elements like font name, font size, paragraph format, etc... * * The following properties and methods must be implemented when inheriting from * this class: * - Property: CommandName [ The command name to be executed ] * - Method: GetLabel() [ Returns the label ] * - CreateItems( targetSpecialCombo ) [ Add all items in the special combo ] */ var FCKToolbarSpecialCombo = function() { this.SourceView = false ; this.ContextSensitive = true ; this.FieldWidth = null ; this.PanelWidth = null ; this.PanelMaxHeight = null ; //this._LastValue = null ; } FCKToolbarSpecialCombo.prototype.DefaultLabel = '' ; function FCKToolbarSpecialCombo_OnSelect( itemId, item ) { FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).Execute( itemId, item ) ; } FCKToolbarSpecialCombo.prototype.Create = function( targetElement ) { this._Combo = new FCKSpecialCombo( this.GetLabel(), this.FieldWidth, this.PanelWidth, this.PanelMaxHeight, FCKBrowserInfo.IsIE ? window : FCKTools.GetElementWindow( targetElement ).parent ) ; /* this._Combo.FieldWidth = this.FieldWidth != null ? this.FieldWidth : 100 ; this._Combo.PanelWidth = this.PanelWidth != null ? this.PanelWidth : 150 ; this._Combo.PanelMaxHeight = this.PanelMaxHeight != null ? this.PanelMaxHeight : 150 ; */ //this._Combo.Command.Name = this.Command.Name; // this._Combo.Label = this.Label ; this._Combo.Tooltip = this.Tooltip ; this._Combo.Style = this.Style ; this.CreateItems( this._Combo ) ; this._Combo.Create( targetElement ) ; this._Combo.CommandName = this.CommandName ; this._Combo.OnSelect = FCKToolbarSpecialCombo_OnSelect ; } function FCKToolbarSpecialCombo_RefreshActiveItems( combo, value ) { combo.DeselectAll() ; combo.SelectItem( value ) ; combo.SetLabelById( value ) ; } FCKToolbarSpecialCombo.prototype.RefreshState = function() { // Gets the actual state. var eState ; // if ( FCK.EditMode == FCK_EDITMODE_SOURCE && ! this.SourceView ) // eState = FCK_TRISTATE_DISABLED ; // else // { var sValue = FCK.ToolbarSet.CurrentInstance.Commands.GetCommand( this.CommandName ).GetState() ; // FCKDebug.Output( 'RefreshState of Special Combo "' + this.TypeOf + '" - State: ' + sValue ) ; if ( sValue != FCK_TRISTATE_DISABLED ) { eState = FCK_TRISTATE_ON ; if ( this.RefreshActiveItems ) this.RefreshActiveItems( this._Combo, sValue ) ; else { if ( this._LastValue !== sValue) { this._LastValue = sValue ; if ( !sValue || sValue.length == 0 ) { this._Combo.DeselectAll() ; this._Combo.SetLabel( this.DefaultLabel ) ; } else FCKToolbarSpecialCombo_RefreshActiveItems( this._Combo, sValue ) ; } } } else eState = FCK_TRISTATE_DISABLED ; // } // If there are no state changes then do nothing and return. if ( eState == this.State ) return ; if ( eState == FCK_TRISTATE_DISABLED ) { this._Combo.DeselectAll() ; this._Combo.SetLabel( '' ) ; } // Sets the actual state. this.State = eState ; // Updates the graphical state. this._Combo.SetEnabled( eState != FCK_TRISTATE_DISABLED ) ; } FCKToolbarSpecialCombo.prototype.Enable = function() { this.RefreshState() ; } FCKToolbarSpecialCombo.prototype.Disable = function() { this.State = FCK_TRISTATE_DISABLED ; this._Combo.DeselectAll() ; this._Combo.SetLabel( '' ) ; this._Combo.SetEnabled( false ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This class partially implements the W3C DOM Range for browser that don't * support the standards (like IE): * http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html */ var FCKW3CRange = function( parentDocument ) { this._Document = parentDocument ; this.startContainer = null ; this.startOffset = null ; this.endContainer = null ; this.endOffset = null ; this.collapsed = true ; } FCKW3CRange.CreateRange = function( parentDocument ) { // We could opt to use the Range implementation of the browsers. The problem // is that every browser have different bugs on their implementations, // mostly related to different interpretations of the W3C specifications. // So, for now, let's use our implementation and pray for browsers fixings // soon. Otherwise will go crazy on trying to find out workarounds. /* // Get the browser implementation of the range, if available. if ( parentDocument.createRange ) { var range = parentDocument.createRange() ; if ( typeof( range.startContainer ) != 'undefined' ) return range ; } */ return new FCKW3CRange( parentDocument ) ; } FCKW3CRange.CreateFromRange = function( parentDocument, sourceRange ) { var range = FCKW3CRange.CreateRange( parentDocument ) ; range.setStart( sourceRange.startContainer, sourceRange.startOffset ) ; range.setEnd( sourceRange.endContainer, sourceRange.endOffset ) ; return range ; } FCKW3CRange.prototype = { _UpdateCollapsed : function() { this.collapsed = ( this.startContainer == this.endContainer && this.startOffset == this.endOffset ) ; }, // 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. setStart : function( refNode, offset ) { this.startContainer = refNode ; this.startOffset = offset ; if ( !this.endContainer ) { this.endContainer = refNode ; this.endOffset = offset ; } this._UpdateCollapsed() ; }, // 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. setEnd : function( refNode, offset ) { this.endContainer = refNode ; this.endOffset = offset ; if ( !this.startContainer ) { this.startContainer = refNode ; this.startOffset = offset ; } this._UpdateCollapsed() ; }, setStartAfter : function( refNode ) { this.setStart( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) + 1 ) ; }, setStartBefore : function( refNode ) { this.setStart( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) ) ; }, setEndAfter : function( refNode ) { this.setEnd( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) + 1 ) ; }, setEndBefore : function( refNode ) { this.setEnd( refNode.parentNode, FCKDomTools.GetIndexOf( refNode ) ) ; }, 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 ; }, selectNodeContents : function( refNode ) { this.setStart( refNode, 0 ) ; this.setEnd( refNode, refNode.nodeType == 3 ? refNode.data.length : refNode.childNodes.length ) ; }, insertNode : function( newNode ) { var startContainer = this.startContainer ; var startOffset = this.startOffset ; // If we are in a text node. if ( startContainer.nodeType == 3 ) { startContainer.splitText( startOffset ) ; // Check if it is necessary to update the end boundary. if ( startContainer == this.endContainer ) this.setEnd( startContainer.nextSibling, this.endOffset - this.startOffset ) ; // Insert the new node it after the text node. FCKDomTools.InsertAfterNode( startContainer, newNode ) ; return ; } else { // Simply insert the new node before the current start node. startContainer.insertBefore( newNode, startContainer.childNodes[ startOffset ] || null ) ; // Check if it is necessary to update the end boundary. if ( startContainer == this.endContainer ) { this.endOffset++ ; this.collapsed = false ; } } }, deleteContents : function() { if ( this.collapsed ) return ; this._ExecContentsAction( 0 ) ; }, extractContents : function() { var docFrag = new FCKDocumentFragment( this._Document ) ; if ( !this.collapsed ) this._ExecContentsAction( 1, docFrag ) ; return docFrag ; }, // The selection may be lost when cloning (due to the splitText() call). cloneContents : function() { var docFrag = new FCKDocumentFragment( this._Document ) ; if ( !this.collapsed ) this._ExecContentsAction( 2, docFrag ) ; return docFrag ; }, _ExecContentsAction : function( action, docFrag ) { var startNode = this.startContainer ; var endNode = this.endContainer ; var startOffset = this.startOffset ; var endOffset = this.endOffset ; var removeStartNode = false ; var removeEndNode = false ; // Check the start and end nodes and make the necessary removals or changes. // Start from the end, otherwise DOM mutations (splitText) made in the // start boundary may interfere on the results here. // 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.nodeType == 3 ) endNode = endNode.splitText( endOffset ) ; else { // If the end container has children and the offset is pointing // to a child, then we should start from it. if ( endNode.childNodes.length > 0 ) { // If the offset points after the last node. if ( endOffset > endNode.childNodes.length - 1 ) { // Let's create a temporary node and mark it for removal. endNode = FCKDomTools.InsertAfterNode( endNode.lastChild, this._Document.createTextNode('') ) ; removeEndNode = true ; } else endNode = endNode.childNodes[ endOffset ] ; } } // For text containers, we must simply split the node. The removal will // be handled by the rest of the code . if ( startNode.nodeType == 3 ) { startNode.splitText( 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 == endNode ) endNode = startNode.nextSibling ; } 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 == 0 ) { // Let's create a temporary node and mark it for removal. startNode = startNode.insertBefore( this._Document.createTextNode(''), startNode.firstChild ) ; removeStartNode = true ; } else if ( startOffset > startNode.childNodes.length - 1 ) { // Let's create a temporary node and mark it for removal. startNode = startNode.appendChild( this._Document.createTextNode('') ) ; removeStartNode = true ; } else startNode = startNode.childNodes[ startOffset ].previousSibling ; } // Get the parent nodes tree for the start and end boundaries. var startParents = FCKDomTools.GetParents( startNode ) ; var endParents = FCKDomTools.GetParents( endNode ) ; // 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 != topEnd ) break ; } var clone, levelStartNode, levelClone, currentNode, currentSibling ; if ( docFrag ) clone = docFrag.RootNode ; // 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 != startNode ) // action = 0 = Delete levelClone = clone.appendChild( levelStartNode.cloneNode( levelStartNode == startNode ) ) ; currentNode = levelStartNode.nextSibling ; while( currentNode ) { // Stop processing when the current node matches a node in the // endParents tree or if it is the endNode. if ( currentNode == endParents[j] || currentNode == endNode ) break ; // Cache the next sibling. currentSibling = currentNode.nextSibling ; // If cloning, just clone it. if ( action == 2 ) // 2 = Clone clone.appendChild( currentNode.cloneNode( true ) ) ; else { // Both Delete and Extract will remove the node. currentNode.parentNode.removeChild( currentNode ) ; // When Extracting, move the removed node to the docFrag. if ( action == 1 ) // 1 = Extract clone.appendChild( currentNode ) ; } currentNode = currentSibling ; } if ( clone ) clone = levelClone ; } if ( docFrag ) clone = docFrag.RootNode ; // 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 != endNode ) // action = 0 = Delete levelClone = clone.appendChild( levelStartNode.cloneNode( levelStartNode == endNode ) ) ; // The processing of siblings may have already been done by the parent. if ( !startParents[k] || levelStartNode.parentNode != startParents[k].parentNode ) { currentNode = levelStartNode.previousSibling ; while( currentNode ) { // Stop processing when the current node matches a node in the // startParents tree or if it is the startNode. if ( currentNode == startParents[k] || currentNode == startNode ) break ; // Cache the next sibling. currentSibling = currentNode.previousSibling ; // 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.parentNode.removeChild( currentNode ) ; // 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 = this.startContainer ; if ( startTextNode.nodeType == 3 ) { startTextNode.data += startTextNode.nextSibling.data ; startTextNode.parentNode.removeChild( startTextNode.nextSibling ) ; } var endTextNode = this.endContainer ; if ( endTextNode.nodeType == 3 && 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 = FCKDomTools.GetIndexOf( topEnd ) ; // If the start node is to be removed, we must correct the // index to reflect the removal. if ( removeStartNode && topEnd.parentNode == startNode.parentNode ) endIndex-- ; this.setStart( topEnd.parentNode, endIndex ) ; } // Collapse it to the start. this.collapse( true ) ; } // Cleanup any marked node. if( removeStartNode ) startNode.parentNode.removeChild( startNode ) ; if( removeEndNode && endNode.parentNode ) endNode.parentNode.removeChild( endNode ) ; }, cloneRange : function() { return FCKW3CRange.CreateFromRange( this._Document, this ) ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Manages the DOM ascensors element list of a specific DOM node * (limited to body, inclusive). */ var FCKElementPath = function( lastNode ) { var eBlock = null ; var eBlockLimit = null ; var aElements = new Array() ; var e = lastNode ; while ( e ) { if ( e.nodeType == 1 ) { if ( !this.LastElement ) this.LastElement = e ; var sElementName = e.nodeName.toLowerCase() ; if ( FCKBrowserInfo.IsIE && e.scopeName != 'HTML' ) sElementName = e.scopeName.toLowerCase() + ':' + sElementName ; if ( !eBlockLimit ) { if ( !eBlock && FCKListsLib.PathBlockElements[ sElementName ] != null ) eBlock = e ; if ( FCKListsLib.PathBlockLimitElements[ sElementName ] != null ) { // DIV is considered the Block, if no block is available (#525) // and if it doesn't contain other blocks. if ( !eBlock && sElementName == 'div' && !FCKElementPath._CheckHasBlock( e ) ) eBlock = e ; else eBlockLimit = e ; } } aElements.push( e ) ; if ( sElementName == 'body' ) break ; } e = e.parentNode ; } this.Block = eBlock ; this.BlockLimit = eBlockLimit ; this.Elements = aElements ; } /** * Check if an element contains any block element. */ FCKElementPath._CheckHasBlock = function( element ) { var childNodes = element.childNodes ; for ( var i = 0, count = childNodes.length ; i < count ; i++ ) { var child = childNodes[i] ; if ( child.nodeType == 1 && FCKListsLib.BlockElements[ child.nodeName.toLowerCase() ] ) return true ; } return false ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Create the FCKeditorAPI object that is available as a global object in * the page where the editor is placed in. */ var FCKeditorAPI ; function InitializeAPI() { var oParentWindow = window.parent ; if ( !( FCKeditorAPI = oParentWindow.FCKeditorAPI ) ) { // Make the FCKeditorAPI object available in the parent window. Use // eval so this core runs in the parent's scope and so it will still be // available if the editor instance is removed ("Can't execute code // from a freed script" error). // Note: we check the existence of oEditor.GetParentForm because some external // code (like JSON) can extend the Object prototype and we get then extra oEditor // objects that aren't really FCKeditor instances. var sScript = 'window.FCKeditorAPI = {' + 'Version : "2.6.4.1",' + 'VersionBuild : "23187",' + 'Instances : window.FCKeditorAPI && window.FCKeditorAPI.Instances || {},' + 'GetInstance : function( name )' + '{' + 'return this.Instances[ name ];' + '},' + '_FormSubmit : function()' + '{' + 'for ( var name in FCKeditorAPI.Instances )' + '{' + 'var oEditor = FCKeditorAPI.Instances[ name ] ;' + 'if ( oEditor.GetParentForm && oEditor.GetParentForm() == this )' + 'oEditor.UpdateLinkedField() ;' + '}' + 'this._FCKOriginalSubmit() ;' + '},' + '_FunctionQueue : window.FCKeditorAPI && window.FCKeditorAPI._FunctionQueue || {' + 'Functions : new Array(),' + 'IsRunning : false,' + 'Add : function( f )' + '{' + 'this.Functions.push( f );' + 'if ( !this.IsRunning )' + 'this.StartNext();' + '},' + 'StartNext : function()' + '{' + 'var aQueue = this.Functions ;' + 'if ( aQueue.length > 0 )' + '{' + 'this.IsRunning = true;' + 'aQueue[0].call();' + '}' + 'else ' + 'this.IsRunning = false;' + '},' + 'Remove : function( f )' + '{' + 'var aQueue = this.Functions;' + 'var i = 0, fFunc;' + 'while( (fFunc = aQueue[ i ]) )' + '{' + 'if ( fFunc == f )' + 'aQueue.splice( i,1 );' + 'i++ ;' + '}' + 'this.StartNext();' + '}' + '}' + '}' ; // In IE, the "eval" function is not always available (it works with // the JavaScript samples, but not with the ASP ones, for example). // So, let's use the execScript instead. if ( oParentWindow.execScript ) oParentWindow.execScript( sScript, 'JavaScript' ) ; else { if ( FCKBrowserInfo.IsGecko10 ) { // FF 1.0.4 gives an error with the request bellow. The // following seams to work well. eval.call( oParentWindow, sScript ) ; } else if( FCKBrowserInfo.IsAIR ) { FCKAdobeAIR.FCKeditorAPI_Evaluate( oParentWindow, sScript ) ; } else if ( FCKBrowserInfo.IsSafari ) { // oParentWindow.eval in Safari executes in the calling window // environment, instead of the parent one. The following should // make it work. var oParentDocument = oParentWindow.document ; var eScript = oParentDocument.createElement('script') ; eScript.appendChild( oParentDocument.createTextNode( sScript ) ) ; oParentDocument.documentElement.appendChild( eScript ) ; } else oParentWindow.eval( sScript ) ; } FCKeditorAPI = oParentWindow.FCKeditorAPI ; // The __Instances properly has been changed to the public Instances, // but we should still have the "deprecated" version of it. FCKeditorAPI.__Instances = FCKeditorAPI.Instances ; } // Add the current instance to the FCKeditorAPI's instances collection. FCKeditorAPI.Instances[ FCK.Name ] = FCK ; } // Attach to the form onsubmit event and to the form.submit(). function _AttachFormSubmitToAPI() { // Get the linked field form. var oForm = FCK.GetParentForm() ; if ( oForm ) { // Attach to the onsubmit event. FCKTools.AddEventListener( oForm, 'submit', FCK.UpdateLinkedField ) ; // IE sees oForm.submit function as an 'object'. if ( !oForm._FCKOriginalSubmit && ( typeof( oForm.submit ) == 'function' || ( !oForm.submit.tagName && !oForm.submit.length ) ) ) { // Save the original submit. oForm._FCKOriginalSubmit = oForm.submit ; // Create our replacement for the submit. oForm.submit = FCKeditorAPI._FormSubmit ; } } } function FCKeditorAPI_Cleanup() { if ( window.FCKConfig && FCKConfig.MsWebBrowserControlCompat && !window.FCKUnloadFlag ) return ; delete FCKeditorAPI.Instances[ FCK.Name ] ; } function FCKeditorAPI_ConfirmCleanup() { if ( window.FCKConfig && FCKConfig.MsWebBrowserControlCompat ) window.FCKUnloadFlag = true ; } FCKTools.AddEventListener( window, 'unload', FCKeditorAPI_Cleanup ) ; FCKTools.AddEventListener( window, 'beforeunload', FCKeditorAPI_ConfirmCleanup) ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKTextColorCommand Class: represents the text color comand. It shows the * color selection panel. */ // FCKTextColorCommand Constructor // type: can be 'ForeColor' or 'BackColor'. var FCKTextColorCommand = function( type ) { this.Name = type == 'ForeColor' ? 'TextColor' : 'BGColor' ; this.Type = type ; var oWindow ; if ( FCKBrowserInfo.IsIE ) oWindow = window ; else if ( FCK.ToolbarSet._IFrame ) oWindow = FCKTools.GetElementWindow( FCK.ToolbarSet._IFrame ) ; else oWindow = window.parent ; this._Panel = new FCKPanel( oWindow ) ; this._Panel.AppendStyleSheet( FCKConfig.SkinEditorCSS ) ; this._Panel.MainNode.className = 'FCK_Panel' ; this._CreatePanelBody( this._Panel.Document, this._Panel.MainNode ) ; FCK.ToolbarSet.ToolbarItems.GetItem( this.Name ).RegisterPanel( this._Panel ) ; FCKTools.DisableSelection( this._Panel.Document.body ) ; } FCKTextColorCommand.prototype.Execute = function( panelX, panelY, relElement ) { // Show the Color Panel at the desired position. this._Panel.Show( panelX, panelY, relElement ) ; } FCKTextColorCommand.prototype.SetColor = function( color ) { FCKUndo.SaveUndoStep() ; var style = FCKStyles.GetStyle( '_FCK_' + ( this.Type == 'ForeColor' ? 'Color' : 'BackColor' ) ) ; if ( !color || color.length == 0 ) FCK.Styles.RemoveStyle( style ) ; else { style.SetVariable( 'Color', color ) ; FCKStyles.ApplyStyle( style ) ; } FCKUndo.SaveUndoStep() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; } FCKTextColorCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return FCK_TRISTATE_OFF ; } function FCKTextColorCommand_OnMouseOver() { this.className = 'ColorSelected' ; } function FCKTextColorCommand_OnMouseOut() { this.className = 'ColorDeselected' ; } function FCKTextColorCommand_OnClick( ev, command, color ) { this.className = 'ColorDeselected' ; command.SetColor( color ) ; command._Panel.Hide() ; } function FCKTextColorCommand_AutoOnClick( ev, command ) { this.className = 'ColorDeselected' ; command.SetColor( '' ) ; command._Panel.Hide() ; } function FCKTextColorCommand_MoreOnClick( ev, command ) { this.className = 'ColorDeselected' ; command._Panel.Hide() ; FCKDialog.OpenDialog( 'FCKDialog_Color', FCKLang.DlgColorTitle, 'dialog/fck_colorselector.html', 410, 320, FCKTools.Bind( command, command.SetColor ) ) ; } FCKTextColorCommand.prototype._CreatePanelBody = function( targetDocument, targetDiv ) { function CreateSelectionDiv() { var oDiv = targetDocument.createElement( "DIV" ) ; oDiv.className = 'ColorDeselected' ; FCKTools.AddEventListenerEx( oDiv, 'mouseover', FCKTextColorCommand_OnMouseOver ) ; FCKTools.AddEventListenerEx( oDiv, 'mouseout', FCKTextColorCommand_OnMouseOut ) ; return oDiv ; } // Create the Table that will hold all colors. var oTable = targetDiv.appendChild( targetDocument.createElement( "TABLE" ) ) ; oTable.className = 'ForceBaseFont' ; // Firefox 1.5 Bug. oTable.style.tableLayout = 'fixed' ; oTable.cellPadding = 0 ; oTable.cellSpacing = 0 ; oTable.border = 0 ; oTable.width = 150 ; var oCell = oTable.insertRow(-1).insertCell(-1) ; oCell.colSpan = 8 ; // Create the Button for the "Automatic" color selection. var oDiv = oCell.appendChild( CreateSelectionDiv() ) ; oDiv.innerHTML = '<table cellspacing="0" cellpadding="0" width="100%" border="0">\ <tr>\ <td><div class="ColorBoxBorder"><div class="ColorBox" style="background-color: #000000"></div></div></td>\ <td nowrap width="100%" align="center">' + FCKLang.ColorAutomatic + '</td>\ </tr>\ </table>' ; FCKTools.AddEventListenerEx( oDiv, 'click', FCKTextColorCommand_AutoOnClick, this ) ; // Dirty hack for Opera, Safari and Firefox 3. if ( !FCKBrowserInfo.IsIE ) oDiv.style.width = '96%' ; // Create an array of colors based on the configuration file. var aColors = FCKConfig.FontColors.toString().split(',') ; // Create the colors table based on the array. var iCounter = 0 ; while ( iCounter < aColors.length ) { var oRow = oTable.insertRow(-1) ; for ( var i = 0 ; i < 8 ; i++, iCounter++ ) { // The div will be created even if no more colors are available. // Extra divs will be hidden later in the code. (#1597) if ( iCounter < aColors.length ) { var colorParts = aColors[iCounter].split('/') ; var colorValue = '#' + colorParts[0] ; var colorName = colorParts[1] || colorValue ; } oDiv = oRow.insertCell(-1).appendChild( CreateSelectionDiv() ) ; oDiv.innerHTML = '<div class="ColorBoxBorder"><div class="ColorBox" style="background-color: ' + colorValue + '"></div></div>' ; if ( iCounter >= aColors.length ) oDiv.style.visibility = 'hidden' ; else FCKTools.AddEventListenerEx( oDiv, 'click', FCKTextColorCommand_OnClick, [ this, colorName ] ) ; } } // Create the Row and the Cell for the "More Colors..." button. if ( FCKConfig.EnableMoreFontColors ) { oCell = oTable.insertRow(-1).insertCell(-1) ; oCell.colSpan = 8 ; oDiv = oCell.appendChild( CreateSelectionDiv() ) ; oDiv.innerHTML = '<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td nowrap align="center">' + FCKLang.ColorMoreColors + '</td></tr></table>' ; FCKTools.AddEventListenerEx( oDiv, 'click', FCKTextColorCommand_MoreOnClick, this ) ; } // Dirty hack for Opera, Safari and Firefox 3. if ( !FCKBrowserInfo.IsIE ) oDiv.style.width = '96%' ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKNamedCommand Class: represents an internal browser command. */ var FCKNamedCommand = function( commandName ) { this.Name = commandName ; } FCKNamedCommand.prototype.Execute = function() { FCK.ExecuteNamedCommand( this.Name ) ; } FCKNamedCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return FCK.GetNamedCommandState( this.Name ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Implementation for the "Insert/Remove Ordered/Unordered List" commands. */ var FCKListCommand = function( name, tagName ) { this.Name = name ; this.TagName = tagName ; } FCKListCommand.prototype = { GetState : function() { // Disabled if not WYSIWYG. if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || ! FCK.EditorWindow ) return FCK_TRISTATE_DISABLED ; // We'll use the style system's convention to determine list state here... // If the starting block is a descendant of an <ol> or <ul> node, then we're in a list. var startContainer = FCKSelection.GetBoundaryParentElement( true ) ; var listNode = startContainer ; while ( listNode ) { if ( listNode.nodeName.IEquals( [ 'ul', 'ol' ] ) ) break ; listNode = listNode.parentNode ; } if ( listNode && listNode.nodeName.IEquals( this.TagName ) ) return FCK_TRISTATE_ON ; else return FCK_TRISTATE_OFF ; }, Execute : function() { FCKUndo.SaveUndoStep() ; var doc = FCK.EditorDocument ; var range = new FCKDomRange( FCK.EditorWindow ) ; range.MoveToSelection() ; var state = this.GetState() ; // Midas lists rule #1 says we can create a list even in an empty document. // But FCKDomRangeIterator wouldn't run if the document is really empty. // So create a paragraph if the document is empty and we're going to create a list. if ( state == FCK_TRISTATE_OFF ) { FCKDomTools.TrimNode( doc.body ) ; if ( ! doc.body.firstChild ) { var paragraph = doc.createElement( 'p' ) ; doc.body.appendChild( paragraph ) ; range.MoveToNodeContents( paragraph ) ; } } var bookmark = range.CreateBookmark() ; // Group the blocks up because there are many cases where multiple lists have to be created, // or multiple lists have to be cancelled. var listGroups = [] ; var markerObj = {} ; var iterator = new FCKDomRangeIterator( range ) ; var block ; iterator.ForceBrBreak = ( state == FCK_TRISTATE_OFF ) ; var nextRangeExists = true ; var rangeQueue = null ; while ( nextRangeExists ) { while ( ( block = iterator.GetNextParagraph() ) ) { var path = new FCKElementPath( block ) ; var listNode = null ; var processedFlag = false ; var blockLimit = path.BlockLimit ; // First, try to group by a list ancestor. for ( var i = path.Elements.length - 1 ; i >= 0 ; i-- ) { var el = path.Elements[i] ; if ( el.nodeName.IEquals( ['ol', 'ul'] ) ) { // If we've encountered a list inside a block limit // The last group object of the block limit element should // no longer be valid. Since paragraphs after the list // should belong to a different group of paragraphs before // the list. (Bug #1309) if ( blockLimit._FCK_ListGroupObject ) blockLimit._FCK_ListGroupObject = null ; var groupObj = el._FCK_ListGroupObject ; if ( groupObj ) groupObj.contents.push( block ) ; else { groupObj = { 'root' : el, 'contents' : [ block ] } ; listGroups.push( groupObj ) ; FCKDomTools.SetElementMarker( markerObj, el, '_FCK_ListGroupObject', groupObj ) ; } processedFlag = true ; break ; } } if ( processedFlag ) continue ; // No list ancestor? Group by block limit. var root = blockLimit ; if ( root._FCK_ListGroupObject ) root._FCK_ListGroupObject.contents.push( block ) ; else { var groupObj = { 'root' : root, 'contents' : [ block ] } ; FCKDomTools.SetElementMarker( markerObj, root, '_FCK_ListGroupObject', groupObj ) ; listGroups.push( groupObj ) ; } } if ( FCKBrowserInfo.IsIE ) nextRangeExists = false ; else { if ( rangeQueue == null ) { rangeQueue = [] ; var selectionObject = FCKSelection.GetSelection() ; if ( selectionObject && listGroups.length == 0 ) rangeQueue.push( selectionObject.getRangeAt( 0 ) ) ; for ( var i = 1 ; selectionObject && i < selectionObject.rangeCount ; i++ ) rangeQueue.push( selectionObject.getRangeAt( i ) ) ; } if ( rangeQueue.length < 1 ) nextRangeExists = false ; else { var internalRange = FCKW3CRange.CreateFromRange( doc, rangeQueue.shift() ) ; range._Range = internalRange ; range._UpdateElementInfo() ; if ( range.StartNode.nodeName.IEquals( 'td' ) ) range.SetStart( range.StartNode, 1 ) ; if ( range.EndNode.nodeName.IEquals( 'td' ) ) range.SetEnd( range.EndNode, 2 ) ; iterator = new FCKDomRangeIterator( range ) ; iterator.ForceBrBreak = ( state == FCK_TRISTATE_OFF ) ; } } } // Now we have two kinds of list groups, groups rooted at a list, and groups rooted at a block limit element. // We either have to build lists or remove lists, for removing a list does not makes sense when we are looking // at the group that's not rooted at lists. So we have three cases to handle. var listsCreated = [] ; while ( listGroups.length > 0 ) { var groupObj = listGroups.shift() ; if ( state == FCK_TRISTATE_OFF ) { if ( groupObj.root.nodeName.IEquals( ['ul', 'ol'] ) ) this._ChangeListType( groupObj, markerObj, listsCreated ) ; else this._CreateList( groupObj, listsCreated ) ; } else if ( state == FCK_TRISTATE_ON && groupObj.root.nodeName.IEquals( ['ul', 'ol'] ) ) this._RemoveList( groupObj, markerObj ) ; } // For all new lists created, merge adjacent, same type lists. for ( var i = 0 ; i < listsCreated.length ; i++ ) { var listNode = listsCreated[i] ; var stopFlag = false ; var currentNode = listNode ; while ( ! stopFlag ) { currentNode = currentNode.nextSibling ; if ( currentNode && currentNode.nodeType == 3 && currentNode.nodeValue.search( /^[\n\r\t ]*$/ ) == 0 ) continue ; stopFlag = true ; } if ( currentNode && currentNode.nodeName.IEquals( this.TagName ) ) { currentNode.parentNode.removeChild( currentNode ) ; while ( currentNode.firstChild ) listNode.appendChild( currentNode.removeChild( currentNode.firstChild ) ) ; } stopFlag = false ; currentNode = listNode ; while ( ! stopFlag ) { currentNode = currentNode.previousSibling ; if ( currentNode && currentNode.nodeType == 3 && currentNode.nodeValue.search( /^[\n\r\t ]*$/ ) == 0 ) continue ; stopFlag = true ; } if ( currentNode && currentNode.nodeName.IEquals( this.TagName ) ) { currentNode.parentNode.removeChild( currentNode ) ; while ( currentNode.lastChild ) listNode.insertBefore( currentNode.removeChild( currentNode.lastChild ), listNode.firstChild ) ; } } // Clean up, restore selection and update toolbar button states. FCKDomTools.ClearAllMarkers( markerObj ) ; range.MoveToBookmark( bookmark ) ; range.Select() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, _ChangeListType : function( groupObj, markerObj, listsCreated ) { // This case is easy... // 1. Convert the whole list into a one-dimensional array. // 2. Change the list type by modifying the array. // 3. Recreate the whole list by converting the array to a list. // 4. Replace the original list with the recreated list. var listArray = FCKDomTools.ListToArray( groupObj.root, markerObj ) ; var selectedListItems = [] ; for ( var i = 0 ; i < groupObj.contents.length ; i++ ) { var itemNode = groupObj.contents[i] ; itemNode = FCKTools.GetElementAscensor( itemNode, 'li' ) ; if ( ! itemNode || itemNode._FCK_ListItem_Processed ) continue ; selectedListItems.push( itemNode ) ; FCKDomTools.SetElementMarker( markerObj, itemNode, '_FCK_ListItem_Processed', true ) ; } var fakeParent = FCKTools.GetElementDocument( groupObj.root ).createElement( this.TagName ) ; for ( var i = 0 ; i < selectedListItems.length ; i++ ) { var listIndex = selectedListItems[i]._FCK_ListArray_Index ; listArray[listIndex].parent = fakeParent ; } var newList = FCKDomTools.ArrayToList( listArray, markerObj ) ; for ( var i = 0 ; i < newList.listNode.childNodes.length ; i++ ) { if ( newList.listNode.childNodes[i].nodeName.IEquals( this.TagName ) ) listsCreated.push( newList.listNode.childNodes[i] ) ; } groupObj.root.parentNode.replaceChild( newList.listNode, groupObj.root ) ; }, _CreateList : function( groupObj, listsCreated ) { var contents = groupObj.contents ; var doc = FCKTools.GetElementDocument( groupObj.root ) ; var listContents = [] ; // It is possible to have the contents returned by DomRangeIterator to be the same as the root. // e.g. when we're running into table cells. // In such a case, enclose the childNodes of contents[0] into a <div>. if ( contents.length == 1 && contents[0] == groupObj.root ) { var divBlock = doc.createElement( 'div' ); while ( contents[0].firstChild ) divBlock.appendChild( contents[0].removeChild( contents[0].firstChild ) ) ; contents[0].appendChild( divBlock ) ; contents[0] = divBlock ; } // Calculate the common parent node of all content blocks. var commonParent = groupObj.contents[0].parentNode ; for ( var i = 0 ; i < contents.length ; i++ ) commonParent = FCKDomTools.GetCommonParents( commonParent, contents[i].parentNode ).pop() ; // We want to insert things that are in the same tree level only, so calculate the contents again // by expanding the selected blocks to the same tree level. for ( var i = 0 ; i < contents.length ; i++ ) { var contentNode = contents[i] ; while ( contentNode.parentNode ) { if ( contentNode.parentNode == commonParent ) { listContents.push( contentNode ) ; break ; } contentNode = contentNode.parentNode ; } } if ( listContents.length < 1 ) return ; // Insert the list to the DOM tree. var insertAnchor = listContents[listContents.length - 1].nextSibling ; var listNode = doc.createElement( this.TagName ) ; listsCreated.push( listNode ) ; while ( listContents.length ) { var contentBlock = listContents.shift() ; var docFrag = doc.createDocumentFragment() ; while ( contentBlock.firstChild ) docFrag.appendChild( contentBlock.removeChild( contentBlock.firstChild ) ) ; contentBlock.parentNode.removeChild( contentBlock ) ; var listItem = doc.createElement( 'li' ) ; listItem.appendChild( docFrag ) ; listNode.appendChild( listItem ) ; } commonParent.insertBefore( listNode, insertAnchor ) ; }, _RemoveList : function( groupObj, markerObj ) { // This is very much like the change list type operation. // Except that we're changing the selected items' indent to -1 in the list array. var listArray = FCKDomTools.ListToArray( groupObj.root, markerObj ) ; var selectedListItems = [] ; for ( var i = 0 ; i < groupObj.contents.length ; i++ ) { var itemNode = groupObj.contents[i] ; itemNode = FCKTools.GetElementAscensor( itemNode, 'li' ) ; if ( ! itemNode || itemNode._FCK_ListItem_Processed ) continue ; selectedListItems.push( itemNode ) ; FCKDomTools.SetElementMarker( markerObj, itemNode, '_FCK_ListItem_Processed', true ) ; } var lastListIndex = null ; for ( var i = 0 ; i < selectedListItems.length ; i++ ) { var listIndex = selectedListItems[i]._FCK_ListArray_Index ; listArray[listIndex].indent = -1 ; lastListIndex = listIndex ; } // After cutting parts of the list out with indent=-1, we still have to maintain the array list // model's nextItem.indent <= currentItem.indent + 1 invariant. Otherwise the array model of the // list cannot be converted back to a real DOM list. for ( var i = lastListIndex + 1; i < listArray.length ; i++ ) { if ( listArray[i].indent > listArray[i-1].indent + 1 ) { var indentOffset = listArray[i-1].indent + 1 - listArray[i].indent ; var oldIndent = listArray[i].indent ; while ( listArray[i] && listArray[i].indent >= oldIndent) { listArray[i].indent += indentOffset ; i++ ; } i-- ; } } var newList = FCKDomTools.ArrayToList( listArray, markerObj ) ; // If groupObj.root is the last element in its parent, or its nextSibling is a <br>, then we should // not add a <br> after the final item. So, check for the cases and trim the <br>. if ( groupObj.root.nextSibling == null || groupObj.root.nextSibling.nodeName.IEquals( 'br' ) ) { if ( newList.listNode.lastChild.nodeName.IEquals( 'br' ) ) newList.listNode.removeChild( newList.listNode.lastChild ) ; } groupObj.root.parentNode.replaceChild( newList.listNode, groupObj.root ) ; } };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKStyleCommand Class: represents the "Spell Check" command. * (Gecko specific implementation) */ var FCKSpellCheckCommand = function() { this.Name = 'SpellCheck' ; this.IsEnabled = ( FCKConfig.SpellChecker != 'ieSpell' ) ; } FCKSpellCheckCommand.prototype.Execute = function() { switch ( FCKConfig.SpellChecker ) { case 'SpellerPages' : FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'dialog/fck_spellerpages.html', 440, 480 ) ; break; case 'WSC' : FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'wsc/w.html', 530, 480 ) ; } } FCKSpellCheckCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKPastePlainTextCommand Class: represents the * "Paste as Plain Text" command. */ var FCKPastePlainTextCommand = function() { this.Name = 'PasteText' ; } FCKPastePlainTextCommand.prototype.Execute = function() { FCK.PasteAsPlainText() ; } FCKPastePlainTextCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return FCK.GetNamedCommandState( 'Paste' ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKBlockQuoteCommand Class: adds or removes blockquote tags. */ var FCKBlockQuoteCommand = function() { } FCKBlockQuoteCommand.prototype = { Execute : function() { FCKUndo.SaveUndoStep() ; var state = this.GetState() ; var range = new FCKDomRange( FCK.EditorWindow ) ; range.MoveToSelection() ; var bookmark = range.CreateBookmark() ; // Kludge for #1592: if the bookmark nodes are in the beginning of // blockquote, then move them to the nearest block element in the // blockquote. if ( FCKBrowserInfo.IsIE ) { var bStart = range.GetBookmarkNode( bookmark, true ) ; var bEnd = range.GetBookmarkNode( bookmark, false ) ; var cursor ; if ( bStart && bStart.parentNode.nodeName.IEquals( 'blockquote' ) && !bStart.previousSibling ) { cursor = bStart ; while ( ( cursor = cursor.nextSibling ) ) { if ( FCKListsLib.BlockElements[ cursor.nodeName.toLowerCase() ] ) FCKDomTools.MoveNode( bStart, cursor, true ) ; } } if ( bEnd && bEnd.parentNode.nodeName.IEquals( 'blockquote' ) && !bEnd.previousSibling ) { cursor = bEnd ; while ( ( cursor = cursor.nextSibling ) ) { if ( FCKListsLib.BlockElements[ cursor.nodeName.toLowerCase() ] ) { if ( cursor.firstChild == bStart ) FCKDomTools.InsertAfterNode( bStart, bEnd ) ; else FCKDomTools.MoveNode( bEnd, cursor, true ) ; } } } } var iterator = new FCKDomRangeIterator( range ) ; var block ; if ( state == FCK_TRISTATE_OFF ) { var paragraphs = [] ; while ( ( block = iterator.GetNextParagraph() ) ) paragraphs.push( block ) ; // If no paragraphs, create one from the current selection position. if ( paragraphs.length < 1 ) { para = range.Window.document.createElement( FCKConfig.EnterMode.IEquals( 'p' ) ? 'p' : 'div' ) ; range.InsertNode( para ) ; para.appendChild( range.Window.document.createTextNode( '\ufeff' ) ) ; range.MoveToBookmark( bookmark ) ; range.MoveToNodeContents( para ) ; range.Collapse( true ) ; bookmark = range.CreateBookmark() ; paragraphs.push( para ) ; } // Make sure all paragraphs have the same parent. var commonParent = paragraphs[0].parentNode ; var tmp = [] ; for ( var i = 0 ; i < paragraphs.length ; i++ ) { block = paragraphs[i] ; commonParent = FCKDomTools.GetCommonParents( block.parentNode, commonParent ).pop() ; } // The common parent must not be the following tags: table, tbody, tr, ol, ul. while ( commonParent.nodeName.IEquals( 'table', 'tbody', 'tr', 'ol', 'ul' ) ) commonParent = commonParent.parentNode ; // Reconstruct the block list to be processed such that all resulting blocks // satisfy parentNode == commonParent. var lastBlock = null ; while ( paragraphs.length > 0 ) { block = paragraphs.shift() ; while ( block.parentNode != commonParent ) block = block.parentNode ; if ( block != lastBlock ) tmp.push( block ) ; lastBlock = block ; } // If any of the selected blocks is a blockquote, remove it to prevent nested blockquotes. while ( tmp.length > 0 ) { block = tmp.shift() ; if ( block.nodeName.IEquals( 'blockquote' ) ) { var docFrag = FCKTools.GetElementDocument( block ).createDocumentFragment() ; while ( block.firstChild ) { docFrag.appendChild( block.removeChild( block.firstChild ) ) ; paragraphs.push( docFrag.lastChild ) ; } block.parentNode.replaceChild( docFrag, block ) ; } else paragraphs.push( block ) ; } // Now we have all the blocks to be included in a new blockquote node. var bqBlock = range.Window.document.createElement( 'blockquote' ) ; commonParent.insertBefore( bqBlock, paragraphs[0] ) ; while ( paragraphs.length > 0 ) { block = paragraphs.shift() ; bqBlock.appendChild( block ) ; } } else if ( state == FCK_TRISTATE_ON ) { var moveOutNodes = [] ; var elementMarkers = {} ; while ( ( block = iterator.GetNextParagraph() ) ) { var bqParent = null ; var bqChild = null ; while ( block.parentNode ) { if ( block.parentNode.nodeName.IEquals( 'blockquote' ) ) { bqParent = block.parentNode ; bqChild = block ; break ; } block = block.parentNode ; } // Remember the blocks that were recorded down in the moveOutNodes array // to prevent duplicates. if ( bqParent && bqChild && !bqChild._fckblockquotemoveout ) { moveOutNodes.push( bqChild ) ; FCKDomTools.SetElementMarker( elementMarkers, bqChild, '_fckblockquotemoveout', true ) ; } } FCKDomTools.ClearAllMarkers( elementMarkers ) ; var movedNodes = [] ; var processedBlockquoteBlocks = [], elementMarkers = {} ; var noBlockLeft = function( bqBlock ) { for ( var i = 0 ; i < bqBlock.childNodes.length ; i++ ) { if ( FCKListsLib.BlockElements[ bqBlock.childNodes[i].nodeName.toLowerCase() ] ) return false ; } return true ; } ; while ( moveOutNodes.length > 0 ) { var node = moveOutNodes.shift() ; var bqBlock = node.parentNode ; // If the node is located at the beginning or the end, just take it out without splitting. // Otherwise, split the blockquote node and move the paragraph in between the two blockquote nodes. if ( node == node.parentNode.firstChild ) bqBlock.parentNode.insertBefore( bqBlock.removeChild( node ), bqBlock ) ; else if ( node == node.parentNode.lastChild ) bqBlock.parentNode.insertBefore( bqBlock.removeChild( node ), bqBlock.nextSibling ) ; else FCKDomTools.BreakParent( node, node.parentNode, range ) ; // Remember the blockquote node so we can clear it later (if it becomes empty). if ( !bqBlock._fckbqprocessed ) { processedBlockquoteBlocks.push( bqBlock ) ; FCKDomTools.SetElementMarker( elementMarkers, bqBlock, '_fckbqprocessed', true ); } movedNodes.push( node ) ; } // Clear blockquote nodes that have become empty. for ( var i = processedBlockquoteBlocks.length - 1 ; i >= 0 ; i-- ) { var bqBlock = processedBlockquoteBlocks[i] ; if ( noBlockLeft( bqBlock ) ) FCKDomTools.RemoveNode( bqBlock ) ; } FCKDomTools.ClearAllMarkers( elementMarkers ) ; if ( FCKConfig.EnterMode.IEquals( 'br' ) ) { while ( movedNodes.length ) { var node = movedNodes.shift() ; var firstTime = true ; if ( node.nodeName.IEquals( 'div' ) ) { var docFrag = FCKTools.GetElementDocument( node ).createDocumentFragment() ; var needBeginBr = firstTime && node.previousSibling && !FCKListsLib.BlockBoundaries[node.previousSibling.nodeName.toLowerCase()] ; if ( firstTime && needBeginBr ) docFrag.appendChild( FCKTools.GetElementDocument( node ).createElement( 'br' ) ) ; var needEndBr = node.nextSibling && !FCKListsLib.BlockBoundaries[node.nextSibling.nodeName.toLowerCase()] ; while ( node.firstChild ) docFrag.appendChild( node.removeChild( node.firstChild ) ) ; if ( needEndBr ) docFrag.appendChild( FCKTools.GetElementDocument( node ).createElement( 'br' ) ) ; node.parentNode.replaceChild( docFrag, node ) ; firstTime = false ; } } } } range.MoveToBookmark( bookmark ) ; range.Select() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { // Disabled if not WYSIWYG. if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || ! FCK.EditorWindow ) return FCK_TRISTATE_DISABLED ; var path = new FCKElementPath( FCKSelection.GetBoundaryParentElement( true ) ) ; var firstBlock = path.Block || path.BlockLimit ; if ( !firstBlock || firstBlock.nodeName.toLowerCase() == 'body' ) return FCK_TRISTATE_OFF ; // See if the first block has a blockquote parent. for ( var i = 0 ; i < path.Elements.length ; i++ ) { if ( path.Elements[i].nodeName.IEquals( 'blockquote' ) ) return FCK_TRISTATE_ON ; } return FCK_TRISTATE_OFF ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKPastePlainTextCommand Class: represents the * "Paste as Plain Text" command. */ var FCKTableCommand = function( command ) { this.Name = command ; } FCKTableCommand.prototype.Execute = function() { FCKUndo.SaveUndoStep() ; if ( ! FCKBrowserInfo.IsGecko ) { switch ( this.Name ) { case 'TableMergeRight' : return FCKTableHandler.MergeRight() ; case 'TableMergeDown' : return FCKTableHandler.MergeDown() ; } } switch ( this.Name ) { case 'TableInsertRowAfter' : return FCKTableHandler.InsertRow( false ) ; case 'TableInsertRowBefore' : return FCKTableHandler.InsertRow( true ) ; case 'TableDeleteRows' : return FCKTableHandler.DeleteRows() ; case 'TableInsertColumnAfter' : return FCKTableHandler.InsertColumn( false ) ; case 'TableInsertColumnBefore' : return FCKTableHandler.InsertColumn( true ) ; case 'TableDeleteColumns' : return FCKTableHandler.DeleteColumns() ; case 'TableInsertCellAfter' : return FCKTableHandler.InsertCell( null, false ) ; case 'TableInsertCellBefore' : return FCKTableHandler.InsertCell( null, true ) ; case 'TableDeleteCells' : return FCKTableHandler.DeleteCells() ; case 'TableMergeCells' : return FCKTableHandler.MergeCells() ; case 'TableHorizontalSplitCell' : return FCKTableHandler.HorizontalSplitCell() ; case 'TableVerticalSplitCell' : return FCKTableHandler.VerticalSplitCell() ; case 'TableDelete' : return FCKTableHandler.DeleteTable() ; default : return alert( FCKLang.UnknownCommand.replace( /%1/g, this.Name ) ) ; } } FCKTableCommand.prototype.GetState = function() { if ( FCK.EditorDocument != null && FCKSelection.HasAncestorNode( 'TABLE' ) ) { switch ( this.Name ) { case 'TableHorizontalSplitCell' : case 'TableVerticalSplitCell' : if ( FCKTableHandler.GetSelectedCells().length == 1 ) return FCK_TRISTATE_OFF ; else return FCK_TRISTATE_DISABLED ; case 'TableMergeCells' : if ( FCKTableHandler.CheckIsSelectionRectangular() && FCKTableHandler.GetSelectedCells().length > 1 ) return FCK_TRISTATE_OFF ; else return FCK_TRISTATE_DISABLED ; case 'TableMergeRight' : return FCKTableHandler.GetMergeRightTarget() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; case 'TableMergeDown' : return FCKTableHandler.GetMergeDownTarget() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; default : return FCK_TRISTATE_OFF ; } } else return FCK_TRISTATE_DISABLED; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKShowBlockCommand Class: the "Show Blocks" command. */ var FCKShowBlockCommand = function( name, defaultState ) { this.Name = name ; if ( defaultState != undefined ) this._SavedState = defaultState ; else this._SavedState = null ; } FCKShowBlockCommand.prototype.Execute = function() { var state = this.GetState() ; if ( state == FCK_TRISTATE_DISABLED ) return ; var body = FCK.EditorDocument.body ; if ( state == FCK_TRISTATE_ON ) body.className = body.className.replace( /(^| )FCK__ShowBlocks/g, '' ) ; else body.className += ' FCK__ShowBlocks' ; if ( FCKBrowserInfo.IsIE ) { try { FCK.EditorDocument.selection.createRange().select() ; } catch ( e ) {} } else { var focus = FCK.EditorWindow.getSelection().focusNode ; if ( focus ) { if ( focus.nodeType != 1 ) focus = focus.parentNode ; FCKDomTools.ScrollIntoView( focus, false ) ; } } FCK.Events.FireEvent( 'OnSelectionChange' ) ; } FCKShowBlockCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; // On some cases FCK.EditorDocument.body is not yet available if ( !FCK.EditorDocument ) return FCK_TRISTATE_OFF ; if ( /FCK__ShowBlocks(?:\s|$)/.test( FCK.EditorDocument.body.className ) ) return FCK_TRISTATE_ON ; return FCK_TRISTATE_OFF ; } FCKShowBlockCommand.prototype.SaveState = function() { this._SavedState = this.GetState() ; } FCKShowBlockCommand.prototype.RestoreState = function() { if ( this._SavedState != null && this.GetState() != this._SavedState ) this.Execute() ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKStyleCommand Class: represents the "Spell Check" command. * (IE specific implementation) */ var FCKSpellCheckCommand = function() { this.Name = 'SpellCheck' ; this.IsEnabled = true ; } FCKSpellCheckCommand.prototype.Execute = function() { switch ( FCKConfig.SpellChecker ) { case 'ieSpell' : this._RunIeSpell() ; break ; case 'SpellerPages' : FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'dialog/fck_spellerpages.html', 440, 480 ) ; break ; case 'WSC' : FCKDialog.OpenDialog( 'FCKDialog_SpellCheck', 'Spell Check', 'wsc/w.html', 530, 480 ) ; } } FCKSpellCheckCommand.prototype._RunIeSpell = function() { try { var oIeSpell = new ActiveXObject( "ieSpell.ieSpellExtension" ) ; oIeSpell.CheckAllLinkedDocuments( FCK.EditorDocument ) ; } catch( e ) { if( e.number == -2146827859 ) { if ( confirm( FCKLang.IeSpellDownload ) ) window.open( FCKConfig.IeSpellDownloadUrl , 'IeSpellDownload' ) ; } else alert( 'Error Loading ieSpell: ' + e.message + ' (' + e.number + ')' ) ; } } FCKSpellCheckCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return this.IsEnabled ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Definition of other commands that are not available internaly in the * browser (see FCKNamedCommand). */ // ### General Dialog Box Commands. var FCKDialogCommand = function( name, title, url, width, height, getStateFunction, getStateParam, customValue ) { this.Name = name ; this.Title = title ; this.Url = url ; this.Width = width ; this.Height = height ; this.CustomValue = customValue ; this.GetStateFunction = getStateFunction ; this.GetStateParam = getStateParam ; this.Resizable = false ; } FCKDialogCommand.prototype.Execute = function() { FCKDialog.OpenDialog( 'FCKDialog_' + this.Name , this.Title, this.Url, this.Width, this.Height, this.CustomValue, null, this.Resizable ) ; } FCKDialogCommand.prototype.GetState = function() { if ( this.GetStateFunction ) return this.GetStateFunction( this.GetStateParam ) ; else return FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; } // Generic Undefined command (usually used when a command is under development). var FCKUndefinedCommand = function() { this.Name = 'Undefined' ; } FCKUndefinedCommand.prototype.Execute = function() { alert( FCKLang.NotImplemented ) ; } FCKUndefinedCommand.prototype.GetState = function() { return FCK_TRISTATE_OFF ; } // ### FormatBlock var FCKFormatBlockCommand = function() {} FCKFormatBlockCommand.prototype = { Name : 'FormatBlock', Execute : FCKStyleCommand.prototype.Execute, GetState : function() { return FCK.EditorDocument ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; } }; // ### FontName var FCKFontNameCommand = function() {} FCKFontNameCommand.prototype = { Name : 'FontName', Execute : FCKStyleCommand.prototype.Execute, GetState : FCKFormatBlockCommand.prototype.GetState }; // ### FontSize var FCKFontSizeCommand = function() {} FCKFontSizeCommand.prototype = { Name : 'FontSize', Execute : FCKStyleCommand.prototype.Execute, GetState : FCKFormatBlockCommand.prototype.GetState }; // ### Preview var FCKPreviewCommand = function() { this.Name = 'Preview' ; } FCKPreviewCommand.prototype.Execute = function() { FCK.Preview() ; } FCKPreviewCommand.prototype.GetState = function() { return FCK_TRISTATE_OFF ; } // ### Save var FCKSaveCommand = function() { this.Name = 'Save' ; } FCKSaveCommand.prototype.Execute = function() { // Get the linked field form. var oForm = FCK.GetParentForm() ; if ( typeof( oForm.onsubmit ) == 'function' ) { var bRet = oForm.onsubmit() ; if ( bRet != null && bRet === false ) return ; } // Submit the form. // If there's a button named "submit" then the form.submit() function is masked and // can't be called in Mozilla, so we call the click() method of that button. if ( typeof( oForm.submit ) == 'function' ) oForm.submit() ; else oForm.submit.click() ; } FCKSaveCommand.prototype.GetState = function() { return FCK_TRISTATE_OFF ; } // ### NewPage var FCKNewPageCommand = function() { this.Name = 'NewPage' ; } FCKNewPageCommand.prototype.Execute = function() { FCKUndo.SaveUndoStep() ; FCK.SetData( '' ) ; FCKUndo.Typing = true ; FCK.Focus() ; } FCKNewPageCommand.prototype.GetState = function() { return FCK_TRISTATE_OFF ; } // ### Source button var FCKSourceCommand = function() { this.Name = 'Source' ; } FCKSourceCommand.prototype.Execute = function() { if ( FCKConfig.SourcePopup ) // Until v2.2, it was mandatory for FCKBrowserInfo.IsGecko. { var iWidth = FCKConfig.ScreenWidth * 0.65 ; var iHeight = FCKConfig.ScreenHeight * 0.65 ; FCKDialog.OpenDialog( 'FCKDialog_Source', FCKLang.Source, 'dialog/fck_source.html', iWidth, iHeight, null, null, true ) ; } else FCK.SwitchEditMode() ; } FCKSourceCommand.prototype.GetState = function() { return ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_OFF : FCK_TRISTATE_ON ) ; } // ### Undo var FCKUndoCommand = function() { this.Name = 'Undo' ; } FCKUndoCommand.prototype.Execute = function() { FCKUndo.Undo() ; } FCKUndoCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return ( FCKUndo.CheckUndoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ; } // ### Redo var FCKRedoCommand = function() { this.Name = 'Redo' ; } FCKRedoCommand.prototype.Execute = function() { FCKUndo.Redo() ; } FCKRedoCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return ( FCKUndo.CheckRedoState() ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ) ; } // ### Page Break var FCKPageBreakCommand = function() { this.Name = 'PageBreak' ; } FCKPageBreakCommand.prototype.Execute = function() { // Take an undo snapshot before changing the document FCKUndo.SaveUndoStep() ; // var e = FCK.EditorDocument.createElement( 'CENTER' ) ; // e.style.pageBreakAfter = 'always' ; // Tidy was removing the empty CENTER tags, so the following solution has // been found. It also validates correctly as XHTML 1.0 Strict. var e = FCK.EditorDocument.createElement( 'DIV' ) ; e.style.pageBreakAfter = 'always' ; e.innerHTML = '<span style="DISPLAY:none">&nbsp;</span>' ; var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', e ) ; var oRange = new FCKDomRange( FCK.EditorWindow ) ; oRange.MoveToSelection() ; var oSplitInfo = oRange.SplitBlock() ; oRange.InsertNode( oFakeImage ) ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; } FCKPageBreakCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return 0 ; // FCK_TRISTATE_OFF } // FCKUnlinkCommand - by Johnny Egeland (johnny@coretrek.com) var FCKUnlinkCommand = function() { this.Name = 'Unlink' ; } FCKUnlinkCommand.prototype.Execute = function() { // Take an undo snapshot before changing the document FCKUndo.SaveUndoStep() ; if ( FCKBrowserInfo.IsGeckoLike ) { var oLink = FCK.Selection.MoveToAncestorNode( 'A' ) ; // The unlink command can generate a span in Firefox, so let's do it our way. See #430 if ( oLink ) FCKTools.RemoveOuterTags( oLink ) ; return ; } FCK.ExecuteNamedCommand( this.Name ) ; } FCKUnlinkCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; var state = FCK.GetNamedCommandState( this.Name ) ; // Check that it isn't an anchor if ( state == FCK_TRISTATE_OFF && FCK.EditMode == FCK_EDITMODE_WYSIWYG ) { var oLink = FCKSelection.MoveToAncestorNode( 'A' ) ; var bIsAnchor = ( oLink && oLink.name.length > 0 && oLink.href.length == 0 ) ; if ( bIsAnchor ) state = FCK_TRISTATE_DISABLED ; } return state ; } var FCKVisitLinkCommand = function() { this.Name = 'VisitLink'; } FCKVisitLinkCommand.prototype = { GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; var state = FCK.GetNamedCommandState( 'Unlink' ) ; if ( state == FCK_TRISTATE_OFF ) { var el = FCKSelection.MoveToAncestorNode( 'A' ) ; if ( !el.href ) state = FCK_TRISTATE_DISABLED ; } return state ; }, Execute : function() { var el = FCKSelection.MoveToAncestorNode( 'A' ) ; var url = el.getAttribute( '_fcksavedurl' ) || el.getAttribute( 'href', 2 ) ; // Check if it's a full URL. // If not full URL, we'll need to apply the BaseHref setting. if ( ! /:\/\//.test( url ) ) { var baseHref = FCKConfig.BaseHref ; var parentWindow = FCK.GetInstanceObject( 'parent' ) ; if ( !baseHref ) { baseHref = parentWindow.document.location.href ; baseHref = baseHref.substring( 0, baseHref.lastIndexOf( '/' ) + 1 ) ; } if ( /^\//.test( url ) ) { try { baseHref = baseHref.match( /^.*:\/\/+[^\/]+/ )[0] ; } catch ( e ) { baseHref = parentWindow.document.location.protocol + '://' + parentWindow.parent.document.location.host ; } } url = baseHref + url ; } if ( !window.open( url, '_blank' ) ) alert( FCKLang.VisitLinkBlocked ) ; } } ; // FCKSelectAllCommand var FCKSelectAllCommand = function() { this.Name = 'SelectAll' ; } FCKSelectAllCommand.prototype.Execute = function() { if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) { FCK.ExecuteNamedCommand( 'SelectAll' ) ; } else { // Select the contents of the textarea var textarea = FCK.EditingArea.Textarea ; if ( FCKBrowserInfo.IsIE ) { textarea.createTextRange().execCommand( 'SelectAll' ) ; } else { textarea.selectionStart = 0 ; textarea.selectionEnd = textarea.value.length ; } textarea.focus() ; } } FCKSelectAllCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return FCK_TRISTATE_OFF ; } // FCKPasteCommand var FCKPasteCommand = function() { this.Name = 'Paste' ; } FCKPasteCommand.prototype = { Execute : function() { if ( FCKBrowserInfo.IsIE ) FCK.Paste() ; else FCK.ExecuteNamedCommand( 'Paste' ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return FCK.GetNamedCommandState( 'Paste' ) ; } } ; // FCKRuleCommand var FCKRuleCommand = function() { this.Name = 'Rule' ; } FCKRuleCommand.prototype = { Execute : function() { FCKUndo.SaveUndoStep() ; FCK.InsertElement( 'hr' ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return FCK.GetNamedCommandState( 'InsertHorizontalRule' ) ; } } ; // FCKCutCopyCommand var FCKCutCopyCommand = function( isCut ) { this.Name = isCut ? 'Cut' : 'Copy' ; } FCKCutCopyCommand.prototype = { Execute : function() { var enabled = false ; if ( FCKBrowserInfo.IsIE ) { // The following seems to be the only reliable way to detect that // cut/copy is enabled in IE. It will fire the oncut/oncopy event // only if the security settings enabled the command to execute. var onEvent = function() { enabled = true ; } ; var eventName = 'on' + this.Name.toLowerCase() ; FCK.EditorDocument.body.attachEvent( eventName, onEvent ) ; FCK.ExecuteNamedCommand( this.Name ) ; FCK.EditorDocument.body.detachEvent( eventName, onEvent ) ; } else { try { // Other browsers throw an error if the command is disabled. FCK.ExecuteNamedCommand( this.Name ) ; enabled = true ; } catch(e){} } if ( !enabled ) alert( FCKLang[ 'PasteError' + this.Name ] ) ; }, GetState : function() { // Strangely, the Cut command happens to have the correct states for // both Copy and Cut in all browsers. return FCK.EditMode != FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_DISABLED : FCK.GetNamedCommandState( 'Cut' ) ; } }; var FCKAnchorDeleteCommand = function() { this.Name = 'AnchorDelete' ; } FCKAnchorDeleteCommand.prototype = { Execute : function() { if (FCK.Selection.GetType() == 'Control') { FCK.Selection.Delete(); } else { var oFakeImage = FCK.Selection.GetSelectedElement() ; if ( oFakeImage ) { if ( oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fckanchor') ) oAnchor = FCK.GetRealElement( oFakeImage ) ; else oFakeImage = null ; } //Search for a real anchor if ( !oFakeImage ) { oAnchor = FCK.Selection.MoveToAncestorNode( 'A' ) ; if ( oAnchor ) FCK.Selection.SelectNode( oAnchor ) ; } // If it's also a link, then just remove the name and exit if ( oAnchor.href.length != 0 ) { oAnchor.removeAttribute( 'name' ) ; // Remove temporary class for IE if ( FCKBrowserInfo.IsIE ) oAnchor.className = oAnchor.className.replace( FCKRegexLib.FCK_Class, '' ) ; return ; } // We need to remove the anchor // If we got a fake image, then just remove it and we're done if ( oFakeImage ) { oFakeImage.parentNode.removeChild( oFakeImage ) ; return ; } // Empty anchor, so just remove it if ( oAnchor.innerHTML.length == 0 ) { oAnchor.parentNode.removeChild( oAnchor ) ; return ; } // Anchor with content, leave the content FCKTools.RemoveOuterTags( oAnchor ) ; } if ( FCKBrowserInfo.IsGecko ) FCK.Selection.Collapse( true ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return FCK.GetNamedCommandState( 'Unlink') ; } }; var FCKDeleteDivCommand = function() { } FCKDeleteDivCommand.prototype = { GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; var node = FCKSelection.GetParentElement() ; var path = new FCKElementPath( node ) ; return path.BlockLimit && path.BlockLimit.nodeName.IEquals( 'div' ) ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; }, Execute : function() { // Create an undo snapshot before doing anything. FCKUndo.SaveUndoStep() ; // Find out the nodes to delete. var nodes = FCKDomTools.GetSelectedDivContainers() ; // Remember the current selection position. var range = new FCKDomRange( FCK.EditorWindow ) ; range.MoveToSelection() ; var bookmark = range.CreateBookmark() ; // Delete the container DIV node. for ( var i = 0 ; i < nodes.length ; i++) FCKDomTools.RemoveNode( nodes[i], true ) ; // Restore selection. range.MoveToBookmark( bookmark ) ; range.Select() ; } } ; // FCKRuleCommand var FCKNbsp = function() { this.Name = 'Non Breaking Space' ; } FCKNbsp.prototype = { Execute : function() { FCK.InsertHtml( '&nbsp;' ) ; }, GetState : function() { return ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ? FCK_TRISTATE_DISABLED : FCK_TRISTATE_OFF ) ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Stretch the editor to full window size and back. */ var FCKFitWindow = function() { this.Name = 'FitWindow' ; } FCKFitWindow.prototype.Execute = function() { var eEditorFrame = window.frameElement ; var eEditorFrameStyle = eEditorFrame.style ; var eMainWindow = parent ; var eDocEl = eMainWindow.document.documentElement ; var eBody = eMainWindow.document.body ; var eBodyStyle = eBody.style ; var eParent ; // Save the current selection and scroll position. var oRange, oEditorScrollPos ; if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) { oRange = new FCKDomRange( FCK.EditorWindow ) ; oRange.MoveToSelection() ; oEditorScrollPos = FCKTools.GetScrollPosition( FCK.EditorWindow ) ; } else { var eTextarea = FCK.EditingArea.Textarea ; oRange = !FCKBrowserInfo.IsIE && [ eTextarea.selectionStart, eTextarea.selectionEnd ] ; oEditorScrollPos = [ eTextarea.scrollLeft, eTextarea.scrollTop ] ; } // No original style properties known? Go fullscreen. if ( !this.IsMaximized ) { // Registering an event handler when the window gets resized. if( FCKBrowserInfo.IsIE ) eMainWindow.attachEvent( 'onresize', FCKFitWindow_Resize ) ; else eMainWindow.addEventListener( 'resize', FCKFitWindow_Resize, true ) ; // Save the scrollbars position. this._ScrollPos = FCKTools.GetScrollPosition( eMainWindow ) ; // Save and reset the styles for the entire node tree. They could interfere in the result. eParent = eEditorFrame ; // The extra () is to avoid a warning with strict error checking. This is ok. while( (eParent = eParent.parentNode) ) { if ( eParent.nodeType == 1 ) { eParent._fckSavedStyles = FCKTools.SaveStyles( eParent ) ; eParent.style.zIndex = FCKConfig.FloatingPanelsZIndex - 1 ; } } // Hide IE scrollbars (in strict mode). if ( FCKBrowserInfo.IsIE ) { this.documentElementOverflow = eDocEl.style.overflow ; eDocEl.style.overflow = 'hidden' ; eBodyStyle.overflow = 'hidden' ; } else { // Hide the scroolbars in Firefox. eBodyStyle.overflow = 'hidden' ; eBodyStyle.width = '0px' ; eBodyStyle.height = '0px' ; } // Save the IFRAME styles. this._EditorFrameStyles = FCKTools.SaveStyles( eEditorFrame ) ; // Resize. var oViewPaneSize = FCKTools.GetViewPaneSize( eMainWindow ) ; eEditorFrameStyle.position = "absolute"; eEditorFrame.offsetLeft ; // Kludge for Safari 3.1 browser bug, do not remove. See #2066. eEditorFrameStyle.zIndex = FCKConfig.FloatingPanelsZIndex - 1; eEditorFrameStyle.left = "0px"; eEditorFrameStyle.top = "0px"; eEditorFrameStyle.width = oViewPaneSize.Width + "px"; eEditorFrameStyle.height = oViewPaneSize.Height + "px"; // Giving the frame some (huge) borders on his right and bottom // side to hide the background that would otherwise show when the // editor is in fullsize mode and the window is increased in size // not for IE, because IE immediately adapts the editor on resize, // without showing any of the background oddly in firefox, the // editor seems not to fill the whole frame, so just setting the // background of it to white to cover the page laying behind it anyway. if ( !FCKBrowserInfo.IsIE ) { eEditorFrameStyle.borderRight = eEditorFrameStyle.borderBottom = "9999px solid white" ; eEditorFrameStyle.backgroundColor = "white"; } // Scroll to top left. eMainWindow.scrollTo(0, 0); // Is the editor still not on the top left? Let's find out and fix that as well. (Bug #174) var editorPos = FCKTools.GetWindowPosition( eMainWindow, eEditorFrame ) ; if ( editorPos.x != 0 ) eEditorFrameStyle.left = ( -1 * editorPos.x ) + "px" ; if ( editorPos.y != 0 ) eEditorFrameStyle.top = ( -1 * editorPos.y ) + "px" ; this.IsMaximized = true ; } else // Resize to original size. { // Remove the event handler of window resizing. if( FCKBrowserInfo.IsIE ) eMainWindow.detachEvent( "onresize", FCKFitWindow_Resize ) ; else eMainWindow.removeEventListener( "resize", FCKFitWindow_Resize, true ) ; // Restore the CSS position for the entire node tree. eParent = eEditorFrame ; // The extra () is to avoid a warning with strict error checking. This is ok. while( (eParent = eParent.parentNode) ) { if ( eParent._fckSavedStyles ) { FCKTools.RestoreStyles( eParent, eParent._fckSavedStyles ) ; eParent._fckSavedStyles = null ; } } // Restore IE scrollbars if ( FCKBrowserInfo.IsIE ) eDocEl.style.overflow = this.documentElementOverflow ; // Restore original size FCKTools.RestoreStyles( eEditorFrame, this._EditorFrameStyles ) ; // Restore the window scroll position. eMainWindow.scrollTo( this._ScrollPos.X, this._ScrollPos.Y ) ; this.IsMaximized = false ; } FCKToolbarItems.GetItem('FitWindow').RefreshState() ; // It seams that Firefox restarts the editing area when making this changes. // On FF 1.0.x, the area is not anymore editable. On FF 1.5+, the special //configuration, like DisableFFTableHandles and DisableObjectResizing get //lost, so we must reset it. Also, the cursor position and selection are //also lost, even if you comment the following line (MakeEditable). // if ( FCKBrowserInfo.IsGecko10 ) // Initially I thought it was a FF 1.0 only problem. if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) FCK.EditingArea.MakeEditable() ; FCK.Focus() ; // Restore the selection and scroll position of inside the document. if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG ) { oRange.Select() ; FCK.EditorWindow.scrollTo( oEditorScrollPos.X, oEditorScrollPos.Y ) ; } else { if ( !FCKBrowserInfo.IsIE ) { eTextarea.selectionStart = oRange[0] ; eTextarea.selectionEnd = oRange[1] ; } eTextarea.scrollLeft = oEditorScrollPos[0] ; eTextarea.scrollTop = oEditorScrollPos[1] ; } } FCKFitWindow.prototype.GetState = function() { if ( FCKConfig.ToolbarLocation != 'In' ) return FCK_TRISTATE_DISABLED ; else return ( this.IsMaximized ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ); } function FCKFitWindow_Resize() { var oViewPaneSize = FCKTools.GetViewPaneSize( parent ) ; var eEditorFrameStyle = window.frameElement.style ; eEditorFrameStyle.width = oViewPaneSize.Width + 'px' ; eEditorFrameStyle.height = oViewPaneSize.Height + 'px' ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKCoreStyleCommand Class: controls the execution of a core style. Core * styles are usually represented as buttons in the toolbar., like Bold and * Italic. */ var FCKCoreStyleCommand = function( coreStyleName ) { this.Name = 'CoreStyle' ; this.StyleName = '_FCK_' + coreStyleName ; this.IsActive = false ; FCKStyles.AttachStyleStateChange( this.StyleName, this._OnStyleStateChange, this ) ; } FCKCoreStyleCommand.prototype = { Execute : function() { FCKUndo.SaveUndoStep() ; if ( this.IsActive ) FCKStyles.RemoveStyle( this.StyleName ) ; else FCKStyles.ApplyStyle( this.StyleName ) ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG ) return FCK_TRISTATE_DISABLED ; return this.IsActive ? FCK_TRISTATE_ON : FCK_TRISTATE_OFF ; }, _OnStyleStateChange : function( styleName, isActive ) { this.IsActive = isActive ; } };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKRemoveFormatCommand Class: controls the execution of a core style. Core * styles are usually represented as buttons in the toolbar., like Bold and * Italic. */ var FCKRemoveFormatCommand = function() { this.Name = 'RemoveFormat' ; } FCKRemoveFormatCommand.prototype = { Execute : function() { FCKStyles.RemoveAll() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { return FCK.EditorWindow ? FCK_TRISTATE_OFF : FCK_TRISTATE_DISABLED ; } };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKJustifyCommand Class: controls block justification. */ var FCKJustifyCommand = function( alignValue ) { this.AlignValue = alignValue ; // Detect whether this is the instance for the default alignment. var contentDir = FCKConfig.ContentLangDirection.toLowerCase() ; this.IsDefaultAlign = ( alignValue == 'left' && contentDir == 'ltr' ) || ( alignValue == 'right' && contentDir == 'rtl' ) ; // Get the class name to be used by this instance. var cssClassName = this._CssClassName = ( function() { var classes = FCKConfig.JustifyClasses ; if ( classes ) { switch ( alignValue ) { case 'left' : return classes[0] || null ; case 'center' : return classes[1] || null ; case 'right' : return classes[2] || null ; case 'justify' : return classes[3] || null ; } } return null ; } )() ; if ( cssClassName && cssClassName.length > 0 ) this._CssClassRegex = new RegExp( '(?:^|\\s+)' + cssClassName + '(?=$|\\s)' ) ; } FCKJustifyCommand._GetClassNameRegex = function() { var regex = FCKJustifyCommand._ClassRegex ; if ( regex != undefined ) return regex ; var names = [] ; var classes = FCKConfig.JustifyClasses ; if ( classes ) { for ( var i = 0 ; i < 4 ; i++ ) { var className = classes[i] ; if ( className && className.length > 0 ) names.push( className ) ; } } if ( names.length > 0 ) regex = new RegExp( '(?:^|\\s+)(?:' + names.join( '|' ) + ')(?=$|\\s)' ) ; else regex = null ; return FCKJustifyCommand._ClassRegex = regex ; } FCKJustifyCommand.prototype = { Execute : function() { // Save an undo snapshot before doing anything. FCKUndo.SaveUndoStep() ; var range = new FCKDomRange( FCK.EditorWindow ) ; range.MoveToSelection() ; var currentState = this.GetState() ; if ( currentState == FCK_TRISTATE_DISABLED ) return ; // Store a bookmark of the selection since the paragraph iterator might // change the DOM tree and break selections. var bookmark = range.CreateBookmark() ; var cssClassName = this._CssClassName ; // Apply alignment setting for each paragraph. var iterator = new FCKDomRangeIterator( range ) ; var block ; while ( ( block = iterator.GetNextParagraph() ) ) { block.removeAttribute( 'align' ) ; if ( cssClassName ) { // Remove the any of the alignment classes from the className. var className = block.className.replace( FCKJustifyCommand._GetClassNameRegex(), '' ) ; // Append the desired class name. if ( currentState == FCK_TRISTATE_OFF ) { if ( className.length > 0 ) className += ' ' ; block.className = className + cssClassName ; } else if ( className.length == 0 ) FCKDomTools.RemoveAttribute( block, 'class' ) ; } else { var style = block.style ; if ( currentState == FCK_TRISTATE_OFF ) style.textAlign = this.AlignValue ; else { style.textAlign = '' ; if ( style.cssText.length == 0 ) block.removeAttribute( 'style' ) ; } } } // Restore previous selection. range.MoveToBookmark( bookmark ) ; range.Select() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { // Disabled if not WYSIWYG. if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || ! FCK.EditorWindow ) return FCK_TRISTATE_DISABLED ; // Retrieve the first selected block. var path = new FCKElementPath( FCKSelection.GetBoundaryParentElement( true ) ) ; var firstBlock = path.Block || path.BlockLimit ; if ( !firstBlock || firstBlock.nodeName.toLowerCase() == 'body' ) return FCK_TRISTATE_OFF ; // Check if the desired style is already applied to the block. var currentAlign ; if ( FCKBrowserInfo.IsIE ) currentAlign = firstBlock.currentStyle.textAlign ; else currentAlign = FCK.EditorWindow.getComputedStyle( firstBlock, '' ).getPropertyValue( 'text-align' ); currentAlign = currentAlign.replace( /(-moz-|-webkit-|start|auto)/i, '' ); if ( ( !currentAlign && this.IsDefaultAlign ) || currentAlign == this.AlignValue ) return FCK_TRISTATE_ON ; return FCK_TRISTATE_OFF ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKPasteWordCommand Class: represents the "Paste from Word" command. */ var FCKPasteWordCommand = function() { this.Name = 'PasteWord' ; } FCKPasteWordCommand.prototype.Execute = function() { FCK.PasteFromWord() ; } FCKPasteWordCommand.prototype.GetState = function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || FCKConfig.ForcePasteAsPlainText ) return FCK_TRISTATE_DISABLED ; else return FCK.GetNamedCommandState( 'Paste' ) ; }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKStyleCommand Class: represents the "Style" command. */ var FCKStyleCommand = function() {} FCKStyleCommand.prototype = { Name : 'Style', Execute : function( styleName, styleComboItem ) { FCKUndo.SaveUndoStep() ; if ( styleComboItem.Selected ) FCK.Styles.RemoveStyle( styleComboItem.Style ) ; else FCK.Styles.ApplyStyle( styleComboItem.Style ) ; FCKUndo.SaveUndoStep() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || !FCK.EditorDocument ) return FCK_TRISTATE_DISABLED ; if ( FCKSelection.GetType() == 'Control' ) { var el = FCKSelection.GetSelectedElement() ; if ( !el || !FCKStyles.CheckHasObjectStyle( el.nodeName.toLowerCase() ) ) return FCK_TRISTATE_DISABLED ; } return FCK_TRISTATE_OFF ; } };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * FCKIndentCommand Class: controls block indentation. */ var FCKIndentCommand = function( name, offset ) { this.Name = name ; this.Offset = offset ; this.IndentCSSProperty = FCKConfig.ContentLangDirection.IEquals( 'ltr' ) ? 'marginLeft' : 'marginRight' ; } FCKIndentCommand._InitIndentModeParameters = function() { if ( FCKConfig.IndentClasses && FCKConfig.IndentClasses.length > 0 ) { this._UseIndentClasses = true ; this._IndentClassMap = {} ; for ( var i = 0 ; i < FCKConfig.IndentClasses.length ;i++ ) this._IndentClassMap[FCKConfig.IndentClasses[i]] = i + 1 ; this._ClassNameRegex = new RegExp( '(?:^|\\s+)(' + FCKConfig.IndentClasses.join( '|' ) + ')(?=$|\\s)' ) ; } else this._UseIndentClasses = false ; } FCKIndentCommand.prototype = { Execute : function() { // Save an undo snapshot before doing anything. FCKUndo.SaveUndoStep() ; var range = new FCKDomRange( FCK.EditorWindow ) ; range.MoveToSelection() ; var bookmark = range.CreateBookmark() ; // Two cases to handle here: either we're in a list, or not. // If we're in a list, then the indent/outdent operations would be done on the list nodes. // Otherwise, apply the operation on the nearest block nodes. var nearestListBlock = FCKDomTools.GetCommonParentNode( range.StartNode || range.StartContainer , range.EndNode || range.EndContainer, ['ul', 'ol'] ) ; if ( nearestListBlock ) this._IndentList( range, nearestListBlock ) ; else this._IndentBlock( range ) ; range.MoveToBookmark( bookmark ) ; range.Select() ; FCK.Focus() ; FCK.Events.FireEvent( 'OnSelectionChange' ) ; }, GetState : function() { // Disabled if not WYSIWYG. if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || ! FCK.EditorWindow ) return FCK_TRISTATE_DISABLED ; // Initialize parameters if not already initialzed. if ( FCKIndentCommand._UseIndentClasses == undefined ) FCKIndentCommand._InitIndentModeParameters() ; // If we're not in a list, and the starting block's indentation is zero, and the current // command is the outdent command, then we should return FCK_TRISTATE_DISABLED. var startContainer = FCKSelection.GetBoundaryParentElement( true ) ; var endContainer = FCKSelection.GetBoundaryParentElement( false ) ; var listNode = FCKDomTools.GetCommonParentNode( startContainer, endContainer, ['ul','ol'] ) ; if ( listNode ) { if ( this.Name.IEquals( 'outdent' ) ) return FCK_TRISTATE_OFF ; var firstItem = FCKTools.GetElementAscensor( startContainer, 'li' ) ; if ( !firstItem || !firstItem.previousSibling ) return FCK_TRISTATE_DISABLED ; return FCK_TRISTATE_OFF ; } if ( ! FCKIndentCommand._UseIndentClasses && this.Name.IEquals( 'indent' ) ) return FCK_TRISTATE_OFF; var path = new FCKElementPath( startContainer ) ; var firstBlock = path.Block || path.BlockLimit ; if ( !firstBlock ) return FCK_TRISTATE_DISABLED ; if ( FCKIndentCommand._UseIndentClasses ) { var indentClass = firstBlock.className.match( FCKIndentCommand._ClassNameRegex ) ; var indentStep = 0 ; if ( indentClass != null ) { indentClass = indentClass[1] ; indentStep = FCKIndentCommand._IndentClassMap[indentClass] ; } if ( ( this.Name == 'outdent' && indentStep == 0 ) || ( this.Name == 'indent' && indentStep == FCKConfig.IndentClasses.length ) ) return FCK_TRISTATE_DISABLED ; return FCK_TRISTATE_OFF ; } else { var indent = parseInt( firstBlock.style[this.IndentCSSProperty], 10 ) ; if ( isNaN( indent ) ) indent = 0 ; if ( indent <= 0 ) return FCK_TRISTATE_DISABLED ; return FCK_TRISTATE_OFF ; } }, _IndentBlock : function( range ) { var iterator = new FCKDomRangeIterator( range ) ; iterator.EnforceRealBlocks = true ; range.Expand( 'block_contents' ) ; var commonParents = FCKDomTools.GetCommonParents( range.StartContainer, range.EndContainer ) ; var nearestParent = commonParents[commonParents.length - 1] ; var block ; while ( ( block = iterator.GetNextParagraph() ) ) { // We don't want to indent subtrees recursively, so only perform the indent operation // if the block itself is the nearestParent, or the block's parent is the nearestParent. if ( ! ( block == nearestParent || block.parentNode == nearestParent ) ) continue ; if ( FCKIndentCommand._UseIndentClasses ) { // Transform current class name to indent step index. var indentClass = block.className.match( FCKIndentCommand._ClassNameRegex ) ; var indentStep = 0 ; if ( indentClass != null ) { indentClass = indentClass[1] ; indentStep = FCKIndentCommand._IndentClassMap[indentClass] ; } // Operate on indent step index, transform indent step index back to class name. if ( this.Name.IEquals( 'outdent' ) ) indentStep-- ; else if ( this.Name.IEquals( 'indent' ) ) indentStep++ ; indentStep = Math.min( indentStep, FCKConfig.IndentClasses.length ) ; indentStep = Math.max( indentStep, 0 ) ; var className = block.className.replace( FCKIndentCommand._ClassNameRegex, '' ) ; if ( indentStep < 1 ) block.className = className ; else block.className = ( className.length > 0 ? className + ' ' : '' ) + FCKConfig.IndentClasses[indentStep - 1] ; } else { // Offset distance is assumed to be in pixels for now. var currentOffset = parseInt( block.style[this.IndentCSSProperty], 10 ) ; if ( isNaN( currentOffset ) ) currentOffset = 0 ; currentOffset += this.Offset ; currentOffset = Math.max( currentOffset, 0 ) ; currentOffset = Math.ceil( currentOffset / this.Offset ) * this.Offset ; block.style[this.IndentCSSProperty] = currentOffset ? currentOffset + FCKConfig.IndentUnit : '' ; if ( block.getAttribute( 'style' ) == '' ) block.removeAttribute( 'style' ) ; } } }, _IndentList : function( range, listNode ) { // Our starting and ending points of the range might be inside some blocks under a list item... // So before playing with the iterator, we need to expand the block to include the list items. var startContainer = range.StartContainer ; var endContainer = range.EndContainer ; while ( startContainer && startContainer.parentNode != listNode ) startContainer = startContainer.parentNode ; while ( endContainer && endContainer.parentNode != listNode ) endContainer = endContainer.parentNode ; if ( ! startContainer || ! endContainer ) return ; // Now we can iterate over the individual items on the same tree depth. var block = startContainer ; var itemsToMove = [] ; var stopFlag = false ; while ( stopFlag == false ) { if ( block == endContainer ) stopFlag = true ; itemsToMove.push( block ) ; block = block.nextSibling ; } if ( itemsToMove.length < 1 ) return ; // Do indent or outdent operations on the array model of the list, not the list's DOM tree itself. // The array model demands that it knows as much as possible about the surrounding lists, we need // to feed it the further ancestor node that is still a list. var listParents = FCKDomTools.GetParents( listNode ) ; for ( var i = 0 ; i < listParents.length ; i++ ) { if ( listParents[i].nodeName.IEquals( ['ul', 'ol'] ) ) { listNode = listParents[i] ; break ; } } var indentOffset = this.Name.IEquals( 'indent' ) ? 1 : -1 ; var startItem = itemsToMove[0] ; var lastItem = itemsToMove[ itemsToMove.length - 1 ] ; var markerObj = {} ; // Convert the list DOM tree into a one dimensional array. var listArray = FCKDomTools.ListToArray( listNode, markerObj ) ; // Apply indenting or outdenting on the array. var baseIndent = listArray[lastItem._FCK_ListArray_Index].indent ; for ( var i = startItem._FCK_ListArray_Index ; i <= lastItem._FCK_ListArray_Index ; i++ ) listArray[i].indent += indentOffset ; for ( var i = lastItem._FCK_ListArray_Index + 1 ; i < listArray.length && listArray[i].indent > baseIndent ; i++ ) listArray[i].indent += indentOffset ; /* For debug use only var PrintArray = function( listArray, doc ) { var s = [] ; for ( var i = 0 ; i < listArray.length ; i++ ) { for ( var j in listArray[i] ) { if ( j != 'contents' ) s.push( j + ":" + listArray[i][j] + "; " ) ; else { var docFrag = doc.createDocumentFragment() ; var tmpNode = doc.createElement( 'span' ) ; for ( var k = 0 ; k < listArray[i][j].length ; k++ ) docFrag.appendChild( listArray[i][j][k].cloneNode( true ) ) ; tmpNode.appendChild( docFrag ) ; s.push( j + ":" + tmpNode.innerHTML + "; ") ; } } s.push( '\n' ) ; } alert( s.join('') ) ; } PrintArray( listArray, FCK.EditorDocument ) ; */ // Convert the array back to a DOM forest (yes we might have a few subtrees now). // And replace the old list with the new forest. var newList = FCKDomTools.ArrayToList( listArray ) ; if ( newList ) listNode.parentNode.replaceChild( newList.listNode, listNode ) ; // Clean up the markers. FCKDomTools.ClearAllMarkers( markerObj ) ; } } ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * This is a utility object which can be used to load specific components of * FCKeditor, including all dependencies. */ var FCK_GENERIC = 1 ; var FCK_GENERIC_SPECIFIC = 2 ; var FCK_SPECIFIC = 3 ; var FCKScriptLoader = new Object() ; FCKScriptLoader.FCKeditorPath = '/fckeditor/' ; FCKScriptLoader._Scripts = new Object() ; FCKScriptLoader._LoadedScripts = new Object() ; FCKScriptLoader._IsIE = (/msie/).test( navigator.userAgent.toLowerCase() ) ; FCKScriptLoader.Load = function( scriptName ) { // Check if the script has already been loaded. if ( scriptName in FCKScriptLoader._LoadedScripts ) return ; FCKScriptLoader._LoadedScripts[ scriptName ] = true ; var oScriptInfo = this._Scripts[ scriptName ] ; if ( !oScriptInfo ) { alert( 'FCKScriptLoader: The script "' + scriptName + '" could not be loaded' ) ; return ; } for ( var i = 0 ; i < oScriptInfo.Dependency.length ; i++ ) { this.Load( oScriptInfo.Dependency[i] ) ; } var sBaseScriptName = oScriptInfo.BasePath + scriptName.toLowerCase() ; if ( oScriptInfo.Compatibility == FCK_GENERIC || oScriptInfo.Compatibility == FCK_GENERIC_SPECIFIC ) this._LoadScript( sBaseScriptName + '.js' ) ; if ( oScriptInfo.Compatibility == FCK_SPECIFIC || oScriptInfo.Compatibility == FCK_GENERIC_SPECIFIC ) { if ( this._IsIE ) this._LoadScript( sBaseScriptName + '_ie.js' ) ; else this._LoadScript( sBaseScriptName + '_gecko.js' ) ; } } FCKScriptLoader._LoadScript = function( scriptPathFromSource ) { document.write( '<script type="text/javascript" src="' + this.FCKeditorPath + 'editor/_source/' + scriptPathFromSource + '"><\/script>' ) ; } FCKScriptLoader.AddScript = function( scriptName, scriptBasePath, dependency, compatibility ) { this._Scripts[ scriptName ] = { BasePath : scriptBasePath || '', Dependency : dependency || [], Compatibility : compatibility || FCK_GENERIC } ; } /* * #################################### * ### Scripts Definition List */ FCKScriptLoader.AddScript( 'FCKConstants' ) ; FCKScriptLoader.AddScript( 'FCKJSCoreExtensions' ) ; FCKScriptLoader.AddScript( 'FCK_Xhtml10Transitional', '../dtd/' ) ; FCKScriptLoader.AddScript( 'FCKDataProcessor' , 'classes/' , ['FCKConfig','FCKBrowserInfo','FCKRegexLib','FCKXHtml'] ) ; FCKScriptLoader.AddScript( 'FCKDocumentFragment', 'classes/' , ['FCKDomTools'], FCK_SPECIFIC ) ; FCKScriptLoader.AddScript( 'FCKDomRange' , 'classes/' , ['FCKBrowserInfo','FCKJSCoreExtensions','FCKW3CRange','FCKElementPath','FCKDomTools','FCKTools','FCKDocumentFragment'], FCK_GENERIC_SPECIFIC ) ; FCKScriptLoader.AddScript( 'FCKDomRangeIterator', 'classes/' , ['FCKDomRange','FCKListsLib'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKElementPath' , 'classes/' , ['FCKListsLib'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKEnterKey' , 'classes/' , ['FCKDomRange','FCKDomTools','FCKTools','FCKKeystrokeHandler','FCKListHandler'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKPanel' , 'classes/' , ['FCKBrowserInfo','FCKConfig','FCKTools'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKImagePreloader' , 'classes/' ) ; FCKScriptLoader.AddScript( 'FCKKeystrokeHandler', 'classes/' , ['FCKConstants','FCKBrowserInfo','FCKTools'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKStyle' , 'classes/' , ['FCKConstants','FCKDomRange','FCKDomRangeIterator','FCKDomTools','FCKListsLib','FCK_Xhtml10Transitional'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKW3CRange' , 'classes/' , ['FCKDomTools','FCKTools','FCKDocumentFragment'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKBrowserInfo' , 'internals/' , ['FCKJSCoreExtensions'] ) ; FCKScriptLoader.AddScript( 'FCKCodeFormatter' , 'internals/' ) ; FCKScriptLoader.AddScript( 'FCKConfig' , 'internals/' , ['FCKBrowserInfo','FCKConstants'] ) ; FCKScriptLoader.AddScript( 'FCKDebug' , 'internals/' , ['FCKConfig'] ) ; FCKScriptLoader.AddScript( 'FCKDomTools' , 'internals/' , ['FCKJSCoreExtensions','FCKBrowserInfo','FCKTools','FCKDomRange'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKListsLib' , 'internals/' ) ; FCKScriptLoader.AddScript( 'FCKListHandler' , 'internals/' , ['FCKConfig', 'FCKDocumentFragment', 'FCKJSCoreExtensions','FCKDomTools'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKRegexLib' , 'internals/' ) ; FCKScriptLoader.AddScript( 'FCKStyles' , 'internals/' , ['FCKConfig', 'FCKDocumentFragment', 'FCKDomRange','FCKDomTools','FCKElementPath','FCKTools'], FCK_GENERIC ) ; FCKScriptLoader.AddScript( 'FCKTools' , 'internals/' , ['FCKJSCoreExtensions','FCKBrowserInfo'], FCK_GENERIC_SPECIFIC ) ; FCKScriptLoader.AddScript( 'FCKXHtml' , 'internals/' , ['FCKBrowserInfo','FCKCodeFormatter','FCKConfig','FCKDomTools','FCKListsLib','FCKRegexLib','FCKTools','FCKXHtmlEntities'], FCK_GENERIC_SPECIFIC ) ; FCKScriptLoader.AddScript( 'FCKXHtmlEntities' , 'internals/' , ['FCKConfig'] ) ; // ####################################
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == */ (function() { // IE6 doens't handle absolute positioning properly (it is always in quirks // mode). This function fixes the sizes and positions of many elements that // compose the skin (this is skin specific). var fixSizes = window.DoResizeFixes = function() { var fckDlg = window.document.body ; for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) { var child = fckDlg.childNodes[i] ; switch ( child.className ) { case 'contents' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 ) ; // -left -right child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 ) ; // -bottom -top break ; case 'blocker' : case 'cover' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 + 4 ) ; // -left -right + 4 child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 + 4 ) ; // -bottom -top + 4 break ; case 'tr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; break ; case 'tc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 16 - 16 ) ; break ; case 'ml' : child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'mr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'bl' : child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'br' : child.style.left = Math.max( 0, fckDlg.clientWidth - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'bc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 30 - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; } } } var closeButtonOver = function() { this.style.backgroundPosition = '-16px -687px' ; } ; var closeButtonOut = function() { this.style.backgroundPosition = '-16px -651px' ; } ; var fixCloseButton = function() { var closeButton = document.getElementById ( 'closeButton' ) ; closeButton.onmouseover = closeButtonOver ; closeButton.onmouseout = closeButtonOut ; } var onLoad = function() { fixSizes() ; fixCloseButton() ; window.attachEvent( 'onresize', fixSizes ) ; window.detachEvent( 'onload', onLoad ) ; } window.attachEvent( 'onload', onLoad ) ; })() ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == */ (function() { // IE6 doens't handle absolute positioning properly (it is always in quirks // mode). This function fixes the sizes and positions of many elements that // compose the skin (this is skin specific). var fixSizes = window.DoResizeFixes = function() { var fckDlg = window.document.body ; for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) { var child = fckDlg.childNodes[i] ; switch ( child.className ) { case 'contents' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 ) ; // -left -right child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 ) ; // -bottom -top break ; case 'blocker' : case 'cover' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 + 4 ) ; // -left -right + 4 child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 + 4 ) ; // -bottom -top + 4 break ; case 'tr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; break ; case 'tc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 16 - 16 ) ; break ; case 'ml' : child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'mr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'bl' : child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'br' : child.style.left = Math.max( 0, fckDlg.clientWidth - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'bc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 30 - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; } } } var closeButtonOver = function() { this.style.backgroundPosition = '-16px -687px' ; } ; var closeButtonOut = function() { this.style.backgroundPosition = '-16px -651px' ; } ; var fixCloseButton = function() { var closeButton = document.getElementById ( 'closeButton' ) ; closeButton.onmouseover = closeButtonOver ; closeButton.onmouseout = closeButtonOut ; } var onLoad = function() { fixSizes() ; fixCloseButton() ; window.attachEvent( 'onresize', fixSizes ) ; window.detachEvent( 'onload', onLoad ) ; } window.attachEvent( 'onload', onLoad ) ; })() ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == */ (function() { // IE6 doens't handle absolute positioning properly (it is always in quirks // mode). This function fixes the sizes and positions of many elements that // compose the skin (this is skin specific). var fixSizes = window.DoResizeFixes = function() { var fckDlg = window.document.body ; for ( var i = 0 ; i < fckDlg.childNodes.length ; i++ ) { var child = fckDlg.childNodes[i] ; switch ( child.className ) { case 'contents' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 ) ; // -left -right child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 ) ; // -bottom -top break ; case 'blocker' : case 'cover' : child.style.width = Math.max( 0, fckDlg.offsetWidth - 16 - 16 + 4 ) ; // -left -right + 4 child.style.height = Math.max( 0, fckDlg.clientHeight - 20 - 2 + 4 ) ; // -bottom -top + 4 break ; case 'tr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; break ; case 'tc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 16 - 16 ) ; break ; case 'ml' : child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'mr' : child.style.left = Math.max( 0, fckDlg.clientWidth - 16 ) ; child.style.height = Math.max( 0, fckDlg.clientHeight - 16 - 51 ) ; break ; case 'bl' : child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'br' : child.style.left = Math.max( 0, fckDlg.clientWidth - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; case 'bc' : child.style.width = Math.max( 0, fckDlg.clientWidth - 30 - 30 ) ; child.style.top = Math.max( 0, fckDlg.clientHeight - 51 ) ; break ; } } } var closeButtonOver = function() { this.style.backgroundPosition = '-16px -687px' ; } ; var closeButtonOut = function() { this.style.backgroundPosition = '-16px -651px' ; } ; var fixCloseButton = function() { var closeButton = document.getElementById ( 'closeButton' ) ; closeButton.onmouseover = closeButtonOver ; closeButton.onmouseout = closeButtonOut ; } var onLoad = function() { fixSizes() ; fixCloseButton() ; window.attachEvent( 'onresize', fixSizes ) ; window.detachEvent( 'onload', onLoad ) ; } window.attachEvent( 'onload', onLoad ) ; })() ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Compatibility code for Adobe AIR. */ if ( FCKBrowserInfo.IsAIR ) { var FCKAdobeAIR = (function() { /* * ### Private functions. */ var getDocumentHead = function( doc ) { var head ; var heads = doc.getElementsByTagName( 'head' ) ; if( heads && heads[0] ) head = heads[0] ; else { head = doc.createElement( 'head' ) ; doc.documentElement.insertBefore( head, doc.documentElement.firstChild ) ; } return head ; } ; /* * ### Public interface. */ return { FCKeditorAPI_Evaluate : function( parentWindow, script ) { // TODO : This one doesn't work always. The parent window will // point to an anonymous function in this window. If this // window is destroyied the parent window will be pointing to // an invalid reference. // Evaluate the script in this window. eval( script ) ; // Point the FCKeditorAPI property of the parent window to the // local reference. parentWindow.FCKeditorAPI = window.FCKeditorAPI ; }, EditingArea_Start : function( doc, html ) { // Get the HTML for the <head>. var headInnerHtml = html.match( /<head>([\s\S]*)<\/head>/i )[1] ; if ( headInnerHtml && headInnerHtml.length > 0 ) { // Inject the <head> HTML inside a <div>. // Do that before getDocumentHead because WebKit moves // <link css> elements to the <head> at this point. var div = doc.createElement( 'div' ) ; div.innerHTML = headInnerHtml ; // Move the <div> nodes to <head>. FCKDomTools.MoveChildren( div, getDocumentHead( doc ) ) ; } doc.body.innerHTML = html.match( /<body>([\s\S]*)<\/body>/i )[1] ; //prevent clicking on hyperlinks and navigating away doc.addEventListener('click', function( ev ) { ev.preventDefault() ; ev.stopPropagation() ; }, true ) ; }, Panel_Contructor : function( doc, baseLocation ) { var head = getDocumentHead( doc ) ; // Set the <base> href. head.appendChild( doc.createElement('base') ).href = baseLocation ; doc.body.style.margin = '0px' ; doc.body.style.padding = '0px' ; }, ToolbarSet_GetOutElement : function( win, outMatch ) { var toolbarTarget = win.parent ; var targetWindowParts = outMatch[1].split( '.' ) ; while ( targetWindowParts.length > 0 ) { var part = targetWindowParts.shift() ; if ( part.length > 0 ) toolbarTarget = toolbarTarget[ part ] ; } toolbarTarget = toolbarTarget.document.getElementById( outMatch[2] ) ; }, ToolbarSet_InitOutFrame : function( doc ) { var head = getDocumentHead( doc ) ; head.appendChild( doc.createElement('base') ).href = window.document.location ; var targetWindow = doc.defaultView; targetWindow.adjust = function() { targetWindow.frameElement.height = doc.body.scrollHeight; } ; targetWindow.onresize = targetWindow.adjust ; targetWindow.setTimeout( targetWindow.adjust, 0 ) ; doc.body.style.overflow = 'hidden'; doc.body.innerHTML = document.getElementById( 'xToolbarSpace' ).innerHTML ; } } ; })(); /* * ### Overrides */ ( function() { // Save references for override reuse. var _Original_FCKPanel_Window_OnFocus = FCKPanel_Window_OnFocus ; var _Original_FCKPanel_Window_OnBlur = FCKPanel_Window_OnBlur ; var _Original_FCK_StartEditor = FCK.StartEditor ; FCKPanel_Window_OnFocus = function( e, panel ) { // Call the original implementation. _Original_FCKPanel_Window_OnFocus.call( this, e, panel ) ; if ( panel._focusTimer ) clearTimeout( panel._focusTimer ) ; } FCKPanel_Window_OnBlur = function( e, panel ) { // Delay the execution of the original function. panel._focusTimer = FCKTools.SetTimeout( _Original_FCKPanel_Window_OnBlur, 100, this, [ e, panel ] ) ; } FCK.StartEditor = function() { // Force pointing to the CSS files instead of using the inline CSS cached styles. window.FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ; window.FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ; _Original_FCK_StartEditor.apply( this, arguments ) ; } })(); }
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Contains the DTD mapping for XHTML 1.0 Strict. * This file was automatically generated from the file: xhtml10-strict.dtd */ FCK.DTD = (function() { var X = FCKTools.Merge ; var H,I,J,K,C,L,M,A,B,D,E,G,N,F ; A = {ins:1, del:1, script:1} ; B = {hr:1, ul:1, div:1, blockquote:1, noscript:1, table:1, address:1, pre:1, p:1, h5:1, dl:1, h4:1, ol:1, h6:1, h1:1, h3:1, h2:1} ; C = X({fieldset:1}, B) ; D = X({sub:1, bdo:1, 'var':1, sup:1, br:1, kbd:1, map:1, samp:1, b:1, acronym:1, '#':1, abbr:1, code:1, i:1, cite:1, tt:1, strong:1, q:1, em:1, big:1, small:1, span:1, dfn:1}, A) ; E = X({img:1, object:1}, D) ; F = {input:1, button:1, textarea:1, select:1, label:1} ; G = X({a:1}, F) ; H = {img:1, noscript:1, br:1, kbd:1, button:1, h5:1, h4:1, samp:1, h6:1, ol:1, h1:1, h3:1, h2:1, form:1, select:1, '#':1, ins:1, abbr:1, label:1, code:1, table:1, script:1, cite:1, input:1, strong:1, textarea:1, big:1, small:1, span:1, hr:1, sub:1, bdo:1, 'var':1, div:1, object:1, sup:1, map:1, dl:1, del:1, fieldset:1, ul:1, b:1, acronym:1, a:1, blockquote:1, i:1, address:1, tt:1, q:1, pre:1, p:1, em:1, dfn:1} ; I = X({form:1, fieldset:1}, B, E, G) ; J = {tr:1} ; K = {'#':1} ; L = X(E, G) ; M = {li:1} ; N = X({form:1}, A, C) ; return { col: {}, tr: {td:1, th:1}, img: {}, colgroup: {col:1}, noscript: N, td: I, br: {}, th: I, kbd: L, button: X(B, E), h5: L, h4: L, samp: L, h6: L, ol: M, h1: L, h3: L, option: K, h2: L, form: X(A, C), select: {optgroup:1, option:1}, ins: I, abbr: L, label: L, code: L, table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, script: K, tfoot: J, cite: L, li: I, input: {}, strong: L, textarea: K, big: L, small: L, span: L, dt: L, hr: {}, sub: L, optgroup: {option:1}, bdo: L, param: {}, 'var': L, div: I, object: X({param:1}, H), sup: L, dd: I, area: {}, map: X({form:1, area:1}, A, C), dl: {dt:1, dd:1}, del: I, fieldset: X({legend:1}, H), thead: J, ul: M, acronym: L, b: L, a: X({img:1, object:1}, D, F), blockquote: N, caption: L, i: L, tbody: J, address: L, tt: L, legend: L, q: L, pre: X({a:1}, D, F), p: L, em: L, dfn: L } ; })() ;
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Contains the DTD mapping for XHTML 1.0 Transitional. * This file was automatically generated from the file: xhtml10-transitional.dtd */ FCK.DTD = (function() { var X = FCKTools.Merge ; var A,L,J,M,N,O,D,H,P,K,Q,F,G,C,B,E,I ; 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, 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} ; 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}, F) ; H = X({sub:1, img:1, object:1, sup:1, basefont:1, map:1, applet:1, font:1, big:1, small: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, 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} ; return { col: {}, tr: {td:1, th:1}, img: {}, colgroup: {col:1}, noscript: P, td: P, br: {}, 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: J, // Changed from L to J (see (1)) ins: P, menu: Q, abbr: L, label: L, table: {thead:1, col:1, tbody:1, tr:1, colgroup:1, caption:1, tfoot:1}, code: L, script: N, tfoot: M, cite: L, li: P, input: {}, iframe: P, strong: J, // Changed from L to J (see (1)) textarea: N, noframes: P, big: J, // Changed from L to J (see (1)) small: J, // Changed from L to J (see (1)) span: J, // Changed from L to J (see (1)) hr: {}, dt: L, sub: J, // Changed from L to J (see (1)) optgroup: {option:1}, param: {}, bdo: L, 'var': J, // Changed from L to J (see (1)) div: P, object: O, sup: J, // Changed from L to J (see (1)) dd: P, strike: J, // Changed from L to J (see (1)) area: {}, dir: Q, map: X({area:1, form:1, p:1}, A, F, E), applet: O, dl: {dt:1, dd:1}, del: P, isindex: {}, fieldset: X({legend:1}, K), thead: M, ul: Q, acronym: L, b: J, // Changed from L to J (see (1)) a: J, blockquote: P, caption: L, i: J, // Changed from L to J (see (1)) u: J, // Changed from L to J (see (1)) tbody: M, s: L, address: X(D, I), tt: J, // Changed from L to J (see (1)) legend: L, q: L, pre: X(G, C), p: L, em: J, // Changed from L to J (see (1)) dfn: L } ; })() ; /* Notes: (1) According to the DTD, many elements, like <b> accept <a> elements inside of them. But, to produce better output results, we have manually changed the map to avoid breaking the links on pieces, having "<b>this is a </b><a><b>link</b> test</a>", instead of "<b>this is a <a>link</a></b><a> test</a>". */
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Dutch language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Menubalk inklappen", ToolbarExpand : "Menubalk uitklappen", // Toolbar Items and Context Menu Save : "Opslaan", NewPage : "Nieuwe pagina", Preview : "Voorbeeld", Cut : "Knippen", Copy : "Kopiëren", Paste : "Plakken", PasteText : "Plakken als platte tekst", PasteWord : "Plakken als Word-gegevens", Print : "Printen", SelectAll : "Alles selecteren", RemoveFormat : "Opmaak verwijderen", InsertLinkLbl : "Link", InsertLink : "Link invoegen/wijzigen", RemoveLink : "Link verwijderen", VisitLink : "Link volgen", Anchor : "Interne link", AnchorDelete : "Anker verwijderen", InsertImageLbl : "Afbeelding", InsertImage : "Afbeelding invoegen/wijzigen", InsertFlashLbl : "Flash", InsertFlash : "Flash invoegen/wijzigen", InsertTableLbl : "Tabel", InsertTable : "Tabel invoegen/wijzigen", InsertLineLbl : "Lijn", InsertLine : "Horizontale lijn invoegen", InsertSpecialCharLbl: "Speciale tekens", InsertSpecialChar : "Speciaal teken invoegen", InsertSmileyLbl : "Smiley", InsertSmiley : "Smiley invoegen", About : "Over FCKeditor", Bold : "Vet", Italic : "Schuingedrukt", Underline : "Onderstreept", StrikeThrough : "Doorhalen", Subscript : "Subscript", Superscript : "Superscript", LeftJustify : "Links uitlijnen", CenterJustify : "Centreren", RightJustify : "Rechts uitlijnen", BlockJustify : "Uitvullen", DecreaseIndent : "Inspringen verkleinen", IncreaseIndent : "Inspringen vergroten", Blockquote : "Citaatblok", CreateDiv : "DIV aanmaken", EditDiv : "DIV wijzigen", DeleteDiv : "DIV verwijderen", Undo : "Ongedaan maken", Redo : "Opnieuw uitvoeren", NumberedListLbl : "Genummerde lijst", NumberedList : "Genummerde lijst invoegen/verwijderen", BulletedListLbl : "Opsomming", BulletedList : "Opsomming invoegen/verwijderen", ShowTableBorders : "Randen tabel weergeven", ShowDetails : "Details weergeven", Style : "Stijl", FontFormat : "Opmaak", Font : "Lettertype", FontSize : "Grootte", TextColor : "Tekstkleur", BGColor : "Achtergrondkleur", Source : "Code", Find : "Zoeken", Replace : "Vervangen", SpellCheck : "Spellingscontrole", UniversalKeyboard : "Universeel toetsenbord", PageBreakLbl : "Pagina-einde", PageBreak : "Pagina-einde invoegen", Form : "Formulier", Checkbox : "Aanvinkvakje", RadioButton : "Selectievakje", TextField : "Tekstveld", Textarea : "Tekstvak", HiddenField : "Verborgen veld", Button : "Knop", SelectionField : "Selectieveld", ImageButton : "Afbeeldingsknop", FitWindow : "De editor maximaliseren", ShowBlocks : "Toon blokken", // Context Menu EditLink : "Link wijzigen", CellCM : "Cel", RowCM : "Rij", ColumnCM : "Kolom", InsertRowAfter : "Voeg rij in achter", InsertRowBefore : "Voeg rij in voor", DeleteRows : "Rijen verwijderen", InsertColumnAfter : "Voeg kolom in achter", InsertColumnBefore : "Voeg kolom in voor", DeleteColumns : "Kolommen verwijderen", InsertCellAfter : "Voeg cel in achter", InsertCellBefore : "Voeg cel in voor", DeleteCells : "Cellen verwijderen", MergeCells : "Cellen samenvoegen", MergeRight : "Voeg samen naar rechts", MergeDown : "Voeg samen naar beneden", HorizontalSplitCell : "Splits cellen horizontaal", VerticalSplitCell : "Splits cellen verticaal", TableDelete : "Tabel verwijderen", CellProperties : "Eigenschappen cel", TableProperties : "Eigenschappen tabel", ImageProperties : "Eigenschappen afbeelding", FlashProperties : "Eigenschappen Flash", AnchorProp : "Eigenschappen interne link", ButtonProp : "Eigenschappen knop", CheckboxProp : "Eigenschappen aanvinkvakje", HiddenFieldProp : "Eigenschappen verborgen veld", RadioButtonProp : "Eigenschappen selectievakje", ImageButtonProp : "Eigenschappen afbeeldingsknop", TextFieldProp : "Eigenschappen tekstveld", SelectionFieldProp : "Eigenschappen selectieveld", TextareaProp : "Eigenschappen tekstvak", FormProp : "Eigenschappen formulier", FontFormats : "Normaal;Met opmaak;Adres;Kop 1;Kop 2;Kop 3;Kop 4;Kop 5;Kop 6;Normaal (DIV)", // Alerts and Messages ProcessingXHTML : "Bezig met verwerken XHTML. Even geduld aub...", Done : "Klaar", PasteWordConfirm : "De tekst die u plakte lijkt gekopieerd te zijn vanuit Word. Wilt u de tekst opschonen voordat deze geplakt wordt?", NotCompatiblePaste : "Deze opdracht is beschikbaar voor Internet Explorer versie 5.5 of hoger. Wilt u plakken zonder op te schonen?", UnknownToolbarItem : "Onbekend item op menubalk \"%1\"", UnknownCommand : "Onbekende opdrachtnaam: \"%1\"", NotImplemented : "Opdracht niet geïmplementeerd.", UnknownToolbarSet : "Menubalk \"%1\" bestaat niet.", NoActiveX : "De beveilingsinstellingen van uw browser zouden sommige functies van de editor kunnen beperken. De optie \"Activeer ActiveX-elementen en plug-ins\" dient ingeschakeld te worden. Het kan zijn dat er nu functies ontbreken of niet werken.", BrowseServerBlocked : "De bestandsbrowser kon niet geopend worden. Zorg ervoor dat pop-up-blokkeerders uit staan.", DialogBlocked : "Kan het dialoogvenster niet weergeven. Zorg ervoor dat pop-up-blokkeerders uit staan.", VisitLinkBlocked : "Het was niet mogelijk een nieuw venster te openen. Controleer of er geen pop-up-blocker aktief is.", // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Annuleren", DlgBtnClose : "Afsluiten", DlgBtnBrowseServer : "Bladeren op server", DlgAdvancedTag : "Geavanceerd", DlgOpOther : "<Anders>", DlgInfoTab : "Informatie", DlgAlertUrl : "Geef URL op", // General Dialogs Labels DlgGenNotSet : "<niet ingevuld>", DlgGenId : "Kenmerk", DlgGenLangDir : "Schrijfrichting", DlgGenLangDirLtr : "Links naar rechts (LTR)", DlgGenLangDirRtl : "Rechts naar links (RTL)", DlgGenLangCode : "Taalcode", DlgGenAccessKey : "Toegangstoets", DlgGenName : "Naam", DlgGenTabIndex : "Tabvolgorde", DlgGenLongDescr : "Lange URL-omschrijving", DlgGenClass : "Stylesheet-klassen", DlgGenTitle : "Aanbevolen titel", DlgGenContType : "Aanbevolen content-type", DlgGenLinkCharset : "Karakterset van gelinkte bron", DlgGenStyle : "Stijl", // Image Dialog DlgImgTitle : "Eigenschappen afbeelding", DlgImgInfoTab : "Informatie afbeelding", DlgImgBtnUpload : "Naar server verzenden", DlgImgURL : "URL", DlgImgUpload : "Upload", DlgImgAlt : "Alternatieve tekst", DlgImgWidth : "Breedte", DlgImgHeight : "Hoogte", DlgImgLockRatio : "Afmetingen vergrendelen", DlgBtnResetSize : "Afmetingen resetten", DlgImgBorder : "Rand", DlgImgHSpace : "HSpace", DlgImgVSpace : "VSpace", DlgImgAlign : "Uitlijning", DlgImgAlignLeft : "Links", DlgImgAlignAbsBottom: "Absoluut-onder", DlgImgAlignAbsMiddle: "Absoluut-midden", DlgImgAlignBaseline : "Basislijn", DlgImgAlignBottom : "Beneden", DlgImgAlignMiddle : "Midden", DlgImgAlignRight : "Rechts", DlgImgAlignTextTop : "Boven tekst", DlgImgAlignTop : "Boven", DlgImgPreview : "Voorbeeld", DlgImgAlertUrl : "Geef de URL van de afbeelding", DlgImgLinkTab : "Link", // Flash Dialog DlgFlashTitle : "Eigenschappen Flash", DlgFlashChkPlay : "Automatisch afspelen", DlgFlashChkLoop : "Herhalen", DlgFlashChkMenu : "Flashmenu\'s inschakelen", DlgFlashScale : "Schaal", DlgFlashScaleAll : "Alles tonen", DlgFlashScaleNoBorder : "Geen rand", DlgFlashScaleFit : "Precies passend", // Link Dialog DlgLnkWindowTitle : "Link", DlgLnkInfoTab : "Linkomschrijving", DlgLnkTargetTab : "Doel", DlgLnkType : "Linktype", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Interne link in pagina", DlgLnkTypeEMail : "E-mail", DlgLnkProto : "Protocol", DlgLnkProtoOther : "<anders>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Kies een interne link", DlgLnkAnchorByName : "Op naam interne link", DlgLnkAnchorById : "Op kenmerk interne link", DlgLnkNoAnchors : "(Geen interne links in document gevonden)", DlgLnkEMail : "E-mailadres", DlgLnkEMailSubject : "Onderwerp bericht", DlgLnkEMailBody : "Inhoud bericht", DlgLnkUpload : "Upload", DlgLnkBtnUpload : "Naar de server versturen", DlgLnkTarget : "Doel", DlgLnkTargetFrame : "<frame>", DlgLnkTargetPopup : "<popup window>", DlgLnkTargetBlank : "Nieuw venster (_blank)", DlgLnkTargetParent : "Origineel venster (_parent)", DlgLnkTargetSelf : "Zelfde venster (_self)", DlgLnkTargetTop : "Hele venster (_top)", DlgLnkTargetFrameName : "Naam doelframe", DlgLnkPopWinName : "Naam popupvenster", DlgLnkPopWinFeat : "Instellingen popupvenster", DlgLnkPopResize : "Grootte wijzigen", DlgLnkPopLocation : "Locatiemenu", DlgLnkPopMenu : "Menubalk", DlgLnkPopScroll : "Schuifbalken", DlgLnkPopStatus : "Statusbalk", DlgLnkPopToolbar : "Menubalk", DlgLnkPopFullScrn : "Volledig scherm (IE)", DlgLnkPopDependent : "Afhankelijk (Netscape)", DlgLnkPopWidth : "Breedte", DlgLnkPopHeight : "Hoogte", DlgLnkPopLeft : "Positie links", DlgLnkPopTop : "Positie boven", DlnLnkMsgNoUrl : "Geef de link van de URL", DlnLnkMsgNoEMail : "Geef een e-mailadres", DlnLnkMsgNoAnchor : "Selecteer een interne link", DlnLnkMsgInvPopName : "De naam van de popup moet met een alfa-numerieke waarde beginnen, en mag geen spaties bevatten.", // Color Dialog DlgColorTitle : "Selecteer kleur", DlgColorBtnClear : "Opschonen", DlgColorHighlight : "Accentueren", DlgColorSelected : "Geselecteerd", // Smiley Dialog DlgSmileyTitle : "Smiley invoegen", // Special Character Dialog DlgSpecialCharTitle : "Selecteer speciaal teken", // Table Dialog DlgTableTitle : "Eigenschappen tabel", DlgTableRows : "Rijen", DlgTableColumns : "Kolommen", DlgTableBorder : "Breedte rand", DlgTableAlign : "Uitlijning", DlgTableAlignNotSet : "<Niet ingevoerd>", DlgTableAlignLeft : "Links", DlgTableAlignCenter : "Centreren", DlgTableAlignRight : "Rechts", DlgTableWidth : "Breedte", DlgTableWidthPx : "pixels", DlgTableWidthPc : "procent", DlgTableHeight : "Hoogte", DlgTableCellSpace : "Afstand tussen cellen", DlgTableCellPad : "Afstand vanaf rand cel", DlgTableCaption : "Naam", DlgTableSummary : "Samenvatting", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Eigenschappen cel", DlgCellWidth : "Breedte", DlgCellWidthPx : "pixels", DlgCellWidthPc : "procent", DlgCellHeight : "Hoogte", DlgCellWordWrap : "Afbreken woorden", DlgCellWordWrapNotSet : "<Niet ingevoerd>", DlgCellWordWrapYes : "Ja", DlgCellWordWrapNo : "Nee", DlgCellHorAlign : "Horizontale uitlijning", DlgCellHorAlignNotSet : "<Niet ingevoerd>", DlgCellHorAlignLeft : "Links", DlgCellHorAlignCenter : "Centreren", DlgCellHorAlignRight: "Rechts", DlgCellVerAlign : "Verticale uitlijning", DlgCellVerAlignNotSet : "<Niet ingevoerd>", DlgCellVerAlignTop : "Boven", DlgCellVerAlignMiddle : "Midden", DlgCellVerAlignBottom : "Beneden", DlgCellVerAlignBaseline : "Basislijn", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Overkoepeling rijen", DlgCellCollSpan : "Overkoepeling kolommen", DlgCellBackColor : "Achtergrondkleur", DlgCellBorderColor : "Randkleur", DlgCellBtnSelect : "Selecteren...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Zoeken en vervangen", // Find Dialog DlgFindTitle : "Zoeken", DlgFindFindBtn : "Zoeken", DlgFindNotFoundMsg : "De opgegeven tekst is niet gevonden.", // Replace Dialog DlgReplaceTitle : "Vervangen", DlgReplaceFindLbl : "Zoeken naar:", DlgReplaceReplaceLbl : "Vervangen met:", DlgReplaceCaseChk : "Hoofdlettergevoelig", DlgReplaceReplaceBtn : "Vervangen", DlgReplaceReplAllBtn : "Alles vervangen", DlgReplaceWordChk : "Hele woord moet voorkomen", // Paste Operations / Dialog PasteErrorCut : "De beveiligingsinstelling van de browser verhinderen het automatisch knippen. Gebruik de sneltoets Ctrl+X van het toetsenbord.", PasteErrorCopy : "De beveiligingsinstelling van de browser verhinderen het automatisch kopiëren. Gebruik de sneltoets Ctrl+C van het toetsenbord.", PasteAsText : "Plakken als platte tekst", PasteFromWord : "Plakken als Word-gegevens", DlgPasteMsg2 : "Plak de tekst in het volgende vak gebruik makend van uw toetsenbord (<strong>Ctrl+V</strong>) en klik op <strong>OK</strong>.", DlgPasteSec : "Door de beveiligingsinstellingen van uw browser is het niet mogelijk om direct vanuit het klembord in de editor te plakken. Middels opnieuw plakken in dit venster kunt u de tekst alsnog plakken in de editor.", DlgPasteIgnoreFont : "Negeer \"Font Face\"-definities", DlgPasteRemoveStyles : "Verwijder \"Style\"-definities", // Color Picker ColorAutomatic : "Automatisch", ColorMoreColors : "Meer kleuren...", // Document Properties DocProps : "Eigenschappen document", // Anchor Dialog DlgAnchorTitle : "Eigenschappen interne link", DlgAnchorName : "Naam interne link", DlgAnchorErrorName : "Geef de naam van de interne link op", // Speller Pages Dialog DlgSpellNotInDic : "Niet in het woordenboek", DlgSpellChangeTo : "Wijzig in", DlgSpellBtnIgnore : "Negeren", DlgSpellBtnIgnoreAll : "Alles negeren", DlgSpellBtnReplace : "Vervangen", DlgSpellBtnReplaceAll : "Alles vervangen", DlgSpellBtnUndo : "Ongedaan maken", DlgSpellNoSuggestions : "-Geen suggesties-", DlgSpellProgress : "Bezig met spellingscontrole...", DlgSpellNoMispell : "Klaar met spellingscontrole: geen fouten gevonden", DlgSpellNoChanges : "Klaar met spellingscontrole: geen woorden aangepast", DlgSpellOneChange : "Klaar met spellingscontrole: één woord aangepast", DlgSpellManyChanges : "Klaar met spellingscontrole: %1 woorden aangepast", IeSpellDownload : "De spellingscontrole niet geïnstalleerd. Wilt u deze nu downloaden?", // Button Dialog DlgButtonText : "Tekst (waarde)", DlgButtonType : "Soort", DlgButtonTypeBtn : "Knop", DlgButtonTypeSbm : "Versturen", DlgButtonTypeRst : "Leegmaken", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Naam", DlgCheckboxValue : "Waarde", DlgCheckboxSelected : "Geselecteerd", // Form Dialog DlgFormName : "Naam", DlgFormAction : "Actie", DlgFormMethod : "Methode", // Select Field Dialog DlgSelectName : "Naam", DlgSelectValue : "Waarde", DlgSelectSize : "Grootte", DlgSelectLines : "Regels", DlgSelectChkMulti : "Gecombineerde selecties toestaan", DlgSelectOpAvail : "Beschikbare opties", DlgSelectOpText : "Tekst", DlgSelectOpValue : "Waarde", DlgSelectBtnAdd : "Toevoegen", DlgSelectBtnModify : "Wijzigen", DlgSelectBtnUp : "Omhoog", DlgSelectBtnDown : "Omlaag", DlgSelectBtnSetValue : "Als geselecteerde waarde instellen", DlgSelectBtnDelete : "Verwijderen", // Textarea Dialog DlgTextareaName : "Naam", DlgTextareaCols : "Kolommen", DlgTextareaRows : "Rijen", // Text Field Dialog DlgTextName : "Naam", DlgTextValue : "Waarde", DlgTextCharWidth : "Breedte (tekens)", DlgTextMaxChars : "Maximum aantal tekens", DlgTextType : "Soort", DlgTextTypeText : "Tekst", DlgTextTypePass : "Wachtwoord", // Hidden Field Dialog DlgHiddenName : "Naam", DlgHiddenValue : "Waarde", // Bulleted List Dialog BulletedListProp : "Eigenschappen opsommingslijst", NumberedListProp : "Eigenschappen genummerde opsommingslijst", DlgLstStart : "Start", DlgLstType : "Soort", DlgLstTypeCircle : "Cirkel", DlgLstTypeDisc : "Schijf", DlgLstTypeSquare : "Vierkant", DlgLstTypeNumbers : "Nummers (1, 2, 3)", DlgLstTypeLCase : "Kleine letters (a, b, c)", DlgLstTypeUCase : "Hoofdletters (A, B, C)", DlgLstTypeSRoman : "Klein Romeins (i, ii, iii)", DlgLstTypeLRoman : "Groot Romeins (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Algemeen", DlgDocBackTab : "Achtergrond", DlgDocColorsTab : "Kleuring en marges", DlgDocMetaTab : "META-data", DlgDocPageTitle : "Paginatitel", DlgDocLangDir : "Schrijfrichting", DlgDocLangDirLTR : "Links naar rechts", DlgDocLangDirRTL : "Rechts naar links", DlgDocLangCode : "Taalcode", DlgDocCharSet : "Karakterset-encoding", DlgDocCharSetCE : "Centraal Europees", DlgDocCharSetCT : "Traditioneel Chinees (Big5)", DlgDocCharSetCR : "Cyriliaans", DlgDocCharSetGR : "Grieks", DlgDocCharSetJP : "Japans", DlgDocCharSetKR : "Koreaans", DlgDocCharSetTR : "Turks", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "West europees", DlgDocCharSetOther : "Andere karakterset-encoding", DlgDocDocType : "Opschrift documentsoort", DlgDocDocTypeOther : "Ander opschrift documentsoort", DlgDocIncXHTML : "XHTML-declaraties meenemen", DlgDocBgColor : "Achtergrondkleur", DlgDocBgImage : "URL achtergrondplaatje", DlgDocBgNoScroll : "Vaste achtergrond", DlgDocCText : "Tekst", DlgDocCLink : "Link", DlgDocCVisited : "Bezochte link", DlgDocCActive : "Active link", DlgDocMargins : "Afstandsinstellingen document", DlgDocMaTop : "Boven", DlgDocMaLeft : "Links", DlgDocMaRight : "Rechts", DlgDocMaBottom : "Onder", DlgDocMeIndex : "Trefwoorden betreffende document (kommagescheiden)", DlgDocMeDescr : "Beschrijving document", DlgDocMeAuthor : "Auteur", DlgDocMeCopy : "Copyright", DlgDocPreview : "Voorbeeld", // Templates Dialog Templates : "Sjablonen", DlgTemplatesTitle : "Inhoud sjabonen", DlgTemplatesSelMsg : "Selecteer het sjabloon dat in de editor geopend moet worden (de actuele inhoud gaat verloren):", DlgTemplatesLoading : "Bezig met laden sjabonen. Even geduld alstublieft...", DlgTemplatesNoTpl : "(Geen sjablonen gedefinieerd)", DlgTemplatesReplace : "Vervang de huidige inhoud", // About Dialog DlgAboutAboutTab : "Over", DlgAboutBrowserInfoTab : "Browserinformatie", DlgAboutLicenseTab : "Licentie", DlgAboutVersion : "Versie", DlgAboutInfo : "Voor meer informatie ga naar ", // Div Dialog DlgDivGeneralTab : "Algemeen", DlgDivAdvancedTab : "Geavanceerd", DlgDivStyle : "Style", DlgDivInlineStyle : "Inline Style" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Italian language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Nascondi la barra degli strumenti", ToolbarExpand : "Mostra la barra degli strumenti", // Toolbar Items and Context Menu Save : "Salva", NewPage : "Nuova pagina vuota", Preview : "Anteprima", Cut : "Taglia", Copy : "Copia", Paste : "Incolla", PasteText : "Incolla come testo semplice", PasteWord : "Incolla da Word", Print : "Stampa", SelectAll : "Seleziona tutto", RemoveFormat : "Elimina formattazione", InsertLinkLbl : "Collegamento", InsertLink : "Inserisci/Modifica collegamento", RemoveLink : "Elimina collegamento", VisitLink : "Open Link", //MISSING Anchor : "Inserisci/Modifica Ancora", AnchorDelete : "Rimuovi Ancora", InsertImageLbl : "Immagine", InsertImage : "Inserisci/Modifica immagine", InsertFlashLbl : "Oggetto Flash", InsertFlash : "Inserisci/Modifica Oggetto Flash", InsertTableLbl : "Tabella", InsertTable : "Inserisci/Modifica tabella", InsertLineLbl : "Riga orizzontale", InsertLine : "Inserisci riga orizzontale", InsertSpecialCharLbl: "Caratteri speciali", InsertSpecialChar : "Inserisci carattere speciale", InsertSmileyLbl : "Emoticon", InsertSmiley : "Inserisci emoticon", About : "Informazioni su FCKeditor", Bold : "Grassetto", Italic : "Corsivo", Underline : "Sottolineato", StrikeThrough : "Barrato", Subscript : "Pedice", Superscript : "Apice", LeftJustify : "Allinea a sinistra", CenterJustify : "Centra", RightJustify : "Allinea a destra", BlockJustify : "Giustifica", DecreaseIndent : "Riduci rientro", IncreaseIndent : "Aumenta rientro", Blockquote : "Blockquote", //MISSING CreateDiv : "Create Div Container", //MISSING EditDiv : "Edit Div Container", //MISSING DeleteDiv : "Remove Div Container", //MISSING Undo : "Annulla", Redo : "Ripristina", NumberedListLbl : "Elenco numerato", NumberedList : "Inserisci/Modifica elenco numerato", BulletedListLbl : "Elenco puntato", BulletedList : "Inserisci/Modifica elenco puntato", ShowTableBorders : "Mostra bordi tabelle", ShowDetails : "Mostra dettagli", Style : "Stile", FontFormat : "Formato", Font : "Font", FontSize : "Dimensione", TextColor : "Colore testo", BGColor : "Colore sfondo", Source : "Codice Sorgente", Find : "Trova", Replace : "Sostituisci", SpellCheck : "Correttore ortografico", UniversalKeyboard : "Tastiera universale", PageBreakLbl : "Interruzione di pagina", PageBreak : "Inserisci interruzione di pagina", Form : "Modulo", Checkbox : "Checkbox", RadioButton : "Radio Button", TextField : "Campo di testo", Textarea : "Area di testo", HiddenField : "Campo nascosto", Button : "Bottone", SelectionField : "Menu di selezione", ImageButton : "Bottone immagine", FitWindow : "Massimizza l'area dell'editor", ShowBlocks : "Visualizza Blocchi", // Context Menu EditLink : "Modifica collegamento", CellCM : "Cella", RowCM : "Riga", ColumnCM : "Colonna", InsertRowAfter : "Inserisci Riga Dopo", InsertRowBefore : "Inserisci Riga Prima", DeleteRows : "Elimina righe", InsertColumnAfter : "Inserisci Colonna Dopo", InsertColumnBefore : "Inserisci Colonna Prima", DeleteColumns : "Elimina colonne", InsertCellAfter : "Inserisci Cella Dopo", InsertCellBefore : "Inserisci Cella Prima", DeleteCells : "Elimina celle", MergeCells : "Unisce celle", MergeRight : "Unisci a Destra", MergeDown : "Unisci in Basso", HorizontalSplitCell : "Dividi Cella Orizzontalmente", VerticalSplitCell : "Dividi Cella Verticalmente", TableDelete : "Cancella Tabella", CellProperties : "Proprietà cella", TableProperties : "Proprietà tabella", ImageProperties : "Proprietà immagine", FlashProperties : "Proprietà Oggetto Flash", AnchorProp : "Proprietà ancora", ButtonProp : "Proprietà bottone", CheckboxProp : "Proprietà checkbox", HiddenFieldProp : "Proprietà campo nascosto", RadioButtonProp : "Proprietà radio button", ImageButtonProp : "Proprietà bottone immagine", TextFieldProp : "Proprietà campo di testo", SelectionFieldProp : "Proprietà menu di selezione", TextareaProp : "Proprietà area di testo", FormProp : "Proprietà modulo", FontFormats : "Normale;Formattato;Indirizzo;Titolo 1;Titolo 2;Titolo 3;Titolo 4;Titolo 5;Titolo 6;Paragrafo (DIV)", // Alerts and Messages ProcessingXHTML : "Elaborazione XHTML in corso. Attendere prego...", Done : "Completato", PasteWordConfirm : "Il testo da incollare sembra provenire da Word. Desideri pulirlo prima di incollare?", NotCompatiblePaste : "Questa funzione è disponibile solo per Internet Explorer 5.5 o superiore. Desideri incollare il testo senza pulirlo?", UnknownToolbarItem : "Elemento della barra strumenti sconosciuto \"%1\"", UnknownCommand : "Comando sconosciuto \"%1\"", NotImplemented : "Comando non implementato", UnknownToolbarSet : "La barra di strumenti \"%1\" non esiste", NoActiveX : "Le impostazioni di sicurezza del tuo browser potrebbero limitare alcune funzionalità dell'editor. Devi abilitare l'opzione \"Esegui controlli e plug-in ActiveX\". Potresti avere errori e notare funzionalità mancanti.", BrowseServerBlocked : "Non è possibile aprire la finestra di espolorazione risorse. Verifica che tutti i blocca popup siano bloccati.", DialogBlocked : "Non è possibile aprire la finestra di dialogo. Verifica che tutti i blocca popup siano bloccati.", VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Annulla", DlgBtnClose : "Chiudi", DlgBtnBrowseServer : "Cerca sul server", DlgAdvancedTag : "Avanzate", DlgOpOther : "<Altro>", DlgInfoTab : "Info", DlgAlertUrl : "Devi inserire l'URL", // General Dialogs Labels DlgGenNotSet : "<non impostato>", DlgGenId : "Id", DlgGenLangDir : "Direzione scrittura", DlgGenLangDirLtr : "Da Sinistra a Destra (LTR)", DlgGenLangDirRtl : "Da Destra a Sinistra (RTL)", DlgGenLangCode : "Codice Lingua", DlgGenAccessKey : "Scorciatoia<br />da tastiera", DlgGenName : "Nome", DlgGenTabIndex : "Ordine di tabulazione", DlgGenLongDescr : "URL descrizione estesa", DlgGenClass : "Nome classe CSS", DlgGenTitle : "Titolo", DlgGenContType : "Tipo della risorsa collegata", DlgGenLinkCharset : "Set di caretteri della risorsa collegata", DlgGenStyle : "Stile", // Image Dialog DlgImgTitle : "Proprietà immagine", DlgImgInfoTab : "Informazioni immagine", DlgImgBtnUpload : "Invia al server", DlgImgURL : "URL", DlgImgUpload : "Carica", DlgImgAlt : "Testo alternativo", DlgImgWidth : "Larghezza", DlgImgHeight : "Altezza", DlgImgLockRatio : "Blocca rapporto", DlgBtnResetSize : "Reimposta dimensione", DlgImgBorder : "Bordo", DlgImgHSpace : "HSpace", DlgImgVSpace : "VSpace", DlgImgAlign : "Allineamento", DlgImgAlignLeft : "Sinistra", DlgImgAlignAbsBottom: "In basso assoluto", DlgImgAlignAbsMiddle: "Centrato assoluto", DlgImgAlignBaseline : "Linea base", DlgImgAlignBottom : "In Basso", DlgImgAlignMiddle : "Centrato", DlgImgAlignRight : "Destra", DlgImgAlignTextTop : "In alto al testo", DlgImgAlignTop : "In Alto", DlgImgPreview : "Anteprima", DlgImgAlertUrl : "Devi inserire l'URL per l'immagine", DlgImgLinkTab : "Collegamento", // Flash Dialog DlgFlashTitle : "Proprietà Oggetto Flash", DlgFlashChkPlay : "Avvio Automatico", DlgFlashChkLoop : "Cicla", DlgFlashChkMenu : "Abilita Menu di Flash", DlgFlashScale : "Ridimensiona", DlgFlashScaleAll : "Mostra Tutto", DlgFlashScaleNoBorder : "Senza Bordo", DlgFlashScaleFit : "Dimensione Esatta", // Link Dialog DlgLnkWindowTitle : "Collegamento", DlgLnkInfoTab : "Informazioni collegamento", DlgLnkTargetTab : "Destinazione", DlgLnkType : "Tipo di Collegamento", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Ancora nella pagina", DlgLnkTypeEMail : "E-Mail", DlgLnkProto : "Protocollo", DlgLnkProtoOther : "<altro>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Scegli Ancora", DlgLnkAnchorByName : "Per Nome", DlgLnkAnchorById : "Per id elemento", DlgLnkNoAnchors : "(Nessuna ancora disponibile nel documento)", DlgLnkEMail : "Indirizzo E-Mail", DlgLnkEMailSubject : "Oggetto del messaggio", DlgLnkEMailBody : "Corpo del messaggio", DlgLnkUpload : "Carica", DlgLnkBtnUpload : "Invia al Server", DlgLnkTarget : "Destinazione", DlgLnkTargetFrame : "<riquadro>", DlgLnkTargetPopup : "<finestra popup>", DlgLnkTargetBlank : "Nuova finestra (_blank)", DlgLnkTargetParent : "Finestra padre (_parent)", DlgLnkTargetSelf : "Stessa finestra (_self)", DlgLnkTargetTop : "Finestra superiore (_top)", DlgLnkTargetFrameName : "Nome del riquadro di destinazione", DlgLnkPopWinName : "Nome finestra popup", DlgLnkPopWinFeat : "Caratteristiche finestra popup", DlgLnkPopResize : "Ridimensionabile", DlgLnkPopLocation : "Barra degli indirizzi", DlgLnkPopMenu : "Barra del menu", DlgLnkPopScroll : "Barre di scorrimento", DlgLnkPopStatus : "Barra di stato", DlgLnkPopToolbar : "Barra degli strumenti", DlgLnkPopFullScrn : "A tutto schermo (IE)", DlgLnkPopDependent : "Dipendente (Netscape)", DlgLnkPopWidth : "Larghezza", DlgLnkPopHeight : "Altezza", DlgLnkPopLeft : "Posizione da sinistra", DlgLnkPopTop : "Posizione dall'alto", DlnLnkMsgNoUrl : "Devi inserire l'URL del collegamento", DlnLnkMsgNoEMail : "Devi inserire un'indirizzo e-mail", DlnLnkMsgNoAnchor : "Devi selezionare un'ancora", DlnLnkMsgInvPopName : "Il nome del popup deve iniziare con una lettera, e non può contenere spazi", // Color Dialog DlgColorTitle : "Seleziona colore", DlgColorBtnClear : "Vuota", DlgColorHighlight : "Evidenziato", DlgColorSelected : "Selezionato", // Smiley Dialog DlgSmileyTitle : "Inserisci emoticon", // Special Character Dialog DlgSpecialCharTitle : "Seleziona carattere speciale", // Table Dialog DlgTableTitle : "Proprietà tabella", DlgTableRows : "Righe", DlgTableColumns : "Colonne", DlgTableBorder : "Dimensione bordo", DlgTableAlign : "Allineamento", DlgTableAlignNotSet : "<non impostato>", DlgTableAlignLeft : "Sinistra", DlgTableAlignCenter : "Centrato", DlgTableAlignRight : "Destra", DlgTableWidth : "Larghezza", DlgTableWidthPx : "pixel", DlgTableWidthPc : "percento", DlgTableHeight : "Altezza", DlgTableCellSpace : "Spaziatura celle", DlgTableCellPad : "Padding celle", DlgTableCaption : "Intestazione", DlgTableSummary : "Indice", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Proprietà cella", DlgCellWidth : "Larghezza", DlgCellWidthPx : "pixel", DlgCellWidthPc : "percento", DlgCellHeight : "Altezza", DlgCellWordWrap : "A capo automatico", DlgCellWordWrapNotSet : "<non impostato>", DlgCellWordWrapYes : "Si", DlgCellWordWrapNo : "No", DlgCellHorAlign : "Allineamento orizzontale", DlgCellHorAlignNotSet : "<non impostato>", DlgCellHorAlignLeft : "Sinistra", DlgCellHorAlignCenter : "Centrato", DlgCellHorAlignRight: "Destra", DlgCellVerAlign : "Allineamento verticale", DlgCellVerAlignNotSet : "<non impostato>", DlgCellVerAlignTop : "In Alto", DlgCellVerAlignMiddle : "Centrato", DlgCellVerAlignBottom : "In Basso", DlgCellVerAlignBaseline : "Linea base", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Righe occupate", DlgCellCollSpan : "Colonne occupate", DlgCellBackColor : "Colore sfondo", DlgCellBorderColor : "Colore bordo", DlgCellBtnSelect : "Scegli...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Cerca e Sostituisci", // Find Dialog DlgFindTitle : "Trova", DlgFindFindBtn : "Trova", DlgFindNotFoundMsg : "L'elemento cercato non è stato trovato.", // Replace Dialog DlgReplaceTitle : "Sostituisci", DlgReplaceFindLbl : "Trova:", DlgReplaceReplaceLbl : "Sostituisci con:", DlgReplaceCaseChk : "Maiuscole/minuscole", DlgReplaceReplaceBtn : "Sostituisci", DlgReplaceReplAllBtn : "Sostituisci tutto", DlgReplaceWordChk : "Solo parole intere", // Paste Operations / Dialog PasteErrorCut : "Le impostazioni di sicurezza del browser non permettono di tagliare automaticamente il testo. Usa la tastiera (Ctrl+X).", PasteErrorCopy : "Le impostazioni di sicurezza del browser non permettono di copiare automaticamente il testo. Usa la tastiera (Ctrl+C).", PasteAsText : "Incolla come testo semplice", PasteFromWord : "Incolla da Word", DlgPasteMsg2 : "Incolla il testo all'interno dell'area sottostante usando la scorciatoia di tastiere (<STRONG>Ctrl+V</STRONG>) e premi <STRONG>OK</STRONG>.", DlgPasteSec : "A causa delle impostazioni di sicurezza del browser,l'editor non è in grado di accedere direttamente agli appunti. E' pertanto necessario incollarli di nuovo in questa finestra.", DlgPasteIgnoreFont : "Ignora le definizioni di Font", DlgPasteRemoveStyles : "Rimuovi le definizioni di Stile", // Color Picker ColorAutomatic : "Automatico", ColorMoreColors : "Altri colori...", // Document Properties DocProps : "Proprietà del Documento", // Anchor Dialog DlgAnchorTitle : "Proprietà ancora", DlgAnchorName : "Nome ancora", DlgAnchorErrorName : "Inserici il nome dell'ancora", // Speller Pages Dialog DlgSpellNotInDic : "Non nel dizionario", DlgSpellChangeTo : "Cambia in", DlgSpellBtnIgnore : "Ignora", DlgSpellBtnIgnoreAll : "Ignora tutto", DlgSpellBtnReplace : "Cambia", DlgSpellBtnReplaceAll : "Cambia tutto", DlgSpellBtnUndo : "Annulla", DlgSpellNoSuggestions : "- Nessun suggerimento -", DlgSpellProgress : "Controllo ortografico in corso", DlgSpellNoMispell : "Controllo ortografico completato: nessun errore trovato", DlgSpellNoChanges : "Controllo ortografico completato: nessuna parola cambiata", DlgSpellOneChange : "Controllo ortografico completato: 1 parola cambiata", DlgSpellManyChanges : "Controllo ortografico completato: %1 parole cambiate", IeSpellDownload : "Contollo ortografico non installato. Lo vuoi scaricare ora?", // Button Dialog DlgButtonText : "Testo (Value)", DlgButtonType : "Tipo", DlgButtonTypeBtn : "Bottone", DlgButtonTypeSbm : "Invio", DlgButtonTypeRst : "Annulla", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Nome", DlgCheckboxValue : "Valore", DlgCheckboxSelected : "Selezionato", // Form Dialog DlgFormName : "Nome", DlgFormAction : "Azione", DlgFormMethod : "Metodo", // Select Field Dialog DlgSelectName : "Nome", DlgSelectValue : "Valore", DlgSelectSize : "Dimensione", DlgSelectLines : "righe", DlgSelectChkMulti : "Permetti selezione multipla", DlgSelectOpAvail : "Opzioni disponibili", DlgSelectOpText : "Testo", DlgSelectOpValue : "Valore", DlgSelectBtnAdd : "Aggiungi", DlgSelectBtnModify : "Modifica", DlgSelectBtnUp : "Su", DlgSelectBtnDown : "Gi", DlgSelectBtnSetValue : "Imposta come predefinito", DlgSelectBtnDelete : "Rimuovi", // Textarea Dialog DlgTextareaName : "Nome", DlgTextareaCols : "Colonne", DlgTextareaRows : "Righe", // Text Field Dialog DlgTextName : "Nome", DlgTextValue : "Valore", DlgTextCharWidth : "Larghezza", DlgTextMaxChars : "Numero massimo di caratteri", DlgTextType : "Tipo", DlgTextTypeText : "Testo", DlgTextTypePass : "Password", // Hidden Field Dialog DlgHiddenName : "Nome", DlgHiddenValue : "Valore", // Bulleted List Dialog BulletedListProp : "Proprietà lista puntata", NumberedListProp : "Proprietà lista numerata", DlgLstStart : "Inizio", DlgLstType : "Tipo", DlgLstTypeCircle : "Tondo", DlgLstTypeDisc : "Disco", DlgLstTypeSquare : "Quadrato", DlgLstTypeNumbers : "Numeri (1, 2, 3)", DlgLstTypeLCase : "Caratteri minuscoli (a, b, c)", DlgLstTypeUCase : "Caratteri maiuscoli (A, B, C)", DlgLstTypeSRoman : "Numeri Romani minuscoli (i, ii, iii)", DlgLstTypeLRoman : "Numeri Romani maiuscoli (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Genarale", DlgDocBackTab : "Sfondo", DlgDocColorsTab : "Colori e margini", DlgDocMetaTab : "Meta Data", DlgDocPageTitle : "Titolo pagina", DlgDocLangDir : "Direzione scrittura", DlgDocLangDirLTR : "Da Sinistra a Destra (LTR)", DlgDocLangDirRTL : "Da Destra a Sinistra (RTL)", DlgDocLangCode : "Codice Lingua", DlgDocCharSet : "Set di caretteri", DlgDocCharSetCE : "Europa Centrale", DlgDocCharSetCT : "Cinese Tradizionale (Big5)", DlgDocCharSetCR : "Cirillico", DlgDocCharSetGR : "Greco", DlgDocCharSetJP : "Giapponese", DlgDocCharSetKR : "Coreano", DlgDocCharSetTR : "Turco", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Europa Occidentale", DlgDocCharSetOther : "Altro set di caretteri", DlgDocDocType : "Intestazione DocType", DlgDocDocTypeOther : "Altra intestazione DocType", DlgDocIncXHTML : "Includi dichiarazione XHTML", DlgDocBgColor : "Colore di sfondo", DlgDocBgImage : "Immagine di sfondo", DlgDocBgNoScroll : "Sfondo fissato", DlgDocCText : "Testo", DlgDocCLink : "Collegamento", DlgDocCVisited : "Collegamento visitato", DlgDocCActive : "Collegamento attivo", DlgDocMargins : "Margini", DlgDocMaTop : "In Alto", DlgDocMaLeft : "A Sinistra", DlgDocMaRight : "A Destra", DlgDocMaBottom : "In Basso", DlgDocMeIndex : "Chiavi di indicizzazione documento (separate da virgola)", DlgDocMeDescr : "Descrizione documento", DlgDocMeAuthor : "Autore", DlgDocMeCopy : "Copyright", DlgDocPreview : "Anteprima", // Templates Dialog Templates : "Modelli", DlgTemplatesTitle : "Contenuto dei modelli", DlgTemplatesSelMsg : "Seleziona il modello da aprire nell'editor<br />(il contenuto attuale verrà eliminato):", DlgTemplatesLoading : "Caricamento modelli in corso. Attendere prego...", DlgTemplatesNoTpl : "(Nessun modello definito)", DlgTemplatesReplace : "Cancella il contenuto corrente", // About Dialog DlgAboutAboutTab : "Informazioni", DlgAboutBrowserInfoTab : "Informazioni Browser", DlgAboutLicenseTab : "Licenza", DlgAboutVersion : "versione", DlgAboutInfo : "Per maggiori informazioni visitare", // Div Dialog DlgDivGeneralTab : "General", //MISSING DlgDivAdvancedTab : "Advanced", //MISSING DlgDivStyle : "Style", //MISSING DlgDivInlineStyle : "Inline Style" //MISSING };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * German language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Symbolleiste einklappen", ToolbarExpand : "Symbolleiste ausklappen", // Toolbar Items and Context Menu Save : "Speichern", NewPage : "Neue Seite", Preview : "Vorschau", Cut : "Ausschneiden", Copy : "Kopieren", Paste : "Einfügen", PasteText : "aus Textdatei einfügen", PasteWord : "aus MS-Word einfügen", Print : "Drucken", SelectAll : "Alles auswählen", RemoveFormat : "Formatierungen entfernen", InsertLinkLbl : "Link", InsertLink : "Link einfügen/editieren", RemoveLink : "Link entfernen", VisitLink : "Link aufrufen", Anchor : "Anker einfügen/editieren", AnchorDelete : "Anker entfernen", InsertImageLbl : "Bild", InsertImage : "Bild einfügen/editieren", InsertFlashLbl : "Flash", InsertFlash : "Flash einfügen/editieren", InsertTableLbl : "Tabelle", InsertTable : "Tabelle einfügen/editieren", InsertLineLbl : "Linie", InsertLine : "Horizontale Linie einfügen", InsertSpecialCharLbl: "Sonderzeichen", InsertSpecialChar : "Sonderzeichen einfügen/editieren", InsertSmileyLbl : "Smiley", InsertSmiley : "Smiley einfügen", About : "Über FCKeditor", Bold : "Fett", Italic : "Kursiv", Underline : "Unterstrichen", StrikeThrough : "Durchgestrichen", Subscript : "Tiefgestellt", Superscript : "Hochgestellt", LeftJustify : "Linksbündig", CenterJustify : "Zentriert", RightJustify : "Rechtsbündig", BlockJustify : "Blocksatz", DecreaseIndent : "Einzug verringern", IncreaseIndent : "Einzug erhöhen", Blockquote : "Zitatblock", CreateDiv : "Erzeuge Div Block", EditDiv : "Bearbeite Div Block", DeleteDiv : "Entferne Div Block", Undo : "Rückgängig", Redo : "Wiederherstellen", NumberedListLbl : "Nummerierte Liste", NumberedList : "Nummerierte Liste einfügen/entfernen", BulletedListLbl : "Liste", BulletedList : "Liste einfügen/entfernen", ShowTableBorders : "Zeige Tabellenrahmen", ShowDetails : "Zeige Details", Style : "Stil", FontFormat : "Format", Font : "Schriftart", FontSize : "Größe", TextColor : "Textfarbe", BGColor : "Hintergrundfarbe", Source : "Quellcode", Find : "Suchen", Replace : "Ersetzen", SpellCheck : "Rechtschreibprüfung", UniversalKeyboard : "Universal-Tastatur", PageBreakLbl : "Seitenumbruch", PageBreak : "Seitenumbruch einfügen", Form : "Formular", Checkbox : "Checkbox", RadioButton : "Radiobutton", TextField : "Textfeld einzeilig", Textarea : "Textfeld mehrzeilig", HiddenField : "verstecktes Feld", Button : "Klickbutton", SelectionField : "Auswahlfeld", ImageButton : "Bildbutton", FitWindow : "Editor maximieren", ShowBlocks : "Blöcke anzeigen", // Context Menu EditLink : "Link editieren", CellCM : "Zelle", RowCM : "Zeile", ColumnCM : "Spalte", InsertRowAfter : "Zeile unterhalb einfügen", InsertRowBefore : "Zeile oberhalb einfügen", DeleteRows : "Zeile entfernen", InsertColumnAfter : "Spalte rechts danach einfügen", InsertColumnBefore : "Spalte links davor einfügen", DeleteColumns : "Spalte löschen", InsertCellAfter : "Zelle danach einfügen", InsertCellBefore : "Zelle davor einfügen", DeleteCells : "Zelle löschen", MergeCells : "Zellen verbinden", MergeRight : "nach rechts verbinden", MergeDown : "nach unten verbinden", HorizontalSplitCell : "Zelle horizontal teilen", VerticalSplitCell : "Zelle vertikal teilen", TableDelete : "Tabelle löschen", CellProperties : "Zellen-Eigenschaften", TableProperties : "Tabellen-Eigenschaften", ImageProperties : "Bild-Eigenschaften", FlashProperties : "Flash-Eigenschaften", AnchorProp : "Anker-Eigenschaften", ButtonProp : "Button-Eigenschaften", CheckboxProp : "Checkbox-Eigenschaften", HiddenFieldProp : "Verstecktes Feld-Eigenschaften", RadioButtonProp : "Optionsfeld-Eigenschaften", ImageButtonProp : "Bildbutton-Eigenschaften", TextFieldProp : "Textfeld (einzeilig) Eigenschaften", SelectionFieldProp : "Auswahlfeld-Eigenschaften", TextareaProp : "Textfeld (mehrzeilig) Eigenschaften", FormProp : "Formular-Eigenschaften", FontFormats : "Normal;Formatiert;Addresse;Überschrift 1;Überschrift 2;Überschrift 3;Überschrift 4;Überschrift 5;Überschrift 6;Normal (DIV)", // Alerts and Messages ProcessingXHTML : "Bearbeite XHTML. Bitte warten...", Done : "Fertig", PasteWordConfirm : "Der Text, den Sie einfügen möchten, scheint aus MS-Word kopiert zu sein. Möchten Sie ihn zuvor bereinigen lassen?", NotCompatiblePaste : "Diese Funktion steht nur im Internet Explorer ab Version 5.5 zur Verfügung. Möchten Sie den Text unbereinigt einfügen?", UnknownToolbarItem : "Unbekanntes Menüleisten-Objekt \"%1\"", UnknownCommand : "Unbekannter Befehl \"%1\"", NotImplemented : "Befehl nicht implementiert", UnknownToolbarSet : "Menüleiste \"%1\" existiert nicht", NoActiveX : "Die Sicherheitseinstellungen Ihres Browsers beschränken evtl. einige Funktionen des Editors. Aktivieren Sie die Option \"ActiveX-Steuerelemente und Plugins ausführen\" in den Sicherheitseinstellungen, um diese Funktionen nutzen zu können", BrowseServerBlocked : "Ein Auswahlfenster konnte nicht geöffnet werden. Stellen Sie sicher, das alle Popup-Blocker ausgeschaltet sind.", DialogBlocked : "Das Dialog-Fenster konnte nicht geöffnet werden. Stellen Sie sicher, das alle Popup-Blocker ausgeschaltet sind.", VisitLinkBlocked : "Es war leider nicht möglich ein neues Fenster zu öffnen. Bitte versichern Sie sich das der Popup-Blocker ausgeschaltet ist.", // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Abbrechen", DlgBtnClose : "Schließen", DlgBtnBrowseServer : "Server durchsuchen", DlgAdvancedTag : "Erweitert", DlgOpOther : "<andere>", DlgInfoTab : "Info", DlgAlertUrl : "Bitte tragen Sie die URL ein", // General Dialogs Labels DlgGenNotSet : "<nichts>", DlgGenId : "ID", DlgGenLangDir : "Schreibrichtung", DlgGenLangDirLtr : "Links nach Rechts (LTR)", DlgGenLangDirRtl : "Rechts nach Links (RTL)", DlgGenLangCode : "Sprachenkürzel", DlgGenAccessKey : "Zugriffstaste", DlgGenName : "Name", DlgGenTabIndex : "Tab-Index", DlgGenLongDescr : "Langform URL", DlgGenClass : "Stylesheet Klasse", DlgGenTitle : "Titel Beschreibung", DlgGenContType : "Inhaltstyp", DlgGenLinkCharset : "Ziel-Zeichensatz", DlgGenStyle : "Style", // Image Dialog DlgImgTitle : "Bild-Eigenschaften", DlgImgInfoTab : "Bild-Info", DlgImgBtnUpload : "Zum Server senden", DlgImgURL : "Bildauswahl", DlgImgUpload : "Upload", DlgImgAlt : "Alternativer Text", DlgImgWidth : "Breite", DlgImgHeight : "Höhe", DlgImgLockRatio : "Größenverhältniss beibehalten", DlgBtnResetSize : "Größe zurücksetzen", DlgImgBorder : "Rahmen", DlgImgHSpace : "Horizontal-Abstand", DlgImgVSpace : "Vertikal-Abstand", DlgImgAlign : "Ausrichtung", DlgImgAlignLeft : "Links", DlgImgAlignAbsBottom: "Abs Unten", DlgImgAlignAbsMiddle: "Abs Mitte", DlgImgAlignBaseline : "Baseline", DlgImgAlignBottom : "Unten", DlgImgAlignMiddle : "Mitte", DlgImgAlignRight : "Rechts", DlgImgAlignTextTop : "Text Oben", DlgImgAlignTop : "Oben", DlgImgPreview : "Vorschau", DlgImgAlertUrl : "Bitte geben Sie die Bild-URL an", DlgImgLinkTab : "Link", // Flash Dialog DlgFlashTitle : "Flash-Eigenschaften", DlgFlashChkPlay : "autom. Abspielen", DlgFlashChkLoop : "Endlosschleife", DlgFlashChkMenu : "Flash-Menü aktivieren", DlgFlashScale : "Skalierung", DlgFlashScaleAll : "Alles anzeigen", DlgFlashScaleNoBorder : "ohne Rand", DlgFlashScaleFit : "Passgenau", // Link Dialog DlgLnkWindowTitle : "Link", DlgLnkInfoTab : "Link-Info", DlgLnkTargetTab : "Zielseite", DlgLnkType : "Link-Typ", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Anker in dieser Seite", DlgLnkTypeEMail : "E-Mail", DlgLnkProto : "Protokoll", DlgLnkProtoOther : "<anderes>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Anker auswählen", DlgLnkAnchorByName : "nach Anker Name", DlgLnkAnchorById : "nach Element Id", DlgLnkNoAnchors : "(keine Anker im Dokument vorhanden)", DlgLnkEMail : "E-Mail Addresse", DlgLnkEMailSubject : "Betreffzeile", DlgLnkEMailBody : "Nachrichtentext", DlgLnkUpload : "Upload", DlgLnkBtnUpload : "Zum Server senden", DlgLnkTarget : "Zielseite", DlgLnkTargetFrame : "<Frame>", DlgLnkTargetPopup : "<Pop-up Fenster>", DlgLnkTargetBlank : "Neues Fenster (_blank)", DlgLnkTargetParent : "Oberes Fenster (_parent)", DlgLnkTargetSelf : "Gleiches Fenster (_self)", DlgLnkTargetTop : "Oberstes Fenster (_top)", DlgLnkTargetFrameName : "Ziel-Fenster-Name", DlgLnkPopWinName : "Pop-up Fenster-Name", DlgLnkPopWinFeat : "Pop-up Fenster-Eigenschaften", DlgLnkPopResize : "Vergrößerbar", DlgLnkPopLocation : "Adress-Leiste", DlgLnkPopMenu : "Menü-Leiste", DlgLnkPopScroll : "Rollbalken", DlgLnkPopStatus : "Statusleiste", DlgLnkPopToolbar : "Werkzeugleiste", DlgLnkPopFullScrn : "Vollbild (IE)", DlgLnkPopDependent : "Abhängig (Netscape)", DlgLnkPopWidth : "Breite", DlgLnkPopHeight : "Höhe", DlgLnkPopLeft : "Linke Position", DlgLnkPopTop : "Obere Position", DlnLnkMsgNoUrl : "Bitte geben Sie die Link-URL an", DlnLnkMsgNoEMail : "Bitte geben Sie e-Mail Adresse an", DlnLnkMsgNoAnchor : "Bitte wählen Sie einen Anker aus", DlnLnkMsgInvPopName : "Der Name des Popups muss mit einem Buchstaben beginnen und darf keine Leerzeichen enthalten", // Color Dialog DlgColorTitle : "Farbauswahl", DlgColorBtnClear : "Keine Farbe", DlgColorHighlight : "Vorschau", DlgColorSelected : "Ausgewählt", // Smiley Dialog DlgSmileyTitle : "Smiley auswählen", // Special Character Dialog DlgSpecialCharTitle : "Sonderzeichen auswählen", // Table Dialog DlgTableTitle : "Tabellen-Eigenschaften", DlgTableRows : "Zeile", DlgTableColumns : "Spalte", DlgTableBorder : "Rahmen", DlgTableAlign : "Ausrichtung", DlgTableAlignNotSet : "<keine>", DlgTableAlignLeft : "Links", DlgTableAlignCenter : "Zentriert", DlgTableAlignRight : "Rechts", DlgTableWidth : "Breite", DlgTableWidthPx : "Pixel", DlgTableWidthPc : "%", DlgTableHeight : "Höhe", DlgTableCellSpace : "Zellenabstand außen", DlgTableCellPad : "Zellenabstand innen", DlgTableCaption : "Überschrift", DlgTableSummary : "Inhaltsübersicht", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Zellen-Eigenschaften", DlgCellWidth : "Breite", DlgCellWidthPx : "Pixel", DlgCellWidthPc : "%", DlgCellHeight : "Höhe", DlgCellWordWrap : "Umbruch", DlgCellWordWrapNotSet : "<keiner>", DlgCellWordWrapYes : "Ja", DlgCellWordWrapNo : "Nein", DlgCellHorAlign : "Horizontale Ausrichtung", DlgCellHorAlignNotSet : "<keine>", DlgCellHorAlignLeft : "Links", DlgCellHorAlignCenter : "Zentriert", DlgCellHorAlignRight: "Rechts", DlgCellVerAlign : "Vertikale Ausrichtung", DlgCellVerAlignNotSet : "<keine>", DlgCellVerAlignTop : "Oben", DlgCellVerAlignMiddle : "Mitte", DlgCellVerAlignBottom : "Unten", DlgCellVerAlignBaseline : "Grundlinie", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Zeilen zusammenfassen", DlgCellCollSpan : "Spalten zusammenfassen", DlgCellBackColor : "Hintergrundfarbe", DlgCellBorderColor : "Rahmenfarbe", DlgCellBtnSelect : "Auswahl...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Suchen und Ersetzen", // Find Dialog DlgFindTitle : "Finden", DlgFindFindBtn : "Finden", DlgFindNotFoundMsg : "Der gesuchte Text wurde nicht gefunden.", // Replace Dialog DlgReplaceTitle : "Ersetzen", DlgReplaceFindLbl : "Suche nach:", DlgReplaceReplaceLbl : "Ersetze mit:", DlgReplaceCaseChk : "Groß-Kleinschreibung beachten", DlgReplaceReplaceBtn : "Ersetzen", DlgReplaceReplAllBtn : "Alle Ersetzen", DlgReplaceWordChk : "Nur ganze Worte suchen", // Paste Operations / Dialog PasteErrorCut : "Die Sicherheitseinstellungen Ihres Browsers lassen es nicht zu, den Text automatisch auszuschneiden. Bitte benutzen Sie die System-Zwischenablage über STRG-X (ausschneiden) und STRG-V (einfügen).", PasteErrorCopy : "Die Sicherheitseinstellungen Ihres Browsers lassen es nicht zu, den Text automatisch kopieren. Bitte benutzen Sie die System-Zwischenablage über STRG-C (kopieren).", PasteAsText : "Als Text einfügen", PasteFromWord : "Aus Word einfügen", DlgPasteMsg2 : "Bitte fügen Sie den Text in der folgenden Box über die Tastatur (mit <STRONG>Strg+V</STRONG>) ein und bestätigen Sie mit <STRONG>OK</STRONG>.", DlgPasteSec : "Aufgrund von Sicherheitsbeschränkungen Ihres Browsers kann der Editor nicht direkt auf die Zwischenablage zugreifen. Bitte fügen Sie den Inhalt erneut in diesem Fenster ein.", DlgPasteIgnoreFont : "Ignoriere Schriftart-Definitionen", DlgPasteRemoveStyles : "Entferne Style-Definitionen", // Color Picker ColorAutomatic : "Automatisch", ColorMoreColors : "Weitere Farben...", // Document Properties DocProps : "Dokument-Eigenschaften", // Anchor Dialog DlgAnchorTitle : "Anker-Eigenschaften", DlgAnchorName : "Anker Name", DlgAnchorErrorName : "Bitte geben Sie den Namen des Ankers ein", // Speller Pages Dialog DlgSpellNotInDic : "Nicht im Wörterbuch", DlgSpellChangeTo : "Ändern in", DlgSpellBtnIgnore : "Ignorieren", DlgSpellBtnIgnoreAll : "Alle Ignorieren", DlgSpellBtnReplace : "Ersetzen", DlgSpellBtnReplaceAll : "Alle Ersetzen", DlgSpellBtnUndo : "Rückgängig", DlgSpellNoSuggestions : " - keine Vorschläge - ", DlgSpellProgress : "Rechtschreibprüfung läuft...", DlgSpellNoMispell : "Rechtschreibprüfung abgeschlossen - keine Fehler gefunden", DlgSpellNoChanges : "Rechtschreibprüfung abgeschlossen - keine Worte geändert", DlgSpellOneChange : "Rechtschreibprüfung abgeschlossen - ein Wort geändert", DlgSpellManyChanges : "Rechtschreibprüfung abgeschlossen - %1 Wörter geändert", IeSpellDownload : "Rechtschreibprüfung nicht installiert. Möchten Sie sie jetzt herunterladen?", // Button Dialog DlgButtonText : "Text (Wert)", DlgButtonType : "Typ", DlgButtonTypeBtn : "Button", DlgButtonTypeSbm : "Absenden", DlgButtonTypeRst : "Zurücksetzen", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Name", DlgCheckboxValue : "Wert", DlgCheckboxSelected : "ausgewählt", // Form Dialog DlgFormName : "Name", DlgFormAction : "Action", DlgFormMethod : "Method", // Select Field Dialog DlgSelectName : "Name", DlgSelectValue : "Wert", DlgSelectSize : "Größe", DlgSelectLines : "Linien", DlgSelectChkMulti : "Erlaube Mehrfachauswahl", DlgSelectOpAvail : "Mögliche Optionen", DlgSelectOpText : "Text", DlgSelectOpValue : "Wert", DlgSelectBtnAdd : "Hinzufügen", DlgSelectBtnModify : "Ändern", DlgSelectBtnUp : "Hoch", DlgSelectBtnDown : "Runter", DlgSelectBtnSetValue : "Setze als Standardwert", DlgSelectBtnDelete : "Entfernen", // Textarea Dialog DlgTextareaName : "Name", DlgTextareaCols : "Spalten", DlgTextareaRows : "Reihen", // Text Field Dialog DlgTextName : "Name", DlgTextValue : "Wert", DlgTextCharWidth : "Zeichenbreite", DlgTextMaxChars : "Max. Zeichen", DlgTextType : "Typ", DlgTextTypeText : "Text", DlgTextTypePass : "Passwort", // Hidden Field Dialog DlgHiddenName : "Name", DlgHiddenValue : "Wert", // Bulleted List Dialog BulletedListProp : "Listen-Eigenschaften", NumberedListProp : "Nummerierte Listen-Eigenschaften", DlgLstStart : "Start", DlgLstType : "Typ", DlgLstTypeCircle : "Ring", DlgLstTypeDisc : "Kreis", DlgLstTypeSquare : "Quadrat", DlgLstTypeNumbers : "Nummern (1, 2, 3)", DlgLstTypeLCase : "Kleinbuchstaben (a, b, c)", DlgLstTypeUCase : "Großbuchstaben (A, B, C)", DlgLstTypeSRoman : "Kleine römische Zahlen (i, ii, iii)", DlgLstTypeLRoman : "Große römische Zahlen (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Allgemein", DlgDocBackTab : "Hintergrund", DlgDocColorsTab : "Farben und Abstände", DlgDocMetaTab : "Metadaten", DlgDocPageTitle : "Seitentitel", DlgDocLangDir : "Schriftrichtung", DlgDocLangDirLTR : "Links nach Rechts", DlgDocLangDirRTL : "Rechts nach Links", DlgDocLangCode : "Sprachkürzel", DlgDocCharSet : "Zeichenkodierung", DlgDocCharSetCE : "Zentraleuropäisch", DlgDocCharSetCT : "traditionell Chinesisch (Big5)", DlgDocCharSetCR : "Kyrillisch", DlgDocCharSetGR : "Griechisch", DlgDocCharSetJP : "Japanisch", DlgDocCharSetKR : "Koreanisch", DlgDocCharSetTR : "Türkisch", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Westeuropäisch", DlgDocCharSetOther : "Andere Zeichenkodierung", DlgDocDocType : "Dokumententyp", DlgDocDocTypeOther : "Anderer Dokumententyp", DlgDocIncXHTML : "Beziehe XHTML Deklarationen ein", DlgDocBgColor : "Hintergrundfarbe", DlgDocBgImage : "Hintergrundbild URL", DlgDocBgNoScroll : "feststehender Hintergrund", DlgDocCText : "Text", DlgDocCLink : "Link", DlgDocCVisited : "Besuchter Link", DlgDocCActive : "Aktiver Link", DlgDocMargins : "Seitenränder", DlgDocMaTop : "Oben", DlgDocMaLeft : "Links", DlgDocMaRight : "Rechts", DlgDocMaBottom : "Unten", DlgDocMeIndex : "Schlüsselwörter (durch Komma getrennt)", DlgDocMeDescr : "Dokument-Beschreibung", DlgDocMeAuthor : "Autor", DlgDocMeCopy : "Copyright", DlgDocPreview : "Vorschau", // Templates Dialog Templates : "Vorlagen", DlgTemplatesTitle : "Vorlagen", DlgTemplatesSelMsg : "Klicken Sie auf eine Vorlage, um sie im Editor zu öffnen (der aktuelle Inhalt wird dabei gelöscht!):", DlgTemplatesLoading : "Liste der Vorlagen wird geladen. Bitte warten...", DlgTemplatesNoTpl : "(keine Vorlagen definiert)", DlgTemplatesReplace : "Aktuellen Inhalt ersetzen", // About Dialog DlgAboutAboutTab : "Über", DlgAboutBrowserInfoTab : "Browser-Info", DlgAboutLicenseTab : "Lizenz", DlgAboutVersion : "Version", DlgAboutInfo : "Für weitere Informationen siehe", // Div Dialog DlgDivGeneralTab : "Allgemein", DlgDivAdvancedTab : "Erweitert", DlgDivStyle : "Style", DlgDivInlineStyle : "Inline Style" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Polish language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Zwiń pasek narzędzi", ToolbarExpand : "Rozwiń pasek narzędzi", // Toolbar Items and Context Menu Save : "Zapisz", NewPage : "Nowa strona", Preview : "Podgląd", Cut : "Wytnij", Copy : "Kopiuj", Paste : "Wklej", PasteText : "Wklej jako czysty tekst", PasteWord : "Wklej z Worda", Print : "Drukuj", SelectAll : "Zaznacz wszystko", RemoveFormat : "Usuń formatowanie", InsertLinkLbl : "Hiperłącze", InsertLink : "Wstaw/edytuj hiperłącze", RemoveLink : "Usuń hiperłącze", VisitLink : "Open Link", //MISSING Anchor : "Wstaw/edytuj kotwicę", AnchorDelete : "Usuń kotwicę", InsertImageLbl : "Obrazek", InsertImage : "Wstaw/edytuj obrazek", InsertFlashLbl : "Flash", InsertFlash : "Dodaj/Edytuj element Flash", InsertTableLbl : "Tabela", InsertTable : "Wstaw/edytuj tabelę", InsertLineLbl : "Linia pozioma", InsertLine : "Wstaw poziomą linię", InsertSpecialCharLbl: "Znak specjalny", InsertSpecialChar : "Wstaw znak specjalny", InsertSmileyLbl : "Emotikona", InsertSmiley : "Wstaw emotikonę", About : "O programie FCKeditor", Bold : "Pogrubienie", Italic : "Kursywa", Underline : "Podkreślenie", StrikeThrough : "Przekreślenie", Subscript : "Indeks dolny", Superscript : "Indeks górny", LeftJustify : "Wyrównaj do lewej", CenterJustify : "Wyrównaj do środka", RightJustify : "Wyrównaj do prawej", BlockJustify : "Wyrównaj do lewej i prawej", DecreaseIndent : "Zmniejsz wcięcie", IncreaseIndent : "Zwiększ wcięcie", Blockquote : "Cytat", CreateDiv : "Create Div Container", //MISSING EditDiv : "Edit Div Container", //MISSING DeleteDiv : "Remove Div Container", //MISSING Undo : "Cofnij", Redo : "Ponów", NumberedListLbl : "Lista numerowana", NumberedList : "Wstaw/usuń numerowanie listy", BulletedListLbl : "Lista wypunktowana", BulletedList : "Wstaw/usuń wypunktowanie listy", ShowTableBorders : "Pokazuj ramkę tabeli", ShowDetails : "Pokaż szczegóły", Style : "Styl", FontFormat : "Format", Font : "Czcionka", FontSize : "Rozmiar", TextColor : "Kolor tekstu", BGColor : "Kolor tła", Source : "Źródło dokumentu", Find : "Znajdź", Replace : "Zamień", SpellCheck : "Sprawdź pisownię", UniversalKeyboard : "Klawiatura Uniwersalna", PageBreakLbl : "Odstęp", PageBreak : "Wstaw odstęp", Form : "Formularz", Checkbox : "Pole wyboru (checkbox)", RadioButton : "Pole wyboru (radio)", TextField : "Pole tekstowe", Textarea : "Obszar tekstowy", HiddenField : "Pole ukryte", Button : "Przycisk", SelectionField : "Lista wyboru", ImageButton : "Przycisk-obrazek", FitWindow : "Maksymalizuj rozmiar edytora", ShowBlocks : "Pokaż bloki", // Context Menu EditLink : "Edytuj hiperłącze", CellCM : "Komórka", RowCM : "Wiersz", ColumnCM : "Kolumna", InsertRowAfter : "Wstaw wiersz poniżej", InsertRowBefore : "Wstaw wiersz powyżej", DeleteRows : "Usuń wiersze", InsertColumnAfter : "Wstaw kolumnę z prawej", InsertColumnBefore : "Wstaw kolumnę z lewej", DeleteColumns : "Usuń kolumny", InsertCellAfter : "Wstaw komórkę z prawej", InsertCellBefore : "Wstaw komórkę z lewej", DeleteCells : "Usuń komórki", MergeCells : "Połącz komórki", MergeRight : "Połącz z komórką z prawej", MergeDown : "Połącz z komórką poniżej", HorizontalSplitCell : "Podziel komórkę poziomo", VerticalSplitCell : "Podziel komórkę pionowo", TableDelete : "Usuń tabelę", CellProperties : "Właściwości komórki", TableProperties : "Właściwości tabeli", ImageProperties : "Właściwości obrazka", FlashProperties : "Właściwości elementu Flash", AnchorProp : "Właściwości kotwicy", ButtonProp : "Właściwości przycisku", CheckboxProp : "Właściwości pola wyboru (checkbox)", HiddenFieldProp : "Właściwości pola ukrytego", RadioButtonProp : "Właściwości pola wyboru (radio)", ImageButtonProp : "Właściwości przycisku obrazka", TextFieldProp : "Właściwości pola tekstowego", SelectionFieldProp : "Właściwości listy wyboru", TextareaProp : "Właściwości obszaru tekstowego", FormProp : "Właściwości formularza", FontFormats : "Normalny;Tekst sformatowany;Adres;Nagłówek 1;Nagłówek 2;Nagłówek 3;Nagłówek 4;Nagłówek 5;Nagłówek 6", // Alerts and Messages ProcessingXHTML : "Przetwarzanie XHTML. Proszę czekać...", Done : "Gotowe", PasteWordConfirm : "Tekst, który chcesz wkleić, prawdopodobnie pochodzi z programu Word. Czy chcesz go wyczyścic przed wklejeniem?", NotCompatiblePaste : "Ta funkcja jest dostępna w programie Internet Explorer w wersji 5.5 lub wyższej. Czy chcesz wkleić tekst bez czyszczenia?", UnknownToolbarItem : "Nieznany element paska narzędzi \"%1\"", UnknownCommand : "Nieznana komenda \"%1\"", NotImplemented : "Komenda niezaimplementowana", UnknownToolbarSet : "Pasek narzędzi \"%1\" nie istnieje", NoActiveX : "Ustawienia zabezpieczeń twojej przeglądarki mogą ograniczyć niektóre funkcje edytora. Musisz włączyć opcję \"Uruchamianie formantów Activex i dodatków plugin\". W przeciwnym wypadku mogą pojawiać się błędy.", BrowseServerBlocked : "Nie można otworzyć okno menadżera plików. Upewnij się, że wszystkie blokady wyskakujących okienek są wyłączone.", DialogBlocked : "Nie można otworzyć okna dialogowego. Upewnij się, że wszystkie blokady wyskakujących okienek są wyłączone.", VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Anuluj", DlgBtnClose : "Zamknij", DlgBtnBrowseServer : "Przeglądaj", DlgAdvancedTag : "Zaawansowane", DlgOpOther : "<Inny>", DlgInfoTab : "Informacje", DlgAlertUrl : "Proszę podać URL", // General Dialogs Labels DlgGenNotSet : "<nie ustawione>", DlgGenId : "Id", DlgGenLangDir : "Kierunek tekstu", DlgGenLangDirLtr : "Od lewej do prawej (LTR)", DlgGenLangDirRtl : "Od prawej do lewej (RTL)", DlgGenLangCode : "Kod języka", DlgGenAccessKey : "Klawisz dostępu", DlgGenName : "Nazwa", DlgGenTabIndex : "Indeks tabeli", DlgGenLongDescr : "Długi opis hiperłącza", DlgGenClass : "Nazwa klasy CSS", DlgGenTitle : "Opis obiektu docelowego", DlgGenContType : "Typ MIME obiektu docelowego", DlgGenLinkCharset : "Kodowanie znaków obiektu docelowego", DlgGenStyle : "Styl", // Image Dialog DlgImgTitle : "Właściwości obrazka", DlgImgInfoTab : "Informacje o obrazku", DlgImgBtnUpload : "Wyślij", DlgImgURL : "Adres URL", DlgImgUpload : "Wyślij", DlgImgAlt : "Tekst zastępczy", DlgImgWidth : "Szerokość", DlgImgHeight : "Wysokość", DlgImgLockRatio : "Zablokuj proporcje", DlgBtnResetSize : "Przywróć rozmiar", DlgImgBorder : "Ramka", DlgImgHSpace : "Odstęp poziomy", DlgImgVSpace : "Odstęp pionowy", DlgImgAlign : "Wyrównaj", DlgImgAlignLeft : "Do lewej", DlgImgAlignAbsBottom: "Do dołu", DlgImgAlignAbsMiddle: "Do środka w pionie", DlgImgAlignBaseline : "Do linii bazowej", DlgImgAlignBottom : "Do dołu", DlgImgAlignMiddle : "Do środka", DlgImgAlignRight : "Do prawej", DlgImgAlignTextTop : "Do góry tekstu", DlgImgAlignTop : "Do góry", DlgImgPreview : "Podgląd", DlgImgAlertUrl : "Podaj adres obrazka.", DlgImgLinkTab : "Hiperłącze", // Flash Dialog DlgFlashTitle : "Właściwości elementu Flash", DlgFlashChkPlay : "Auto Odtwarzanie", DlgFlashChkLoop : "Pętla", DlgFlashChkMenu : "Włącz menu", DlgFlashScale : "Skaluj", DlgFlashScaleAll : "Pokaż wszystko", DlgFlashScaleNoBorder : "Bez Ramki", DlgFlashScaleFit : "Dokładne dopasowanie", // Link Dialog DlgLnkWindowTitle : "Hiperłącze", DlgLnkInfoTab : "Informacje ", DlgLnkTargetTab : "Cel", DlgLnkType : "Typ hiperłącza", DlgLnkTypeURL : "Adres URL", DlgLnkTypeAnchor : "Odnośnik wewnątrz strony", DlgLnkTypeEMail : "Adres e-mail", DlgLnkProto : "Protokół", DlgLnkProtoOther : "<inny>", DlgLnkURL : "Adres URL", DlgLnkAnchorSel : "Wybierz etykietę", DlgLnkAnchorByName : "Wg etykiety", DlgLnkAnchorById : "Wg identyfikatora elementu", DlgLnkNoAnchors : "(W dokumencie nie zdefiniowano żadnych etykiet)", DlgLnkEMail : "Adres e-mail", DlgLnkEMailSubject : "Temat", DlgLnkEMailBody : "Treść", DlgLnkUpload : "Wyślij", DlgLnkBtnUpload : "Wyślij", DlgLnkTarget : "Cel", DlgLnkTargetFrame : "<ramka>", DlgLnkTargetPopup : "<wyskakujące okno>", DlgLnkTargetBlank : "Nowe okno (_blank)", DlgLnkTargetParent : "Okno nadrzędne (_parent)", DlgLnkTargetSelf : "To samo okno (_self)", DlgLnkTargetTop : "Okno najwyższe w hierarchii (_top)", DlgLnkTargetFrameName : "Nazwa Ramki Docelowej", DlgLnkPopWinName : "Nazwa wyskakującego okna", DlgLnkPopWinFeat : "Właściwości wyskakującego okna", DlgLnkPopResize : "Możliwa zmiana rozmiaru", DlgLnkPopLocation : "Pasek adresu", DlgLnkPopMenu : "Pasek menu", DlgLnkPopScroll : "Paski przewijania", DlgLnkPopStatus : "Pasek statusu", DlgLnkPopToolbar : "Pasek narzędzi", DlgLnkPopFullScrn : "Pełny ekran (IE)", DlgLnkPopDependent : "Okno zależne (Netscape)", DlgLnkPopWidth : "Szerokość", DlgLnkPopHeight : "Wysokość", DlgLnkPopLeft : "Pozycja w poziomie", DlgLnkPopTop : "Pozycja w pionie", DlnLnkMsgNoUrl : "Podaj adres URL", DlnLnkMsgNoEMail : "Podaj adres e-mail", DlnLnkMsgNoAnchor : "Wybierz etykietę", DlnLnkMsgInvPopName : "Nazwa wyskakującego okienka musi zaczynać się od znaku alfanumerycznego i nie może zawierać spacji", // Color Dialog DlgColorTitle : "Wybierz kolor", DlgColorBtnClear : "Wyczyść", DlgColorHighlight : "Podgląd", DlgColorSelected : "Wybrane", // Smiley Dialog DlgSmileyTitle : "Wstaw emotikonę", // Special Character Dialog DlgSpecialCharTitle : "Wybierz znak specjalny", // Table Dialog DlgTableTitle : "Właściwości tabeli", DlgTableRows : "Liczba wierszy", DlgTableColumns : "Liczba kolumn", DlgTableBorder : "Grubość ramki", DlgTableAlign : "Wyrównanie", DlgTableAlignNotSet : "<brak ustawień>", DlgTableAlignLeft : "Do lewej", DlgTableAlignCenter : "Do środka", DlgTableAlignRight : "Do prawej", DlgTableWidth : "Szerokość", DlgTableWidthPx : "piksele", DlgTableWidthPc : "%", DlgTableHeight : "Wysokość", DlgTableCellSpace : "Odstęp pomiędzy komórkami", DlgTableCellPad : "Margines wewnętrzny komórek", DlgTableCaption : "Tytuł", DlgTableSummary : "Podsumowanie", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Właściwości komórki", DlgCellWidth : "Szerokość", DlgCellWidthPx : "piksele", DlgCellWidthPc : "%", DlgCellHeight : "Wysokość", DlgCellWordWrap : "Zawijanie tekstu", DlgCellWordWrapNotSet : "<brak ustawień>", DlgCellWordWrapYes : "Tak", DlgCellWordWrapNo : "Nie", DlgCellHorAlign : "Wyrównanie poziome", DlgCellHorAlignNotSet : "<brak ustawień>", DlgCellHorAlignLeft : "Do lewej", DlgCellHorAlignCenter : "Do środka", DlgCellHorAlignRight: "Do prawej", DlgCellVerAlign : "Wyrównanie pionowe", DlgCellVerAlignNotSet : "<brak ustawień>", DlgCellVerAlignTop : "Do góry", DlgCellVerAlignMiddle : "Do środka", DlgCellVerAlignBottom : "Do dołu", DlgCellVerAlignBaseline : "Do linii bazowej", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Zajętość wierszy", DlgCellCollSpan : "Zajętość kolumn", DlgCellBackColor : "Kolor tła", DlgCellBorderColor : "Kolor ramki", DlgCellBtnSelect : "Wybierz...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Znajdź i zamień", // Find Dialog DlgFindTitle : "Znajdź", DlgFindFindBtn : "Znajdź", DlgFindNotFoundMsg : "Nie znaleziono szukanego hasła.", // Replace Dialog DlgReplaceTitle : "Zamień", DlgReplaceFindLbl : "Znajdź:", DlgReplaceReplaceLbl : "Zastąp przez:", DlgReplaceCaseChk : "Uwzględnij wielkość liter", DlgReplaceReplaceBtn : "Zastąp", DlgReplaceReplAllBtn : "Zastąp wszystko", DlgReplaceWordChk : "Całe słowa", // Paste Operations / Dialog PasteErrorCut : "Ustawienia bezpieczeństwa Twojej przeglądarki nie pozwalają na automatyczne wycinanie tekstu. Użyj skrótu klawiszowego Ctrl+X.", PasteErrorCopy : "Ustawienia bezpieczeństwa Twojej przeglądarki nie pozwalają na automatyczne kopiowanie tekstu. Użyj skrótu klawiszowego Ctrl+C.", PasteAsText : "Wklej jako czysty tekst", PasteFromWord : "Wklej z Worda", DlgPasteMsg2 : "Proszę wkleić w poniższym polu używając klawiaturowego skrótu (<STRONG>Ctrl+V</STRONG>) i kliknąć <STRONG>OK</STRONG>.", DlgPasteSec : "Zabezpieczenia przeglądarki uniemożliwiają wklejenie danych bezpośrednio do edytora. Proszę dane wkleić ponownie w tym okienku.", DlgPasteIgnoreFont : "Ignoruj definicje 'Font Face'", DlgPasteRemoveStyles : "Usuń definicje Stylów", // Color Picker ColorAutomatic : "Automatycznie", ColorMoreColors : "Więcej kolorów...", // Document Properties DocProps : "Właściwości dokumentu", // Anchor Dialog DlgAnchorTitle : "Właściwości kotwicy", DlgAnchorName : "Nazwa kotwicy", DlgAnchorErrorName : "Wpisz nazwę kotwicy", // Speller Pages Dialog DlgSpellNotInDic : "Słowa nie ma w słowniku", DlgSpellChangeTo : "Zmień na", DlgSpellBtnIgnore : "Ignoruj", DlgSpellBtnIgnoreAll : "Ignoruj wszystkie", DlgSpellBtnReplace : "Zmień", DlgSpellBtnReplaceAll : "Zmień wszystkie", DlgSpellBtnUndo : "Cofnij", DlgSpellNoSuggestions : "- Brak sugestii -", DlgSpellProgress : "Trwa sprawdzanie ...", DlgSpellNoMispell : "Sprawdzanie zakończone: nie znaleziono błędów", DlgSpellNoChanges : "Sprawdzanie zakończone: nie zmieniono żadnego słowa", DlgSpellOneChange : "Sprawdzanie zakończone: zmieniono jedno słowo", DlgSpellManyChanges : "Sprawdzanie zakończone: zmieniono %l słów", IeSpellDownload : "Słownik nie jest zainstalowany. Chcesz go ściągnąć?", // Button Dialog DlgButtonText : "Tekst (Wartość)", DlgButtonType : "Typ", DlgButtonTypeBtn : "Przycisk", DlgButtonTypeSbm : "Wyślij", DlgButtonTypeRst : "Wyzeruj", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Nazwa", DlgCheckboxValue : "Wartość", DlgCheckboxSelected : "Zaznaczone", // Form Dialog DlgFormName : "Nazwa", DlgFormAction : "Akcja", DlgFormMethod : "Metoda", // Select Field Dialog DlgSelectName : "Nazwa", DlgSelectValue : "Wartość", DlgSelectSize : "Rozmiar", DlgSelectLines : "linii", DlgSelectChkMulti : "Wielokrotny wybór", DlgSelectOpAvail : "Dostępne opcje", DlgSelectOpText : "Tekst", DlgSelectOpValue : "Wartość", DlgSelectBtnAdd : "Dodaj", DlgSelectBtnModify : "Zmień", DlgSelectBtnUp : "Do góry", DlgSelectBtnDown : "Do dołu", DlgSelectBtnSetValue : "Ustaw wartość zaznaczoną", DlgSelectBtnDelete : "Usuń", // Textarea Dialog DlgTextareaName : "Nazwa", DlgTextareaCols : "Kolumnu", DlgTextareaRows : "Wiersze", // Text Field Dialog DlgTextName : "Nazwa", DlgTextValue : "Wartość", DlgTextCharWidth : "Szerokość w znakach", DlgTextMaxChars : "Max. szerokość", DlgTextType : "Typ", DlgTextTypeText : "Tekst", DlgTextTypePass : "Hasło", // Hidden Field Dialog DlgHiddenName : "Nazwa", DlgHiddenValue : "Wartość", // Bulleted List Dialog BulletedListProp : "Właściwości listy punktowanej", NumberedListProp : "Właściwości listy numerowanej", DlgLstStart : "Początek", DlgLstType : "Typ", DlgLstTypeCircle : "Koło", DlgLstTypeDisc : "Dysk", DlgLstTypeSquare : "Kwadrat", DlgLstTypeNumbers : "Cyfry (1, 2, 3)", DlgLstTypeLCase : "Małe litery (a, b, c)", DlgLstTypeUCase : "Duże litery (A, B, C)", DlgLstTypeSRoman : "Numeracja rzymska (i, ii, iii)", DlgLstTypeLRoman : "Numeracja rzymska (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Ogólne", DlgDocBackTab : "Tło", DlgDocColorsTab : "Kolory i marginesy", DlgDocMetaTab : "Meta Dane", DlgDocPageTitle : "Tytuł strony", DlgDocLangDir : "Kierunek pisania", DlgDocLangDirLTR : "Od lewej do prawej (LTR)", DlgDocLangDirRTL : "Od prawej do lewej (RTL)", DlgDocLangCode : "Kod języka", DlgDocCharSet : "Kodowanie znaków", DlgDocCharSetCE : "Środkowoeuropejskie", DlgDocCharSetCT : "Chińskie tradycyjne (Big5)", DlgDocCharSetCR : "Cyrylica", DlgDocCharSetGR : "Greckie", DlgDocCharSetJP : "Japońskie", DlgDocCharSetKR : "Koreańskie", DlgDocCharSetTR : "Tureckie", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Zachodnioeuropejskie", DlgDocCharSetOther : "Inne kodowanie znaków", DlgDocDocType : "Nagłówek typu dokumentu", DlgDocDocTypeOther : "Inny typ dokumentu", DlgDocIncXHTML : "Dołącz deklarację XHTML", DlgDocBgColor : "Kolor tła", DlgDocBgImage : "Obrazek tła", DlgDocBgNoScroll : "Tło nieruchome", DlgDocCText : "Tekst", DlgDocCLink : "Hiperłącze", DlgDocCVisited : "Odwiedzane hiperłącze", DlgDocCActive : "Aktywne hiperłącze", DlgDocMargins : "Marginesy strony", DlgDocMaTop : "Górny", DlgDocMaLeft : "Lewy", DlgDocMaRight : "Prawy", DlgDocMaBottom : "Dolny", DlgDocMeIndex : "Słowa kluczowe (oddzielone przecinkami)", DlgDocMeDescr : "Opis dokumentu", DlgDocMeAuthor : "Autor", DlgDocMeCopy : "Prawa autorskie", DlgDocPreview : "Podgląd", // Templates Dialog Templates : "Sablony", DlgTemplatesTitle : "Szablony zawartości", DlgTemplatesSelMsg : "Wybierz szablon do otwarcia w edytorze<br>(obecna zawartość okna edytora zostanie utracona):", DlgTemplatesLoading : "Ładowanie listy szablonów. Proszę czekać...", DlgTemplatesNoTpl : "(Brak zdefiniowanych szablonów)", DlgTemplatesReplace : "Zastąp aktualną zawartość", // About Dialog DlgAboutAboutTab : "O ...", DlgAboutBrowserInfoTab : "O przeglądarce", DlgAboutLicenseTab : "Licencja", DlgAboutVersion : "wersja", DlgAboutInfo : "Więcej informacji uzyskasz pod adresem", // Div Dialog DlgDivGeneralTab : "General", //MISSING DlgDivAdvancedTab : "Advanced", //MISSING DlgDivStyle : "Style", //MISSING DlgDivInlineStyle : "Inline Style" //MISSING };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Vietnamese language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Thu gọn Thanh công cụ", ToolbarExpand : "Mở rộng Thanh công cụ", // Toolbar Items and Context Menu Save : "Lưu", NewPage : "Trang mới", Preview : "Xem trước", Cut : "Cắt", Copy : "Sao chép", Paste : "Dán", PasteText : "Dán theo dạng văn bản thuần", PasteWord : "Dán với định dạng Word", Print : "In", SelectAll : "Chọn Tất cả", RemoveFormat : "Xoá Định dạng", InsertLinkLbl : "Liên kết", InsertLink : "Chèn/Sửa Liên kết", RemoveLink : "Xoá Liên kết", VisitLink : "Mở Liên Kết", Anchor : "Chèn/Sửa Neo", AnchorDelete : "Gỡ bỏ Neo", InsertImageLbl : "Hình ảnh", InsertImage : "Chèn/Sửa Hình ảnh", InsertFlashLbl : "Flash", InsertFlash : "Chèn/Sửa Flash", InsertTableLbl : "Bảng", InsertTable : "Chèn/Sửa Bảng", InsertLineLbl : "Đường phân cách ngang", InsertLine : "Chèn Đường phân cách ngang", InsertSpecialCharLbl: "Ký tự đặc biệt", InsertSpecialChar : "Chèn Ký tự đặc biệt", InsertSmileyLbl : "Hình biểu lộ cảm xúc (mặt cười)", InsertSmiley : "Chèn Hình biểu lộ cảm xúc (mặt cười)", About : "Giới thiệu về FCKeditor", Bold : "Đậm", Italic : "Nghiêng", Underline : "Gạch chân", StrikeThrough : "Gạch xuyên ngang", Subscript : "Chỉ số dưới", Superscript : "Chỉ số trên", LeftJustify : "Canh trái", CenterJustify : "Canh giữa", RightJustify : "Canh phải", BlockJustify : "Canh đều", DecreaseIndent : "Dịch ra ngoài", IncreaseIndent : "Dịch vào trong", Blockquote : "Khối Trích dẫn", CreateDiv : "Tạo Div Container", EditDiv : "Chỉnh sửa Div Container", DeleteDiv : "Gỡ bỏ Div Container", Undo : "Khôi phục thao tác", Redo : "Làm lại thao tác", NumberedListLbl : "Danh sách có thứ tự", NumberedList : "Chèn/Xoá Danh sách có thứ tự", BulletedListLbl : "Danh sách không thứ tự", BulletedList : "Chèn/Xoá Danh sách không thứ tự", ShowTableBorders : "Hiển thị Đường viền bảng", ShowDetails : "Hiển thị Chi tiết", Style : "Mẫu", FontFormat : "Định dạng", Font : "Phông", FontSize : "Cỡ chữ", TextColor : "Màu chữ", BGColor : "Màu nền", Source : "Mã HTML", Find : "Tìm kiếm", Replace : "Thay thế", SpellCheck : "Kiểm tra Chính tả", UniversalKeyboard : "Bàn phím Quốc tế", PageBreakLbl : "Ngắt trang", PageBreak : "Chèn Ngắt trang", Form : "Biểu mẫu", Checkbox : "Nút kiểm", RadioButton : "Nút chọn", TextField : "Trường văn bản", Textarea : "Vùng văn bản", HiddenField : "Trường ẩn", Button : "Nút", SelectionField : "Ô chọn", ImageButton : "Nút hình ảnh", FitWindow : "Mở rộng tối đa kích thước trình biên tập", ShowBlocks : "Hiển thị các Khối", // Context Menu EditLink : "Sửa Liên kết", CellCM : "Ô", RowCM : "Hàng", ColumnCM : "Cột", InsertRowAfter : "Chèn Hàng Phía sau", InsertRowBefore : "Chèn Hàng Phía trước", DeleteRows : "Xoá Hàng", InsertColumnAfter : "Chèn Cột Phía sau", InsertColumnBefore : "Chèn Cột Phía trước", DeleteColumns : "Xoá Cột", InsertCellAfter : "Chèn Ô Phía sau", InsertCellBefore : "Chèn Ô Phía trước", DeleteCells : "Xoá Ô", MergeCells : "Kết hợp Ô", MergeRight : "Kết hợp Sang phải", MergeDown : "Kết hợp Xuống dưới", HorizontalSplitCell : "Tách ngang Ô", VerticalSplitCell : "Tách dọc Ô", TableDelete : "Xóa Bảng", CellProperties : "Thuộc tính Ô", TableProperties : "Thuộc tính Bảng", ImageProperties : "Thuộc tính Hình ảnh", FlashProperties : "Thuộc tính Flash", AnchorProp : "Thuộc tính Neo", ButtonProp : "Thuộc tính Nút", CheckboxProp : "Thuộc tính Nút kiểm", HiddenFieldProp : "Thuộc tính Trường ẩn", RadioButtonProp : "Thuộc tính Nút chọn", ImageButtonProp : "Thuộc tính Nút hình ảnh", TextFieldProp : "Thuộc tính Trường văn bản", SelectionFieldProp : "Thuộc tính Ô chọn", TextareaProp : "Thuộc tính Vùng văn bản", FormProp : "Thuộc tính Biểu mẫu", FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", // Alerts and Messages ProcessingXHTML : "Đang xử lý XHTML. Vui lòng đợi trong giây lát...", Done : "Đã hoàn thành", PasteWordConfirm : "Văn bản bạn muốn dán có kèm định dạng của Word. Bạn có muốn loại bỏ định dạng Word trước khi dán?", NotCompatiblePaste : "Lệnh này chỉ được hỗ trợ từ trình duyệt Internet Explorer phiên bản 5.5 hoặc mới hơn. Bạn có muốn dán nguyên mẫu?", UnknownToolbarItem : "Không rõ mục trên thanh công cụ \"%1\"", UnknownCommand : "Không rõ lệnh \"%1\"", NotImplemented : "Lệnh không được thực hiện", UnknownToolbarSet : "Thanh công cụ \"%1\" không tồn tại", NoActiveX : "Các thiết lập bảo mật của trình duyệt có thể giới hạn một số chức năng của trình biên tập. Bạn phải bật tùy chọn \"Run ActiveX controls and plug-ins\". Bạn có thể gặp một số lỗi và thấy thiếu một số chức năng.", BrowseServerBlocked : "Không thể mở được bộ duyệt tài nguyên. Hãy đảm bảo chức năng chặn popup đã bị vô hiệu hóa.", DialogBlocked : "Không thể mở được cửa sổ hộp thoại. Hãy đảm bảo chức năng chặn popup đã bị vô hiệu hóa.", VisitLinkBlocked : "Không thể mở được cửa sổ trình duyệt mới. Hãy đảm bảo chức năng chặn popup đã bị vô hiệu hóa.", // Dialogs DlgBtnOK : "Đồng ý", DlgBtnCancel : "Bỏ qua", DlgBtnClose : "Đóng", DlgBtnBrowseServer : "Duyệt trên máy chủ", DlgAdvancedTag : "Mở rộng", DlgOpOther : "<Khác>", DlgInfoTab : "Thông tin", DlgAlertUrl : "Hãy nhập vào một URL", // General Dialogs Labels DlgGenNotSet : "<không thiết lập>", DlgGenId : "Định danh", DlgGenLangDir : "Đường dẫn Ngôn ngữ", DlgGenLangDirLtr : "Trái sang Phải (LTR)", DlgGenLangDirRtl : "Phải sang Trái (RTL)", DlgGenLangCode : "Mã Ngôn ngữ", DlgGenAccessKey : "Phím Hỗ trợ truy cập", DlgGenName : "Tên", DlgGenTabIndex : "Chỉ số của Tab", DlgGenLongDescr : "Mô tả URL", DlgGenClass : "Lớp Stylesheet", DlgGenTitle : "Advisory Title", DlgGenContType : "Advisory Content Type", DlgGenLinkCharset : "Bảng mã của tài nguyên được liên kết đến", DlgGenStyle : "Mẫu", // Image Dialog DlgImgTitle : "Thuộc tính Hình ảnh", DlgImgInfoTab : "Thông tin Hình ảnh", DlgImgBtnUpload : "Tải lên Máy chủ", DlgImgURL : "URL", DlgImgUpload : "Tải lên", DlgImgAlt : "Chú thích Hình ảnh", DlgImgWidth : "Rộng", DlgImgHeight : "Cao", DlgImgLockRatio : "Giữ nguyên tỷ lệ", DlgBtnResetSize : "Kích thước gốc", DlgImgBorder : "Đường viền", DlgImgHSpace : "HSpace", DlgImgVSpace : "VSpace", DlgImgAlign : "Vị trí", DlgImgAlignLeft : "Trái", DlgImgAlignAbsBottom: "Dưới tuyệt đối", DlgImgAlignAbsMiddle: "Giữa tuyệt đối", DlgImgAlignBaseline : "Đường cơ sở", DlgImgAlignBottom : "Dưới", DlgImgAlignMiddle : "Giữa", DlgImgAlignRight : "Phải", DlgImgAlignTextTop : "Phía trên chữ", DlgImgAlignTop : "Trên", DlgImgPreview : "Xem trước", DlgImgAlertUrl : "Hãy đưa vào URL của hình ảnh", DlgImgLinkTab : "Liên kết", // Flash Dialog DlgFlashTitle : "Thuộc tính Flash", DlgFlashChkPlay : "Tự động chạy", DlgFlashChkLoop : "Lặp", DlgFlashChkMenu : "Cho phép bật Menu của Flash", DlgFlashScale : "Tỷ lệ", DlgFlashScaleAll : "Hiển thị tất cả", DlgFlashScaleNoBorder : "Không đường viền", DlgFlashScaleFit : "Vừa vặn", // Link Dialog DlgLnkWindowTitle : "Liên kết", DlgLnkInfoTab : "Thông tin Liên kết", DlgLnkTargetTab : "Đích", DlgLnkType : "Kiểu Liên kết", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Neo trong trang này", DlgLnkTypeEMail : "Thư điện tử", DlgLnkProto : "Giao thức", DlgLnkProtoOther : "<khác>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Chọn một Neo", DlgLnkAnchorByName : "Theo Tên Neo", DlgLnkAnchorById : "Theo Định danh Element", DlgLnkNoAnchors : "(Không có Neo nào trong tài liệu)", DlgLnkEMail : "Thư điện tử", DlgLnkEMailSubject : "Tiêu đề Thông điệp", DlgLnkEMailBody : "Nội dung Thông điệp", DlgLnkUpload : "Tải lên", DlgLnkBtnUpload : "Tải lên Máy chủ", DlgLnkTarget : "Đích", DlgLnkTargetFrame : "<khung>", DlgLnkTargetPopup : "<cửa sổ popup>", DlgLnkTargetBlank : "Cửa sổ mới (_blank)", DlgLnkTargetParent : "Cửa sổ cha (_parent)", DlgLnkTargetSelf : "Cùng cửa sổ (_self)", DlgLnkTargetTop : "Cửa sổ trên cùng(_top)", DlgLnkTargetFrameName : "Tên Khung đích", DlgLnkPopWinName : "Tên Cửa sổ Popup", DlgLnkPopWinFeat : "Đặc điểm của Cửa sổ Popup", DlgLnkPopResize : "Kích thước thay đổi", DlgLnkPopLocation : "Thanh vị trí", DlgLnkPopMenu : "Thanh Menu", DlgLnkPopScroll : "Thanh cuộn", DlgLnkPopStatus : "Thanh trạng thái", DlgLnkPopToolbar : "Thanh công cụ", DlgLnkPopFullScrn : "Toàn màn hình (IE)", DlgLnkPopDependent : "Phụ thuộc (Netscape)", DlgLnkPopWidth : "Rộng", DlgLnkPopHeight : "Cao", DlgLnkPopLeft : "Vị trí Trái", DlgLnkPopTop : "Vị trí Trên", DlnLnkMsgNoUrl : "Hãy đưa vào Liên kết URL", DlnLnkMsgNoEMail : "Hãy đưa vào địa chỉ thư điện tử", DlnLnkMsgNoAnchor : "Hãy chọn một Neo", DlnLnkMsgInvPopName : "Tên của cửa sổ Popup phải bắt đầu bằng một ký tự và không được chứa khoảng trắng", // Color Dialog DlgColorTitle : "Chọn màu", DlgColorBtnClear : "Xoá", DlgColorHighlight : "Tô sáng", DlgColorSelected : "Đã chọn", // Smiley Dialog DlgSmileyTitle : "Chèn Hình biểu lộ cảm xúc (mặt cười)", // Special Character Dialog DlgSpecialCharTitle : "Hãy chọn Ký tự đặc biệt", // Table Dialog DlgTableTitle : "Thuộc tính bảng", DlgTableRows : "Hàng", DlgTableColumns : "Cột", DlgTableBorder : "Cỡ Đường viền", DlgTableAlign : "Canh lề", DlgTableAlignNotSet : "<Chưa thiết lập>", DlgTableAlignLeft : "Trái", DlgTableAlignCenter : "Giữa", DlgTableAlignRight : "Phải", DlgTableWidth : "Rộng", DlgTableWidthPx : "điểm (px)", DlgTableWidthPc : "%", DlgTableHeight : "Cao", DlgTableCellSpace : "Khoảng cách Ô", DlgTableCellPad : "Đệm Ô", DlgTableCaption : "Đầu đề", DlgTableSummary : "Tóm lược", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Thuộc tính Ô", DlgCellWidth : "Rộng", DlgCellWidthPx : "điểm (px)", DlgCellWidthPc : "%", DlgCellHeight : "Cao", DlgCellWordWrap : "Bọc từ", DlgCellWordWrapNotSet : "<Chưa thiết lập>", DlgCellWordWrapYes : "Đồng ý", DlgCellWordWrapNo : "Không", DlgCellHorAlign : "Canh theo Chiều ngang", DlgCellHorAlignNotSet : "<Chưa thiết lập>", DlgCellHorAlignLeft : "Trái", DlgCellHorAlignCenter : "Giữa", DlgCellHorAlignRight: "Phải", DlgCellVerAlign : "Canh theo Chiều dọc", DlgCellVerAlignNotSet : "<Chưa thiết lập>", DlgCellVerAlignTop : "Trên", DlgCellVerAlignMiddle : "Giữa", DlgCellVerAlignBottom : "Dưới", DlgCellVerAlignBaseline : "Đường cơ sở", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Nối Hàng", DlgCellCollSpan : "Nối Cột", DlgCellBackColor : "Màu nền", DlgCellBorderColor : "Màu viền", DlgCellBtnSelect : "Chọn...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Tìm kiếm và Thay Thế", // Find Dialog DlgFindTitle : "Tìm kiếm", DlgFindFindBtn : "Tìm kiếm", DlgFindNotFoundMsg : "Không tìm thấy chuỗi cần tìm.", // Replace Dialog DlgReplaceTitle : "Thay thế", DlgReplaceFindLbl : "Tìm chuỗi:", DlgReplaceReplaceLbl : "Thay bằng:", DlgReplaceCaseChk : "Phân biệt chữ hoa/thường", DlgReplaceReplaceBtn : "Thay thế", DlgReplaceReplAllBtn : "Thay thế Tất cả", DlgReplaceWordChk : "Đúng toàn bộ từ", // Paste Operations / Dialog PasteErrorCut : "Các thiết lập bảo mật của trình duyệt không cho phép trình biên tập tự động thực thi lệnh cắt. Hãy sử dụng bàn phím cho lệnh này (Ctrl+X).", PasteErrorCopy : "Các thiết lập bảo mật của trình duyệt không cho phép trình biên tập tự động thực thi lệnh sao chép. Hãy sử dụng bàn phím cho lệnh này (Ctrl+C).", PasteAsText : "Dán theo định dạng văn bản thuần", PasteFromWord : "Dán với định dạng Word", DlgPasteMsg2 : "Hãy dán nội dung vào trong khung bên dưới, sử dụng tổ hợp phím (<STRONG>Ctrl+V</STRONG>) và nhấn vào nút <STRONG>Đồng ý</STRONG>.", DlgPasteSec : "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 DlgPasteIgnoreFont : "Chấp nhận các định dạng phông", DlgPasteRemoveStyles : "Gỡ bỏ các định dạng Styles", // Color Picker ColorAutomatic : "Tự động", ColorMoreColors : "Màu khác...", // Document Properties DocProps : "Thuộc tính Tài liệu", // Anchor Dialog DlgAnchorTitle : "Thuộc tính Neo", DlgAnchorName : "Tên của Neo", DlgAnchorErrorName : "Hãy nhập vào tên của Neo", // Speller Pages Dialog DlgSpellNotInDic : "Không có trong từ điển", DlgSpellChangeTo : "Chuyển thành", DlgSpellBtnIgnore : "Bỏ qua", DlgSpellBtnIgnoreAll : "Bỏ qua Tất cả", DlgSpellBtnReplace : "Thay thế", DlgSpellBtnReplaceAll : "Thay thế Tất cả", DlgSpellBtnUndo : "Phục hồi lại", DlgSpellNoSuggestions : "- Không đưa ra gợi ý về từ -", DlgSpellProgress : "Đang tiến hành kiểm tra chính tả...", DlgSpellNoMispell : "Hoàn tất kiểm tra chính tả: Không có lỗi chính tả", DlgSpellNoChanges : "Hoàn tất kiểm tra chính tả: Không có từ nào được thay đổi", DlgSpellOneChange : "Hoàn tất kiểm tra chính tả: Một từ đã được thay đổi", DlgSpellManyChanges : "Hoàn tất kiểm tra chính tả: %1 từ đã được thay đổi", IeSpellDownload : "Chức năng kiểm tra chính tả chưa được cài đặt. Bạn có muốn tải về ngay bây giờ?", // Button Dialog DlgButtonText : "Chuỗi hiển thị (Giá trị)", DlgButtonType : "Kiểu", DlgButtonTypeBtn : "Nút Bấm", DlgButtonTypeSbm : "Nút Gửi", DlgButtonTypeRst : "Nút Nhập lại", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Tên", DlgCheckboxValue : "Giá trị", DlgCheckboxSelected : "Được chọn", // Form Dialog DlgFormName : "Tên", DlgFormAction : "Hành động", DlgFormMethod : "Phương thức", // Select Field Dialog DlgSelectName : "Tên", DlgSelectValue : "Giá trị", DlgSelectSize : "Kích cỡ", DlgSelectLines : "dòng", DlgSelectChkMulti : "Cho phép chọn nhiều", DlgSelectOpAvail : "Các tùy chọn có thể sử dụng", DlgSelectOpText : "Văn bản", DlgSelectOpValue : "Giá trị", DlgSelectBtnAdd : "Thêm", DlgSelectBtnModify : "Thay đổi", DlgSelectBtnUp : "Lên", DlgSelectBtnDown : "Xuống", DlgSelectBtnSetValue : "Giá trị được chọn", DlgSelectBtnDelete : "Xoá", // Textarea Dialog DlgTextareaName : "Tên", DlgTextareaCols : "Cột", DlgTextareaRows : "Hàng", // Text Field Dialog DlgTextName : "Tên", DlgTextValue : "Giá trị", DlgTextCharWidth : "Rộng", DlgTextMaxChars : "Số Ký tự tối đa", DlgTextType : "Kiểu", DlgTextTypeText : "Ký tự", DlgTextTypePass : "Mật khẩu", // Hidden Field Dialog DlgHiddenName : "Tên", DlgHiddenValue : "Giá trị", // Bulleted List Dialog BulletedListProp : "Thuộc tính Danh sách không thứ tự", NumberedListProp : "Thuộc tính Danh sách có thứ tự", DlgLstStart : "Bắt đầu", DlgLstType : "Kiểu", DlgLstTypeCircle : "Hình tròn", DlgLstTypeDisc : "Hình đĩa", DlgLstTypeSquare : "Hình vuông", DlgLstTypeNumbers : "Số thứ tự (1, 2, 3)", DlgLstTypeLCase : "Chữ cái thường (a, b, c)", DlgLstTypeUCase : "Chữ cái hoa (A, B, C)", DlgLstTypeSRoman : "Số La Mã thường (i, ii, iii)", DlgLstTypeLRoman : "Số La Mã hoa (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Toàn thể", DlgDocBackTab : "Nền", DlgDocColorsTab : "Màu sắc và Đường biên", DlgDocMetaTab : "Siêu dữ liệu", DlgDocPageTitle : "Tiêu đề Trang", DlgDocLangDir : "Đường dẫn Ngôn ngữ", DlgDocLangDirLTR : "Trái sang Phải (LTR)", DlgDocLangDirRTL : "Phải sang Trái (RTL)", DlgDocLangCode : "Mã Ngôn ngữ", DlgDocCharSet : "Bảng mã ký tự", DlgDocCharSetCE : "Trung Âu", DlgDocCharSetCT : "Tiếng Trung Quốc (Big5)", DlgDocCharSetCR : "Tiếng Kirin", DlgDocCharSetGR : "Tiếng Hy Lạp", DlgDocCharSetJP : "Tiếng Nhật", DlgDocCharSetKR : "Tiếng Hàn", DlgDocCharSetTR : "Tiếng Thổ Nhĩ Kỳ", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Tây Âu", DlgDocCharSetOther : "Bảng mã ký tự khác", DlgDocDocType : "Kiểu Đề mục Tài liệu", DlgDocDocTypeOther : "Kiểu Đề mục Tài liệu khác", DlgDocIncXHTML : "Bao gồm cả định nghĩa XHTML", DlgDocBgColor : "Màu nền", DlgDocBgImage : "URL của Hình ảnh nền", DlgDocBgNoScroll : "Không cuộn nền", DlgDocCText : "Văn bản", DlgDocCLink : "Liên kết", DlgDocCVisited : "Liên kết Đã ghé thăm", DlgDocCActive : "Liên kết Hiện hành", DlgDocMargins : "Đường biên của Trang", DlgDocMaTop : "Trên", DlgDocMaLeft : "Trái", DlgDocMaRight : "Phải", DlgDocMaBottom : "Dưới", DlgDocMeIndex : "Các từ khóa chỉ mục tài liệu (phân cách bởi dấu phẩy)", DlgDocMeDescr : "Mô tả tài liệu", DlgDocMeAuthor : "Tác giả", DlgDocMeCopy : "Bản quyền", DlgDocPreview : "Xem trước", // Templates Dialog Templates : "Mẫu dựng sẵn", DlgTemplatesTitle : "Nội dung Mẫu dựng sẵn", DlgTemplatesSelMsg : "Hãy chọn Mẫu dựng sẵn để mở trong trình biên tập<br>(nội dung hiện tại sẽ bị mất):", DlgTemplatesLoading : "Đang nạp Danh sách Mẫu dựng sẵn. Vui lòng đợi trong giây lát...", DlgTemplatesNoTpl : "(Không có Mẫu dựng sẵn nào được định nghĩa)", DlgTemplatesReplace : "Thay thế nội dung hiện tại", // About Dialog DlgAboutAboutTab : "Giới thiệu", DlgAboutBrowserInfoTab : "Thông tin trình duyệt", DlgAboutLicenseTab : "Giấy phép", DlgAboutVersion : "phiên bản", DlgAboutInfo : "Để biết thêm thông tin, hãy truy cập", // Div Dialog DlgDivGeneralTab : "Chung", DlgDivAdvancedTab : "Nâng cao", DlgDivStyle : "Kiểu Style", DlgDivInlineStyle : "Kiểu Style Trực tiếp" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Hungarian language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Eszköztár elrejtése", ToolbarExpand : "Eszköztár megjelenítése", // Toolbar Items and Context Menu Save : "Mentés", NewPage : "Új oldal", Preview : "Előnézet", Cut : "Kivágás", Copy : "Másolás", Paste : "Beillesztés", PasteText : "Beillesztés formázás nélkül", PasteWord : "Beillesztés Word-ből", Print : "Nyomtatás", SelectAll : "Mindent kijelöl", RemoveFormat : "Formázás eltávolítása", InsertLinkLbl : "Hivatkozás", InsertLink : "Hivatkozás beillesztése/módosítása", RemoveLink : "Hivatkozás törlése", VisitLink : "Open Link", //MISSING Anchor : "Horgony beillesztése/szerkesztése", AnchorDelete : "Horgony eltávolítása", InsertImageLbl : "Kép", InsertImage : "Kép beillesztése/módosítása", InsertFlashLbl : "Flash", InsertFlash : "Flash beillesztése, módosítása", InsertTableLbl : "Táblázat", InsertTable : "Táblázat beillesztése/módosítása", InsertLineLbl : "Vonal", InsertLine : "Elválasztóvonal beillesztése", InsertSpecialCharLbl: "Speciális karakter", InsertSpecialChar : "Speciális karakter beillesztése", InsertSmileyLbl : "Hangulatjelek", InsertSmiley : "Hangulatjelek beillesztése", About : "FCKeditor névjegy", Bold : "Félkövér", Italic : "Dőlt", Underline : "Aláhúzott", StrikeThrough : "Áthúzott", Subscript : "Alsó index", Superscript : "Felső index", LeftJustify : "Balra", CenterJustify : "Középre", RightJustify : "Jobbra", BlockJustify : "Sorkizárt", DecreaseIndent : "Behúzás csökkentése", IncreaseIndent : "Behúzás növelése", Blockquote : "Idézet blokk", CreateDiv : "Create Div Container", //MISSING EditDiv : "Edit Div Container", //MISSING DeleteDiv : "Remove Div Container", //MISSING Undo : "Visszavonás", Redo : "Ismétlés", NumberedListLbl : "Számozás", NumberedList : "Számozás beillesztése/törlése", BulletedListLbl : "Felsorolás", BulletedList : "Felsorolás beillesztése/törlése", ShowTableBorders : "Táblázat szegély mutatása", ShowDetails : "Részletek mutatása", Style : "Stílus", FontFormat : "Formátum", Font : "Betűtípus", FontSize : "Méret", TextColor : "Betűszín", BGColor : "Háttérszín", Source : "Forráskód", Find : "Keresés", Replace : "Csere", SpellCheck : "Helyesírás-ellenőrzés", UniversalKeyboard : "Univerzális billentyűzet", PageBreakLbl : "Oldaltörés", PageBreak : "Oldaltörés beillesztése", Form : "Űrlap", Checkbox : "Jelölőnégyzet", RadioButton : "Választógomb", TextField : "Szövegmező", Textarea : "Szövegterület", HiddenField : "Rejtettmező", Button : "Gomb", SelectionField : "Legördülő lista", ImageButton : "Képgomb", FitWindow : "Maximalizálás", ShowBlocks : "Blokkok megjelenítése", // Context Menu EditLink : "Hivatkozás módosítása", CellCM : "Cella", RowCM : "Sor", ColumnCM : "Oszlop", InsertRowAfter : "Sor beillesztése az aktuális sor mögé", InsertRowBefore : "Sor beillesztése az aktuális sor elé", DeleteRows : "Sorok törlése", InsertColumnAfter : "Oszlop beillesztése az aktuális oszlop mögé", InsertColumnBefore : "Oszlop beillesztése az aktuális oszlop elé", DeleteColumns : "Oszlopok törlése", InsertCellAfter : "Cella beillesztése az aktuális cella mögé", InsertCellBefore : "Cella beillesztése az aktuális cella elé", DeleteCells : "Cellák törlése", MergeCells : "Cellák egyesítése", MergeRight : "Cellák egyesítése jobbra", MergeDown : "Cellák egyesítése lefelé", HorizontalSplitCell : "Cellák szétválasztása vízszintesen", VerticalSplitCell : "Cellák szétválasztása függőlegesen", TableDelete : "Táblázat törlése", CellProperties : "Cella tulajdonságai", TableProperties : "Táblázat tulajdonságai", ImageProperties : "Kép tulajdonságai", FlashProperties : "Flash tulajdonságai", AnchorProp : "Horgony tulajdonságai", ButtonProp : "Gomb tulajdonságai", CheckboxProp : "Jelölőnégyzet tulajdonságai", HiddenFieldProp : "Rejtett mező tulajdonságai", RadioButtonProp : "Választógomb tulajdonságai", ImageButtonProp : "Képgomb tulajdonságai", TextFieldProp : "Szövegmező tulajdonságai", SelectionFieldProp : "Legördülő lista tulajdonságai", TextareaProp : "Szövegterület tulajdonságai", FormProp : "Űrlap tulajdonságai", FontFormats : "Normál;Formázott;Címsor;Fejléc 1;Fejléc 2;Fejléc 3;Fejléc 4;Fejléc 5;Fejléc 6;Bekezdés (DIV)", // Alerts and Messages ProcessingXHTML : "XHTML feldolgozása. Kérem várjon...", Done : "Kész", PasteWordConfirm : "A beilleszteni kívánt szöveg Word-ből van másolva. El kívánja távolítani a formázást a beillesztés előtt?", NotCompatiblePaste : "Ez a parancs csak Internet Explorer 5.5 verziótól használható. Megpróbálja beilleszteni a szöveget az eredeti formázással?", UnknownToolbarItem : "Ismeretlen eszköztár elem \"%1\"", UnknownCommand : "Ismeretlen parancs \"%1\"", NotImplemented : "A parancs nem hajtható végre", UnknownToolbarSet : "Az eszközkészlet \"%1\" nem létezik", NoActiveX : "A böngésző biztonsági beállításai korlátozzák a szerkesztő lehetőségeit. Engedélyezni kell ezt az opciót: \"Run ActiveX controls and plug-ins\". Ettől függetlenül előfordulhatnak hibaüzenetek ill. bizonyos funkciók hiányozhatnak.", BrowseServerBlocked : "Nem lehet megnyitni a fájlböngészőt. Bizonyosodjon meg róla, hogy a felbukkanó ablakok engedélyezve vannak.", DialogBlocked : "Nem lehet megnyitni a párbeszédablakot. Bizonyosodjon meg róla, hogy a felbukkanó ablakok engedélyezve vannak.", VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "Rendben", DlgBtnCancel : "Mégsem", DlgBtnClose : "Bezárás", DlgBtnBrowseServer : "Böngészés a szerveren", DlgAdvancedTag : "További opciók", DlgOpOther : "Egyéb", DlgInfoTab : "Alaptulajdonságok", DlgAlertUrl : "Illessze be a webcímet", // General Dialogs Labels DlgGenNotSet : "<nincs beállítva>", DlgGenId : "Azonosító", DlgGenLangDir : "Írás iránya", DlgGenLangDirLtr : "Balról jobbra", DlgGenLangDirRtl : "Jobbról balra", DlgGenLangCode : "Nyelv kódja", DlgGenAccessKey : "Billentyűkombináció", DlgGenName : "Név", DlgGenTabIndex : "Tabulátor index", DlgGenLongDescr : "Részletes leírás webcíme", DlgGenClass : "Stíluskészlet", DlgGenTitle : "Súgócimke", DlgGenContType : "Súgó tartalomtípusa", DlgGenLinkCharset : "Hivatkozott tartalom kódlapja", DlgGenStyle : "Stílus", // Image Dialog DlgImgTitle : "Kép tulajdonságai", DlgImgInfoTab : "Alaptulajdonságok", DlgImgBtnUpload : "Küldés a szerverre", DlgImgURL : "Hivatkozás", DlgImgUpload : "Feltöltés", DlgImgAlt : "Buborék szöveg", DlgImgWidth : "Szélesség", DlgImgHeight : "Magasság", DlgImgLockRatio : "Arány megtartása", DlgBtnResetSize : "Eredeti méret", DlgImgBorder : "Keret", DlgImgHSpace : "Vízsz. táv", DlgImgVSpace : "Függ. táv", DlgImgAlign : "Igazítás", DlgImgAlignLeft : "Bal", DlgImgAlignAbsBottom: "Legaljára", DlgImgAlignAbsMiddle: "Közepére", DlgImgAlignBaseline : "Alapvonalhoz", DlgImgAlignBottom : "Aljára", DlgImgAlignMiddle : "Középre", DlgImgAlignRight : "Jobbra", DlgImgAlignTextTop : "Szöveg tetejére", DlgImgAlignTop : "Tetejére", DlgImgPreview : "Előnézet", DlgImgAlertUrl : "Töltse ki a kép webcímét", DlgImgLinkTab : "Hivatkozás", // Flash Dialog DlgFlashTitle : "Flash tulajdonságai", DlgFlashChkPlay : "Automata lejátszás", DlgFlashChkLoop : "Folyamatosan", DlgFlashChkMenu : "Flash menü engedélyezése", DlgFlashScale : "Méretezés", DlgFlashScaleAll : "Mindent mutat", DlgFlashScaleNoBorder : "Keret nélkül", DlgFlashScaleFit : "Teljes kitöltés", // Link Dialog DlgLnkWindowTitle : "Hivatkozás tulajdonságai", DlgLnkInfoTab : "Alaptulajdonságok", DlgLnkTargetTab : "Megjelenítés", DlgLnkType : "Hivatkozás típusa", DlgLnkTypeURL : "Webcím", DlgLnkTypeAnchor : "Horgony az oldalon", DlgLnkTypeEMail : "E-Mail", DlgLnkProto : "Protokoll", DlgLnkProtoOther : "<más>", DlgLnkURL : "Webcím", DlgLnkAnchorSel : "Horgony választása", DlgLnkAnchorByName : "Horgony név szerint", DlgLnkAnchorById : "Azonosító szerint", DlgLnkNoAnchors : "(Nincs horgony a dokumentumban)", DlgLnkEMail : "E-Mail cím", DlgLnkEMailSubject : "Üzenet tárgya", DlgLnkEMailBody : "Üzenet", DlgLnkUpload : "Feltöltés", DlgLnkBtnUpload : "Küldés a szerverre", DlgLnkTarget : "Tartalom megjelenítése", DlgLnkTargetFrame : "<keretben>", DlgLnkTargetPopup : "<felugró ablakban>", DlgLnkTargetBlank : "Új ablakban (_blank)", DlgLnkTargetParent : "Szülő ablakban (_parent)", DlgLnkTargetSelf : "Azonos ablakban (_self)", DlgLnkTargetTop : "Legfelső ablakban (_top)", DlgLnkTargetFrameName : "Keret neve", DlgLnkPopWinName : "Felugró ablak neve", DlgLnkPopWinFeat : "Felugró ablak jellemzői", DlgLnkPopResize : "Méretezhető", DlgLnkPopLocation : "Címsor", DlgLnkPopMenu : "Menü sor", DlgLnkPopScroll : "Gördítősáv", DlgLnkPopStatus : "Állapotsor", DlgLnkPopToolbar : "Eszköztár", DlgLnkPopFullScrn : "Teljes képernyő (csak IE)", DlgLnkPopDependent : "Szülőhöz kapcsolt (csak Netscape)", DlgLnkPopWidth : "Szélesség", DlgLnkPopHeight : "Magasság", DlgLnkPopLeft : "Bal pozíció", DlgLnkPopTop : "Felső pozíció", DlnLnkMsgNoUrl : "Adja meg a hivatkozás webcímét", DlnLnkMsgNoEMail : "Adja meg az E-Mail címet", DlnLnkMsgNoAnchor : "Válasszon egy horgonyt", DlnLnkMsgInvPopName : "A felbukkanó ablak neve alfanumerikus karakterrel kezdôdjön, valamint ne tartalmazzon szóközt", // Color Dialog DlgColorTitle : "Színválasztás", DlgColorBtnClear : "Törlés", DlgColorHighlight : "Előnézet", DlgColorSelected : "Kiválasztott", // Smiley Dialog DlgSmileyTitle : "Hangulatjel beszúrása", // Special Character Dialog DlgSpecialCharTitle : "Speciális karakter választása", // Table Dialog DlgTableTitle : "Táblázat tulajdonságai", DlgTableRows : "Sorok", DlgTableColumns : "Oszlopok", DlgTableBorder : "Szegélyméret", DlgTableAlign : "Igazítás", DlgTableAlignNotSet : "<Nincs beállítva>", DlgTableAlignLeft : "Balra", DlgTableAlignCenter : "Középre", DlgTableAlignRight : "Jobbra", DlgTableWidth : "Szélesség", DlgTableWidthPx : "képpont", DlgTableWidthPc : "százalék", DlgTableHeight : "Magasság", DlgTableCellSpace : "Cella térköz", DlgTableCellPad : "Cella belső margó", DlgTableCaption : "Felirat", DlgTableSummary : "Leírás", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Cella tulajdonságai", DlgCellWidth : "Szélesség", DlgCellWidthPx : "képpont", DlgCellWidthPc : "százalék", DlgCellHeight : "Magasság", DlgCellWordWrap : "Sortörés", DlgCellWordWrapNotSet : "<Nincs beállítva>", DlgCellWordWrapYes : "Igen", DlgCellWordWrapNo : "Nem", DlgCellHorAlign : "Vízsz. igazítás", DlgCellHorAlignNotSet : "<Nincs beállítva>", DlgCellHorAlignLeft : "Balra", DlgCellHorAlignCenter : "Középre", DlgCellHorAlignRight: "Jobbra", DlgCellVerAlign : "Függ. igazítás", DlgCellVerAlignNotSet : "<Nincs beállítva>", DlgCellVerAlignTop : "Tetejére", DlgCellVerAlignMiddle : "Középre", DlgCellVerAlignBottom : "Aljára", DlgCellVerAlignBaseline : "Egyvonalba", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Sorok egyesítése", DlgCellCollSpan : "Oszlopok egyesítése", DlgCellBackColor : "Háttérszín", DlgCellBorderColor : "Szegélyszín", DlgCellBtnSelect : "Kiválasztás...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Keresés és csere", // Find Dialog DlgFindTitle : "Keresés", DlgFindFindBtn : "Keresés", DlgFindNotFoundMsg : "A keresett szöveg nem található.", // Replace Dialog DlgReplaceTitle : "Csere", DlgReplaceFindLbl : "Keresett szöveg:", DlgReplaceReplaceLbl : "Csere erre:", DlgReplaceCaseChk : "kis- és nagybetű megkülönböztetése", DlgReplaceReplaceBtn : "Csere", DlgReplaceReplAllBtn : "Az összes cseréje", DlgReplaceWordChk : "csak ha ez a teljes szó", // Paste Operations / Dialog PasteErrorCut : "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+X).", PasteErrorCopy : "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+X).", PasteAsText : "Beillesztés formázatlan szövegként", PasteFromWord : "Beillesztés Word-ből", DlgPasteMsg2 : "Másolja be az alábbi mezőbe a <STRONG>Ctrl+V</STRONG> billentyűk lenyomásával, majd nyomjon <STRONG>Rendben</STRONG>-t.", DlgPasteSec : "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.", DlgPasteIgnoreFont : "Betű formázások megszüntetése", DlgPasteRemoveStyles : "Stílusok eltávolítása", // Color Picker ColorAutomatic : "Automatikus", ColorMoreColors : "További színek...", // Document Properties DocProps : "Dokumentum tulajdonságai", // Anchor Dialog DlgAnchorTitle : "Horgony tulajdonságai", DlgAnchorName : "Horgony neve", DlgAnchorErrorName : "Kérem adja meg a horgony nevét", // Speller Pages Dialog DlgSpellNotInDic : "Nincs a szótárban", DlgSpellChangeTo : "Módosítás", DlgSpellBtnIgnore : "Kihagyja", DlgSpellBtnIgnoreAll : "Mindet kihagyja", DlgSpellBtnReplace : "Csere", DlgSpellBtnReplaceAll : "Összes cseréje", DlgSpellBtnUndo : "Visszavonás", DlgSpellNoSuggestions : "Nincs javaslat", DlgSpellProgress : "Helyesírás-ellenőrzés folyamatban...", DlgSpellNoMispell : "Helyesírás-ellenőrzés kész: Nem találtam hibát", DlgSpellNoChanges : "Helyesírás-ellenőrzés kész: Nincs változtatott szó", DlgSpellOneChange : "Helyesírás-ellenőrzés kész: Egy szó cserélve", DlgSpellManyChanges : "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?", // Button Dialog DlgButtonText : "Szöveg (Érték)", DlgButtonType : "Típus", DlgButtonTypeBtn : "Gomb", DlgButtonTypeSbm : "Küldés", DlgButtonTypeRst : "Alaphelyzet", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Név", DlgCheckboxValue : "Érték", DlgCheckboxSelected : "Kiválasztott", // Form Dialog DlgFormName : "Név", DlgFormAction : "Adatfeldolgozást végző hivatkozás", DlgFormMethod : "Adatküldés módja", // Select Field Dialog DlgSelectName : "Név", DlgSelectValue : "Érték", DlgSelectSize : "Méret", DlgSelectLines : "sor", DlgSelectChkMulti : "több sor is kiválasztható", DlgSelectOpAvail : "Elérhető opciók", DlgSelectOpText : "Szöveg", DlgSelectOpValue : "Érték", DlgSelectBtnAdd : "Hozzáad", DlgSelectBtnModify : "Módosít", DlgSelectBtnUp : "Fel", DlgSelectBtnDown : "Le", DlgSelectBtnSetValue : "Legyen az alapértelmezett érték", DlgSelectBtnDelete : "Töröl", // Textarea Dialog DlgTextareaName : "Név", DlgTextareaCols : "Karakterek száma egy sorban", DlgTextareaRows : "Sorok száma", // Text Field Dialog DlgTextName : "Név", DlgTextValue : "Érték", DlgTextCharWidth : "Megjelenített karakterek száma", DlgTextMaxChars : "Maximális karakterszám", DlgTextType : "Típus", DlgTextTypeText : "Szöveg", DlgTextTypePass : "Jelszó", // Hidden Field Dialog DlgHiddenName : "Név", DlgHiddenValue : "Érték", // Bulleted List Dialog BulletedListProp : "Felsorolás tulajdonságai", NumberedListProp : "Számozás tulajdonságai", DlgLstStart : "Start", DlgLstType : "Formátum", DlgLstTypeCircle : "Kör", DlgLstTypeDisc : "Lemez", DlgLstTypeSquare : "Négyzet", DlgLstTypeNumbers : "Számok (1, 2, 3)", DlgLstTypeLCase : "Kisbetűk (a, b, c)", DlgLstTypeUCase : "Nagybetűk (A, B, C)", DlgLstTypeSRoman : "Kis római számok (i, ii, iii)", DlgLstTypeLRoman : "Nagy római számok (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Általános", DlgDocBackTab : "Háttér", DlgDocColorsTab : "Színek és margók", DlgDocMetaTab : "Meta adatok", DlgDocPageTitle : "Oldalcím", DlgDocLangDir : "Írás iránya", DlgDocLangDirLTR : "Balról jobbra", DlgDocLangDirRTL : "Jobbról balra", DlgDocLangCode : "Nyelv kód", DlgDocCharSet : "Karakterkódolás", DlgDocCharSetCE : "Közép-Európai", DlgDocCharSetCT : "Kínai Tradicionális (Big5)", DlgDocCharSetCR : "Cyrill", DlgDocCharSetGR : "Görög", DlgDocCharSetJP : "Japán", DlgDocCharSetKR : "Koreai", DlgDocCharSetTR : "Török", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Nyugat-Európai", DlgDocCharSetOther : "Más karakterkódolás", DlgDocDocType : "Dokumentum típus fejléc", DlgDocDocTypeOther : "Más dokumentum típus fejléc", DlgDocIncXHTML : "XHTML deklarációk beillesztése", DlgDocBgColor : "Háttérszín", DlgDocBgImage : "Háttérkép cím", DlgDocBgNoScroll : "Nem gördíthető háttér", DlgDocCText : "Szöveg", DlgDocCLink : "Cím", DlgDocCVisited : "Látogatott cím", DlgDocCActive : "Aktív cím", DlgDocMargins : "Oldal margók", DlgDocMaTop : "Felső", DlgDocMaLeft : "Bal", DlgDocMaRight : "Jobb", DlgDocMaBottom : "Alsó", DlgDocMeIndex : "Dokumentum keresőszavak (vesszővel elválasztva)", DlgDocMeDescr : "Dokumentum leírás", DlgDocMeAuthor : "Szerző", DlgDocMeCopy : "Szerzői jog", DlgDocPreview : "Előnézet", // Templates Dialog Templates : "Sablonok", DlgTemplatesTitle : "Elérhető sablonok", DlgTemplatesSelMsg : "Válassza ki melyik sablon nyíljon meg a szerkesztőben<br>(a jelenlegi tartalom elveszik):", DlgTemplatesLoading : "Sablon lista betöltése. Kis türelmet...", DlgTemplatesNoTpl : "(Nincs sablon megadva)", DlgTemplatesReplace : "Kicseréli a jelenlegi tartalmat", // About Dialog DlgAboutAboutTab : "Névjegy", DlgAboutBrowserInfoTab : "Böngésző információ", DlgAboutLicenseTab : "Licensz", DlgAboutVersion : "verzió", DlgAboutInfo : "További információkért látogasson el ide:", // Div Dialog DlgDivGeneralTab : "General", //MISSING DlgDivAdvancedTab : "Advanced", //MISSING DlgDivStyle : "Style", //MISSING DlgDivInlineStyle : "Inline Style" //MISSING };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Croatian language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Smanji trake s alatima", ToolbarExpand : "Proširi trake s alatima", // Toolbar Items and Context Menu Save : "Snimi", NewPage : "Nova stranica", Preview : "Pregledaj", Cut : "Izreži", Copy : "Kopiraj", Paste : "Zalijepi", PasteText : "Zalijepi kao čisti tekst", PasteWord : "Zalijepi iz Worda", Print : "Ispiši", SelectAll : "Odaberi sve", RemoveFormat : "Ukloni formatiranje", InsertLinkLbl : "Link", InsertLink : "Ubaci/promijeni link", RemoveLink : "Ukloni link", VisitLink : "Otvori link", Anchor : "Ubaci/promijeni sidro", AnchorDelete : "Ukloni sidro", InsertImageLbl : "Slika", InsertImage : "Ubaci/promijeni sliku", InsertFlashLbl : "Flash", InsertFlash : "Ubaci/promijeni Flash", InsertTableLbl : "Tablica", InsertTable : "Ubaci/promijeni tablicu", InsertLineLbl : "Linija", InsertLine : "Ubaci vodoravnu liniju", InsertSpecialCharLbl: "Posebni karakteri", InsertSpecialChar : "Ubaci posebne znakove", InsertSmileyLbl : "Smješko", InsertSmiley : "Ubaci smješka", About : "O FCKeditoru", Bold : "Podebljaj", Italic : "Ukosi", Underline : "Potcrtano", StrikeThrough : "Precrtano", Subscript : "Subscript", Superscript : "Superscript", LeftJustify : "Lijevo poravnanje", CenterJustify : "Središnje poravnanje", RightJustify : "Desno poravnanje", BlockJustify : "Blok poravnanje", DecreaseIndent : "Pomakni ulijevo", IncreaseIndent : "Pomakni udesno", Blockquote : "Blockquote", CreateDiv : "Napravi Div kontejner", EditDiv : "Uredi Div kontejner", DeleteDiv : "Ukloni Div kontejner", Undo : "Poništi", Redo : "Ponovi", NumberedListLbl : "Brojčana lista", NumberedList : "Ubaci/ukloni brojčanu listu", BulletedListLbl : "Obična lista", BulletedList : "Ubaci/ukloni običnu listu", ShowTableBorders : "Prikaži okvir tablice", ShowDetails : "Prikaži detalje", Style : "Stil", FontFormat : "Format", Font : "Font", FontSize : "Veličina", TextColor : "Boja teksta", BGColor : "Boja pozadine", Source : "Kôd", Find : "Pronađi", Replace : "Zamijeni", SpellCheck : "Provjeri pravopis", UniversalKeyboard : "Univerzalna tipkovnica", PageBreakLbl : "Prijelom stranice", PageBreak : "Ubaci prijelom stranice", Form : "Form", Checkbox : "Checkbox", RadioButton : "Radio Button", TextField : "Text Field", Textarea : "Textarea", HiddenField : "Hidden Field", Button : "Button", SelectionField : "Selection Field", ImageButton : "Image Button", FitWindow : "Povećaj veličinu editora", ShowBlocks : "Prikaži blokove", // Context Menu EditLink : "Promijeni link", CellCM : "Ćelija", RowCM : "Red", ColumnCM : "Kolona", InsertRowAfter : "Ubaci red poslije", InsertRowBefore : "Ubaci red prije", DeleteRows : "Izbriši redove", InsertColumnAfter : "Ubaci kolonu poslije", InsertColumnBefore : "Ubaci kolonu prije", DeleteColumns : "Izbriši kolone", InsertCellAfter : "Ubaci ćeliju poslije", InsertCellBefore : "Ubaci ćeliju prije", DeleteCells : "Izbriši ćelije", MergeCells : "Spoji ćelije", MergeRight : "Spoji desno", MergeDown : "Spoji dolje", HorizontalSplitCell : "Podijeli ćeliju vodoravno", VerticalSplitCell : "Podijeli ćeliju okomito", TableDelete : "Izbriši tablicu", CellProperties : "Svojstva ćelije", TableProperties : "Svojstva tablice", ImageProperties : "Svojstva slike", FlashProperties : "Flash svojstva", AnchorProp : "Svojstva sidra", ButtonProp : "Image Button svojstva", CheckboxProp : "Checkbox svojstva", HiddenFieldProp : "Hidden Field svojstva", RadioButtonProp : "Radio Button svojstva", ImageButtonProp : "Image Button svojstva", TextFieldProp : "Text Field svojstva", SelectionFieldProp : "Selection svojstva", TextareaProp : "Textarea svojstva", FormProp : "Form svojstva", FontFormats : "Normal;Formatted;Address;Heading 1;Heading 2;Heading 3;Heading 4;Heading 5;Heading 6;Normal (DIV)", // Alerts and Messages ProcessingXHTML : "Obrađujem XHTML. Molimo pričekajte...", Done : "Završio", PasteWordConfirm : "Tekst koji želite zalijepiti čini se da je kopiran iz Worda. Želite li prije očistiti tekst?", NotCompatiblePaste : "Ova naredba je dostupna samo u Internet Exploreru 5.5 ili novijem. Želite li nastaviti bez čišćenja?", UnknownToolbarItem : "Nepoznati član trake s alatima \"%1\"", UnknownCommand : "Nepoznata naredba \"%1\"", NotImplemented : "Naredba nije implementirana", UnknownToolbarSet : "Traka s alatima \"%1\" ne postoji", NoActiveX : "Vaše postavke pretraživača mogle bi ograničiti neke od mogućnosti editora. Morate uključiti opciju \"Run ActiveX controls and plug-ins\" u postavkama. Ukoliko to ne učinite, moguće su razliite greške tijekom rada.", BrowseServerBlocked : "Pretraivač nije moguće otvoriti. Provjerite da li je uključeno blokiranje pop-up prozora.", DialogBlocked : "Nije moguće otvoriti novi prozor. Provjerite da li je uključeno blokiranje pop-up prozora.", VisitLinkBlocked : "Nije moguće otvoriti novi prozor. Provjerite da li je uključeno blokiranje pop-up prozora.", // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Poništi", DlgBtnClose : "Zatvori", DlgBtnBrowseServer : "Pretraži server", DlgAdvancedTag : "Napredno", DlgOpOther : "<Drugo>", DlgInfoTab : "Info", DlgAlertUrl : "Molimo unesite URL", // General Dialogs Labels DlgGenNotSet : "<nije postavljeno>", DlgGenId : "Id", DlgGenLangDir : "Smjer jezika", DlgGenLangDirLtr : "S lijeva na desno (LTR)", DlgGenLangDirRtl : "S desna na lijevo (RTL)", DlgGenLangCode : "Kôd jezika", DlgGenAccessKey : "Pristupna tipka", DlgGenName : "Naziv", DlgGenTabIndex : "Tab Indeks", DlgGenLongDescr : "Dugački opis URL", DlgGenClass : "Stylesheet klase", DlgGenTitle : "Advisory naslov", DlgGenContType : "Advisory vrsta sadržaja", DlgGenLinkCharset : "Kodna stranica povezanih resursa", DlgGenStyle : "Stil", // Image Dialog DlgImgTitle : "Svojstva slika", DlgImgInfoTab : "Info slike", DlgImgBtnUpload : "Pošalji na server", DlgImgURL : "URL", DlgImgUpload : "Pošalji", DlgImgAlt : "Alternativni tekst", DlgImgWidth : "Širina", DlgImgHeight : "Visina", DlgImgLockRatio : "Zaključaj odnos", DlgBtnResetSize : "Obriši veličinu", DlgImgBorder : "Okvir", DlgImgHSpace : "HSpace", DlgImgVSpace : "VSpace", DlgImgAlign : "Poravnaj", DlgImgAlignLeft : "Lijevo", DlgImgAlignAbsBottom: "Abs dolje", DlgImgAlignAbsMiddle: "Abs sredina", DlgImgAlignBaseline : "Bazno", DlgImgAlignBottom : "Dolje", DlgImgAlignMiddle : "Sredina", DlgImgAlignRight : "Desno", DlgImgAlignTextTop : "Vrh teksta", DlgImgAlignTop : "Vrh", DlgImgPreview : "Pregledaj", DlgImgAlertUrl : "Unesite URL slike", DlgImgLinkTab : "Link", // Flash Dialog DlgFlashTitle : "Flash svojstva", DlgFlashChkPlay : "Auto Play", DlgFlashChkLoop : "Ponavljaj", DlgFlashChkMenu : "Omogući Flash izbornik", DlgFlashScale : "Omjer", DlgFlashScaleAll : "Prikaži sve", DlgFlashScaleNoBorder : "Bez okvira", DlgFlashScaleFit : "Točna veličina", // Link Dialog DlgLnkWindowTitle : "Link", DlgLnkInfoTab : "Link Info", DlgLnkTargetTab : "Meta", DlgLnkType : "Link vrsta", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Sidro na ovoj stranici", DlgLnkTypeEMail : "E-Mail", DlgLnkProto : "Protokol", DlgLnkProtoOther : "<drugo>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Odaberi sidro", DlgLnkAnchorByName : "Po nazivu sidra", DlgLnkAnchorById : "Po Id elementa", DlgLnkNoAnchors : "(Nema dostupnih sidra)", DlgLnkEMail : "E-Mail adresa", DlgLnkEMailSubject : "Naslov", DlgLnkEMailBody : "Sadržaj poruke", DlgLnkUpload : "Pošalji", DlgLnkBtnUpload : "Pošalji na server", DlgLnkTarget : "Meta", DlgLnkTargetFrame : "<okvir>", DlgLnkTargetPopup : "<popup prozor>", DlgLnkTargetBlank : "Novi prozor (_blank)", DlgLnkTargetParent : "Roditeljski prozor (_parent)", DlgLnkTargetSelf : "Isti prozor (_self)", DlgLnkTargetTop : "Vršni prozor (_top)", DlgLnkTargetFrameName : "Ime ciljnog okvira", DlgLnkPopWinName : "Naziv popup prozora", DlgLnkPopWinFeat : "Mogućnosti popup prozora", DlgLnkPopResize : "Promjenljive veličine", DlgLnkPopLocation : "Traka za lokaciju", DlgLnkPopMenu : "Izborna traka", DlgLnkPopScroll : "Scroll traka", DlgLnkPopStatus : "Statusna traka", DlgLnkPopToolbar : "Traka s alatima", DlgLnkPopFullScrn : "Cijeli ekran (IE)", DlgLnkPopDependent : "Ovisno (Netscape)", DlgLnkPopWidth : "Širina", DlgLnkPopHeight : "Visina", DlgLnkPopLeft : "Lijeva pozicija", DlgLnkPopTop : "Gornja pozicija", DlnLnkMsgNoUrl : "Molimo upišite URL link", DlnLnkMsgNoEMail : "Molimo upišite e-mail adresu", DlnLnkMsgNoAnchor : "Molimo odaberite sidro", DlnLnkMsgInvPopName : "Ime popup prozora mora početi sa slovom i ne smije sadržavati razmake", // Color Dialog DlgColorTitle : "Odaberite boju", DlgColorBtnClear : "Obriši", DlgColorHighlight : "Osvijetli", DlgColorSelected : "Odaberi", // Smiley Dialog DlgSmileyTitle : "Ubaci smješka", // Special Character Dialog DlgSpecialCharTitle : "Odaberite posebni karakter", // Table Dialog DlgTableTitle : "Svojstva tablice", DlgTableRows : "Redova", DlgTableColumns : "Kolona", DlgTableBorder : "Veličina okvira", DlgTableAlign : "Poravnanje", DlgTableAlignNotSet : "<nije postavljeno>", DlgTableAlignLeft : "Lijevo", DlgTableAlignCenter : "Središnje", DlgTableAlignRight : "Desno", DlgTableWidth : "Širina", DlgTableWidthPx : "piksela", DlgTableWidthPc : "postotaka", DlgTableHeight : "Visina", DlgTableCellSpace : "Prostornost ćelija", DlgTableCellPad : "Razmak ćelija", DlgTableCaption : "Naslov", DlgTableSummary : "Sažetak", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Svojstva ćelije", DlgCellWidth : "Širina", DlgCellWidthPx : "piksela", DlgCellWidthPc : "postotaka", DlgCellHeight : "Visina", DlgCellWordWrap : "Word Wrap", DlgCellWordWrapNotSet : "<nije postavljeno>", DlgCellWordWrapYes : "Da", DlgCellWordWrapNo : "Ne", DlgCellHorAlign : "Vodoravno poravnanje", DlgCellHorAlignNotSet : "<nije postavljeno>", DlgCellHorAlignLeft : "Lijevo", DlgCellHorAlignCenter : "Središnje", DlgCellHorAlignRight: "Desno", DlgCellVerAlign : "Okomito poravnanje", DlgCellVerAlignNotSet : "<nije postavljeno>", DlgCellVerAlignTop : "Gornje", DlgCellVerAlignMiddle : "Srednišnje", DlgCellVerAlignBottom : "Donje", DlgCellVerAlignBaseline : "Bazno", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Spajanje redova", DlgCellCollSpan : "Spajanje kolona", DlgCellBackColor : "Boja pozadine", DlgCellBorderColor : "Boja okvira", DlgCellBtnSelect : "Odaberi...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Pronađi i zamijeni", // Find Dialog DlgFindTitle : "Pronađi", DlgFindFindBtn : "Pronađi", DlgFindNotFoundMsg : "Traženi tekst nije pronađen.", // Replace Dialog DlgReplaceTitle : "Zamijeni", DlgReplaceFindLbl : "Pronađi:", DlgReplaceReplaceLbl : "Zamijeni s:", DlgReplaceCaseChk : "Usporedi mala/velika slova", DlgReplaceReplaceBtn : "Zamijeni", DlgReplaceReplAllBtn : "Zamijeni sve", DlgReplaceWordChk : "Usporedi cijele riječi", // Paste Operations / Dialog PasteErrorCut : "Sigurnosne postavke Vašeg pretraživača ne dozvoljavaju operacije automatskog izrezivanja. Molimo koristite kraticu na tipkovnici (Ctrl+X).", PasteErrorCopy : "Sigurnosne postavke Vašeg pretraživača ne dozvoljavaju operacije automatskog kopiranja. Molimo koristite kraticu na tipkovnici (Ctrl+C).", PasteAsText : "Zalijepi kao čisti tekst", PasteFromWord : "Zalijepi iz Worda", DlgPasteMsg2 : "Molimo zaljepite unutar doljnjeg okvira koristeći tipkovnicu (<STRONG>Ctrl+V</STRONG>) i kliknite <STRONG>OK</STRONG>.", DlgPasteSec : "Zbog sigurnosnih postavki Vašeg pretraživača, editor nema direktan pristup Vašem međuspremniku. Potrebno je ponovno zalijepiti tekst u ovaj prozor.", DlgPasteIgnoreFont : "Zanemari definiciju vrste fonta", DlgPasteRemoveStyles : "Ukloni definicije stilova", // Color Picker ColorAutomatic : "Automatski", ColorMoreColors : "Više boja...", // Document Properties DocProps : "Svojstva dokumenta", // Anchor Dialog DlgAnchorTitle : "Svojstva sidra", DlgAnchorName : "Ime sidra", DlgAnchorErrorName : "Molimo unesite ime sidra", // Speller Pages Dialog DlgSpellNotInDic : "Nije u rječniku", DlgSpellChangeTo : "Promijeni u", DlgSpellBtnIgnore : "Zanemari", DlgSpellBtnIgnoreAll : "Zanemari sve", DlgSpellBtnReplace : "Zamijeni", DlgSpellBtnReplaceAll : "Zamijeni sve", DlgSpellBtnUndo : "Vrati", DlgSpellNoSuggestions : "-Nema preporuke-", DlgSpellProgress : "Provjera u tijeku...", DlgSpellNoMispell : "Provjera završena: Nema grešaka", DlgSpellNoChanges : "Provjera završena: Nije napravljena promjena", DlgSpellOneChange : "Provjera završena: Jedna riječ promjenjena", DlgSpellManyChanges : "Provjera završena: Promijenjeno %1 riječi", IeSpellDownload : "Provjera pravopisa nije instalirana. Želite li skinuti provjeru pravopisa?", // Button Dialog DlgButtonText : "Tekst (vrijednost)", DlgButtonType : "Vrsta", DlgButtonTypeBtn : "Gumb", DlgButtonTypeSbm : "Pošalji", DlgButtonTypeRst : "Poništi", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Ime", DlgCheckboxValue : "Vrijednost", DlgCheckboxSelected : "Odabrano", // Form Dialog DlgFormName : "Ime", DlgFormAction : "Akcija", DlgFormMethod : "Metoda", // Select Field Dialog DlgSelectName : "Ime", DlgSelectValue : "Vrijednost", DlgSelectSize : "Veličina", DlgSelectLines : "linija", DlgSelectChkMulti : "Dozvoli višestruki odabir", DlgSelectOpAvail : "Dostupne opcije", DlgSelectOpText : "Tekst", DlgSelectOpValue : "Vrijednost", DlgSelectBtnAdd : "Dodaj", DlgSelectBtnModify : "Promijeni", DlgSelectBtnUp : "Gore", DlgSelectBtnDown : "Dolje", DlgSelectBtnSetValue : "Postavi kao odabranu vrijednost", DlgSelectBtnDelete : "Obriši", // Textarea Dialog DlgTextareaName : "Ime", DlgTextareaCols : "Kolona", DlgTextareaRows : "Redova", // Text Field Dialog DlgTextName : "Ime", DlgTextValue : "Vrijednost", DlgTextCharWidth : "Širina", DlgTextMaxChars : "Najviše karaktera", DlgTextType : "Vrsta", DlgTextTypeText : "Tekst", DlgTextTypePass : "Šifra", // Hidden Field Dialog DlgHiddenName : "Ime", DlgHiddenValue : "Vrijednost", // Bulleted List Dialog BulletedListProp : "Svojstva liste", NumberedListProp : "Svojstva brojčane liste", DlgLstStart : "Početak", DlgLstType : "Vrsta", DlgLstTypeCircle : "Krug", DlgLstTypeDisc : "Disk", DlgLstTypeSquare : "Kvadrat", DlgLstTypeNumbers : "Brojevi (1, 2, 3)", DlgLstTypeLCase : "Mala slova (a, b, c)", DlgLstTypeUCase : "Velika slova (A, B, C)", DlgLstTypeSRoman : "Male rimske brojke (i, ii, iii)", DlgLstTypeLRoman : "Velike rimske brojke (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Općenito", DlgDocBackTab : "Pozadina", DlgDocColorsTab : "Boje i margine", DlgDocMetaTab : "Meta Data", DlgDocPageTitle : "Naslov stranice", DlgDocLangDir : "Smjer jezika", DlgDocLangDirLTR : "S lijeva na desno", DlgDocLangDirRTL : "S desna na lijevo", DlgDocLangCode : "Kôd jezika", DlgDocCharSet : "Enkodiranje znakova", DlgDocCharSetCE : "Središnja Europa", DlgDocCharSetCT : "Tradicionalna kineska (Big5)", DlgDocCharSetCR : "Ćirilica", DlgDocCharSetGR : "Grčka", DlgDocCharSetJP : "Japanska", DlgDocCharSetKR : "Koreanska", DlgDocCharSetTR : "Turska", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Zapadna Europa", DlgDocCharSetOther : "Ostalo enkodiranje znakova", DlgDocDocType : "Zaglavlje vrste dokumenta", DlgDocDocTypeOther : "Ostalo zaglavlje vrste dokumenta", DlgDocIncXHTML : "Ubaci XHTML deklaracije", DlgDocBgColor : "Boja pozadine", DlgDocBgImage : "URL slike pozadine", DlgDocBgNoScroll : "Pozadine se ne pomiče", DlgDocCText : "Tekst", DlgDocCLink : "Link", DlgDocCVisited : "Posjećeni link", DlgDocCActive : "Aktivni link", DlgDocMargins : "Margine stranice", DlgDocMaTop : "Vrh", DlgDocMaLeft : "Lijevo", DlgDocMaRight : "Desno", DlgDocMaBottom : "Dolje", DlgDocMeIndex : "Ključne riječi dokumenta (odvojene zarezom)", DlgDocMeDescr : "Opis dokumenta", DlgDocMeAuthor : "Autor", DlgDocMeCopy : "Autorska prava", DlgDocPreview : "Pregledaj", // Templates Dialog Templates : "Predlošci", DlgTemplatesTitle : "Predlošci sadržaja", DlgTemplatesSelMsg : "Molimo odaberite predložak koji želite otvoriti<br>(stvarni sadržaj će biti izgubljen):", DlgTemplatesLoading : "Učitavam listu predložaka. Molimo pričekajte...", DlgTemplatesNoTpl : "(Nema definiranih predložaka)", DlgTemplatesReplace : "Zamijeni trenutne sadržaje", // About Dialog DlgAboutAboutTab : "O FCKEditoru", DlgAboutBrowserInfoTab : "Podaci o pretraživaču", DlgAboutLicenseTab : "Licenca", DlgAboutVersion : "inačica", DlgAboutInfo : "Za više informacija posjetite", // Div Dialog DlgDivGeneralTab : "Općenito", DlgDivAdvancedTab : "Napredno", DlgDivStyle : "Stil", DlgDivInlineStyle : "Stil u redu" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Faroese language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Fjal amboðsbjálkan", ToolbarExpand : "Vís amboðsbjálkan", // Toolbar Items and Context Menu Save : "Goym", NewPage : "Nýggj síða", Preview : "Frumsýning", Cut : "Kvett", Copy : "Avrita", Paste : "Innrita", PasteText : "Innrita reinan tekst", PasteWord : "Innrita frá Word", Print : "Prenta", SelectAll : "Markera alt", RemoveFormat : "Strika sniðgeving", InsertLinkLbl : "Tilknýti", InsertLink : "Ger/broyt tilknýti", RemoveLink : "Strika tilknýti", VisitLink : "Opna tilknýti", Anchor : "Ger/broyt marknastein", AnchorDelete : "Strika marknastein", InsertImageLbl : "Myndir", InsertImage : "Set inn/broyt mynd", InsertFlashLbl : "Flash", InsertFlash : "Set inn/broyt Flash", InsertTableLbl : "Tabell", InsertTable : "Set inn/broyt tabell", InsertLineLbl : "Linja", InsertLine : "Ger vatnrætta linju", InsertSpecialCharLbl: "Sertekn", InsertSpecialChar : "Set inn sertekn", InsertSmileyLbl : "Smiley", InsertSmiley : "Set inn Smiley", About : "Um FCKeditor", Bold : "Feit skrift", Italic : "Skráskrift", Underline : "Undirstrikað", StrikeThrough : "Yvirstrikað", Subscript : "Lækkað skrift", Superscript : "Hækkað skrift", LeftJustify : "Vinstrasett", CenterJustify : "Miðsett", RightJustify : "Høgrasett", BlockJustify : "Javnir tekstkantar", DecreaseIndent : "Minka reglubrotarinntriv", IncreaseIndent : "Økja reglubrotarinntriv", Blockquote : "Blockquote", CreateDiv : "Ger DIV øki", EditDiv : "Broyt DIV øki", DeleteDiv : "Strika DIV øki", Undo : "Angra", Redo : "Vend aftur", NumberedListLbl : "Talmerktur listi", NumberedList : "Ger/strika talmerktan lista", BulletedListLbl : "Punktmerktur listi", BulletedList : "Ger/strika punktmerktan lista", ShowTableBorders : "Vís tabellbordar", ShowDetails : "Vís í smálutum", Style : "Typografi", FontFormat : "Skriftsnið", Font : "Skrift", FontSize : "Skriftstødd", TextColor : "Tekstlitur", BGColor : "Bakgrundslitur", Source : "Kelda", Find : "Leita", Replace : "Yvirskriva", SpellCheck : "Kanna stavseting", UniversalKeyboard : "Knappaborð", PageBreakLbl : "Síðuskift", PageBreak : "Ger síðuskift", Form : "Formur", Checkbox : "Flugubein", RadioButton : "Radioknøttur", TextField : "Tekstteigur", Textarea : "Tekstumráði", HiddenField : "Fjaldur teigur", Button : "Knøttur", SelectionField : "Valskrá", ImageButton : "Myndaknøttur", FitWindow : "Set tekstviðgera til fulla stødd", ShowBlocks : "Vís blokkar", // Context Menu EditLink : "Broyt tilknýti", CellCM : "Meski", RowCM : "Rað", ColumnCM : "Kolonna", InsertRowAfter : "Set rað inn aftaná", InsertRowBefore : "Set rað inn áðrenn", DeleteRows : "Strika røðir", InsertColumnAfter : "Set kolonnu inn aftaná", InsertColumnBefore : "Set kolonnu inn áðrenn", DeleteColumns : "Strika kolonnur", InsertCellAfter : "Set meska inn aftaná", InsertCellBefore : "Set meska inn áðrenn", DeleteCells : "Strika meskar", MergeCells : "Flætta meskar", MergeRight : "Flætta meskar til høgru", MergeDown : "Flætta saman", HorizontalSplitCell : "Kloyv meska vatnrætt", VerticalSplitCell : "Kloyv meska loddrætt", TableDelete : "Strika tabell", CellProperties : "Meskueginleikar", TableProperties : "Tabelleginleikar", ImageProperties : "Myndaeginleikar", FlashProperties : "Flash eginleikar", AnchorProp : "Eginleikar fyri marknastein", ButtonProp : "Eginleikar fyri knøtt", CheckboxProp : "Eginleikar fyri flugubein", HiddenFieldProp : "Eginleikar fyri fjaldan teig", RadioButtonProp : "Eginleikar fyri radioknøtt", ImageButtonProp : "Eginleikar fyri myndaknøtt", TextFieldProp : "Eginleikar fyri tekstteig", SelectionFieldProp : "Eginleikar fyri valskrá", TextareaProp : "Eginleikar fyri tekstumráði", FormProp : "Eginleikar fyri Form", FontFormats : "Vanligt;Sniðgivið;Adressa;Yvirskrift 1;Yvirskrift 2;Yvirskrift 3;Yvirskrift 4;Yvirskrift 5;Yvirskrift 6", // Alerts and Messages ProcessingXHTML : "XHTML verður viðgjørt. Bíða við...", Done : "Liðugt", PasteWordConfirm : "Teksturin, royndur verður at seta inn, tykist at stava frá Word. Vilt tú reinsa tekstin, áðrenn hann verður settur inn?", NotCompatiblePaste : "Hetta er bert tøkt í Internet Explorer 5.5 og nýggjari. Vilt tú seta tekstin inn kortini - óreinsaðan?", UnknownToolbarItem : "Ókendur lutur í amboðsbjálkanum \"%1\"", UnknownCommand : "Ókend kommando \"%1\"", NotImplemented : "Hetta er ikki tøkt í hesi útgávuni", UnknownToolbarSet : "Amboðsbjálkin \"%1\" finst ikki", NoActiveX : "Trygdaruppsetingin í alnótskaganum kann sum er avmarka onkrar hentleikar í tekstviðgeranum. Tú mást loyva møguleikanum \"Run/Kør ActiveX controls and plug-ins\". Tú kanst uppliva feilir og ávaringar um tvørrandi hentleikar.", BrowseServerBlocked : "Ambætarakagin kundi ikki opnast. Tryggja tær, at allar pop-up forðingar eru óvirknar.", DialogBlocked : "Tað eyðnaðist ikki at opna samskiftisrútin. Tryggja tær, at allar pop-up forðingar eru óvirknar.", VisitLinkBlocked : "Tað eyðnaðist ikki at opna nýggjan rút. Tryggja tær, at allar pop-up forðingar eru óvirknar.", // Dialogs DlgBtnOK : "Góðkent", DlgBtnCancel : "Avlýst", DlgBtnClose : "Lat aftur", DlgBtnBrowseServer : "Ambætarakagi", DlgAdvancedTag : "Fjølbroytt", DlgOpOther : "<Annað>", DlgInfoTab : "Upplýsingar", DlgAlertUrl : "Vinarliga veit ein URL", // General Dialogs Labels DlgGenNotSet : "<ikki sett>", DlgGenId : "Id", DlgGenLangDir : "Tekstkós", DlgGenLangDirLtr : "Frá vinstru til høgru (LTR)", DlgGenLangDirRtl : "Frá høgru til vinstru (RTL)", DlgGenLangCode : "Málkoda", DlgGenAccessKey : "Snarvegisknappur", DlgGenName : "Navn", DlgGenTabIndex : "Inntriv indeks", DlgGenLongDescr : "Víðkað URL frágreiðing", DlgGenClass : "Typografi klassar", DlgGenTitle : "Vegleiðandi heiti", DlgGenContType : "Vegleiðandi innihaldsslag", DlgGenLinkCharset : "Atknýtt teknsett", DlgGenStyle : "Typografi", // Image Dialog DlgImgTitle : "Myndaeginleikar", DlgImgInfoTab : "Myndaupplýsingar", DlgImgBtnUpload : "Send til ambætaran", DlgImgURL : "URL", DlgImgUpload : "Send", DlgImgAlt : "Alternativur tekstur", DlgImgWidth : "Breidd", DlgImgHeight : "Hædd", DlgImgLockRatio : "Læs lutfallið", DlgBtnResetSize : "Upprunastødd", DlgImgBorder : "Bordi", DlgImgHSpace : "Høgri breddi", DlgImgVSpace : "Vinstri breddi", DlgImgAlign : "Justering", DlgImgAlignLeft : "Vinstra", DlgImgAlignAbsBottom: "Abs botnur", DlgImgAlignAbsMiddle: "Abs miðja", DlgImgAlignBaseline : "Basislinja", DlgImgAlignBottom : "Botnur", DlgImgAlignMiddle : "Miðja", DlgImgAlignRight : "Høgra", DlgImgAlignTextTop : "Tekst toppur", DlgImgAlignTop : "Ovast", DlgImgPreview : "Frumsýning", DlgImgAlertUrl : "Rita slóðina til myndina", DlgImgLinkTab : "Tilknýti", // Flash Dialog DlgFlashTitle : "Flash eginleikar", DlgFlashChkPlay : "Avspælingin byrjar sjálv", DlgFlashChkLoop : "Endurspæl", DlgFlashChkMenu : "Ger Flash skrá virkna", DlgFlashScale : "Skalering", DlgFlashScaleAll : "Vís alt", DlgFlashScaleNoBorder : "Eingin bordi", DlgFlashScaleFit : "Neyv skalering", // Link Dialog DlgLnkWindowTitle : "Tilknýti", DlgLnkInfoTab : "Tilknýtis upplýsingar", DlgLnkTargetTab : "Mál", DlgLnkType : "Tilknýtisslag", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Tilknýti til marknastein í tekstinum", DlgLnkTypeEMail : "Teldupostur", DlgLnkProto : "Protokoll", DlgLnkProtoOther : "<Annað>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Vel ein marknastein", DlgLnkAnchorByName : "Eftir navni á marknasteini", DlgLnkAnchorById : "Eftir element Id", DlgLnkNoAnchors : "(Eingir marknasteinar eru í hesum dokumentið)", DlgLnkEMail : "Teldupost-adressa", DlgLnkEMailSubject : "Evni", DlgLnkEMailBody : "Breyðtekstur", DlgLnkUpload : "Send til ambætaran", DlgLnkBtnUpload : "Send til ambætaran", DlgLnkTarget : "Mál", DlgLnkTargetFrame : "<ramma>", DlgLnkTargetPopup : "<popup vindeyga>", DlgLnkTargetBlank : "Nýtt vindeyga (_blank)", DlgLnkTargetParent : "Upphavliga vindeygað (_parent)", DlgLnkTargetSelf : "Sama vindeygað (_self)", DlgLnkTargetTop : "Alt vindeygað (_top)", DlgLnkTargetFrameName : "Vís navn vindeygans", DlgLnkPopWinName : "Popup vindeygans navn", DlgLnkPopWinFeat : "Popup vindeygans víðkaðu eginleikar", DlgLnkPopResize : "Kann broyta stødd", DlgLnkPopLocation : "Adressulinja", DlgLnkPopMenu : "Skrábjálki", DlgLnkPopScroll : "Rullibjálki", DlgLnkPopStatus : "Støðufrágreiðingarbjálki", DlgLnkPopToolbar : "Amboðsbjálki", DlgLnkPopFullScrn : "Fullur skermur (IE)", DlgLnkPopDependent : "Bundið (Netscape)", DlgLnkPopWidth : "Breidd", DlgLnkPopHeight : "Hædd", DlgLnkPopLeft : "Frástøða frá vinstru", DlgLnkPopTop : "Frástøða frá íerva", DlnLnkMsgNoUrl : "Vinarliga skriva tilknýti (URL)", DlnLnkMsgNoEMail : "Vinarliga skriva teldupost-adressu", DlnLnkMsgNoAnchor : "Vinarliga vel marknastein", DlnLnkMsgInvPopName : "Popup navnið má byrja við bókstavi og má ikki hava millumrúm", // Color Dialog DlgColorTitle : "Vel lit", DlgColorBtnClear : "Strika alt", DlgColorHighlight : "Framhevja", DlgColorSelected : "Valt", // Smiley Dialog DlgSmileyTitle : "Vel Smiley", // Special Character Dialog DlgSpecialCharTitle : "Vel sertekn", // Table Dialog DlgTableTitle : "Eginleikar fyri tabell", DlgTableRows : "Røðir", DlgTableColumns : "Kolonnur", DlgTableBorder : "Bordabreidd", DlgTableAlign : "Justering", DlgTableAlignNotSet : "<Einki valt>", DlgTableAlignLeft : "Vinstrasett", DlgTableAlignCenter : "Miðsett", DlgTableAlignRight : "Høgrasett", DlgTableWidth : "Breidd", DlgTableWidthPx : "pixels", DlgTableWidthPc : "prosent", DlgTableHeight : "Hædd", DlgTableCellSpace : "Fjarstøða millum meskar", DlgTableCellPad : "Meskubreddi", DlgTableCaption : "Tabellfrágreiðing", DlgTableSummary : "Samandráttur", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Mesku eginleikar", DlgCellWidth : "Breidd", DlgCellWidthPx : "pixels", DlgCellWidthPc : "prosent", DlgCellHeight : "Hædd", DlgCellWordWrap : "Orðkloyving", DlgCellWordWrapNotSet : "<Einki valt>", DlgCellWordWrapYes : "Ja", DlgCellWordWrapNo : "Nei", DlgCellHorAlign : "Vatnrøtt justering", DlgCellHorAlignNotSet : "<Einki valt>", DlgCellHorAlignLeft : "Vinstrasett", DlgCellHorAlignCenter : "Miðsett", DlgCellHorAlignRight: "Høgrasett", DlgCellVerAlign : "Lodrøtt justering", DlgCellVerAlignNotSet : "<Ikki sett>", DlgCellVerAlignTop : "Ovast", DlgCellVerAlignMiddle : "Miðjan", DlgCellVerAlignBottom : "Niðast", DlgCellVerAlignBaseline : "Basislinja", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Røðir, meskin fevnir um", DlgCellCollSpan : "Kolonnur, meskin fevnir um", DlgCellBackColor : "Bakgrundslitur", DlgCellBorderColor : "Litur á borda", DlgCellBtnSelect : "Vel...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Finn og broyt", // Find Dialog DlgFindTitle : "Finn", DlgFindFindBtn : "Finn", DlgFindNotFoundMsg : "Leititeksturin varð ikki funnin", // Replace Dialog DlgReplaceTitle : "Yvirskriva", DlgReplaceFindLbl : "Finn:", DlgReplaceReplaceLbl : "Yvirskriva við:", DlgReplaceCaseChk : "Munur á stórum og smáðum bókstavum", DlgReplaceReplaceBtn : "Yvirskriva", DlgReplaceReplAllBtn : "Yvirskriva alt", DlgReplaceWordChk : "Bert heil orð", // Paste Operations / Dialog PasteErrorCut : "Trygdaruppseting alnótskagans forðar tekstviðgeranum í at kvetta tekstin. Vinarliga nýt knappaborðið til at kvetta tekstin (CTRL+X).", PasteErrorCopy : "Trygdaruppseting alnótskagans forðar tekstviðgeranum í at avrita tekstin. Vinarliga nýt knappaborðið til at avrita tekstin (CTRL+C).", PasteAsText : "Innrita som reinan tekst", PasteFromWord : "Innrita fra Word", DlgPasteMsg2 : "Vinarliga koyr tekstin í hendan rútin við knappaborðinum (<strong>CTRL+V</strong>) og klikk á <strong>Góðtak</strong>.", DlgPasteSec : "Trygdaruppseting alnótskagans forðar tekstviðgeranum í beinleiðis atgongd til avritingarminnið. Tygum mugu royna aftur í hesum rútinum.", DlgPasteIgnoreFont : "Forfjóna Font definitiónirnar", DlgPasteRemoveStyles : "Strika typografi definitiónir", // Color Picker ColorAutomatic : "Automatiskt", ColorMoreColors : "Fleiri litir...", // Document Properties DocProps : "Eginleikar fyri dokument", // Anchor Dialog DlgAnchorTitle : "Eginleikar fyri marknastein", DlgAnchorName : "Heiti marknasteinsins", DlgAnchorErrorName : "Vinarliga rita marknasteinsins heiti", // Speller Pages Dialog DlgSpellNotInDic : "Finst ikki í orðabókini", DlgSpellChangeTo : "Broyt til", DlgSpellBtnIgnore : "Forfjóna", DlgSpellBtnIgnoreAll : "Forfjóna alt", DlgSpellBtnReplace : "Yvirskriva", DlgSpellBtnReplaceAll : "Yvirskriva alt", DlgSpellBtnUndo : "Angra", DlgSpellNoSuggestions : "- Einki uppskot -", DlgSpellProgress : "Rættstavarin arbeiðir...", DlgSpellNoMispell : "Rættstavarain liðugur: Eingin feilur funnin", DlgSpellNoChanges : "Rættstavarain liðugur: Einki orð varð broytt", DlgSpellOneChange : "Rættstavarain liðugur: Eitt orð er broytt", DlgSpellManyChanges : "Rættstavarain liðugur: %1 orð broytt", IeSpellDownload : "Rættstavarin er ikki tøkur í tekstviðgeranum. Vilt tú heinta hann nú?", // Button Dialog DlgButtonText : "Tekstur", DlgButtonType : "Slag", DlgButtonTypeBtn : "Knøttur", DlgButtonTypeSbm : "Send", DlgButtonTypeRst : "Nullstilla", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Navn", DlgCheckboxValue : "Virði", DlgCheckboxSelected : "Valt", // Form Dialog DlgFormName : "Navn", DlgFormAction : "Hending", DlgFormMethod : "Háttur", // Select Field Dialog DlgSelectName : "Navn", DlgSelectValue : "Virði", DlgSelectSize : "Stødd", DlgSelectLines : "Linjur", DlgSelectChkMulti : "Loyv fleiri valmøguleikum samstundis", DlgSelectOpAvail : "Tøkir møguleikar", DlgSelectOpText : "Tekstur", DlgSelectOpValue : "Virði", DlgSelectBtnAdd : "Legg afturat", DlgSelectBtnModify : "Broyt", DlgSelectBtnUp : "Upp", DlgSelectBtnDown : "Niður", DlgSelectBtnSetValue : "Set sum valt virði", DlgSelectBtnDelete : "Strika", // Textarea Dialog DlgTextareaName : "Navn", DlgTextareaCols : "kolonnur", DlgTextareaRows : "røðir", // Text Field Dialog DlgTextName : "Navn", DlgTextValue : "Virði", DlgTextCharWidth : "Breidd (sjónlig tekn)", DlgTextMaxChars : "Mest loyvdu tekn", DlgTextType : "Slag", DlgTextTypeText : "Tekstur", DlgTextTypePass : "Loyniorð", // Hidden Field Dialog DlgHiddenName : "Navn", DlgHiddenValue : "Virði", // Bulleted List Dialog BulletedListProp : "Eginleikar fyri punktmerktan lista", NumberedListProp : "Eginleikar fyri talmerktan lista", DlgLstStart : "Byrjan", DlgLstType : "Slag", DlgLstTypeCircle : "Sirkul", DlgLstTypeDisc : "Fyltur sirkul", DlgLstTypeSquare : "Fjórhyrningur", DlgLstTypeNumbers : "Talmerkt (1, 2, 3)", DlgLstTypeLCase : "Smáir bókstavir (a, b, c)", DlgLstTypeUCase : "Stórir bókstavir (A, B, C)", DlgLstTypeSRoman : "Smá rómaratøl (i, ii, iii)", DlgLstTypeLRoman : "Stór rómaratøl (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Generelt", DlgDocBackTab : "Bakgrund", DlgDocColorsTab : "Litir og breddar", DlgDocMetaTab : "META-upplýsingar", DlgDocPageTitle : "Síðuheiti", DlgDocLangDir : "Tekstkós", DlgDocLangDirLTR : "Frá vinstru móti høgru (LTR)", DlgDocLangDirRTL : "Frá høgru móti vinstru (RTL)", DlgDocLangCode : "Málkoda", DlgDocCharSet : "Teknsett koda", DlgDocCharSetCE : "Miðeuropa", DlgDocCharSetCT : "Kinesiskt traditionelt (Big5)", DlgDocCharSetCR : "Cyrilliskt", DlgDocCharSetGR : "Grikst", DlgDocCharSetJP : "Japanskt", DlgDocCharSetKR : "Koreanskt", DlgDocCharSetTR : "Turkiskt", DlgDocCharSetUN : "UNICODE (UTF-8)", DlgDocCharSetWE : "Vestureuropa", DlgDocCharSetOther : "Onnur teknsett koda", DlgDocDocType : "Dokumentslag yvirskrift", DlgDocDocTypeOther : "Annað dokumentslag yvirskrift", DlgDocIncXHTML : "Viðfest XHTML deklaratiónir", DlgDocBgColor : "Bakgrundslitur", DlgDocBgImage : "Leið til bakgrundsmynd (URL)", DlgDocBgNoScroll : "Læst bakgrund (rullar ikki)", DlgDocCText : "Tekstur", DlgDocCLink : "Tilknýti", DlgDocCVisited : "Vitjaði tilknýti", DlgDocCActive : "Virkin tilknýti", DlgDocMargins : "Síðubreddar", DlgDocMaTop : "Ovast", DlgDocMaLeft : "Vinstra", DlgDocMaRight : "Høgra", DlgDocMaBottom : "Niðast", DlgDocMeIndex : "Dokument index lyklaorð (sundurbýtt við komma)", DlgDocMeDescr : "Dokumentlýsing", DlgDocMeAuthor : "Høvundur", DlgDocMeCopy : "Upphavsrættindi", DlgDocPreview : "Frumsýning", // Templates Dialog Templates : "Skabelónir", DlgTemplatesTitle : "Innihaldsskabelónir", DlgTemplatesSelMsg : "Vinarliga vel ta skabelón, ið skal opnast í tekstviðgeranum<br>(Hetta yvirskrivar núverandi innihald):", DlgTemplatesLoading : "Heinti yvirlit yvir skabelónir. Vinarliga bíða við...", DlgTemplatesNoTpl : "(Ongar skabelónir tøkar)", DlgTemplatesReplace : "Yvirskriva núverandi innihald", // About Dialog DlgAboutAboutTab : "Um", DlgAboutBrowserInfoTab : "Upplýsingar um alnótskagan", DlgAboutLicenseTab : "License", DlgAboutVersion : "version", DlgAboutInfo : "Fyri fleiri upplýsingar, far til", // Div Dialog DlgDivGeneralTab : "Generelt", DlgDivAdvancedTab : "Fjølbroytt", DlgDivStyle : "Typografi", DlgDivInlineStyle : "Inline typografi" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Russian language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Свернуть панель инструментов", ToolbarExpand : "Развернуть панель инструментов", // Toolbar Items and Context Menu Save : "Сохранить", NewPage : "Новая страница", Preview : "Предварительный просмотр", Cut : "Вырезать", Copy : "Копировать", Paste : "Вставить", PasteText : "Вставить только текст", PasteWord : "Вставить из Word", Print : "Печать", SelectAll : "Выделить все", RemoveFormat : "Убрать форматирование", InsertLinkLbl : "Ссылка", InsertLink : "Вставить/Редактировать ссылку", RemoveLink : "Убрать ссылку", VisitLink : "Перейти по ссылке", Anchor : "Вставить/Редактировать якорь", AnchorDelete : "Убрать якорь", InsertImageLbl : "Изображение", InsertImage : "Вставить/Редактировать изображение", InsertFlashLbl : "Flash", InsertFlash : "Вставить/Редактировать Flash", InsertTableLbl : "Таблица", InsertTable : "Вставить/Редактировать таблицу", InsertLineLbl : "Линия", InsertLine : "Вставить горизонтальную линию", InsertSpecialCharLbl: "Специальный символ", InsertSpecialChar : "Вставить специальный символ", InsertSmileyLbl : "Смайлик", InsertSmiley : "Вставить смайлик", About : "О FCKeditor", Bold : "Жирный", Italic : "Курсив", Underline : "Подчеркнутый", StrikeThrough : "Зачеркнутый", Subscript : "Подстрочный индекс", Superscript : "Надстрочный индекс", LeftJustify : "По левому краю", CenterJustify : "По центру", RightJustify : "По правому краю", BlockJustify : "По ширине", DecreaseIndent : "Уменьшить отступ", IncreaseIndent : "Увеличить отступ", Blockquote : "Цитата", CreateDiv : "Создать Div контейнер", EditDiv : "Редактировать Div контейнер", DeleteDiv : "Удалить Div контейнер", Undo : "Отменить", Redo : "Повторить", NumberedListLbl : "Нумерованный список", NumberedList : "Вставить/Удалить нумерованный список", BulletedListLbl : "Маркированный список", BulletedList : "Вставить/Удалить маркированный список", ShowTableBorders : "Показать бордюры таблицы", ShowDetails : "Показать детали", Style : "Стиль", FontFormat : "Форматирование", Font : "Шрифт", FontSize : "Размер", TextColor : "Цвет текста", BGColor : "Цвет фона", Source : "Источник", Find : "Найти", Replace : "Заменить", SpellCheck : "Проверить орфографию", UniversalKeyboard : "Универсальная клавиатура", PageBreakLbl : "Разрыв страницы", PageBreak : "Вставить разрыв страницы", Form : "Форма", Checkbox : "Флаговая кнопка", RadioButton : "Кнопка выбора", TextField : "Текстовое поле", Textarea : "Текстовая область", HiddenField : "Скрытое поле", Button : "Кнопка", SelectionField : "Список", ImageButton : "Кнопка с изображением", FitWindow : "Развернуть окно редактора", ShowBlocks : "Показать блоки", // Context Menu EditLink : "Вставить ссылку", CellCM : "Ячейка", RowCM : "Строка", ColumnCM : "Колонка", InsertRowAfter : "Вставить строку после", InsertRowBefore : "Вставить строку до", DeleteRows : "Удалить строки", InsertColumnAfter : "Вставить колонку после", InsertColumnBefore : "Вставить колонку до", DeleteColumns : "Удалить колонки", InsertCellAfter : "Вставить ячейку после", InsertCellBefore : "Вставить ячейку до", DeleteCells : "Удалить ячейки", MergeCells : "Соединить ячейки", MergeRight : "Соединить вправо", MergeDown : "Соединить вниз", HorizontalSplitCell : "Разбить ячейку горизонтально", VerticalSplitCell : "Разбить ячейку вертикально", TableDelete : "Удалить таблицу", CellProperties : "Свойства ячейки", TableProperties : "Свойства таблицы", ImageProperties : "Свойства изображения", FlashProperties : "Свойства Flash", AnchorProp : "Свойства якоря", ButtonProp : "Свойства кнопки", CheckboxProp : "Свойства флаговой кнопки", HiddenFieldProp : "Свойства скрытого поля", RadioButtonProp : "Свойства кнопки выбора", ImageButtonProp : "Свойства кнопки с изображением", TextFieldProp : "Свойства текстового поля", SelectionFieldProp : "Свойства списка", TextareaProp : "Свойства текстовой области", FormProp : "Свойства формы", FontFormats : "Нормальный;Форматированный;Адрес;Заголовок 1;Заголовок 2;Заголовок 3;Заголовок 4;Заголовок 5;Заголовок 6;Нормальный (DIV)", // Alerts and Messages ProcessingXHTML : "Обработка XHTML. Пожалуйста, подождите...", Done : "Сделано", PasteWordConfirm : "Текст, который вы хотите вставить, похож на копируемый из Word. Вы хотите очистить его перед вставкой?", NotCompatiblePaste : "Эта команда доступна для Internet Explorer версии 5.5 или выше. Вы хотите вставить без очистки?", UnknownToolbarItem : "Не известный элемент панели инструментов \"%1\"", UnknownCommand : "Не известное имя команды \"%1\"", NotImplemented : "Команда не реализована", UnknownToolbarSet : "Панель инструментов \"%1\" не существует", NoActiveX : "Настройки безопасности вашего браузера могут ограничивать некоторые свойства редактора. Вы должны включить опцию \"Запускать элементы управления ActiveX и плугины\". Вы можете видеть ошибки и замечать отсутствие возможностей.", BrowseServerBlocked : "Ресурсы браузера не могут быть открыты. Проверьте что блокировки всплывающих окон выключены.", DialogBlocked : "Невозможно открыть окно диалога. Проверьте что блокировки всплывающих окон выключены.", VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "ОК", DlgBtnCancel : "Отмена", DlgBtnClose : "Закрыть", DlgBtnBrowseServer : "Просмотреть на сервере", DlgAdvancedTag : "Расширенный", DlgOpOther : "<Другое>", DlgInfoTab : "Информация", DlgAlertUrl : "Пожалуйста, вставьте URL", // General Dialogs Labels DlgGenNotSet : "<не определено>", DlgGenId : "Идентификатор", DlgGenLangDir : "Направление языка", DlgGenLangDirLtr : "Слева на право (LTR)", DlgGenLangDirRtl : "Справа на лево (RTL)", DlgGenLangCode : "Язык", DlgGenAccessKey : "Горячая клавиша", DlgGenName : "Имя", DlgGenTabIndex : "Последовательность перехода", DlgGenLongDescr : "Длинное описание URL", DlgGenClass : "Класс CSS", DlgGenTitle : "Заголовок", DlgGenContType : "Тип содержимого", DlgGenLinkCharset : "Кодировка", DlgGenStyle : "Стиль CSS", // Image Dialog DlgImgTitle : "Свойства изображения", DlgImgInfoTab : "Информация о изображении", DlgImgBtnUpload : "Послать на сервер", DlgImgURL : "URL", DlgImgUpload : "Закачать", DlgImgAlt : "Альтернативный текст", DlgImgWidth : "Ширина", DlgImgHeight : "Высота", DlgImgLockRatio : "Сохранять пропорции", DlgBtnResetSize : "Сбросить размер", DlgImgBorder : "Бордюр", DlgImgHSpace : "Горизонтальный отступ", DlgImgVSpace : "Вертикальный отступ", DlgImgAlign : "Выравнивание", DlgImgAlignLeft : "По левому краю", DlgImgAlignAbsBottom: "Абс понизу", DlgImgAlignAbsMiddle: "Абс посередине", DlgImgAlignBaseline : "По базовой линии", DlgImgAlignBottom : "Понизу", DlgImgAlignMiddle : "Посередине", DlgImgAlignRight : "По правому краю", DlgImgAlignTextTop : "Текст наверху", DlgImgAlignTop : "По верху", DlgImgPreview : "Предварительный просмотр", DlgImgAlertUrl : "Пожалуйста, введите URL изображения", DlgImgLinkTab : "Ссылка", // Flash Dialog DlgFlashTitle : "Свойства Flash", DlgFlashChkPlay : "Авто проигрывание", DlgFlashChkLoop : "Повтор", DlgFlashChkMenu : "Включить меню Flash", DlgFlashScale : "Масштабировать", DlgFlashScaleAll : "Показывать все", DlgFlashScaleNoBorder : "Без бордюра", DlgFlashScaleFit : "Точное совпадение", // Link Dialog DlgLnkWindowTitle : "Ссылка", DlgLnkInfoTab : "Информация ссылки", DlgLnkTargetTab : "Цель", DlgLnkType : "Тип ссылки", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Якорь на эту страницу", DlgLnkTypeEMail : "Эл. почта", DlgLnkProto : "Протокол", DlgLnkProtoOther : "<другое>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Выберите якорь", DlgLnkAnchorByName : "По имени якоря", DlgLnkAnchorById : "По идентификатору элемента", DlgLnkNoAnchors : "(Нет якорей доступных в этом документе)", DlgLnkEMail : "Адрес эл. почты", DlgLnkEMailSubject : "Заголовок сообщения", DlgLnkEMailBody : "Тело сообщения", DlgLnkUpload : "Закачать", DlgLnkBtnUpload : "Послать на сервер", DlgLnkTarget : "Цель", DlgLnkTargetFrame : "<фрейм>", DlgLnkTargetPopup : "<всплывающее окно>", DlgLnkTargetBlank : "Новое окно (_blank)", DlgLnkTargetParent : "Родительское окно (_parent)", DlgLnkTargetSelf : "Тоже окно (_self)", DlgLnkTargetTop : "Самое верхнее окно (_top)", DlgLnkTargetFrameName : "Имя целевого фрейма", DlgLnkPopWinName : "Имя всплывающего окна", DlgLnkPopWinFeat : "Свойства всплывающего окна", DlgLnkPopResize : "Изменяющееся в размерах", DlgLnkPopLocation : "Панель локации", DlgLnkPopMenu : "Панель меню", DlgLnkPopScroll : "Полосы прокрутки", DlgLnkPopStatus : "Строка состояния", DlgLnkPopToolbar : "Панель инструментов", DlgLnkPopFullScrn : "Полный экран (IE)", DlgLnkPopDependent : "Зависимый (Netscape)", DlgLnkPopWidth : "Ширина", DlgLnkPopHeight : "Высота", DlgLnkPopLeft : "Позиция слева", DlgLnkPopTop : "Позиция сверху", DlnLnkMsgNoUrl : "Пожалуйста, введите URL ссылки", DlnLnkMsgNoEMail : "Пожалуйста, введите адрес эл. почты", DlnLnkMsgNoAnchor : "Пожалуйста, выберете якорь", DlnLnkMsgInvPopName : "Название вспывающего окна должно начинаться буквы и не может содержать пробелов", // Color Dialog DlgColorTitle : "Выберите цвет", DlgColorBtnClear : "Очистить", DlgColorHighlight : "Подсвеченный", DlgColorSelected : "Выбранный", // Smiley Dialog DlgSmileyTitle : "Вставить смайлик", // Special Character Dialog DlgSpecialCharTitle : "Выберите специальный символ", // Table Dialog DlgTableTitle : "Свойства таблицы", DlgTableRows : "Строки", DlgTableColumns : "Колонки", DlgTableBorder : "Размер бордюра", DlgTableAlign : "Выравнивание", DlgTableAlignNotSet : "<Не уст.>", DlgTableAlignLeft : "Слева", DlgTableAlignCenter : "По центру", DlgTableAlignRight : "Справа", DlgTableWidth : "Ширина", DlgTableWidthPx : "пикселей", DlgTableWidthPc : "процентов", DlgTableHeight : "Высота", DlgTableCellSpace : "Промежуток (spacing)", DlgTableCellPad : "Отступ (padding)", DlgTableCaption : "Заголовок", DlgTableSummary : "Резюме", DlgTableHeaders : "Заголовки", DlgTableHeadersNone : "Нет", DlgTableHeadersColumn : "Первый столбец", DlgTableHeadersRow : "Первая строка", DlgTableHeadersBoth : "Оба варианта", // Table Cell Dialog DlgCellTitle : "Свойства ячейки", DlgCellWidth : "Ширина", DlgCellWidthPx : "пикселей", DlgCellWidthPc : "процентов", DlgCellHeight : "Высота", DlgCellWordWrap : "Заворачивание текста", DlgCellWordWrapNotSet : "<Не уст.>", DlgCellWordWrapYes : "Да", DlgCellWordWrapNo : "Нет", DlgCellHorAlign : "Гор. выравнивание", DlgCellHorAlignNotSet : "<Не уст.>", DlgCellHorAlignLeft : "Слева", DlgCellHorAlignCenter : "По центру", DlgCellHorAlignRight: "Справа", DlgCellVerAlign : "Верт. выравнивание", DlgCellVerAlignNotSet : "<Не уст.>", DlgCellVerAlignTop : "Сверху", DlgCellVerAlignMiddle : "Посередине", DlgCellVerAlignBottom : "Снизу", DlgCellVerAlignBaseline : "По базовой линии", DlgCellType : "Тип ячейки", DlgCellTypeData : "Данные", DlgCellTypeHeader : "Заголовок", DlgCellRowSpan : "Диапазон строк (span)", DlgCellCollSpan : "Диапазон колонок (span)", DlgCellBackColor : "Цвет фона", DlgCellBorderColor : "Цвет бордюра", DlgCellBtnSelect : "Выберите...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Найти и заменить", // Find Dialog DlgFindTitle : "Найти", DlgFindFindBtn : "Найти", DlgFindNotFoundMsg : "Указанный текст не найден.", // Replace Dialog DlgReplaceTitle : "Заменить", DlgReplaceFindLbl : "Найти:", DlgReplaceReplaceLbl : "Заменить на:", DlgReplaceCaseChk : "Учитывать регистр", DlgReplaceReplaceBtn : "Заменить", DlgReplaceReplAllBtn : "Заменить все", DlgReplaceWordChk : "Совпадение целых слов", // Paste Operations / Dialog PasteErrorCut : "Настройки безопасности вашего браузера не позволяют редактору автоматически выполнять операции вырезания. Пожалуйста, используйте клавиатуру для этого (Ctrl+X).", PasteErrorCopy : "Настройки безопасности вашего браузера не позволяют редактору автоматически выполнять операции копирования. Пожалуйста, используйте клавиатуру для этого (Ctrl+C).", PasteAsText : "Вставить только текст", PasteFromWord : "Вставить из Word", DlgPasteMsg2 : "Пожалуйста, вставьте текст в прямоугольник, используя сочетание клавиш (<STRONG>Ctrl+V</STRONG>), и нажмите <STRONG>OK</STRONG>.", DlgPasteSec : "По причине настроек безопасности браузера, редактор не имеет доступа к данным буфера обмена напрямую. Вам необходимо вставить текст снова в это окно.", DlgPasteIgnoreFont : "Игнорировать определения гарнитуры", DlgPasteRemoveStyles : "Убрать определения стилей", // Color Picker ColorAutomatic : "Автоматический", ColorMoreColors : "Цвета...", // Document Properties DocProps : "Свойства документа", // Anchor Dialog DlgAnchorTitle : "Свойства якоря", DlgAnchorName : "Имя якоря", DlgAnchorErrorName : "Пожалуйста, введите имя якоря", // Speller Pages Dialog DlgSpellNotInDic : "Нет в словаре", DlgSpellChangeTo : "Заменить на", DlgSpellBtnIgnore : "Игнорировать", DlgSpellBtnIgnoreAll : "Игнорировать все", DlgSpellBtnReplace : "Заменить", DlgSpellBtnReplaceAll : "Заменить все", DlgSpellBtnUndo : "Отменить", DlgSpellNoSuggestions : "- Нет предположений -", DlgSpellProgress : "Идет проверка орфографии...", DlgSpellNoMispell : "Проверка орфографии закончена: ошибок не найдено", DlgSpellNoChanges : "Проверка орфографии закончена: ни одного слова не изменено", DlgSpellOneChange : "Проверка орфографии закончена: одно слово изменено", DlgSpellManyChanges : "Проверка орфографии закончена: 1% слов изменен", IeSpellDownload : "Модуль проверки орфографии не установлен. Хотите скачать его сейчас?", // Button Dialog DlgButtonText : "Текст (Значение)", DlgButtonType : "Тип", DlgButtonTypeBtn : "Кнопка", DlgButtonTypeSbm : "Отправить", DlgButtonTypeRst : "Сбросить", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Имя", DlgCheckboxValue : "Значение", DlgCheckboxSelected : "Выбранная", // Form Dialog DlgFormName : "Имя", DlgFormAction : "Действие", DlgFormMethod : "Метод", // Select Field Dialog DlgSelectName : "Имя", DlgSelectValue : "Значение", DlgSelectSize : "Размер", DlgSelectLines : "линии", DlgSelectChkMulti : "Разрешить множественный выбор", DlgSelectOpAvail : "Доступные варианты", DlgSelectOpText : "Текст", DlgSelectOpValue : "Значение", DlgSelectBtnAdd : "Добавить", DlgSelectBtnModify : "Модифицировать", DlgSelectBtnUp : "Вверх", DlgSelectBtnDown : "Вниз", DlgSelectBtnSetValue : "Установить как выбранное значение", DlgSelectBtnDelete : "Удалить", // Textarea Dialog DlgTextareaName : "Имя", DlgTextareaCols : "Колонки", DlgTextareaRows : "Строки", // Text Field Dialog DlgTextName : "Имя", DlgTextValue : "Значение", DlgTextCharWidth : "Ширина", DlgTextMaxChars : "Макс. кол-во символов", DlgTextType : "Тип", DlgTextTypeText : "Текст", DlgTextTypePass : "Пароль", // Hidden Field Dialog DlgHiddenName : "Имя", DlgHiddenValue : "Значение", // Bulleted List Dialog BulletedListProp : "Свойства маркированного списка", NumberedListProp : "Свойства нумерованного списка", DlgLstStart : "Начало", DlgLstType : "Тип", DlgLstTypeCircle : "Круг", DlgLstTypeDisc : "Диск", DlgLstTypeSquare : "Квадрат", DlgLstTypeNumbers : "Номера (1, 2, 3)", DlgLstTypeLCase : "Буквы нижнего регистра (a, b, c)", DlgLstTypeUCase : "Буквы верхнего регистра (A, B, C)", DlgLstTypeSRoman : "Малые римские буквы (i, ii, iii)", DlgLstTypeLRoman : "Большие римские буквы (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Общие", DlgDocBackTab : "Задний фон", DlgDocColorsTab : "Цвета и отступы", DlgDocMetaTab : "Мета данные", DlgDocPageTitle : "Заголовок страницы", DlgDocLangDir : "Направление текста", DlgDocLangDirLTR : "Слева направо (LTR)", DlgDocLangDirRTL : "Справа налево (RTL)", DlgDocLangCode : "Код языка", DlgDocCharSet : "Кодировка набора символов", DlgDocCharSetCE : "Центрально-европейская", DlgDocCharSetCT : "Китайская традиционная (Big5)", DlgDocCharSetCR : "Кириллица", DlgDocCharSetGR : "Греческая", DlgDocCharSetJP : "Японская", DlgDocCharSetKR : "Корейская", DlgDocCharSetTR : "Турецкая", DlgDocCharSetUN : "Юникод (UTF-8)", DlgDocCharSetWE : "Западно-европейская", DlgDocCharSetOther : "Другая кодировка набора символов", DlgDocDocType : "Заголовок типа документа", DlgDocDocTypeOther : "Другой заголовок типа документа", DlgDocIncXHTML : "Включить XHTML объявления", DlgDocBgColor : "Цвет фона", DlgDocBgImage : "URL изображения фона", DlgDocBgNoScroll : "Нескроллируемый фон", DlgDocCText : "Текст", DlgDocCLink : "Ссылка", DlgDocCVisited : "Посещенная ссылка", DlgDocCActive : "Активная ссылка", DlgDocMargins : "Отступы страницы", DlgDocMaTop : "Верхний", DlgDocMaLeft : "Левый", DlgDocMaRight : "Правый", DlgDocMaBottom : "Нижний", DlgDocMeIndex : "Ключевые слова документа (разделенные запятой)", DlgDocMeDescr : "Описание документа", DlgDocMeAuthor : "Автор", DlgDocMeCopy : "Авторские права", DlgDocPreview : "Предварительный просмотр", // Templates Dialog Templates : "Шаблоны", DlgTemplatesTitle : "Шаблоны содержимого", DlgTemplatesSelMsg : "Пожалуйста, выберете шаблон для открытия в редакторе<br>(текущее содержимое будет потеряно):", DlgTemplatesLoading : "Загрузка списка шаблонов. Пожалуйста, подождите...", DlgTemplatesNoTpl : "(Ни одного шаблона не определено)", DlgTemplatesReplace : "Заменить текущее содержание", // About Dialog DlgAboutAboutTab : "О программе", DlgAboutBrowserInfoTab : "Информация браузера", DlgAboutLicenseTab : "Лицензия", DlgAboutVersion : "Версия", DlgAboutInfo : "Для большей информации, посетите", // Div Dialog DlgDivGeneralTab : "Информация", DlgDivAdvancedTab : "Расширенные настройки", DlgDivStyle : "Стиль", DlgDivInlineStyle : "Встроенные стили" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Swedish language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Dölj verktygsfält", ToolbarExpand : "Visa verktygsfält", // Toolbar Items and Context Menu Save : "Spara", NewPage : "Ny sida", Preview : "Förhandsgranska", Cut : "Klipp ut", Copy : "Kopiera", Paste : "Klistra in", PasteText : "Klistra in som text", PasteWord : "Klistra in från Word", Print : "Skriv ut", SelectAll : "Markera allt", RemoveFormat : "Radera formatering", InsertLinkLbl : "Länk", InsertLink : "Infoga/Redigera länk", RemoveLink : "Radera länk", VisitLink : "Open Link", //MISSING Anchor : "Infoga/Redigera ankarlänk", AnchorDelete : "Radera ankarlänk", InsertImageLbl : "Bild", InsertImage : "Infoga/Redigera bild", InsertFlashLbl : "Flash", InsertFlash : "Infoga/Redigera Flash", InsertTableLbl : "Tabell", InsertTable : "Infoga/Redigera tabell", InsertLineLbl : "Linje", InsertLine : "Infoga horisontal linje", InsertSpecialCharLbl: "Utökade tecken", InsertSpecialChar : "Klistra in utökat tecken", InsertSmileyLbl : "Smiley", InsertSmiley : "Infoga Smiley", About : "Om FCKeditor", Bold : "Fet", Italic : "Kursiv", Underline : "Understruken", StrikeThrough : "Genomstruken", Subscript : "Nedsänkta tecken", Superscript : "Upphöjda tecken", LeftJustify : "Vänsterjustera", CenterJustify : "Centrera", RightJustify : "Högerjustera", BlockJustify : "Justera till marginaler", DecreaseIndent : "Minska indrag", IncreaseIndent : "Öka indrag", Blockquote : "Blockquote", //MISSING CreateDiv : "Create Div Container", //MISSING EditDiv : "Edit Div Container", //MISSING DeleteDiv : "Remove Div Container", //MISSING Undo : "Ångra", Redo : "Gör om", NumberedListLbl : "Numrerad lista", NumberedList : "Infoga/Radera numrerad lista", BulletedListLbl : "Punktlista", BulletedList : "Infoga/Radera punktlista", ShowTableBorders : "Visa tabellkant", ShowDetails : "Visa radbrytningar", Style : "Anpassad stil", FontFormat : "Teckenformat", Font : "Typsnitt", FontSize : "Storlek", TextColor : "Textfärg", BGColor : "Bakgrundsfärg", Source : "Källa", Find : "Sök", Replace : "Ersätt", SpellCheck : "Stavningskontroll", UniversalKeyboard : "Universellt tangentbord", PageBreakLbl : "Sidbrytning", PageBreak : "Infoga sidbrytning", Form : "Formulär", Checkbox : "Kryssruta", RadioButton : "Alternativknapp", TextField : "Textfält", Textarea : "Textruta", HiddenField : "Dolt fält", Button : "Knapp", SelectionField : "Flervalslista", ImageButton : "Bildknapp", FitWindow : "Anpassa till fönstrets storlek", ShowBlocks : "Show Blocks", //MISSING // Context Menu EditLink : "Redigera länk", CellCM : "Cell", RowCM : "Rad", ColumnCM : "Kolumn", InsertRowAfter : "Lägg till Rad Efter", InsertRowBefore : "Lägg till Rad Före", DeleteRows : "Radera rad", InsertColumnAfter : "Lägg till Kolumn Efter", InsertColumnBefore : "Lägg till Kolumn Före", DeleteColumns : "Radera kolumn", InsertCellAfter : "Lägg till Cell Efter", InsertCellBefore : "Lägg till Cell Före", DeleteCells : "Radera celler", MergeCells : "Sammanfoga celler", MergeRight : "Sammanfoga Höger", MergeDown : "Sammanfoga Ner", HorizontalSplitCell : "Dela Cell Horisontellt", VerticalSplitCell : "Dela Cell Vertikalt", TableDelete : "Radera tabell", CellProperties : "Cellegenskaper", TableProperties : "Tabellegenskaper", ImageProperties : "Bildegenskaper", FlashProperties : "Flashegenskaper", AnchorProp : "Egenskaper för ankarlänk", ButtonProp : "Egenskaper för knapp", CheckboxProp : "Egenskaper för kryssruta", HiddenFieldProp : "Egenskaper för dolt fält", RadioButtonProp : "Egenskaper för alternativknapp", ImageButtonProp : "Egenskaper för bildknapp", TextFieldProp : "Egenskaper för textfält", SelectionFieldProp : "Egenskaper för flervalslista", TextareaProp : "Egenskaper för textruta", FormProp : "Egenskaper för formulär", FontFormats : "Normal;Formaterad;Adress;Rubrik 1;Rubrik 2;Rubrik 3;Rubrik 4;Rubrik 5;Rubrik 6;Normal (DIV)", // Alerts and Messages ProcessingXHTML : "Bearbetar XHTML. Var god vänta...", Done : "Klar", PasteWordConfirm : "Texten du vill klistra in verkar vara kopierad från Word. Vill du rensa innan du klistar in?", NotCompatiblePaste : "Denna åtgärd är inte tillgängligt för Internet Explorer version 5.5 eller högre. Vill du klistra in utan att rensa?", UnknownToolbarItem : "Okänt verktygsfält \"%1\"", UnknownCommand : "Okänt kommando \"%1\"", NotImplemented : "Kommandot finns ej", UnknownToolbarSet : "Verktygsfält \"%1\" finns ej", NoActiveX : "Din webläsares säkerhetsinställningar kan begränsa funktionaliteten. Du bör aktivera \"Kör ActiveX kontroller och plug-ins\". Fel och avsaknad av funktioner kan annars uppstå.", BrowseServerBlocked : "Kunde Ej öppna resursfönstret. Var god och avaktivera alla popup-blockerare.", DialogBlocked : "Kunde Ej öppna dialogfönstret. Var god och avaktivera alla popup-blockerare.", VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Avbryt", DlgBtnClose : "Stäng", DlgBtnBrowseServer : "Bläddra på server", DlgAdvancedTag : "Avancerad", DlgOpOther : "Övrigt", DlgInfoTab : "Information", DlgAlertUrl : "Var god och ange en URL", // General Dialogs Labels DlgGenNotSet : "<ej angivet>", DlgGenId : "Id", DlgGenLangDir : "Språkriktning", DlgGenLangDirLtr : "Vänster till Höger (VTH)", DlgGenLangDirRtl : "Höger till Vänster (HTV)", DlgGenLangCode : "Språkkod", DlgGenAccessKey : "Behörighetsnyckel", DlgGenName : "Namn", DlgGenTabIndex : "Tabindex", DlgGenLongDescr : "URL-beskrivning", DlgGenClass : "Stylesheet class", DlgGenTitle : "Titel", DlgGenContType : "Innehållstyp", DlgGenLinkCharset : "Teckenuppställning", DlgGenStyle : "Style", // Image Dialog DlgImgTitle : "Bildegenskaper", DlgImgInfoTab : "Bildinformation", DlgImgBtnUpload : "Skicka till server", DlgImgURL : "URL", DlgImgUpload : "Ladda upp", DlgImgAlt : "Alternativ text", DlgImgWidth : "Bredd", DlgImgHeight : "Höjd", DlgImgLockRatio : "Lås höjd/bredd förhållanden", DlgBtnResetSize : "Återställ storlek", DlgImgBorder : "Kant", DlgImgHSpace : "Horis. marginal", DlgImgVSpace : "Vert. marginal", DlgImgAlign : "Justering", DlgImgAlignLeft : "Vänster", DlgImgAlignAbsBottom: "Absolut nederkant", DlgImgAlignAbsMiddle: "Absolut centrering", DlgImgAlignBaseline : "Baslinje", DlgImgAlignBottom : "Nederkant", DlgImgAlignMiddle : "Mitten", DlgImgAlignRight : "Höger", DlgImgAlignTextTop : "Text överkant", DlgImgAlignTop : "Överkant", DlgImgPreview : "Förhandsgranska", DlgImgAlertUrl : "Var god och ange bildens URL", DlgImgLinkTab : "Länk", // Flash Dialog DlgFlashTitle : "Flashegenskaper", DlgFlashChkPlay : "Automatisk uppspelning", DlgFlashChkLoop : "Upprepa/Loopa", DlgFlashChkMenu : "Aktivera Flashmeny", DlgFlashScale : "Skala", DlgFlashScaleAll : "Visa allt", DlgFlashScaleNoBorder : "Ingen ram", DlgFlashScaleFit : "Exakt passning", // Link Dialog DlgLnkWindowTitle : "Länk", DlgLnkInfoTab : "Länkinformation", DlgLnkTargetTab : "Mål", DlgLnkType : "Länktyp", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Ankare i sidan", DlgLnkTypeEMail : "E-post", DlgLnkProto : "Protokoll", DlgLnkProtoOther : "<övrigt>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Välj ett ankare", DlgLnkAnchorByName : "efter ankarnamn", DlgLnkAnchorById : "efter objektid", DlgLnkNoAnchors : "(Inga ankare kunde hittas)", DlgLnkEMail : "E-postadress", DlgLnkEMailSubject : "Ämne", DlgLnkEMailBody : "Innehåll", DlgLnkUpload : "Ladda upp", DlgLnkBtnUpload : "Skicka till servern", DlgLnkTarget : "Mål", DlgLnkTargetFrame : "<ram>", DlgLnkTargetPopup : "<popup-fönster>", DlgLnkTargetBlank : "Nytt fönster (_blank)", DlgLnkTargetParent : "Föregående Window (_parent)", DlgLnkTargetSelf : "Detta fönstret (_self)", DlgLnkTargetTop : "Översta fönstret (_top)", DlgLnkTargetFrameName : "Målets ramnamn", DlgLnkPopWinName : "Popup-fönstrets namn", DlgLnkPopWinFeat : "Popup-fönstrets egenskaper", DlgLnkPopResize : "Kan ändra storlek", DlgLnkPopLocation : "Adressfält", DlgLnkPopMenu : "Menyfält", DlgLnkPopScroll : "Scrolllista", DlgLnkPopStatus : "Statusfält", DlgLnkPopToolbar : "Verktygsfält", DlgLnkPopFullScrn : "Helskärm (endast IE)", DlgLnkPopDependent : "Beroende (endest Netscape)", DlgLnkPopWidth : "Bredd", DlgLnkPopHeight : "Höjd", DlgLnkPopLeft : "Position från vänster", DlgLnkPopTop : "Position från sidans topp", DlnLnkMsgNoUrl : "Var god ange länkens URL", DlnLnkMsgNoEMail : "Var god ange E-postadress", DlnLnkMsgNoAnchor : "Var god ange ett ankare", DlnLnkMsgInvPopName : "Popup-rutans namn måste börja med en alfabetisk bokstav och får inte innehålla mellanslag", // Color Dialog DlgColorTitle : "Välj färg", DlgColorBtnClear : "Rensa", DlgColorHighlight : "Markera", DlgColorSelected : "Vald", // Smiley Dialog DlgSmileyTitle : "Infoga smiley", // Special Character Dialog DlgSpecialCharTitle : "Välj utökat tecken", // Table Dialog DlgTableTitle : "Tabellegenskaper", DlgTableRows : "Rader", DlgTableColumns : "Kolumner", DlgTableBorder : "Kantstorlek", DlgTableAlign : "Justering", DlgTableAlignNotSet : "<ej angivet>", DlgTableAlignLeft : "Vänster", DlgTableAlignCenter : "Centrerad", DlgTableAlignRight : "Höger", DlgTableWidth : "Bredd", DlgTableWidthPx : "pixlar", DlgTableWidthPc : "procent", DlgTableHeight : "Höjd", DlgTableCellSpace : "Cellavstånd", DlgTableCellPad : "Cellutfyllnad", DlgTableCaption : "Rubrik", DlgTableSummary : "Sammanfattning", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Cellegenskaper", DlgCellWidth : "Bredd", DlgCellWidthPx : "pixlar", DlgCellWidthPc : "procent", DlgCellHeight : "Höjd", DlgCellWordWrap : "Automatisk radbrytning", DlgCellWordWrapNotSet : "<Ej angivet>", DlgCellWordWrapYes : "Ja", DlgCellWordWrapNo : "Nej", DlgCellHorAlign : "Horisontal justering", DlgCellHorAlignNotSet : "<Ej angivet>", DlgCellHorAlignLeft : "Vänster", DlgCellHorAlignCenter : "Centrerad", DlgCellHorAlignRight: "Höger", DlgCellVerAlign : "Vertikal justering", DlgCellVerAlignNotSet : "<Ej angivet>", DlgCellVerAlignTop : "Topp", DlgCellVerAlignMiddle : "Mitten", DlgCellVerAlignBottom : "Nederkant", DlgCellVerAlignBaseline : "Underst", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Radomfång", DlgCellCollSpan : "Kolumnomfång", DlgCellBackColor : "Bakgrundsfärg", DlgCellBorderColor : "Kantfärg", DlgCellBtnSelect : "Välj...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Sök och ersätt", // Find Dialog DlgFindTitle : "Sök", DlgFindFindBtn : "Sök", DlgFindNotFoundMsg : "Angiven text kunde ej hittas.", // Replace Dialog DlgReplaceTitle : "Ersätt", DlgReplaceFindLbl : "Sök efter:", DlgReplaceReplaceLbl : "Ersätt med:", DlgReplaceCaseChk : "Skiftläge", DlgReplaceReplaceBtn : "Ersätt", DlgReplaceReplAllBtn : "Ersätt alla", DlgReplaceWordChk : "Inkludera hela ord", // Paste Operations / Dialog PasteErrorCut : "Säkerhetsinställningar i Er webläsare tillåter inte åtgården Klipp ut. Använd (Ctrl+X) istället.", PasteErrorCopy : "Säkerhetsinställningar i Er webläsare tillåter inte åtgården Kopiera. Använd (Ctrl+C) istället", PasteAsText : "Klistra in som vanlig text", PasteFromWord : "Klistra in från Word", DlgPasteMsg2 : "Var god och klistra in Er text i rutan nedan genom att använda (<STRONG>Ctrl+V</STRONG>) klicka sen på <STRONG>OK</STRONG>.", DlgPasteSec : "På grund av din webläsares säkerhetsinställningar kan verktyget inte få åtkomst till urklippsdatan. Var god och använd detta fönster istället.", DlgPasteIgnoreFont : "Ignorera typsnittsdefinitioner", DlgPasteRemoveStyles : "Radera Stildefinitioner", // Color Picker ColorAutomatic : "Automatisk", ColorMoreColors : "Fler färger...", // Document Properties DocProps : "Dokumentegenskaper", // Anchor Dialog DlgAnchorTitle : "Ankaregenskaper", DlgAnchorName : "Ankarnamn", DlgAnchorErrorName : "Var god ange ett ankarnamn", // Speller Pages Dialog DlgSpellNotInDic : "Saknas i ordlistan", DlgSpellChangeTo : "Ändra till", DlgSpellBtnIgnore : "Ignorera", DlgSpellBtnIgnoreAll : "Ignorera alla", DlgSpellBtnReplace : "Ersätt", DlgSpellBtnReplaceAll : "Ersätt alla", DlgSpellBtnUndo : "Ångra", DlgSpellNoSuggestions : "- Förslag saknas -", DlgSpellProgress : "Stavningskontroll pågår...", DlgSpellNoMispell : "Stavningskontroll slutförd: Inga stavfel påträffades.", DlgSpellNoChanges : "Stavningskontroll slutförd: Inga ord rättades.", DlgSpellOneChange : "Stavningskontroll slutförd: Ett ord rättades.", DlgSpellManyChanges : "Stavningskontroll slutförd: %1 ord rättades.", IeSpellDownload : "Stavningskontrollen är ej installerad. Vill du göra det nu?", // Button Dialog DlgButtonText : "Text (Värde)", DlgButtonType : "Typ", DlgButtonTypeBtn : "Knapp", DlgButtonTypeSbm : "Skicka", DlgButtonTypeRst : "Återställ", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Namn", DlgCheckboxValue : "Värde", DlgCheckboxSelected : "Vald", // Form Dialog DlgFormName : "Namn", DlgFormAction : "Funktion", DlgFormMethod : "Metod", // Select Field Dialog DlgSelectName : "Namn", DlgSelectValue : "Värde", DlgSelectSize : "Storlek", DlgSelectLines : "Linjer", DlgSelectChkMulti : "Tillåt flerval", DlgSelectOpAvail : "Befintliga val", DlgSelectOpText : "Text", DlgSelectOpValue : "Värde", DlgSelectBtnAdd : "Lägg till", DlgSelectBtnModify : "Redigera", DlgSelectBtnUp : "Upp", DlgSelectBtnDown : "Ner", DlgSelectBtnSetValue : "Markera som valt värde", DlgSelectBtnDelete : "Radera", // Textarea Dialog DlgTextareaName : "Namn", DlgTextareaCols : "Kolumner", DlgTextareaRows : "Rader", // Text Field Dialog DlgTextName : "Namn", DlgTextValue : "Värde", DlgTextCharWidth : "Teckenbredd", DlgTextMaxChars : "Max antal tecken", DlgTextType : "Typ", DlgTextTypeText : "Text", DlgTextTypePass : "Lösenord", // Hidden Field Dialog DlgHiddenName : "Namn", DlgHiddenValue : "Värde", // Bulleted List Dialog BulletedListProp : "Egenskaper för punktlista", NumberedListProp : "Egenskaper för numrerad lista", DlgLstStart : "Start", DlgLstType : "Typ", DlgLstTypeCircle : "Cirkel", DlgLstTypeDisc : "Punkt", DlgLstTypeSquare : "Ruta", DlgLstTypeNumbers : "Nummer (1, 2, 3)", DlgLstTypeLCase : "Gemener (a, b, c)", DlgLstTypeUCase : "Versaler (A, B, C)", DlgLstTypeSRoman : "Små romerska siffror (i, ii, iii)", DlgLstTypeLRoman : "Stora romerska siffror (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Allmän", DlgDocBackTab : "Bakgrund", DlgDocColorsTab : "Färg och marginal", DlgDocMetaTab : "Metadata", DlgDocPageTitle : "Sidtitel", DlgDocLangDir : "Språkriktning", DlgDocLangDirLTR : "Vänster till Höger", DlgDocLangDirRTL : "Höger till Vänster", DlgDocLangCode : "Språkkod", DlgDocCharSet : "Teckenuppsättningar", DlgDocCharSetCE : "Central Europa", DlgDocCharSetCT : "Traditionell Kinesisk (Big5)", DlgDocCharSetCR : "Kyrillisk", DlgDocCharSetGR : "Grekiska", DlgDocCharSetJP : "Japanska", DlgDocCharSetKR : "Koreanska", DlgDocCharSetTR : "Turkiska", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Väst Europa", DlgDocCharSetOther : "Övriga teckenuppsättningar", DlgDocDocType : "Sidhuvud", DlgDocDocTypeOther : "Övriga sidhuvuden", DlgDocIncXHTML : "Inkludera XHTML deklaration", DlgDocBgColor : "Bakgrundsfärg", DlgDocBgImage : "Bakgrundsbildens URL", DlgDocBgNoScroll : "Fast bakgrund", DlgDocCText : "Text", DlgDocCLink : "Länk", DlgDocCVisited : "Besökt länk", DlgDocCActive : "Aktiv länk", DlgDocMargins : "Sidmarginal", DlgDocMaTop : "Topp", DlgDocMaLeft : "Vänster", DlgDocMaRight : "Höger", DlgDocMaBottom : "Botten", DlgDocMeIndex : "Sidans nyckelord", DlgDocMeDescr : "Sidans beskrivning", DlgDocMeAuthor : "Författare", DlgDocMeCopy : "Upphovsrätt", DlgDocPreview : "Förhandsgranska", // Templates Dialog Templates : "Sidmallar", DlgTemplatesTitle : "Sidmallar", DlgTemplatesSelMsg : "Var god välj en mall att använda med editorn<br>(allt nuvarande innehåll raderas):", DlgTemplatesLoading : "Laddar mallar. Var god vänta...", DlgTemplatesNoTpl : "(Ingen mall är vald)", DlgTemplatesReplace : "Ersätt aktuellt innehåll", // About Dialog DlgAboutAboutTab : "Om", DlgAboutBrowserInfoTab : "Webläsare", DlgAboutLicenseTab : "Licens", DlgAboutVersion : "version", DlgAboutInfo : "För mer information se", // Div Dialog DlgDivGeneralTab : "General", //MISSING DlgDivAdvancedTab : "Advanced", //MISSING DlgDivStyle : "Style", //MISSING DlgDivInlineStyle : "Inline Style" //MISSING };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Afrikaans language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Vou Gereedskaps balk toe", ToolbarExpand : "Vou Gereedskaps balk oop", // Toolbar Items and Context Menu Save : "Bewaar", NewPage : "Nuwe Bladsy", Preview : "Voorskou", Cut : "Uitsny ", Copy : "Kopieer", Paste : "Byvoeg", PasteText : "Slegs inhoud byvoeg", PasteWord : "Van Word af byvoeg", Print : "Druk", SelectAll : "Selekteer alles", RemoveFormat : "Formaat verweider", InsertLinkLbl : "Skakel", InsertLink : "Skakel byvoeg/verander", RemoveLink : "Skakel verweider", VisitLink : "Open Link", //MISSING Anchor : "Plekhouer byvoeg/verander", AnchorDelete : "Remove Anchor", //MISSING InsertImageLbl : "Beeld", InsertImage : "Beeld byvoeg/verander", InsertFlashLbl : "Flash", InsertFlash : "Flash byvoeg/verander", InsertTableLbl : "Tabel", InsertTable : "Tabel byvoeg/verander", InsertLineLbl : "Lyn", InsertLine : "Horisontale lyn byvoeg", InsertSpecialCharLbl: "Spesiaale karakter", InsertSpecialChar : "Spesiaale Karakter byvoeg", InsertSmileyLbl : "Smiley", InsertSmiley : "Smiley byvoeg", About : "Meer oor FCKeditor", Bold : "Vet", Italic : "Skuins", Underline : "Onderstreep", StrikeThrough : "Gestreik", Subscript : "Subscript", Superscript : "Superscript", LeftJustify : "Links rig", CenterJustify : "Rig Middel", RightJustify : "Regs rig", BlockJustify : "Blok paradeer", DecreaseIndent : "Paradeering verkort", IncreaseIndent : "Paradeering verleng", Blockquote : "Blockquote", //MISSING CreateDiv : "Create Div Container", //MISSING EditDiv : "Edit Div Container", //MISSING DeleteDiv : "Remove Div Container", //MISSING Undo : "Ont-skep", Redo : "Her-skep", NumberedListLbl : "Genommerde lys", NumberedList : "Genommerde lys byvoeg/verweider", BulletedListLbl : "Gepunkte lys", BulletedList : "Gepunkte lys byvoeg/verweider", ShowTableBorders : "Wys tabel kante", ShowDetails : "Wys informasie", Style : "Styl", FontFormat : "Karakter formaat", Font : "Karakters", FontSize : "Karakter grote", TextColor : "Karakter kleur", BGColor : "Agtergrond kleur", Source : "Source", Find : "Vind", Replace : "Vervang", SpellCheck : "Spelling nagaan", UniversalKeyboard : "Universeele Sleutelbord", PageBreakLbl : "Bladsy breek", PageBreak : "Bladsy breek byvoeg", Form : "Form", Checkbox : "HakBox", RadioButton : "PuntBox", TextField : "Byvoegbare karakter strook", Textarea : "Byvoegbare karakter area", HiddenField : "Blinde strook", Button : "Knop", SelectionField : "Opklapbare keuse strook", ImageButton : "Beeld knop", FitWindow : "Maksimaliseer venster grote", ShowBlocks : "Show Blocks", //MISSING // Context Menu EditLink : "Verander skakel", CellCM : "Cell", RowCM : "Ry", ColumnCM : "Kolom", InsertRowAfter : "Insert Row After", //MISSING InsertRowBefore : "Insert Row Before", //MISSING DeleteRows : "Ry verweider", InsertColumnAfter : "Insert Column After", //MISSING InsertColumnBefore : "Insert Column Before", //MISSING DeleteColumns : "Kolom verweider", InsertCellAfter : "Insert Cell After", //MISSING InsertCellBefore : "Insert Cell Before", //MISSING DeleteCells : "Cell verweider", MergeCells : "Cell verenig", MergeRight : "Merge Right", //MISSING MergeDown : "Merge Down", //MISSING HorizontalSplitCell : "Split Cell Horizontally", //MISSING VerticalSplitCell : "Split Cell Vertically", //MISSING TableDelete : "Tabel verweider", CellProperties : "Cell eienskappe", TableProperties : "Tabel eienskappe", ImageProperties : "Beeld eienskappe", FlashProperties : "Flash eienskappe", AnchorProp : "Plekhouer eienskappe", ButtonProp : "Knop eienskappe", CheckboxProp : "HakBox eienskappe", HiddenFieldProp : "Blinde strook eienskappe", RadioButtonProp : "PuntBox eienskappe", ImageButtonProp : "Beeld knop eienskappe", TextFieldProp : "Karakter strook eienskappe", SelectionFieldProp : "Opklapbare keuse strook eienskappe", TextareaProp : "Karakter area eienskappe", FormProp : "Form eienskappe", FontFormats : "Normaal;Geformateerd;Adres;Opskrif 1;Opskrif 2;Opskrif 3;Opskrif 4;Opskrif 5;Opskrif 6;Normaal (DIV)", // Alerts and Messages ProcessingXHTML : "XHTML word verarbeit. U geduld asseblief...", Done : "Kompleet", PasteWordConfirm : "Die informasie wat U probeer byvoeg is warskynlik van Word. Wil U dit reinig voor die byvoeging?", NotCompatiblePaste : "Die instruksie is beskikbaar vir Internet Explorer weergawe 5.5 of hor. Wil U dir byvoeg sonder reiniging?", UnknownToolbarItem : "Unbekende gereedskaps balk item \"%1\"", UnknownCommand : "Unbekende instruksie naam \"%1\"", NotImplemented : "Instruksie is nie geimplementeer nie.", UnknownToolbarSet : "Gereedskaps balk \"%1\" bestaan nie", NoActiveX : "U browser sekuriteit instellings kan die funksies van die editor behinder. U moet die opsie \"Run ActiveX controls and plug-ins\" aktiveer. U ondervinding mag problematies geskiet of sekere funksionaliteit mag verhinder word.", BrowseServerBlocked : "Die vorraad venster word geblok! Verseker asseblief dat U die \"popup blocker\" instelling verander.", DialogBlocked : "Die dialoog venster vir verdere informasie word geblok. De-aktiveer asseblief die \"popup blocker\" instellings wat dit behinder.", VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Kanseleer", DlgBtnClose : "Sluit", DlgBtnBrowseServer : "Server deurblaai", DlgAdvancedTag : "Ingewikkeld", DlgOpOther : "<Ander>", DlgInfoTab : "Info", DlgAlertUrl : "Voeg asseblief die URL in", // General Dialogs Labels DlgGenNotSet : "<geen instelling>", DlgGenId : "Id", DlgGenLangDir : "Taal rigting", DlgGenLangDirLtr : "Links na regs (LTR)", DlgGenLangDirRtl : "Regs na links (RTL)", DlgGenLangCode : "Taal kode", DlgGenAccessKey : "Toegang sleutel", DlgGenName : "Naam", DlgGenTabIndex : "Tab Index", DlgGenLongDescr : "Lang beskreiwing URL", DlgGenClass : "Skakel Tiepe", DlgGenTitle : "Voorbeveelings Titel", DlgGenContType : "Voorbeveelings inhoud soort", DlgGenLinkCharset : "Geskakelde voorbeeld karakterstel", DlgGenStyle : "Styl", // Image Dialog DlgImgTitle : "Beeld eienskappe", DlgImgInfoTab : "Beeld informasie", DlgImgBtnUpload : "Stuur dit na die Server", DlgImgURL : "URL", DlgImgUpload : "Uplaai", DlgImgAlt : "Alternatiewe beskrywing", DlgImgWidth : "Weidte", DlgImgHeight : "Hoogde", DlgImgLockRatio : "Behou preporsie", DlgBtnResetSize : "Herstel groote", DlgImgBorder : "Kant", DlgImgHSpace : "HSpasie", DlgImgVSpace : "VSpasie", DlgImgAlign : "Paradeer", DlgImgAlignLeft : "Links", DlgImgAlignAbsBottom: "Abs Onder", DlgImgAlignAbsMiddle: "Abs Middel", DlgImgAlignBaseline : "Baseline", DlgImgAlignBottom : "Onder", DlgImgAlignMiddle : "Middel", DlgImgAlignRight : "Regs", DlgImgAlignTextTop : "Text Bo", DlgImgAlignTop : "Bo", DlgImgPreview : "Voorskou", DlgImgAlertUrl : "Voeg asseblief Beeld URL in.", DlgImgLinkTab : "Skakel", // Flash Dialog DlgFlashTitle : "Flash eienskappe", DlgFlashChkPlay : "Automaties Speel", DlgFlashChkLoop : "Herhaling", DlgFlashChkMenu : "Laat Flash Menu toe", DlgFlashScale : "Scale", DlgFlashScaleAll : "Wys alles", DlgFlashScaleNoBorder : "Geen kante", DlgFlashScaleFit : "Presiese pas", // Link Dialog DlgLnkWindowTitle : "Skakel", DlgLnkInfoTab : "Skakel informasie", DlgLnkTargetTab : "Mikpunt", DlgLnkType : "Skakel soort", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Skakel na plekhouers in text", DlgLnkTypeEMail : "E-Mail", DlgLnkProto : "Protokol", DlgLnkProtoOther : "<ander>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Kies 'n plekhouer", DlgLnkAnchorByName : "Volgens plekhouer naam", DlgLnkAnchorById : "Volgens element Id", DlgLnkNoAnchors : "(Geen plekhouers beskikbaar in dokument}", DlgLnkEMail : "E-Mail Adres", DlgLnkEMailSubject : "Boodskap Opskrif", DlgLnkEMailBody : "Boodskap Inhoud", DlgLnkUpload : "Oplaai", DlgLnkBtnUpload : "Stuur na Server", DlgLnkTarget : "Mikpunt", DlgLnkTargetFrame : "<raam>", DlgLnkTargetPopup : "<popup venster>", DlgLnkTargetBlank : "Nuwe Venster (_blank)", DlgLnkTargetParent : "Vorige Venster (_parent)", DlgLnkTargetSelf : "Selfde Venster (_self)", DlgLnkTargetTop : "Boonste Venster (_top)", DlgLnkTargetFrameName : "Mikpunt Venster Naam", DlgLnkPopWinName : "Popup Venster Naam", DlgLnkPopWinFeat : "Popup Venster Geaartheid", DlgLnkPopResize : "Verstelbare Groote", DlgLnkPopLocation : "Adres Balk", DlgLnkPopMenu : "Menu Balk", DlgLnkPopScroll : "Gleibalkstuk", DlgLnkPopStatus : "Status Balk", DlgLnkPopToolbar : "Gereedskap Balk", DlgLnkPopFullScrn : "Voll Skerm (IE)", DlgLnkPopDependent : "Afhanklik (Netscape)", DlgLnkPopWidth : "Weite", DlgLnkPopHeight : "Hoogde", DlgLnkPopLeft : "Links Posisie", DlgLnkPopTop : "Bo Posisie", DlnLnkMsgNoUrl : "Voeg asseblief die URL in", DlnLnkMsgNoEMail : "Voeg asseblief die e-mail adres in", DlnLnkMsgNoAnchor : "Kies asseblief 'n plekhouer", DlnLnkMsgInvPopName : "Die popup naam moet begin met alphabetiese karakters sonder spasies.", // Color Dialog DlgColorTitle : "Kies Kleur", DlgColorBtnClear : "Maak skoon", DlgColorHighlight : "Highlight", DlgColorSelected : "Geselekteer", // Smiley Dialog DlgSmileyTitle : "Voeg Smiley by", // Special Character Dialog DlgSpecialCharTitle : "Kies spesiale karakter", // Table Dialog DlgTableTitle : "Tabel eienskappe", DlgTableRows : "Reie", DlgTableColumns : "Kolome", DlgTableBorder : "Kant groote", DlgTableAlign : "Parideering", DlgTableAlignNotSet : "<geen instelling>", DlgTableAlignLeft : "Links", DlgTableAlignCenter : "Middel", DlgTableAlignRight : "Regs", DlgTableWidth : "Weite", DlgTableWidthPx : "pixels", DlgTableWidthPc : "percent", DlgTableHeight : "Hoogde", DlgTableCellSpace : "Cell spasieering", DlgTableCellPad : "Cell buffer", DlgTableCaption : "Beskreiwing", DlgTableSummary : "Opsomming", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Cell eienskappe", DlgCellWidth : "Weite", DlgCellWidthPx : "pixels", DlgCellWidthPc : "percent", DlgCellHeight : "Hoogde", DlgCellWordWrap : "Woord Wrap", DlgCellWordWrapNotSet : "<geen instelling>", DlgCellWordWrapYes : "Ja", DlgCellWordWrapNo : "Nee", DlgCellHorAlign : "Horisontale rigting", DlgCellHorAlignNotSet : "<geen instelling>", DlgCellHorAlignLeft : "Links", DlgCellHorAlignCenter : "Middel", DlgCellHorAlignRight: "Regs", DlgCellVerAlign : "Vertikale rigting", DlgCellVerAlignNotSet : "<geen instelling>", DlgCellVerAlignTop : "Bo", DlgCellVerAlignMiddle : "Middel", DlgCellVerAlignBottom : "Onder", DlgCellVerAlignBaseline : "Baseline", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Rei strekking", DlgCellCollSpan : "Kolom strekking", DlgCellBackColor : "Agtergrond Kleur", DlgCellBorderColor : "Kant Kleur", DlgCellBtnSelect : "Keuse...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Find and Replace", //MISSING // Find Dialog DlgFindTitle : "Vind", DlgFindFindBtn : "Vind", DlgFindNotFoundMsg : "Die gespesifiseerde karakters word nie gevind nie.", // Replace Dialog DlgReplaceTitle : "Vervang", DlgReplaceFindLbl : "Soek wat:", DlgReplaceReplaceLbl : "Vervang met:", DlgReplaceCaseChk : "Vergelyk karakter skryfweise", DlgReplaceReplaceBtn : "Vervang", DlgReplaceReplAllBtn : "Vervang alles", DlgReplaceWordChk : "Vergelyk komplete woord", // Paste Operations / Dialog PasteErrorCut : "U browser se sekuriteit instelling behinder die uitsny aksie. Gebruik asseblief die sleutel kombenasie(Ctrl+X).", PasteErrorCopy : "U browser se sekuriteit instelling behinder die kopieerings aksie. Gebruik asseblief die sleutel kombenasie(Ctrl+C).", PasteAsText : "Voeg slegs karakters by", PasteFromWord : "Byvoeging uit Word", DlgPasteMsg2 : "Voeg asseblief die inhoud in die gegewe box by met sleutel kombenasie(<STRONG>Ctrl+V</STRONG>) en druk <STRONG>OK</STRONG>.", DlgPasteSec : "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 DlgPasteIgnoreFont : "Ignoreer karakter soort defenisies", DlgPasteRemoveStyles : "Verweider Styl defenisies", // Color Picker ColorAutomatic : "Automaties", ColorMoreColors : "Meer Kleure...", // Document Properties DocProps : "Dokument Eienskappe", // Anchor Dialog DlgAnchorTitle : "Plekhouer Eienskappe", DlgAnchorName : "Plekhouer Naam", DlgAnchorErrorName : "Voltooi die plekhouer naam asseblief", // Speller Pages Dialog DlgSpellNotInDic : "Nie in woordeboek nie", DlgSpellChangeTo : "Verander na", DlgSpellBtnIgnore : "Ignoreer", DlgSpellBtnIgnoreAll : "Ignoreer na-volgende", DlgSpellBtnReplace : "Vervang", DlgSpellBtnReplaceAll : "vervang na-volgende", DlgSpellBtnUndo : "Ont-skep", DlgSpellNoSuggestions : "- Geen voorstel -", DlgSpellProgress : "Spelling word beproef...", DlgSpellNoMispell : "Spellproef kompleet: Geen foute", DlgSpellNoChanges : "Spellproef kompleet: Geen woord veranderings", DlgSpellOneChange : "Spellproef kompleet: Een woord verander", DlgSpellManyChanges : "Spellproef kompleet: %1 woorde verander", IeSpellDownload : "Geen Spellproefer geinstaleer nie. Wil U dit aflaai?", // Button Dialog DlgButtonText : "Karakters (Waarde)", DlgButtonType : "Soort", DlgButtonTypeBtn : "Knop", DlgButtonTypeSbm : "Indien", DlgButtonTypeRst : "Reset", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Naam", DlgCheckboxValue : "Waarde", DlgCheckboxSelected : "Uitgekies", // Form Dialog DlgFormName : "Naam", DlgFormAction : "Aksie", DlgFormMethod : "Metode", // Select Field Dialog DlgSelectName : "Naam", DlgSelectValue : "Waarde", DlgSelectSize : "Grote", DlgSelectLines : "lyne", DlgSelectChkMulti : "Laat meerere keuses toe", DlgSelectOpAvail : "Beskikbare Opsies", DlgSelectOpText : "Karakters", DlgSelectOpValue : "Waarde", DlgSelectBtnAdd : "Byvoeg", DlgSelectBtnModify : "Verander", DlgSelectBtnUp : "Op", DlgSelectBtnDown : "Af", DlgSelectBtnSetValue : "Stel as uitgekiesde waarde", DlgSelectBtnDelete : "Verweider", // Textarea Dialog DlgTextareaName : "Naam", DlgTextareaCols : "Kolom", DlgTextareaRows : "Reie", // Text Field Dialog DlgTextName : "Naam", DlgTextValue : "Waarde", DlgTextCharWidth : "Karakter weite", DlgTextMaxChars : "Maximale karakters", DlgTextType : "Soort", DlgTextTypeText : "Karakters", DlgTextTypePass : "Wagwoord", // Hidden Field Dialog DlgHiddenName : "Naam", DlgHiddenValue : "Waarde", // Bulleted List Dialog BulletedListProp : "Gepunkte lys eienskappe", NumberedListProp : "Genommerde lys eienskappe", DlgLstStart : "Begin", DlgLstType : "Soort", DlgLstTypeCircle : "Sirkel", DlgLstTypeDisc : "Skyf", DlgLstTypeSquare : "Vierkant", DlgLstTypeNumbers : "Nommer (1, 2, 3)", DlgLstTypeLCase : "Klein Letters (a, b, c)", DlgLstTypeUCase : "Hoof Letters (A, B, C)", DlgLstTypeSRoman : "Klein Romeinse nommers (i, ii, iii)", DlgLstTypeLRoman : "Groot Romeinse nommers (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Algemeen", DlgDocBackTab : "Agtergrond", DlgDocColorsTab : "Kleure en Rante", DlgDocMetaTab : "Meta Data", DlgDocPageTitle : "Bladsy Opskrif", DlgDocLangDir : "Taal rigting", DlgDocLangDirLTR : "Link na Regs (LTR)", DlgDocLangDirRTL : "Regs na Links (RTL)", DlgDocLangCode : "Taal Kode", DlgDocCharSet : "Karakterstel Kodeering", DlgDocCharSetCE : "Sentraal Europa", DlgDocCharSetCT : "Chinees Traditioneel (Big5)", DlgDocCharSetCR : "Cyrillic", DlgDocCharSetGR : "Grieks", DlgDocCharSetJP : "Japanees", DlgDocCharSetKR : "Koreans", DlgDocCharSetTR : "Turks", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Western European", DlgDocCharSetOther : "Ander Karakterstel Kodeering", DlgDocDocType : "Dokument Opskrif Soort", DlgDocDocTypeOther : "Ander Dokument Opskrif Soort", DlgDocIncXHTML : "Voeg XHTML verklaring by", DlgDocBgColor : "Agtergrond kleur", DlgDocBgImage : "Agtergrond Beeld URL", DlgDocBgNoScroll : "Vasgeklemde Agtergrond", DlgDocCText : "Karakters", DlgDocCLink : "Skakel", DlgDocCVisited : "Besoekte Skakel", DlgDocCActive : "Aktiewe Skakel", DlgDocMargins : "Bladsy Rante", DlgDocMaTop : "Bo", DlgDocMaLeft : "Links", DlgDocMaRight : "Regs", DlgDocMaBottom : "Onder", DlgDocMeIndex : "Dokument Index Sleutelwoorde(comma verdeelt)", DlgDocMeDescr : "Dokument Beskrywing", DlgDocMeAuthor : "Skrywer", DlgDocMeCopy : "Kopiereg", DlgDocPreview : "Voorskou", // Templates Dialog Templates : "Templates", DlgTemplatesTitle : "Inhoud Templates", DlgTemplatesSelMsg : "Kies die template om te gebruik in die editor<br>(Inhoud word vervang!):", DlgTemplatesLoading : "Templates word gelaai. U geduld asseblief...", DlgTemplatesNoTpl : "(Geen templates gedefinieerd)", DlgTemplatesReplace : "Vervang bestaande inhoud", // About Dialog DlgAboutAboutTab : "Meer oor", DlgAboutBrowserInfoTab : "Blaai Informasie deur", DlgAboutLicenseTab : "Lesensie", DlgAboutVersion : "weergawe", DlgAboutInfo : "Vir meer informasie gaan na ", // Div Dialog DlgDivGeneralTab : "General", //MISSING DlgDivAdvancedTab : "Advanced", //MISSING DlgDivStyle : "Style", //MISSING DlgDivInlineStyle : "Inline Style" //MISSING };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Turkish language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Araç Çubuğunu Kapat", ToolbarExpand : "Araç Çubuğunu Aç", // Toolbar Items and Context Menu Save : "Kaydet", NewPage : "Yeni Sayfa", Preview : "Ön İzleme", Cut : "Kes", Copy : "Kopyala", Paste : "Yapıştır", PasteText : "Düzyazı Olarak Yapıştır", PasteWord : "Word'den Yapıştır", Print : "Yazdır", SelectAll : "Tümünü Seç", RemoveFormat : "Biçimi Kaldır", InsertLinkLbl : "Köprü", InsertLink : "Köprü Ekle/Düzenle", RemoveLink : "Köprü Kaldır", VisitLink : "Köprü Aç", Anchor : "Çapa Ekle/Düzenle", AnchorDelete : "Çapa Sil", InsertImageLbl : "Resim", InsertImage : "Resim Ekle/Düzenle", InsertFlashLbl : "Flash", InsertFlash : "Flash Ekle/Düzenle", InsertTableLbl : "Tablo", InsertTable : "Tablo Ekle/Düzenle", InsertLineLbl : "Satır", InsertLine : "Yatay Satır Ekle", InsertSpecialCharLbl: "Özel Karakter", InsertSpecialChar : "Özel Karakter Ekle", InsertSmileyLbl : "İfade", InsertSmiley : "İfade Ekle", About : "FCKeditor Hakkında", Bold : "Kalın", Italic : "İtalik", Underline : "Altı Çizgili", StrikeThrough : "Üstü Çizgili", Subscript : "Alt Simge", Superscript : "Üst Simge", LeftJustify : "Sola Dayalı", CenterJustify : "Ortalanmış", RightJustify : "Sağa Dayalı", BlockJustify : "İki Kenara Yaslanmış", DecreaseIndent : "Sekme Azalt", IncreaseIndent : "Sekme Arttır", Blockquote : "Blok Oluştur", CreateDiv : "Div Ekle", EditDiv : "Div Düzenle", DeleteDiv : "Div Sil", Undo : "Geri Al", Redo : "Tekrarla", NumberedListLbl : "Numaralı Liste", NumberedList : "Numaralı Liste Ekle/Kaldır", BulletedListLbl : "Simgeli Liste", BulletedList : "Simgeli Liste Ekle/Kaldır", ShowTableBorders : "Tablo Kenarlarını Göster", ShowDetails : "Detayları Göster", Style : "Biçem", FontFormat : "Biçim", Font : "Yazı Türü", FontSize : "Boyut", TextColor : "Yazı Rengi", BGColor : "Arka Renk", Source : "Kaynak", Find : "Bul", Replace : "Değiştir", SpellCheck : "Yazım Denetimi", UniversalKeyboard : "Evrensel Klavye", PageBreakLbl : "Sayfa sonu", PageBreak : "Sayfa Sonu Ekle", Form : "Form", Checkbox : "Onay Kutusu", RadioButton : "Seçenek Düğmesi", TextField : "Metin Girişi", Textarea : "Çok Satırlı Metin", HiddenField : "Gizli Veri", Button : "Düğme", SelectionField : "Seçim Menüsü", ImageButton : "Resimli Düğme", FitWindow : "Düzenleyici boyutunu büyüt", ShowBlocks : "Blokları Göster", // Context Menu EditLink : "Köprü Düzenle", CellCM : "Hücre", RowCM : "Satır", ColumnCM : "Sütun", InsertRowAfter : "Satır Ekle - Sonra", InsertRowBefore : "Satır Ekle - Önce", DeleteRows : "Satır Sil", InsertColumnAfter : "Kolon Ekle - Sonra", InsertColumnBefore : "Kolon Ekle - Önce", DeleteColumns : "Sütun Sil", InsertCellAfter : "Hücre Ekle - Sonra", InsertCellBefore : "Hücre Ekle - Önce", DeleteCells : "Hücre Sil", MergeCells : "Hücreleri Birleştir", MergeRight : "Birleştir - Sağdaki İle ", MergeDown : "Birleştir - Aşağıdaki İle ", HorizontalSplitCell : "Hücreyi Yatay Böl", VerticalSplitCell : "Hücreyi Dikey Böl", TableDelete : "Tabloyu Sil", CellProperties : "Hücre Özellikleri", TableProperties : "Tablo Özellikleri", ImageProperties : "Resim Özellikleri", FlashProperties : "Flash Özellikleri", AnchorProp : "Çapa Özellikleri", ButtonProp : "Düğme Özellikleri", CheckboxProp : "Onay Kutusu Özellikleri", HiddenFieldProp : "Gizli Veri Özellikleri", RadioButtonProp : "Seçenek Düğmesi Özellikleri", ImageButtonProp : "Resimli Düğme Özellikleri", TextFieldProp : "Metin Girişi Özellikleri", SelectionFieldProp : "Seçim Menüsü Özellikleri", TextareaProp : "Çok Satırlı Metin Özellikleri", FormProp : "Form Özellikleri", FontFormats : "Normal;Biçimli;Adres;Başlık 1;Başlık 2;Başlık 3;Başlık 4;Başlık 5;Başlık 6;Paragraf (DIV)", // Alerts and Messages ProcessingXHTML : "XHTML işleniyor. Lütfen bekleyin...", Done : "Bitti", PasteWordConfirm : "Yapıştırdığınız yazı Word'den gelmişe benziyor. Yapıştırmadan önce gereksiz eklentileri silmek ister misiniz?", NotCompatiblePaste : "Bu komut Internet Explorer 5.5 ve ileriki sürümleri için mevcuttur. Temizlenmeden yapıştırılmasını ister misiniz ?", UnknownToolbarItem : "Bilinmeyen araç çubugu öğesi \"%1\"", UnknownCommand : "Bilinmeyen komut \"%1\"", NotImplemented : "Komut uyarlanamadı", UnknownToolbarSet : "\"%1\" araç çubuğu öğesi mevcut değil", NoActiveX : "Kullandığınız tarayıcının güvenlik ayarları bazı özelliklerin kullanılmasını engelliyor. Bu özelliklerin çalışması için \"Run ActiveX controls and plug-ins (Activex ve eklentileri çalıştır)\" seçeneğinin aktif yapılması gerekiyor. Kullanılamayan eklentiler ve hatalar konusunda daha fazla bilgi sahibi olun.", BrowseServerBlocked : "Kaynak tarayıcısı açılamadı. Tüm \"popup blocker\" programlarının devre dışı olduğundan emin olun. (Yahoo toolbar, Msn toolbar, Google toolbar gibi)", DialogBlocked : "Diyalog açmak mümkün olmadı. Tüm \"Popup Blocker\" programlarının devre dışı olduğundan emin olun.", VisitLinkBlocked : "Yeni pencere açmak mümkün olmadı. Tüm \"Popup Blocker\" programlarının devre dışı olduğundan emin olun", // Dialogs DlgBtnOK : "Tamam", DlgBtnCancel : "İptal", DlgBtnClose : "Kapat", DlgBtnBrowseServer : "Sunucuyu Gez", DlgAdvancedTag : "Gelişmiş", DlgOpOther : "<Diğer>", DlgInfoTab : "Bilgi", DlgAlertUrl : "Lütfen URL girin", // General Dialogs Labels DlgGenNotSet : "<tanımlanmamış>", DlgGenId : "Kimlik", DlgGenLangDir : "Dil Yönü", DlgGenLangDirLtr : "Soldan Sağa (LTR)", DlgGenLangDirRtl : "Sağdan Sola (RTL)", DlgGenLangCode : "Dil Kodlaması", DlgGenAccessKey : "Erişim Tuşu", DlgGenName : "Ad", DlgGenTabIndex : "Sekme İndeksi", DlgGenLongDescr : "Uzun Tanımlı URL", DlgGenClass : "Biçem Sayfası Sınıfları", DlgGenTitle : "Danışma Başlığı", DlgGenContType : "Danışma İçerik Türü", DlgGenLinkCharset : "Bağlı Kaynak Karakter Gurubu", DlgGenStyle : "Biçem", // Image Dialog DlgImgTitle : "Resim Özellikleri", DlgImgInfoTab : "Resim Bilgisi", DlgImgBtnUpload : "Sunucuya Yolla", DlgImgURL : "URL", DlgImgUpload : "Karşıya Yükle", DlgImgAlt : "Alternatif Yazı", DlgImgWidth : "Genişlik", DlgImgHeight : "Yükseklik", DlgImgLockRatio : "Oranı Kilitle", DlgBtnResetSize : "Boyutu Başa Döndür", DlgImgBorder : "Kenar", DlgImgHSpace : "Yatay Boşluk", DlgImgVSpace : "Dikey Boşluk", DlgImgAlign : "Hizalama", DlgImgAlignLeft : "Sol", DlgImgAlignAbsBottom: "Tam Altı", DlgImgAlignAbsMiddle: "Tam Ortası", DlgImgAlignBaseline : "Taban Çizgisi", DlgImgAlignBottom : "Alt", DlgImgAlignMiddle : "Orta", DlgImgAlignRight : "Sağ", DlgImgAlignTextTop : "Yazı Tepeye", DlgImgAlignTop : "Tepe", DlgImgPreview : "Ön İzleme", DlgImgAlertUrl : "Lütfen resmin URL'sini yazınız", DlgImgLinkTab : "Köprü", // Flash Dialog DlgFlashTitle : "Flash Özellikleri", DlgFlashChkPlay : "Otomatik Oynat", DlgFlashChkLoop : "Döngü", DlgFlashChkMenu : "Flash Menüsünü Kullan", DlgFlashScale : "Boyutlandır", DlgFlashScaleAll : "Hepsini Göster", DlgFlashScaleNoBorder : "Kenar Yok", DlgFlashScaleFit : "Tam Sığdır", // Link Dialog DlgLnkWindowTitle : "Köprü", DlgLnkInfoTab : "Köprü Bilgisi", DlgLnkTargetTab : "Hedef", DlgLnkType : "Köprü Türü", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Bu sayfada çapa", DlgLnkTypeEMail : "E-Posta", DlgLnkProto : "Protokol", DlgLnkProtoOther : "<diğer>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Çapa Seç", DlgLnkAnchorByName : "Çapa Adı ile", DlgLnkAnchorById : "Eleman Kimlik Numarası ile", DlgLnkNoAnchors : "(Bu belgede hiç çapa yok)", DlgLnkEMail : "E-Posta Adresi", DlgLnkEMailSubject : "İleti Konusu", DlgLnkEMailBody : "İleti Gövdesi", DlgLnkUpload : "Karşıya Yükle", DlgLnkBtnUpload : "Sunucuya Gönder", DlgLnkTarget : "Hedef", DlgLnkTargetFrame : "<çerçeve>", DlgLnkTargetPopup : "<yeni açılan pencere>", DlgLnkTargetBlank : "Yeni Pencere(_blank)", DlgLnkTargetParent : "Anne Pencere (_parent)", DlgLnkTargetSelf : "Kendi Penceresi (_self)", DlgLnkTargetTop : "En Üst Pencere (_top)", DlgLnkTargetFrameName : "Hedef Çerçeve Adı", DlgLnkPopWinName : "Yeni Açılan Pencere Adı", DlgLnkPopWinFeat : "Yeni Açılan Pencere Özellikleri", DlgLnkPopResize : "Boyutlandırılabilir", DlgLnkPopLocation : "Yer Çubuğu", DlgLnkPopMenu : "Menü Çubuğu", DlgLnkPopScroll : "Kaydırma Çubukları", DlgLnkPopStatus : "Durum Çubuğu", DlgLnkPopToolbar : "Araç Çubuğu", DlgLnkPopFullScrn : "Tam Ekran (IE)", DlgLnkPopDependent : "Bağımlı (Netscape)", DlgLnkPopWidth : "Genişlik", DlgLnkPopHeight : "Yükseklik", DlgLnkPopLeft : "Sola Göre Konum", DlgLnkPopTop : "Yukarıya Göre Konum", DlnLnkMsgNoUrl : "Lütfen köprü URL'sini yazın", DlnLnkMsgNoEMail : "Lütfen E-posta adresini yazın", DlnLnkMsgNoAnchor : "Lütfen bir çapa seçin", DlnLnkMsgInvPopName : "Açılır pencere adı abecesel bir karakterle başlamalı ve boşluk içermemelidir", // Color Dialog DlgColorTitle : "Renk Seç", DlgColorBtnClear : "Temizle", DlgColorHighlight : "Vurgula", DlgColorSelected : "Seçilmiş", // Smiley Dialog DlgSmileyTitle : "İfade Ekle", // Special Character Dialog DlgSpecialCharTitle : "Özel Karakter Seç", // Table Dialog DlgTableTitle : "Tablo Özellikleri", DlgTableRows : "Satırlar", DlgTableColumns : "Sütunlar", DlgTableBorder : "Kenar Kalınlığı", DlgTableAlign : "Hizalama", DlgTableAlignNotSet : "<Tanımlanmamış>", DlgTableAlignLeft : "Sol", DlgTableAlignCenter : "Merkez", DlgTableAlignRight : "Sağ", DlgTableWidth : "Genişlik", DlgTableWidthPx : "piksel", DlgTableWidthPc : "yüzde", DlgTableHeight : "Yükseklik", DlgTableCellSpace : "Izgara kalınlığı", DlgTableCellPad : "Izgara yazı arası", DlgTableCaption : "Başlık", DlgTableSummary : "Özet", DlgTableHeaders : "Başlıklar", DlgTableHeadersNone : "Yok", DlgTableHeadersColumn : "İlk Sütun", DlgTableHeadersRow : "İlk Satır", DlgTableHeadersBoth : "Her İkisi", // Table Cell Dialog DlgCellTitle : "Hücre Özellikleri", DlgCellWidth : "Genişlik", DlgCellWidthPx : "piksel", DlgCellWidthPc : "yüzde", DlgCellHeight : "Yükseklik", DlgCellWordWrap : "Sözcük Kaydır", DlgCellWordWrapNotSet : "<Tanımlanmamış>", DlgCellWordWrapYes : "Evet", DlgCellWordWrapNo : "Hayır", DlgCellHorAlign : "Yatay Hizalama", DlgCellHorAlignNotSet : "<Tanımlanmamış>", DlgCellHorAlignLeft : "Sol", DlgCellHorAlignCenter : "Merkez", DlgCellHorAlignRight: "Sağ", DlgCellVerAlign : "Dikey Hizalama", DlgCellVerAlignNotSet : "<Tanımlanmamış>", DlgCellVerAlignTop : "Tepe", DlgCellVerAlignMiddle : "Orta", DlgCellVerAlignBottom : "Alt", DlgCellVerAlignBaseline : "Taban Çizgisi", DlgCellType : "Hücre Tipi", DlgCellTypeData : "Veri", DlgCellTypeHeader : "Başlık", DlgCellRowSpan : "Satır Kapla", DlgCellCollSpan : "Sütun Kapla", DlgCellBackColor : "Arka Plan Rengi", DlgCellBorderColor : "Kenar Rengi", DlgCellBtnSelect : "Seç...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Bul ve Değiştir", // Find Dialog DlgFindTitle : "Bul", DlgFindFindBtn : "Bul", DlgFindNotFoundMsg : "Belirtilen yazı bulunamadı.", // Replace Dialog DlgReplaceTitle : "Değiştir", DlgReplaceFindLbl : "Aranan:", DlgReplaceReplaceLbl : "Bununla değiştir:", DlgReplaceCaseChk : "Büyük/küçük harf duyarlı", DlgReplaceReplaceBtn : "Değiştir", DlgReplaceReplAllBtn : "Tümünü Değiştir", DlgReplaceWordChk : "Kelimenin tamamı uysun", // Paste Operations / Dialog PasteErrorCut : "Gezgin yazılımınızın güvenlik ayarları düzenleyicinin otomatik kesme işlemine izin vermiyor. İşlem için (Ctrl+X) tuşlarını kullanın.", PasteErrorCopy : "Gezgin yazılımınızın güvenlik ayarları düzenleyicinin otomatik kopyalama işlemine izin vermiyor. İşlem için (Ctrl+C) tuşlarını kullanın.", PasteAsText : "Düz Metin Olarak Yapıştır", PasteFromWord : "Word'den yapıştır", DlgPasteMsg2 : "Lütfen aşağıdaki kutunun içine yapıştırın. (<STRONG>Ctrl+V</STRONG>) ve <STRONG>Tamam</STRONG> butonunu tıklayın.", DlgPasteSec : "Gezgin yazılımınızın güvenlik ayarları düzenleyicinin direkt olarak panoya erişimine izin vermiyor. Bu pencere içine tekrar yapıştırmalısınız..", DlgPasteIgnoreFont : "Yazı Tipi tanımlarını yoksay", DlgPasteRemoveStyles : "Biçem Tanımlarını çıkar", // Color Picker ColorAutomatic : "Otomatik", ColorMoreColors : "Diğer renkler...", // Document Properties DocProps : "Belge Özellikleri", // Anchor Dialog DlgAnchorTitle : "Çapa Özellikleri", DlgAnchorName : "Çapa Adı", DlgAnchorErrorName : "Lütfen çapa için ad giriniz", // Speller Pages Dialog DlgSpellNotInDic : "Sözlükte Yok", DlgSpellChangeTo : "Şuna değiştir:", DlgSpellBtnIgnore : "Yoksay", DlgSpellBtnIgnoreAll : "Tümünü Yoksay", DlgSpellBtnReplace : "Değiştir", DlgSpellBtnReplaceAll : "Tümünü Değiştir", DlgSpellBtnUndo : "Geri Al", DlgSpellNoSuggestions : "- Öneri Yok -", DlgSpellProgress : "Yazım denetimi işlemde...", DlgSpellNoMispell : "Yazım denetimi tamamlandı: Yanlış yazıma rastlanmadı", DlgSpellNoChanges : "Yazım denetimi tamamlandı: Hiçbir kelime değiştirilmedi", DlgSpellOneChange : "Yazım denetimi tamamlandı: Bir kelime değiştirildi", DlgSpellManyChanges : "Yazım denetimi tamamlandı: %1 kelime değiştirildi", IeSpellDownload : "Yazım denetimi yüklenmemiş. Şimdi yüklemek ister misiniz?", // Button Dialog DlgButtonText : "Metin (Değer)", DlgButtonType : "Tip", DlgButtonTypeBtn : "Düğme", DlgButtonTypeSbm : "Gönder", DlgButtonTypeRst : "Sıfırla", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Ad", DlgCheckboxValue : "Değer", DlgCheckboxSelected : "Seçili", // Form Dialog DlgFormName : "Ad", DlgFormAction : "İşlem", DlgFormMethod : "Yöntem", // Select Field Dialog DlgSelectName : "Ad", DlgSelectValue : "Değer", DlgSelectSize : "Boyut", DlgSelectLines : "satır", DlgSelectChkMulti : "Çoklu seçime izin ver", DlgSelectOpAvail : "Mevcut Seçenekler", DlgSelectOpText : "Metin", DlgSelectOpValue : "Değer", DlgSelectBtnAdd : "Ekle", DlgSelectBtnModify : "Düzenle", DlgSelectBtnUp : "Yukarı", DlgSelectBtnDown : "Aşağı", DlgSelectBtnSetValue : "Seçili değer olarak ata", DlgSelectBtnDelete : "Sil", // Textarea Dialog DlgTextareaName : "Ad", DlgTextareaCols : "Sütunlar", DlgTextareaRows : "Satırlar", // Text Field Dialog DlgTextName : "Ad", DlgTextValue : "Değer", DlgTextCharWidth : "Karakter Genişliği", DlgTextMaxChars : "En Fazla Karakter", DlgTextType : "Tür", DlgTextTypeText : "Metin", DlgTextTypePass : "Parola", // Hidden Field Dialog DlgHiddenName : "Ad", DlgHiddenValue : "Değer", // Bulleted List Dialog BulletedListProp : "Simgeli Liste Özellikleri", NumberedListProp : "Numaralı Liste Özellikleri", DlgLstStart : "Başlangıç", DlgLstType : "Tip", DlgLstTypeCircle : "Çember", DlgLstTypeDisc : "Disk", DlgLstTypeSquare : "Kare", DlgLstTypeNumbers : "Sayılar (1, 2, 3)", DlgLstTypeLCase : "Küçük Harfler (a, b, c)", DlgLstTypeUCase : "Büyük Harfler (A, B, C)", DlgLstTypeSRoman : "Küçük Romen Rakamları (i, ii, iii)", DlgLstTypeLRoman : "Büyük Romen Rakamları (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Genel", DlgDocBackTab : "Arka Plan", DlgDocColorsTab : "Renkler ve Kenar Boşlukları", DlgDocMetaTab : "Tanım Bilgisi (Meta)", DlgDocPageTitle : "Sayfa Başlığı", DlgDocLangDir : "Dil Yönü", DlgDocLangDirLTR : "Soldan Sağa (LTR)", DlgDocLangDirRTL : "Sağdan Sola (RTL)", DlgDocLangCode : "Dil Kodu", DlgDocCharSet : "Karakter Kümesi Kodlaması", DlgDocCharSetCE : "Orta Avrupa", DlgDocCharSetCT : "Geleneksel Çince (Big5)", DlgDocCharSetCR : "Kiril", DlgDocCharSetGR : "Yunanca", DlgDocCharSetJP : "Japonca", DlgDocCharSetKR : "Korece", DlgDocCharSetTR : "Türkçe", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Batı Avrupa", DlgDocCharSetOther : "Diğer Karakter Kümesi Kodlaması", DlgDocDocType : "Belge Türü Başlığı", DlgDocDocTypeOther : "Diğer Belge Türü Başlığı", DlgDocIncXHTML : "XHTML Bildirimlerini Dahil Et", DlgDocBgColor : "Arka Plan Rengi", DlgDocBgImage : "Arka Plan Resim URLsi", DlgDocBgNoScroll : "Sabit Arka Plan", DlgDocCText : "Metin", DlgDocCLink : "Köprü", DlgDocCVisited : "Ziyaret Edilmiş Köprü", DlgDocCActive : "Etkin Köprü", DlgDocMargins : "Kenar Boşlukları", DlgDocMaTop : "Tepe", DlgDocMaLeft : "Sol", DlgDocMaRight : "Sağ", DlgDocMaBottom : "Alt", DlgDocMeIndex : "Belge Dizinleme Anahtar Kelimeleri (virgülle ayrılmış)", DlgDocMeDescr : "Belge Tanımı", DlgDocMeAuthor : "Yazar", DlgDocMeCopy : "Telif", DlgDocPreview : "Ön İzleme", // Templates Dialog Templates : "Şablonlar", DlgTemplatesTitle : "İçerik Şablonları", DlgTemplatesSelMsg : "Düzenleyicide açmak için lütfen bir şablon seçin.<br>(hali hazırdaki içerik kaybolacaktır.):", DlgTemplatesLoading : "Şablon listesi yüklenmekte. Lütfen bekleyiniz...", DlgTemplatesNoTpl : "(Belirli bir şablon seçilmedi)", DlgTemplatesReplace : "Mevcut içerik ile değiştir", // About Dialog DlgAboutAboutTab : "Hakkında", DlgAboutBrowserInfoTab : "Gezgin Bilgisi", DlgAboutLicenseTab : "Lisans", DlgAboutVersion : "sürüm", DlgAboutInfo : "Daha fazla bilgi için:", // Div Dialog DlgDivGeneralTab : "Genel", DlgDivAdvancedTab : "Gelişmiş", DlgDivStyle : "Sitil", DlgDivInlineStyle : "Satıriçi Sitil" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * French language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Masquer Outils", ToolbarExpand : "Afficher Outils", // Toolbar Items and Context Menu Save : "Enregistrer", NewPage : "Nouvelle page", Preview : "Prévisualisation", Cut : "Couper", Copy : "Copier", Paste : "Coller", PasteText : "Coller comme texte", PasteWord : "Coller de Word", Print : "Imprimer", SelectAll : "Tout sélectionner", RemoveFormat : "Supprimer le format", InsertLinkLbl : "Lien", InsertLink : "Insérer/modifier le lien", RemoveLink : "Supprimer le lien", VisitLink : "Suivre le lien", Anchor : "Insérer/modifier l'ancre", AnchorDelete : "Supprimer l'ancre", InsertImageLbl : "Image", InsertImage : "Insérer/modifier l'image", InsertFlashLbl : "Animation Flash", InsertFlash : "Insérer/modifier l'animation Flash", InsertTableLbl : "Tableau", InsertTable : "Insérer/modifier le tableau", InsertLineLbl : "Séparateur", InsertLine : "Insérer un séparateur", InsertSpecialCharLbl: "Caractères spéciaux", InsertSpecialChar : "Insérer un caractère spécial", InsertSmileyLbl : "Smiley", InsertSmiley : "Insérer un Smiley", About : "A propos de FCKeditor", Bold : "Gras", Italic : "Italique", Underline : "Souligné", StrikeThrough : "Barré", Subscript : "Indice", Superscript : "Exposant", LeftJustify : "Aligné à gauche", CenterJustify : "Centré", RightJustify : "Aligné à Droite", BlockJustify : "Texte justifié", DecreaseIndent : "Diminuer le retrait", IncreaseIndent : "Augmenter le retrait", Blockquote : "Citation", CreateDiv : "Créer Balise Div", EditDiv : "Modifier Balise Div", DeleteDiv : "Supprimer Balise Div", Undo : "Annuler", Redo : "Refaire", NumberedListLbl : "Liste numérotée", NumberedList : "Insérer/supprimer la liste numérotée", BulletedListLbl : "Liste à puces", BulletedList : "Insérer/supprimer la liste à puces", ShowTableBorders : "Afficher les bordures du tableau", ShowDetails : "Afficher les caractères invisibles", Style : "Style", FontFormat : "Format", Font : "Police", FontSize : "Taille", TextColor : "Couleur de caractère", BGColor : "Couleur de fond", Source : "Source", Find : "Chercher", Replace : "Remplacer", SpellCheck : "Orthographe", UniversalKeyboard : "Clavier universel", PageBreakLbl : "Saut de page", PageBreak : "Insérer un saut de page", Form : "Formulaire", Checkbox : "Case à cocher", RadioButton : "Bouton radio", TextField : "Champ texte", Textarea : "Zone de texte", HiddenField : "Champ caché", Button : "Bouton", SelectionField : "Liste/menu", ImageButton : "Bouton image", FitWindow : "Edition pleine page", ShowBlocks : "Afficher les blocs", // Context Menu EditLink : "Modifier le lien", CellCM : "Cellule", RowCM : "Ligne", ColumnCM : "Colonne", InsertRowAfter : "Insérer une ligne après", InsertRowBefore : "Insérer une ligne avant", DeleteRows : "Supprimer des lignes", InsertColumnAfter : "Insérer une colonne après", InsertColumnBefore : "Insérer une colonne avant", DeleteColumns : "Supprimer des colonnes", InsertCellAfter : "Insérer une cellule après", InsertCellBefore : "Insérer une cellule avant", DeleteCells : "Supprimer des cellules", MergeCells : "Fusionner les cellules", MergeRight : "Fusionner à droite", MergeDown : "Fusionner en bas", HorizontalSplitCell : "Scinder la cellule horizontalement", VerticalSplitCell : "Scinder la cellule verticalement", TableDelete : "Supprimer le tableau", CellProperties : "Propriétés de cellule", TableProperties : "Propriétés du tableau", ImageProperties : "Propriétés de l'image", FlashProperties : "Propriétés de l'animation Flash", AnchorProp : "Propriétés de l'ancre", ButtonProp : "Propriétés du bouton", CheckboxProp : "Propriétés de la case à cocher", HiddenFieldProp : "Propriétés du champ caché", RadioButtonProp : "Propriétés du bouton radio", ImageButtonProp : "Propriétés du bouton image", TextFieldProp : "Propriétés du champ texte", SelectionFieldProp : "Propriétés de la liste/du menu", TextareaProp : "Propriétés de la zone de texte", FormProp : "Propriétés du formulaire", FontFormats : "Normal;Formaté;Adresse;En-tête 1;En-tête 2;En-tête 3;En-tête 4;En-tête 5;En-tête 6;Normal (DIV)", // Alerts and Messages ProcessingXHTML : "Calcul XHTML. Veuillez patienter...", Done : "Terminé", PasteWordConfirm : "Le texte à coller semble provenir de Word. Désirez-vous le nettoyer avant de coller?", NotCompatiblePaste : "Cette commande nécessite Internet Explorer version 5.5 minimum. Souhaitez-vous coller sans nettoyage?", UnknownToolbarItem : "Elément de barre d'outil inconnu \"%1\"", UnknownCommand : "Nom de commande inconnu \"%1\"", NotImplemented : "Commande non encore écrite", UnknownToolbarSet : "La barre d'outils \"%1\" n'existe pas", NoActiveX : "Les paramètres de sécurité de votre navigateur peuvent limiter quelques fonctionnalités de l'éditeur. Veuillez activer l'option \"Exécuter les contrôles ActiveX et les plug-ins\". Il se peut que vous rencontriez des erreurs et remarquiez quelques limitations.", BrowseServerBlocked : "Le navigateur n'a pas pu être ouvert. Assurez-vous que les bloqueurs de popups soient désactivés.", DialogBlocked : "La fenêtre de dialogue n'a pas pu s'ouvrir. Assurez-vous que les bloqueurs de popups soient désactivés.", VisitLinkBlocked : "Impossible d'ouvrir une nouvelle fenêtre. Assurez-vous que les bloqueurs de popups soient désactivés.", // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "Annuler", DlgBtnClose : "Fermer", DlgBtnBrowseServer : "Parcourir le serveur", DlgAdvancedTag : "Avancé", DlgOpOther : "<Autre>", DlgInfoTab : "Info", DlgAlertUrl : "Veuillez saisir l'URL", // General Dialogs Labels DlgGenNotSet : "<Par défaut>", DlgGenId : "Id", DlgGenLangDir : "Sens d'écriture", DlgGenLangDirLtr : "De gauche à droite (LTR)", DlgGenLangDirRtl : "De droite à gauche (RTL)", DlgGenLangCode : "Code langue", DlgGenAccessKey : "Equivalent clavier", DlgGenName : "Nom", DlgGenTabIndex : "Ordre de tabulation", DlgGenLongDescr : "URL de description longue", DlgGenClass : "Classes de feuilles de style", DlgGenTitle : "Titre", DlgGenContType : "Type de contenu", DlgGenLinkCharset : "Encodage de caractère", DlgGenStyle : "Style", // Image Dialog DlgImgTitle : "Propriétés de l'image", DlgImgInfoTab : "Informations sur l'image", DlgImgBtnUpload : "Envoyer sur le serveur", DlgImgURL : "URL", DlgImgUpload : "Télécharger", DlgImgAlt : "Texte de remplacement", DlgImgWidth : "Largeur", DlgImgHeight : "Hauteur", DlgImgLockRatio : "Garder les proportions", DlgBtnResetSize : "Taille originale", DlgImgBorder : "Bordure", DlgImgHSpace : "Espacement horizontal", DlgImgVSpace : "Espacement vertical", DlgImgAlign : "Alignement", DlgImgAlignLeft : "Gauche", DlgImgAlignAbsBottom: "Abs Bas", DlgImgAlignAbsMiddle: "Abs Milieu", DlgImgAlignBaseline : "Bas du texte", DlgImgAlignBottom : "Bas", DlgImgAlignMiddle : "Milieu", DlgImgAlignRight : "Droite", DlgImgAlignTextTop : "Haut du texte", DlgImgAlignTop : "Haut", DlgImgPreview : "Prévisualisation", DlgImgAlertUrl : "Veuillez saisir l'URL de l'image", DlgImgLinkTab : "Lien", // Flash Dialog DlgFlashTitle : "Propriétés de l'animation Flash", DlgFlashChkPlay : "Lecture automatique", DlgFlashChkLoop : "Boucle", DlgFlashChkMenu : "Activer le menu Flash", DlgFlashScale : "Affichage", DlgFlashScaleAll : "Par défaut (tout montrer)", DlgFlashScaleNoBorder : "Sans bordure", DlgFlashScaleFit : "Ajuster aux dimensions", // Link Dialog DlgLnkWindowTitle : "Propriétés du lien", DlgLnkInfoTab : "Informations sur le lien", DlgLnkTargetTab : "Destination", DlgLnkType : "Type de lien", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Ancre dans cette page", DlgLnkTypeEMail : "E-Mail", DlgLnkProto : "Protocole", DlgLnkProtoOther : "<autre>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Sélectionner une ancre", DlgLnkAnchorByName : "Par nom", DlgLnkAnchorById : "Par id", DlgLnkNoAnchors : "(Pas d'ancre disponible dans le document)", DlgLnkEMail : "Adresse E-Mail", DlgLnkEMailSubject : "Sujet du message", DlgLnkEMailBody : "Corps du message", DlgLnkUpload : "Télécharger", DlgLnkBtnUpload : "Envoyer sur le serveur", DlgLnkTarget : "Destination", DlgLnkTargetFrame : "<Cadre>", DlgLnkTargetPopup : "<fenêtre popup>", DlgLnkTargetBlank : "Nouvelle fenêtre (_blank)", DlgLnkTargetParent : "Fenêtre mère (_parent)", DlgLnkTargetSelf : "Même fenêtre (_self)", DlgLnkTargetTop : "Fenêtre supérieure (_top)", DlgLnkTargetFrameName : "Nom du cadre de destination", DlgLnkPopWinName : "Nom de la fenêtre popup", DlgLnkPopWinFeat : "Caractéristiques de la fenêtre popup", DlgLnkPopResize : "Taille modifiable", DlgLnkPopLocation : "Barre d'adresses", DlgLnkPopMenu : "Barre de menu", DlgLnkPopScroll : "Barres de défilement", DlgLnkPopStatus : "Barre d'état", DlgLnkPopToolbar : "Barre d'outils", DlgLnkPopFullScrn : "Plein écran (IE)", DlgLnkPopDependent : "Dépendante (Netscape)", DlgLnkPopWidth : "Largeur", DlgLnkPopHeight : "Hauteur", DlgLnkPopLeft : "Position à partir de la gauche", DlgLnkPopTop : "Position à partir du haut", DlnLnkMsgNoUrl : "Veuillez saisir l'URL", DlnLnkMsgNoEMail : "Veuillez saisir l'adresse e-mail", DlnLnkMsgNoAnchor : "Veuillez sélectionner une ancre", DlnLnkMsgInvPopName : "Le nom de la fenêtre popup doit commencer par une lettre et ne doit pas contenir d'espace", // Color Dialog DlgColorTitle : "Sélectionner", DlgColorBtnClear : "Effacer", DlgColorHighlight : "Prévisualisation", DlgColorSelected : "Sélectionné", // Smiley Dialog DlgSmileyTitle : "Insérer un Smiley", // Special Character Dialog DlgSpecialCharTitle : "Insérer un caractère spécial", // Table Dialog DlgTableTitle : "Propriétés du tableau", DlgTableRows : "Lignes", DlgTableColumns : "Colonnes", DlgTableBorder : "Bordure", DlgTableAlign : "Alignement", DlgTableAlignNotSet : "<Par défaut>", DlgTableAlignLeft : "Gauche", DlgTableAlignCenter : "Centré", DlgTableAlignRight : "Droite", DlgTableWidth : "Largeur", DlgTableWidthPx : "pixels", DlgTableWidthPc : "pourcentage", DlgTableHeight : "Hauteur", DlgTableCellSpace : "Espacement", DlgTableCellPad : "Contour", DlgTableCaption : "Titre", DlgTableSummary : "Résumé", DlgTableHeaders : "Entêtes", DlgTableHeadersNone : "Sans", DlgTableHeadersColumn : "Première colonne", DlgTableHeadersRow : "Première Ligne", DlgTableHeadersBoth : "Les 2", // Table Cell Dialog DlgCellTitle : "Propriétés de la cellule", DlgCellWidth : "Largeur", DlgCellWidthPx : "pixels", DlgCellWidthPc : "pourcentage", DlgCellHeight : "Hauteur", DlgCellWordWrap : "Retour à la ligne", DlgCellWordWrapNotSet : "<Par défaut>", DlgCellWordWrapYes : "Oui", DlgCellWordWrapNo : "Non", DlgCellHorAlign : "Alignement horizontal", DlgCellHorAlignNotSet : "<Par défaut>", DlgCellHorAlignLeft : "Gauche", DlgCellHorAlignCenter : "Centré", DlgCellHorAlignRight: "Droite", DlgCellVerAlign : "Alignement vertical", DlgCellVerAlignNotSet : "<Par défaut>", DlgCellVerAlignTop : "Haut", DlgCellVerAlignMiddle : "Milieu", DlgCellVerAlignBottom : "Bas", DlgCellVerAlignBaseline : "Bas du texte", DlgCellType : "Type de Cellule", DlgCellTypeData : "Données", DlgCellTypeHeader : "Entête", DlgCellRowSpan : "Lignes fusionnées", DlgCellCollSpan : "Colonnes fusionnées", DlgCellBackColor : "Fond", DlgCellBorderColor : "Bordure", DlgCellBtnSelect : "Choisir...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Chercher et Remplacer", // Find Dialog DlgFindTitle : "Chercher", DlgFindFindBtn : "Chercher", DlgFindNotFoundMsg : "Le texte indiqué est introuvable.", // Replace Dialog DlgReplaceTitle : "Remplacer", DlgReplaceFindLbl : "Rechercher:", DlgReplaceReplaceLbl : "Remplacer par:", DlgReplaceCaseChk : "Respecter la casse", DlgReplaceReplaceBtn : "Remplacer", DlgReplaceReplAllBtn : "Tout remplacer", DlgReplaceWordChk : "Mot entier", // Paste Operations / Dialog PasteErrorCut : "Les paramètres de sécurité de votre navigateur empêchent l'éditeur de couper automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl+X).", PasteErrorCopy : "Les paramètres de sécurité de votre navigateur empêchent l'éditeur de copier automatiquement vos données. Veuillez utiliser les équivalents claviers (Ctrl+C).", PasteAsText : "Coller comme texte", PasteFromWord : "Coller à partir de Word", DlgPasteMsg2 : "Veuillez coller dans la zone ci-dessous en utilisant le clavier (<STRONG>Ctrl+V</STRONG>) et cliquez sur <STRONG>OK</STRONG>.", DlgPasteSec : "A cause des paramètres de sécurité de votre navigateur, l'éditeur ne peut accéder au presse-papier directement. Vous devez coller à nouveau le contenu dans cette fenêtre.", DlgPasteIgnoreFont : "Ignorer les polices de caractères", DlgPasteRemoveStyles : "Supprimer les styles", // Color Picker ColorAutomatic : "Automatique", ColorMoreColors : "Plus de couleurs...", // Document Properties DocProps : "Propriétés du document", // Anchor Dialog DlgAnchorTitle : "Propriétés de l'ancre", DlgAnchorName : "Nom de l'ancre", DlgAnchorErrorName : "Veuillez saisir le nom de l'ancre", // Speller Pages Dialog DlgSpellNotInDic : "Pas dans le dictionnaire", DlgSpellChangeTo : "Changer en", DlgSpellBtnIgnore : "Ignorer", DlgSpellBtnIgnoreAll : "Ignorer tout", DlgSpellBtnReplace : "Remplacer", DlgSpellBtnReplaceAll : "Remplacer tout", DlgSpellBtnUndo : "Annuler", DlgSpellNoSuggestions : "- Aucune suggestion -", DlgSpellProgress : "Vérification d'orthographe en cours...", DlgSpellNoMispell : "Vérification d'orthographe terminée: Aucune erreur trouvée", DlgSpellNoChanges : "Vérification d'orthographe terminée: Pas de modifications", DlgSpellOneChange : "Vérification d'orthographe terminée: Un mot modifié", DlgSpellManyChanges : "Vérification d'orthographe terminée: %1 mots modifiés", IeSpellDownload : "Le Correcteur n'est pas installé. Souhaitez-vous le télécharger maintenant?", // Button Dialog DlgButtonText : "Texte (valeur)", DlgButtonType : "Type", DlgButtonTypeBtn : "Bouton", DlgButtonTypeSbm : "Envoyer", DlgButtonTypeRst : "Réinitialiser", // Checkbox and Radio Button Dialogs DlgCheckboxName : "Nom", DlgCheckboxValue : "Valeur", DlgCheckboxSelected : "Sélectionné", // Form Dialog DlgFormName : "Nom", DlgFormAction : "Action", DlgFormMethod : "Méthode", // Select Field Dialog DlgSelectName : "Nom", DlgSelectValue : "Valeur", DlgSelectSize : "Taille", DlgSelectLines : "lignes", DlgSelectChkMulti : "Sélection multiple", DlgSelectOpAvail : "Options disponibles", DlgSelectOpText : "Texte", DlgSelectOpValue : "Valeur", DlgSelectBtnAdd : "Ajouter", DlgSelectBtnModify : "Modifier", DlgSelectBtnUp : "Monter", DlgSelectBtnDown : "Descendre", DlgSelectBtnSetValue : "Valeur sélectionnée", DlgSelectBtnDelete : "Supprimer", // Textarea Dialog DlgTextareaName : "Nom", DlgTextareaCols : "Colonnes", DlgTextareaRows : "Lignes", // Text Field Dialog DlgTextName : "Nom", DlgTextValue : "Valeur", DlgTextCharWidth : "Largeur en caractères", DlgTextMaxChars : "Nombre maximum de caractères", DlgTextType : "Type", DlgTextTypeText : "Texte", DlgTextTypePass : "Mot de passe", // Hidden Field Dialog DlgHiddenName : "Nom", DlgHiddenValue : "Valeur", // Bulleted List Dialog BulletedListProp : "Propriétés de liste à puces", NumberedListProp : "Propriétés de liste numérotée", DlgLstStart : "Début", DlgLstType : "Type", DlgLstTypeCircle : "Cercle", DlgLstTypeDisc : "Disque", DlgLstTypeSquare : "Carré", DlgLstTypeNumbers : "Nombres (1, 2, 3)", DlgLstTypeLCase : "Lettres minuscules (a, b, c)", DlgLstTypeUCase : "Lettres majuscules (A, B, C)", DlgLstTypeSRoman : "Chiffres romains minuscules (i, ii, iii)", DlgLstTypeLRoman : "Chiffres romains majuscules (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Général", DlgDocBackTab : "Fond", DlgDocColorsTab : "Couleurs et marges", DlgDocMetaTab : "Métadonnées", DlgDocPageTitle : "Titre de la page", DlgDocLangDir : "Sens d'écriture", DlgDocLangDirLTR : "De la gauche vers la droite (LTR)", DlgDocLangDirRTL : "De la droite vers la gauche (RTL)", DlgDocLangCode : "Code langue", DlgDocCharSet : "Encodage de caractère", DlgDocCharSetCE : "Europe Centrale", DlgDocCharSetCT : "Chinois Traditionnel (Big5)", DlgDocCharSetCR : "Cyrillique", DlgDocCharSetGR : "Grec", DlgDocCharSetJP : "Japonais", DlgDocCharSetKR : "Coréen", DlgDocCharSetTR : "Turc", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Occidental", DlgDocCharSetOther : "Autre encodage de caractère", DlgDocDocType : "Type de document", DlgDocDocTypeOther : "Autre type de document", DlgDocIncXHTML : "Inclure les déclarations XHTML", DlgDocBgColor : "Couleur de fond", DlgDocBgImage : "Image de fond", DlgDocBgNoScroll : "Image fixe sans défilement", DlgDocCText : "Texte", DlgDocCLink : "Lien", DlgDocCVisited : "Lien visité", DlgDocCActive : "Lien activé", DlgDocMargins : "Marges", DlgDocMaTop : "Haut", DlgDocMaLeft : "Gauche", DlgDocMaRight : "Droite", DlgDocMaBottom : "Bas", DlgDocMeIndex : "Mots-clés (séparés par des virgules)", DlgDocMeDescr : "Description", DlgDocMeAuthor : "Auteur", DlgDocMeCopy : "Copyright", DlgDocPreview : "Prévisualisation", // Templates Dialog Templates : "Modèles", DlgTemplatesTitle : "Modèles de contenu", DlgTemplatesSelMsg : "Veuillez sélectionner le modèle à ouvrir dans l'éditeur<br>(le contenu actuel sera remplacé):", DlgTemplatesLoading : "Chargement de la liste des modèles. Veuillez patienter...", DlgTemplatesNoTpl : "(Aucun modèle disponible)", DlgTemplatesReplace : "Remplacer tout le contenu", // About Dialog DlgAboutAboutTab : "A propos de", DlgAboutBrowserInfoTab : "Navigateur", DlgAboutLicenseTab : "Licence", DlgAboutVersion : "Version", DlgAboutInfo : "Pour plus d'informations, aller à", // Div Dialog DlgDivGeneralTab : "Général", DlgDivAdvancedTab : "Avancé", DlgDivStyle : "Style", DlgDivInlineStyle : "Attribut Style" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Chinese Simplified language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "折叠工具栏", ToolbarExpand : "展开工具栏", // Toolbar Items and Context Menu Save : "保存", NewPage : "新建", Preview : "预览", Cut : "剪切", Copy : "复制", Paste : "粘贴", PasteText : "粘贴为无格式文本", PasteWord : "从 MS Word 粘贴", Print : "打印", SelectAll : "全选", RemoveFormat : "清除格式", InsertLinkLbl : "超链接", InsertLink : "插入/编辑超链接", RemoveLink : "取消超链接", VisitLink : "打开超链接", Anchor : "插入/编辑锚点链接", AnchorDelete : "清除锚点链接", InsertImageLbl : "图象", InsertImage : "插入/编辑图象", InsertFlashLbl : "Flash", InsertFlash : "插入/编辑 Flash", InsertTableLbl : "表格", InsertTable : "插入/编辑表格", InsertLineLbl : "水平线", InsertLine : "插入水平线", InsertSpecialCharLbl: "特殊符号", InsertSpecialChar : "插入特殊符号", InsertSmileyLbl : "表情符", InsertSmiley : "插入表情图标", About : "关于 FCKeditor", Bold : "加粗", Italic : "倾斜", Underline : "下划线", StrikeThrough : "删除线", Subscript : "下标", Superscript : "上标", LeftJustify : "左对齐", CenterJustify : "居中对齐", RightJustify : "右对齐", BlockJustify : "两端对齐", DecreaseIndent : "减少缩进量", IncreaseIndent : "增加缩进量", Blockquote : "块引用", CreateDiv : "插入 Div 标签", EditDiv : "编辑 Div 标签", DeleteDiv : "删除 Div 标签", Undo : "撤消", Redo : "重做", NumberedListLbl : "编号列表", NumberedList : "插入/删除编号列表", BulletedListLbl : "项目列表", BulletedList : "插入/删除项目列表", ShowTableBorders : "显示表格边框", ShowDetails : "显示详细资料", Style : "样式", FontFormat : "格式", Font : "字体", FontSize : "大小", TextColor : "文本颜色", BGColor : "背景颜色", Source : "源代码", Find : "查找", Replace : "替换", SpellCheck : "拼写检查", UniversalKeyboard : "软键盘", PageBreakLbl : "分页符", PageBreak : "插入分页符", Form : "表单", Checkbox : "复选框", RadioButton : "单选按钮", TextField : "单行文本", Textarea : "多行文本", HiddenField : "隐藏域", Button : "按钮", SelectionField : "列表/菜单", ImageButton : "图像域", FitWindow : "全屏编辑", ShowBlocks : "显示区块", // Context Menu EditLink : "编辑超链接", CellCM : "单元格", RowCM : "行", ColumnCM : "列", InsertRowAfter : "在下方插入行", InsertRowBefore : "在上方插入行", DeleteRows : "删除行", InsertColumnAfter : "在右侧插入列", InsertColumnBefore : "在左侧插入列", DeleteColumns : "删除列", InsertCellAfter : "在右侧插入单元格", InsertCellBefore : "在左侧插入单元格", DeleteCells : "删除单元格", MergeCells : "合并单元格", MergeRight : "向右合并单元格", MergeDown : "向下合并单元格", HorizontalSplitCell : "水平拆分单元格", VerticalSplitCell : "垂直拆分单元格", TableDelete : "删除表格", CellProperties : "单元格属性", TableProperties : "表格属性", ImageProperties : "图象属性", FlashProperties : "Flash 属性", AnchorProp : "锚点链接属性", ButtonProp : "按钮属性", CheckboxProp : "复选框属性", HiddenFieldProp : "隐藏域属性", RadioButtonProp : "单选按钮属性", ImageButtonProp : "图像域属性", TextFieldProp : "单行文本属性", SelectionFieldProp : "菜单/列表属性", TextareaProp : "多行文本属性", FormProp : "表单属性", FontFormats : "普通;已编排格式;地址;标题 1;标题 2;标题 3;标题 4;标题 5;标题 6;段落(DIV)", // Alerts and Messages ProcessingXHTML : "正在处理 XHTML,请稍等...", Done : "完成", PasteWordConfirm : "您要粘贴的内容好像是来自 MS Word,是否要清除 MS Word 格式后再粘贴?", NotCompatiblePaste : "该命令需要 Internet Explorer 5.5 或更高版本的支持,是否按常规粘贴进行?", UnknownToolbarItem : "未知工具栏项目 \"%1\"", UnknownCommand : "未知命令名称 \"%1\"", NotImplemented : "命令无法执行", UnknownToolbarSet : "工具栏设置 \"%1\" 不存在", NoActiveX : "浏览器安全设置限制了本编辑器的某些功能。您必须启用安全设置中的“运行 ActiveX 控件和插件”,否则将出现某些错误并缺少功能。", BrowseServerBlocked : "无法打开资源浏览器,请确认是否启用了禁止弹出窗口。", DialogBlocked : "无法打开对话框窗口,请确认是否启用了禁止弹出窗口或网页对话框(IE)。", VisitLinkBlocked : "无法打开新窗口,请确认是否启用了禁止弹出窗口或网页对话框(IE)。", // Dialogs DlgBtnOK : "确定", DlgBtnCancel : "取消", DlgBtnClose : "关闭", DlgBtnBrowseServer : "浏览服务器", DlgAdvancedTag : "高级", DlgOpOther : "<其它>", DlgInfoTab : "信息", DlgAlertUrl : "请插入 URL", // General Dialogs Labels DlgGenNotSet : "<没有设置>", DlgGenId : "ID", DlgGenLangDir : "语言方向", DlgGenLangDirLtr : "从左到右 (LTR)", DlgGenLangDirRtl : "从右到左 (RTL)", DlgGenLangCode : "语言代码", DlgGenAccessKey : "访问键", DlgGenName : "名称", DlgGenTabIndex : "Tab 键次序", DlgGenLongDescr : "详细说明地址", DlgGenClass : "样式类名称", DlgGenTitle : "标题", DlgGenContType : "内容类型", DlgGenLinkCharset : "字符编码", DlgGenStyle : "行内样式", // Image Dialog DlgImgTitle : "图象属性", DlgImgInfoTab : "图象", DlgImgBtnUpload : "发送到服务器上", DlgImgURL : "源文件", DlgImgUpload : "上传", DlgImgAlt : "替换文本", DlgImgWidth : "宽度", DlgImgHeight : "高度", DlgImgLockRatio : "锁定比例", DlgBtnResetSize : "恢复尺寸", DlgImgBorder : "边框大小", DlgImgHSpace : "水平间距", DlgImgVSpace : "垂直间距", DlgImgAlign : "对齐方式", DlgImgAlignLeft : "左对齐", DlgImgAlignAbsBottom: "绝对底边", DlgImgAlignAbsMiddle: "绝对居中", DlgImgAlignBaseline : "基线", DlgImgAlignBottom : "底边", DlgImgAlignMiddle : "居中", DlgImgAlignRight : "右对齐", DlgImgAlignTextTop : "文本上方", DlgImgAlignTop : "顶端", DlgImgPreview : "预览", DlgImgAlertUrl : "请输入图象地址", DlgImgLinkTab : "链接", // Flash Dialog DlgFlashTitle : "Flash 属性", DlgFlashChkPlay : "自动播放", DlgFlashChkLoop : "循环", DlgFlashChkMenu : "启用 Flash 菜单", DlgFlashScale : "缩放", DlgFlashScaleAll : "全部显示", DlgFlashScaleNoBorder : "无边框", DlgFlashScaleFit : "严格匹配", // Link Dialog DlgLnkWindowTitle : "超链接", DlgLnkInfoTab : "超链接信息", DlgLnkTargetTab : "目标", DlgLnkType : "超链接类型", DlgLnkTypeURL : "超链接", DlgLnkTypeAnchor : "页内锚点链接", DlgLnkTypeEMail : "电子邮件", DlgLnkProto : "协议", DlgLnkProtoOther : "<其它>", DlgLnkURL : "地址", DlgLnkAnchorSel : "选择一个锚点", DlgLnkAnchorByName : "按锚点名称", DlgLnkAnchorById : "按锚点 ID", DlgLnkNoAnchors : "(此文档没有可用的锚点)", DlgLnkEMail : "地址", DlgLnkEMailSubject : "主题", DlgLnkEMailBody : "内容", DlgLnkUpload : "上传", DlgLnkBtnUpload : "发送到服务器上", DlgLnkTarget : "目标", DlgLnkTargetFrame : "<框架>", DlgLnkTargetPopup : "<弹出窗口>", DlgLnkTargetBlank : "新窗口 (_blank)", DlgLnkTargetParent : "父窗口 (_parent)", DlgLnkTargetSelf : "本窗口 (_self)", DlgLnkTargetTop : "整页 (_top)", DlgLnkTargetFrameName : "目标框架名称", DlgLnkPopWinName : "弹出窗口名称", DlgLnkPopWinFeat : "弹出窗口属性", DlgLnkPopResize : "调整大小", DlgLnkPopLocation : "地址栏", DlgLnkPopMenu : "菜单栏", DlgLnkPopScroll : "滚动条", DlgLnkPopStatus : "状态栏", DlgLnkPopToolbar : "工具栏", DlgLnkPopFullScrn : "全屏 (IE)", DlgLnkPopDependent : "依附 (NS)", DlgLnkPopWidth : "宽", DlgLnkPopHeight : "高", DlgLnkPopLeft : "左", DlgLnkPopTop : "右", DlnLnkMsgNoUrl : "请输入超链接地址", DlnLnkMsgNoEMail : "请输入电子邮件地址", DlnLnkMsgNoAnchor : "请选择一个锚点", DlnLnkMsgInvPopName : "弹出窗口名称必须以字母开头,并且不能含有空格。", // Color Dialog DlgColorTitle : "选择颜色", DlgColorBtnClear : "清除", DlgColorHighlight : "预览", DlgColorSelected : "选择", // Smiley Dialog DlgSmileyTitle : "插入表情图标", // Special Character Dialog DlgSpecialCharTitle : "选择特殊符号", // Table Dialog DlgTableTitle : "表格属性", DlgTableRows : "行数", DlgTableColumns : "列数", DlgTableBorder : "边框", DlgTableAlign : "对齐", DlgTableAlignNotSet : "<没有设置>", DlgTableAlignLeft : "左对齐", DlgTableAlignCenter : "居中", DlgTableAlignRight : "右对齐", DlgTableWidth : "宽度", DlgTableWidthPx : "像素", DlgTableWidthPc : "百分比", DlgTableHeight : "高度", DlgTableCellSpace : "间距", DlgTableCellPad : "边距", DlgTableCaption : "标题", DlgTableSummary : "摘要", DlgTableHeaders : "标题单元格", DlgTableHeadersNone : "无", DlgTableHeadersColumn : "第一列", DlgTableHeadersRow : "第一行", DlgTableHeadersBoth : "第一列和第一行", // Table Cell Dialog DlgCellTitle : "单元格属性", DlgCellWidth : "宽度", DlgCellWidthPx : "像素", DlgCellWidthPc : "百分比", DlgCellHeight : "高度", DlgCellWordWrap : "自动换行", DlgCellWordWrapNotSet : "<没有设置>", DlgCellWordWrapYes : "是", DlgCellWordWrapNo : "否", DlgCellHorAlign : "水平对齐", DlgCellHorAlignNotSet : "<没有设置>", DlgCellHorAlignLeft : "左对齐", DlgCellHorAlignCenter : "居中", DlgCellHorAlignRight: "右对齐", DlgCellVerAlign : "垂直对齐", DlgCellVerAlignNotSet : "<没有设置>", DlgCellVerAlignTop : "顶端", DlgCellVerAlignMiddle : "居中", DlgCellVerAlignBottom : "底部", DlgCellVerAlignBaseline : "基线", DlgCellType : "单元格类型", DlgCellTypeData : "资料", DlgCellTypeHeader : "标题", DlgCellRowSpan : "纵跨行数", DlgCellCollSpan : "横跨列数", DlgCellBackColor : "背景颜色", DlgCellBorderColor : "边框颜色", DlgCellBtnSelect : "选择...", // Find and Replace Dialog DlgFindAndReplaceTitle : "查找和替换", // Find Dialog DlgFindTitle : "查找", DlgFindFindBtn : "查找", DlgFindNotFoundMsg : "指定文本没有找到。", // Replace Dialog DlgReplaceTitle : "替换", DlgReplaceFindLbl : "查找:", DlgReplaceReplaceLbl : "替换:", DlgReplaceCaseChk : "区分大小写", DlgReplaceReplaceBtn : "替换", DlgReplaceReplAllBtn : "全部替换", DlgReplaceWordChk : "全字匹配", // Paste Operations / Dialog PasteErrorCut : "您的浏览器安全设置不允许编辑器自动执行剪切操作,请使用键盘快捷键(Ctrl+X)来完成。", PasteErrorCopy : "您的浏览器安全设置不允许编辑器自动执行复制操作,请使用键盘快捷键(Ctrl+C)来完成。", PasteAsText : "粘贴为无格式文本", PasteFromWord : "从 MS Word 粘贴", DlgPasteMsg2 : "请使用键盘快捷键(<STRONG>Ctrl+V</STRONG>)把内容粘贴到下面的方框里,再按 <STRONG>确定</STRONG>。", DlgPasteSec : "因为你的浏览器的安全设置原因,本编辑器不能直接访问你的剪贴板内容,你需要在本窗口重新粘贴一次。", DlgPasteIgnoreFont : "忽略 Font 标签", DlgPasteRemoveStyles : "清理 CSS 样式", // Color Picker ColorAutomatic : "自动", ColorMoreColors : "其它颜色...", // Document Properties DocProps : "页面属性", // Anchor Dialog DlgAnchorTitle : "命名锚点", DlgAnchorName : "锚点名称", DlgAnchorErrorName : "请输入锚点名称", // Speller Pages Dialog DlgSpellNotInDic : "没有在字典里", DlgSpellChangeTo : "更改为", DlgSpellBtnIgnore : "忽略", DlgSpellBtnIgnoreAll : "全部忽略", DlgSpellBtnReplace : "替换", DlgSpellBtnReplaceAll : "全部替换", DlgSpellBtnUndo : "撤消", DlgSpellNoSuggestions : "- 没有建议 -", DlgSpellProgress : "正在进行拼写检查...", DlgSpellNoMispell : "拼写检查完成:没有发现拼写错误", DlgSpellNoChanges : "拼写检查完成:没有更改任何单词", DlgSpellOneChange : "拼写检查完成:更改了一个单词", DlgSpellManyChanges : "拼写检查完成:更改了 %1 个单词", IeSpellDownload : "拼写检查插件还没安装,你是否想现在就下载?", // Button Dialog DlgButtonText : "标签(值)", DlgButtonType : "类型", DlgButtonTypeBtn : "按钮", DlgButtonTypeSbm : "提交", DlgButtonTypeRst : "重设", // Checkbox and Radio Button Dialogs DlgCheckboxName : "名称", DlgCheckboxValue : "选定值", DlgCheckboxSelected : "已勾选", // Form Dialog DlgFormName : "名称", DlgFormAction : "动作", DlgFormMethod : "方法", // Select Field Dialog DlgSelectName : "名称", DlgSelectValue : "选定", DlgSelectSize : "高度", DlgSelectLines : "行", DlgSelectChkMulti : "允许多选", DlgSelectOpAvail : "列表值", DlgSelectOpText : "标签", DlgSelectOpValue : "值", DlgSelectBtnAdd : "新增", DlgSelectBtnModify : "修改", DlgSelectBtnUp : "上移", DlgSelectBtnDown : "下移", DlgSelectBtnSetValue : "设为初始化时选定", DlgSelectBtnDelete : "删除", // Textarea Dialog DlgTextareaName : "名称", DlgTextareaCols : "字符宽度", DlgTextareaRows : "行数", // Text Field Dialog DlgTextName : "名称", DlgTextValue : "初始值", DlgTextCharWidth : "字符宽度", DlgTextMaxChars : "最多字符数", DlgTextType : "类型", DlgTextTypeText : "文本", DlgTextTypePass : "密码", // Hidden Field Dialog DlgHiddenName : "名称", DlgHiddenValue : "初始值", // Bulleted List Dialog BulletedListProp : "项目列表属性", NumberedListProp : "编号列表属性", DlgLstStart : "开始序号", DlgLstType : "列表类型", DlgLstTypeCircle : "圆圈", DlgLstTypeDisc : "圆点", DlgLstTypeSquare : "方块", DlgLstTypeNumbers : "数字 (1, 2, 3)", DlgLstTypeLCase : "小写字母 (a, b, c)", DlgLstTypeUCase : "大写字母 (A, B, C)", DlgLstTypeSRoman : "小写罗马数字 (i, ii, iii)", DlgLstTypeLRoman : "大写罗马数字 (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "常规", DlgDocBackTab : "背景", DlgDocColorsTab : "颜色和边距", DlgDocMetaTab : "Meta 数据", DlgDocPageTitle : "页面标题", DlgDocLangDir : "语言方向", DlgDocLangDirLTR : "从左到右 (LTR)", DlgDocLangDirRTL : "从右到左 (RTL)", DlgDocLangCode : "语言代码", DlgDocCharSet : "字符编码", DlgDocCharSetCE : "中欧", DlgDocCharSetCT : "繁体中文 (Big5)", DlgDocCharSetCR : "西里尔文", DlgDocCharSetGR : "希腊文", DlgDocCharSetJP : "日文", DlgDocCharSetKR : "韩文", DlgDocCharSetTR : "土耳其文", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "西欧", DlgDocCharSetOther : "其它字符编码", DlgDocDocType : "文档类型", DlgDocDocTypeOther : "其它文档类型", DlgDocIncXHTML : "包含 XHTML 声明", DlgDocBgColor : "背景颜色", DlgDocBgImage : "背景图像", DlgDocBgNoScroll : "不滚动背景图像", DlgDocCText : "文本", DlgDocCLink : "超链接", DlgDocCVisited : "已访问的超链接", DlgDocCActive : "活动超链接", DlgDocMargins : "页面边距", DlgDocMaTop : "上", DlgDocMaLeft : "左", DlgDocMaRight : "右", DlgDocMaBottom : "下", DlgDocMeIndex : "页面索引关键字 (用半角逗号[,]分隔)", DlgDocMeDescr : "页面说明", DlgDocMeAuthor : "作者", DlgDocMeCopy : "版权", DlgDocPreview : "预览", // Templates Dialog Templates : "模板", DlgTemplatesTitle : "内容模板", DlgTemplatesSelMsg : "请选择编辑器内容模板:", DlgTemplatesLoading : "正在加载模板列表,请稍等...", DlgTemplatesNoTpl : "(没有模板)", DlgTemplatesReplace : "替换当前内容", // About Dialog DlgAboutAboutTab : "关于", DlgAboutBrowserInfoTab : "浏览器信息", DlgAboutLicenseTab : "许可证", DlgAboutVersion : "版本", DlgAboutInfo : "要获得更多信息请访问 ", // Div Dialog DlgDivGeneralTab : "常规", DlgDivAdvancedTab : "高级", DlgDivStyle : "样式", DlgDivInlineStyle : "CSS 样式" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Japanese language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "ツールバーを隠す", ToolbarExpand : "ツールバーを表示", // Toolbar Items and Context Menu Save : "保存", NewPage : "新しいページ", Preview : "プレビュー", Cut : "切り取り", Copy : "コピー", Paste : "貼り付け", PasteText : "プレーンテキスト貼り付け", PasteWord : "ワード文章から貼り付け", Print : "印刷", SelectAll : "すべて選択", RemoveFormat : "フォーマット削除", InsertLinkLbl : "リンク", InsertLink : "リンク挿入/編集", RemoveLink : "リンク削除", VisitLink : "リンクを開く", Anchor : "アンカー挿入/編集", AnchorDelete : "アンカー削除", InsertImageLbl : "イメージ", InsertImage : "イメージ挿入/編集", InsertFlashLbl : "Flash", InsertFlash : "Flash挿入/編集", InsertTableLbl : "テーブル", InsertTable : "テーブル挿入/編集", InsertLineLbl : "ライン", InsertLine : "横罫線", InsertSpecialCharLbl: "特殊文字", InsertSpecialChar : "特殊文字挿入", InsertSmileyLbl : "絵文字", InsertSmiley : "絵文字挿入", About : "FCKeditorヘルプ", Bold : "太字", Italic : "斜体", Underline : "下線", StrikeThrough : "打ち消し線", Subscript : "添え字", Superscript : "上付き文字", LeftJustify : "左揃え", CenterJustify : "中央揃え", RightJustify : "右揃え", BlockJustify : "両端揃え", DecreaseIndent : "インデント解除", IncreaseIndent : "インデント", Blockquote : "ブロック引用", CreateDiv : "Div 作成", EditDiv : "Div 編集", DeleteDiv : "Div 削除", Undo : "元に戻す", Redo : "やり直し", NumberedListLbl : "段落番号", NumberedList : "段落番号の追加/削除", BulletedListLbl : "箇条書き", BulletedList : "箇条書きの追加/削除", ShowTableBorders : "テーブルボーダー表示", ShowDetails : "詳細表示", Style : "スタイル", FontFormat : "フォーマット", Font : "フォント", FontSize : "サイズ", TextColor : "テキスト色", BGColor : "背景色", Source : "ソース", Find : "検索", Replace : "置き換え", SpellCheck : "スペルチェック", UniversalKeyboard : "ユニバーサル・キーボード", PageBreakLbl : "改ページ", PageBreak : "改ページ挿入", Form : "フォーム", Checkbox : "チェックボックス", RadioButton : "ラジオボタン", TextField : "1行テキスト", Textarea : "テキストエリア", HiddenField : "不可視フィールド", Button : "ボタン", SelectionField : "選択フィールド", ImageButton : "画像ボタン", FitWindow : "エディタサイズを最大にします", ShowBlocks : "ブロック表示", // Context Menu EditLink : "リンク編集", CellCM : "セル", RowCM : "行", ColumnCM : "カラム", InsertRowAfter : "列の後に挿入", InsertRowBefore : "列の前に挿入", DeleteRows : "行削除", InsertColumnAfter : "カラムの後に挿入", InsertColumnBefore : "カラムの前に挿入", DeleteColumns : "列削除", InsertCellAfter : "セルの後に挿入", InsertCellBefore : "セルの前に挿入", DeleteCells : "セル削除", MergeCells : "セル結合", MergeRight : "右に結合", MergeDown : "下に結合", HorizontalSplitCell : "セルを水平方向分割", VerticalSplitCell : "セルを垂直方向に分割", TableDelete : "テーブル削除", CellProperties : "セル プロパティ", TableProperties : "テーブル プロパティ", ImageProperties : "イメージ プロパティ", FlashProperties : "Flash プロパティ", AnchorProp : "アンカー プロパティ", ButtonProp : "ボタン プロパティ", CheckboxProp : "チェックボックス プロパティ", HiddenFieldProp : "不可視フィールド プロパティ", RadioButtonProp : "ラジオボタン プロパティ", ImageButtonProp : "画像ボタン プロパティ", TextFieldProp : "1行テキスト プロパティ", SelectionFieldProp : "選択フィールド プロパティ", TextareaProp : "テキストエリア プロパティ", FormProp : "フォーム プロパティ", FontFormats : "標準;書式付き;アドレス;見出し 1;見出し 2;見出し 3;見出し 4;見出し 5;見出し 6;標準 (DIV)", // Alerts and Messages ProcessingXHTML : "XHTML処理中. しばらくお待ちください...", Done : "完了", PasteWordConfirm : "貼り付けを行うテキストは、ワード文章からコピーされようとしています。貼り付ける前にクリーニングを行いますか?", NotCompatiblePaste : "このコマンドはインターネット・エクスプローラーバージョン5.5以上で利用可能です。クリーニングしないで貼り付けを行いますか?", UnknownToolbarItem : "未知のツールバー項目 \"%1\"", UnknownCommand : "未知のコマンド名 \"%1\"", NotImplemented : "コマンドはインプリメントされませんでした。", UnknownToolbarSet : "ツールバー設定 \"%1\" 存在しません。", NoActiveX : "エラー、警告メッセージなどが発生した場合、ブラウザーのセキュリティ設定によりエディタのいくつかの機能が制限されている可能性があります。セキュリティ設定のオプションで\"ActiveXコントロールとプラグインの実行\"を有効にするにしてください。", BrowseServerBlocked : "サーバーブラウザーを開くことができませんでした。ポップアップ・ブロック機能が無効になっているか確認してください。", DialogBlocked : "ダイアログウィンドウを開くことができませんでした。ポップアップ・ブロック機能が無効になっているか確認してください。", VisitLinkBlocked : "新しいウィンドウを開くことができませんでした。ポップアップ・ブロック機能が無効になっているか確認してください。", // Dialogs DlgBtnOK : "OK", DlgBtnCancel : "キャンセル", DlgBtnClose : "閉じる", DlgBtnBrowseServer : "サーバーブラウザー", DlgAdvancedTag : "高度な設定", DlgOpOther : "<その他>", DlgInfoTab : "情報", DlgAlertUrl : "URLを挿入してください", // General Dialogs Labels DlgGenNotSet : "<なし>", DlgGenId : "Id", DlgGenLangDir : "文字表記の方向", DlgGenLangDirLtr : "左から右 (LTR)", DlgGenLangDirRtl : "右から左 (RTL)", DlgGenLangCode : "言語コード", DlgGenAccessKey : "アクセスキー", DlgGenName : "Name属性", DlgGenTabIndex : "タブインデックス", DlgGenLongDescr : "longdesc属性(長文説明)", DlgGenClass : "スタイルシートクラス", DlgGenTitle : "Title属性", DlgGenContType : "Content Type属性", DlgGenLinkCharset : "リンクcharset属性", DlgGenStyle : "スタイルシート", // Image Dialog DlgImgTitle : "イメージ プロパティ", DlgImgInfoTab : "イメージ 情報", DlgImgBtnUpload : "サーバーに送信", DlgImgURL : "URL", DlgImgUpload : "アップロード", DlgImgAlt : "代替テキスト", DlgImgWidth : "幅", DlgImgHeight : "高さ", DlgImgLockRatio : "ロック比率", DlgBtnResetSize : "サイズリセット", DlgImgBorder : "ボーダー", DlgImgHSpace : "横間隔", DlgImgVSpace : "縦間隔", DlgImgAlign : "行揃え", DlgImgAlignLeft : "左", DlgImgAlignAbsBottom: "下部(絶対的)", DlgImgAlignAbsMiddle: "中央(絶対的)", DlgImgAlignBaseline : "ベースライン", DlgImgAlignBottom : "下", DlgImgAlignMiddle : "中央", DlgImgAlignRight : "右", DlgImgAlignTextTop : "テキスト上部", DlgImgAlignTop : "上", DlgImgPreview : "プレビュー", DlgImgAlertUrl : "イメージのURLを入力してください。", DlgImgLinkTab : "リンク", // Flash Dialog DlgFlashTitle : "Flash プロパティ", DlgFlashChkPlay : "再生", DlgFlashChkLoop : "ループ再生", DlgFlashChkMenu : "Flashメニュー可能", DlgFlashScale : "拡大縮小設定", DlgFlashScaleAll : "すべて表示", DlgFlashScaleNoBorder : "外が見えない様に拡大", DlgFlashScaleFit : "上下左右にフィット", // Link Dialog DlgLnkWindowTitle : "ハイパーリンク", DlgLnkInfoTab : "ハイパーリンク 情報", DlgLnkTargetTab : "ターゲット", DlgLnkType : "リンクタイプ", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "このページのアンカー", DlgLnkTypeEMail : "E-Mail", DlgLnkProto : "プロトコル", DlgLnkProtoOther : "<その他>", DlgLnkURL : "URL", DlgLnkAnchorSel : "アンカーを選択", DlgLnkAnchorByName : "アンカー名", DlgLnkAnchorById : "エレメントID", DlgLnkNoAnchors : "(ドキュメントにおいて利用可能なアンカーはありません。)", DlgLnkEMail : "E-Mail アドレス", DlgLnkEMailSubject : "件名", DlgLnkEMailBody : "本文", DlgLnkUpload : "アップロード", DlgLnkBtnUpload : "サーバーに送信", DlgLnkTarget : "ターゲット", DlgLnkTargetFrame : "<フレーム>", DlgLnkTargetPopup : "<ポップアップウィンドウ>", DlgLnkTargetBlank : "新しいウィンドウ (_blank)", DlgLnkTargetParent : "親ウィンドウ (_parent)", DlgLnkTargetSelf : "同じウィンドウ (_self)", DlgLnkTargetTop : "最上位ウィンドウ (_top)", DlgLnkTargetFrameName : "目的のフレーム名", DlgLnkPopWinName : "ポップアップウィンドウ名", DlgLnkPopWinFeat : "ポップアップウィンドウ特徴", DlgLnkPopResize : "リサイズ可能", DlgLnkPopLocation : "ロケーションバー", DlgLnkPopMenu : "メニューバー", DlgLnkPopScroll : "スクロールバー", DlgLnkPopStatus : "ステータスバー", DlgLnkPopToolbar : "ツールバー", DlgLnkPopFullScrn : "全画面モード(IE)", DlgLnkPopDependent : "開いたウィンドウに連動して閉じる (Netscape)", DlgLnkPopWidth : "幅", DlgLnkPopHeight : "高さ", DlgLnkPopLeft : "左端からの座標で指定", DlgLnkPopTop : "上端からの座標で指定", DlnLnkMsgNoUrl : "リンクURLを入力してください。", DlnLnkMsgNoEMail : "メールアドレスを入力してください。", DlnLnkMsgNoAnchor : "アンカーを選択してください。", DlnLnkMsgInvPopName : "ポップ・アップ名は英字で始まる文字で指定してくだい。ポップ・アップ名にスペースは含めません", // Color Dialog DlgColorTitle : "色選択", DlgColorBtnClear : "クリア", DlgColorHighlight : "ハイライト", DlgColorSelected : "選択色", // Smiley Dialog DlgSmileyTitle : "顔文字挿入", // Special Character Dialog DlgSpecialCharTitle : "特殊文字選択", // Table Dialog DlgTableTitle : "テーブル プロパティ", DlgTableRows : "行", DlgTableColumns : "列", DlgTableBorder : "ボーダーサイズ", DlgTableAlign : "キャプションの整列", DlgTableAlignNotSet : "<なし>", DlgTableAlignLeft : "左", DlgTableAlignCenter : "中央", DlgTableAlignRight : "右", DlgTableWidth : "テーブル幅", DlgTableWidthPx : "ピクセル", DlgTableWidthPc : "パーセント", DlgTableHeight : "テーブル高さ", DlgTableCellSpace : "セル内余白", DlgTableCellPad : "セル内間隔", DlgTableCaption : "キャプション", DlgTableSummary : "テーブル目的/構造", DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "セル プロパティ", DlgCellWidth : "幅", DlgCellWidthPx : "ピクセル", DlgCellWidthPc : "パーセント", DlgCellHeight : "高さ", DlgCellWordWrap : "折り返し", DlgCellWordWrapNotSet : "<なし>", DlgCellWordWrapYes : "Yes", DlgCellWordWrapNo : "No", DlgCellHorAlign : "セル横の整列", DlgCellHorAlignNotSet : "<なし>", DlgCellHorAlignLeft : "左", DlgCellHorAlignCenter : "中央", DlgCellHorAlignRight: "右", DlgCellVerAlign : "セル縦の整列", DlgCellVerAlignNotSet : "<なし>", DlgCellVerAlignTop : "上", DlgCellVerAlignMiddle : "中央", DlgCellVerAlignBottom : "下", DlgCellVerAlignBaseline : "ベースライン", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "縦幅(行数)", DlgCellCollSpan : "横幅(列数)", DlgCellBackColor : "背景色", DlgCellBorderColor : "ボーダーカラー", DlgCellBtnSelect : "選択...", // Find and Replace Dialog DlgFindAndReplaceTitle : "検索して置換", // Find Dialog DlgFindTitle : "検索", DlgFindFindBtn : "検索", DlgFindNotFoundMsg : "指定された文字列は見つかりませんでした。", // Replace Dialog DlgReplaceTitle : "置き換え", DlgReplaceFindLbl : "検索する文字列:", DlgReplaceReplaceLbl : "置換えする文字列:", DlgReplaceCaseChk : "部分一致", DlgReplaceReplaceBtn : "置換え", DlgReplaceReplAllBtn : "すべて置換え", DlgReplaceWordChk : "単語単位で一致", // Paste Operations / Dialog PasteErrorCut : "ブラウザーのセキュリティ設定によりエディタの切り取り操作が自動で実行することができません。実行するには手動でキーボードの(Ctrl+X)を使用してください。", PasteErrorCopy : "ブラウザーのセキュリティ設定によりエディタのコピー操作が自動で実行することができません。実行するには手動でキーボードの(Ctrl+C)を使用してください。", PasteAsText : "プレーンテキスト貼り付け", PasteFromWord : "ワード文章から貼り付け", DlgPasteMsg2 : "キーボード(<STRONG>Ctrl+V</STRONG>)を使用して、次の入力エリア内で貼って、<STRONG>OK</STRONG>を押してください。", DlgPasteSec : "ブラウザのセキュリティ設定により、エディタはクリップボード・データに直接アクセスすることができません。このウィンドウは貼り付け操作を行う度に表示されます。", DlgPasteIgnoreFont : "FontタグのFace属性を無視します。", DlgPasteRemoveStyles : "スタイル定義を削除します。", // Color Picker ColorAutomatic : "自動", ColorMoreColors : "その他の色...", // Document Properties DocProps : "文書 プロパティ", // Anchor Dialog DlgAnchorTitle : "アンカー プロパティ", DlgAnchorName : "アンカー名", DlgAnchorErrorName : "アンカー名を必ず入力してください。", // Speller Pages Dialog DlgSpellNotInDic : "辞書にありません", DlgSpellChangeTo : "変更", DlgSpellBtnIgnore : "無視", DlgSpellBtnIgnoreAll : "すべて無視", DlgSpellBtnReplace : "置換", DlgSpellBtnReplaceAll : "すべて置換", DlgSpellBtnUndo : "やり直し", DlgSpellNoSuggestions : "- 該当なし -", DlgSpellProgress : "スペルチェック処理中...", DlgSpellNoMispell : "スペルチェック完了: スペルの誤りはありませんでした", DlgSpellNoChanges : "スペルチェック完了: 語句は変更されませんでした", DlgSpellOneChange : "スペルチェック完了: 1語句変更されました", DlgSpellManyChanges : "スペルチェック完了: %1 語句変更されました", IeSpellDownload : "スペルチェッカーがインストールされていません。今すぐダウンロードしますか?", // Button Dialog DlgButtonText : "テキスト (値)", DlgButtonType : "タイプ", DlgButtonTypeBtn : "ボタン", DlgButtonTypeSbm : "送信", DlgButtonTypeRst : "リセット", // Checkbox and Radio Button Dialogs DlgCheckboxName : "名前", DlgCheckboxValue : "値", DlgCheckboxSelected : "選択済み", // Form Dialog DlgFormName : "フォーム名", DlgFormAction : "アクション", DlgFormMethod : "メソッド", // Select Field Dialog DlgSelectName : "名前", DlgSelectValue : "値", DlgSelectSize : "サイズ", DlgSelectLines : "行", DlgSelectChkMulti : "複数項目選択を許可", DlgSelectOpAvail : "利用可能なオプション", DlgSelectOpText : "選択項目名", DlgSelectOpValue : "選択項目値", DlgSelectBtnAdd : "追加", DlgSelectBtnModify : "編集", DlgSelectBtnUp : "上へ", DlgSelectBtnDown : "下へ", DlgSelectBtnSetValue : "選択した値を設定", DlgSelectBtnDelete : "削除", // Textarea Dialog DlgTextareaName : "名前", DlgTextareaCols : "列", DlgTextareaRows : "行", // Text Field Dialog DlgTextName : "名前", DlgTextValue : "値", DlgTextCharWidth : "サイズ", DlgTextMaxChars : "最大長", DlgTextType : "タイプ", DlgTextTypeText : "テキスト", DlgTextTypePass : "パスワード入力", // Hidden Field Dialog DlgHiddenName : "名前", DlgHiddenValue : "値", // Bulleted List Dialog BulletedListProp : "箇条書き プロパティ", NumberedListProp : "段落番号 プロパティ", DlgLstStart : "開始文字", DlgLstType : "タイプ", DlgLstTypeCircle : "白丸", DlgLstTypeDisc : "黒丸", DlgLstTypeSquare : "四角", DlgLstTypeNumbers : "アラビア数字 (1, 2, 3)", DlgLstTypeLCase : "英字小文字 (a, b, c)", DlgLstTypeUCase : "英字大文字 (A, B, C)", DlgLstTypeSRoman : "ローマ数字小文字 (i, ii, iii)", DlgLstTypeLRoman : "ローマ数字大文字 (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "全般", DlgDocBackTab : "背景", DlgDocColorsTab : "色とマージン", DlgDocMetaTab : "メタデータ", DlgDocPageTitle : "ページタイトル", DlgDocLangDir : "言語文字表記の方向", DlgDocLangDirLTR : "左から右に表記(LTR)", DlgDocLangDirRTL : "右から左に表記(RTL)", DlgDocLangCode : "言語コード", DlgDocCharSet : "文字セット符号化", DlgDocCharSetCE : "Central European", DlgDocCharSetCT : "Chinese Traditional (Big5)", DlgDocCharSetCR : "Cyrillic", DlgDocCharSetGR : "Greek", DlgDocCharSetJP : "Japanese", DlgDocCharSetKR : "Korean", DlgDocCharSetTR : "Turkish", DlgDocCharSetUN : "Unicode (UTF-8)", DlgDocCharSetWE : "Western European", DlgDocCharSetOther : "他の文字セット符号化", DlgDocDocType : "文書タイプヘッダー", DlgDocDocTypeOther : "その他文書タイプヘッダー", DlgDocIncXHTML : "XHTML宣言をインクルード", DlgDocBgColor : "背景色", DlgDocBgImage : "背景画像 URL", DlgDocBgNoScroll : "スクロールしない背景", DlgDocCText : "テキスト", DlgDocCLink : "リンク", DlgDocCVisited : "アクセス済みリンク", DlgDocCActive : "アクセス中リンク", DlgDocMargins : "ページ・マージン", DlgDocMaTop : "上部", DlgDocMaLeft : "左", DlgDocMaRight : "右", DlgDocMaBottom : "下部", DlgDocMeIndex : "文書のキーワード(カンマ区切り)", DlgDocMeDescr : "文書の概要", DlgDocMeAuthor : "文書の作者", DlgDocMeCopy : "文書の著作権", DlgDocPreview : "プレビュー", // Templates Dialog Templates : "テンプレート(雛形)", DlgTemplatesTitle : "テンプレート内容", DlgTemplatesSelMsg : "エディターで使用するテンプレートを選択してください。<br>(現在のエディタの内容は失われます):", DlgTemplatesLoading : "テンプレート一覧読み込み中. しばらくお待ちください...", DlgTemplatesNoTpl : "(テンプレートが定義されていません)", DlgTemplatesReplace : "現在のエディタの内容と置換えをします", // About Dialog DlgAboutAboutTab : "バージョン情報", DlgAboutBrowserInfoTab : "ブラウザ情報", DlgAboutLicenseTab : "ライセンス", DlgAboutVersion : "バージョン", DlgAboutInfo : "より詳しい情報はこちらで", // Div Dialog DlgDivGeneralTab : "全般", DlgDivAdvancedTab : "高度な設定", DlgDivStyle : "スタイル", DlgDivInlineStyle : "インラインスタイル" };
JavaScript
/* * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2009 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or later (the "GPL") * http://www.gnu.org/licenses/gpl.html * * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") * http://www.gnu.org/licenses/lgpl.html * * - Mozilla Public License Version 1.1 or later (the "MPL") * http://www.mozilla.org/MPL/MPL-1.1.html * * == END LICENSE == * * Esperanto language file. */ var FCKLang = { // Language direction : "ltr" (left to right) or "rtl" (right to left). Dir : "ltr", ToolbarCollapse : "Kaŝi Ilobreton", ToolbarExpand : "Vidigi Ilojn", // Toolbar Items and Context Menu Save : "Sekurigi", NewPage : "Nova Paĝo", Preview : "Vidigi Aspekton", Cut : "Eltondi", Copy : "Kopii", Paste : "Interglui", PasteText : "Interglui kiel Tekston", PasteWord : "Interglui el Word", Print : "Presi", SelectAll : "Elekti ĉion", RemoveFormat : "Forigi Formaton", InsertLinkLbl : "Ligilo", InsertLink : "Enmeti/Ŝanĝi Ligilon", RemoveLink : "Forigi Ligilon", VisitLink : "Open Link", //MISSING Anchor : "Enmeti/Ŝanĝi Ankron", AnchorDelete : "Remove Anchor", //MISSING InsertImageLbl : "Bildo", InsertImage : "Enmeti/Ŝanĝi Bildon", InsertFlashLbl : "Flash", //MISSING InsertFlash : "Insert/Edit Flash", //MISSING InsertTableLbl : "Tabelo", InsertTable : "Enmeti/Ŝanĝi Tabelon", InsertLineLbl : "Horizonta Linio", InsertLine : "Enmeti Horizonta Linio", InsertSpecialCharLbl: "Speciala Signo", InsertSpecialChar : "Enmeti Specialan Signon", InsertSmileyLbl : "Mienvinjeto", InsertSmiley : "Enmeti Mienvinjeton", About : "Pri FCKeditor", Bold : "Grasa", Italic : "Kursiva", Underline : "Substreko", StrikeThrough : "Trastreko", Subscript : "Subskribo", Superscript : "Superskribo", LeftJustify : "Maldekstrigi", CenterJustify : "Centrigi", RightJustify : "Dekstrigi", BlockJustify : "Ĝisrandigi Ambaŭflanke", DecreaseIndent : "Malpligrandigi Krommarĝenon", IncreaseIndent : "Pligrandigi Krommarĝenon", Blockquote : "Blockquote", //MISSING CreateDiv : "Create Div Container", //MISSING EditDiv : "Edit Div Container", //MISSING DeleteDiv : "Remove Div Container", //MISSING Undo : "Malfari", Redo : "Refari", NumberedListLbl : "Numera Listo", NumberedList : "Enmeti/Forigi Numeran Liston", BulletedListLbl : "Bula Listo", BulletedList : "Enmeti/Forigi Bulan Liston", ShowTableBorders : "Vidigi Borderojn de Tabelo", ShowDetails : "Vidigi Detalojn", Style : "Stilo", FontFormat : "Formato", Font : "Tiparo", FontSize : "Grando", TextColor : "Teksta Koloro", BGColor : "Fona Koloro", Source : "Fonto", Find : "Serĉi", Replace : "Anstataŭigi", SpellCheck : "Literumada Kontrolilo", UniversalKeyboard : "Universala Klavaro", PageBreakLbl : "Page Break", //MISSING PageBreak : "Insert Page Break", //MISSING Form : "Formularo", Checkbox : "Markobutono", RadioButton : "Radiobutono", TextField : "Teksta kampo", Textarea : "Teksta Areo", HiddenField : "Kaŝita Kampo", Button : "Butono", SelectionField : "Elekta Kampo", ImageButton : "Bildbutono", FitWindow : "Maximize the editor size", //MISSING ShowBlocks : "Show Blocks", //MISSING // Context Menu EditLink : "Modifier Ligilon", CellCM : "Cell", //MISSING RowCM : "Row", //MISSING ColumnCM : "Column", //MISSING InsertRowAfter : "Insert Row After", //MISSING InsertRowBefore : "Insert Row Before", //MISSING DeleteRows : "Forigi Liniojn", InsertColumnAfter : "Insert Column After", //MISSING InsertColumnBefore : "Insert Column Before", //MISSING DeleteColumns : "Forigi Kolumnojn", InsertCellAfter : "Insert Cell After", //MISSING InsertCellBefore : "Insert Cell Before", //MISSING DeleteCells : "Forigi Ĉelojn", MergeCells : "Kunfandi Ĉelojn", MergeRight : "Merge Right", //MISSING MergeDown : "Merge Down", //MISSING HorizontalSplitCell : "Split Cell Horizontally", //MISSING VerticalSplitCell : "Split Cell Vertically", //MISSING TableDelete : "Delete Table", //MISSING CellProperties : "Atributoj de Ĉelo", TableProperties : "Atributoj de Tabelo", ImageProperties : "Atributoj de Bildo", FlashProperties : "Flash Properties", //MISSING AnchorProp : "Ankraj Atributoj", ButtonProp : "Butonaj Atributoj", CheckboxProp : "Markobutonaj Atributoj", HiddenFieldProp : "Atributoj de Kaŝita Kampo", RadioButtonProp : "Radiobutonaj Atributoj", ImageButtonProp : "Bildbutonaj Atributoj", TextFieldProp : "Atributoj de Teksta Kampo", SelectionFieldProp : "Atributoj de Elekta Kampo", TextareaProp : "Atributoj de Teksta Areo", FormProp : "Formularaj Atributoj", FontFormats : "Normala;Formatita;Adreso;Titolo 1;Titolo 2;Titolo 3;Titolo 4;Titolo 5;Titolo 6;Paragrafo (DIV)", // Alerts and Messages ProcessingXHTML : "Traktado de XHTML. Bonvolu pacienci...", Done : "Finita", PasteWordConfirm : "La algluota teksto ŝajnas esti Word-devena. Ĉu vi volas purigi ĝin antaŭ ol interglui?", NotCompatiblePaste : "Tiu ĉi komando bezonas almenaŭ Internet Explorer 5.5. Ĉu vi volas daŭrigi sen purigado?", UnknownToolbarItem : "Ilobretero nekonata \"%1\"", UnknownCommand : "Komandonomo nekonata \"%1\"", NotImplemented : "Komando ne ankoraŭ realigita", UnknownToolbarSet : "La ilobreto \"%1\" ne ekzistas", NoActiveX : "Your browser's security settings could limit some features of the editor. You must enable the option \"Run ActiveX controls and plug-ins\". You may experience errors and notice missing features.", //MISSING BrowseServerBlocked : "The resources browser could not be opened. Make sure that all popup blockers are disabled.", //MISSING DialogBlocked : "It was not possible to open the dialog window. Make sure all popup blockers are disabled.", //MISSING VisitLinkBlocked : "It was not possible to open a new window. Make sure all popup blockers are disabled.", //MISSING // Dialogs DlgBtnOK : "Akcepti", DlgBtnCancel : "Rezigni", DlgBtnClose : "Fermi", DlgBtnBrowseServer : "Foliumi en la Servilo", DlgAdvancedTag : "Speciala", DlgOpOther : "<Alia>", DlgInfoTab : "Info", //MISSING DlgAlertUrl : "Please insert the URL", //MISSING // General Dialogs Labels DlgGenNotSet : "<Defaŭlta>", DlgGenId : "Id", DlgGenLangDir : "Skribdirekto", DlgGenLangDirLtr : "De maldekstro dekstren (LTR)", DlgGenLangDirRtl : "De dekstro maldekstren (RTL)", DlgGenLangCode : "Lingva Kodo", DlgGenAccessKey : "Fulmoklavo", DlgGenName : "Nomo", DlgGenTabIndex : "Taba Ordo", DlgGenLongDescr : "URL de Longa Priskribo", DlgGenClass : "Klasoj de Stilfolioj", DlgGenTitle : "Indika Titolo", DlgGenContType : "Indika Enhavotipo", DlgGenLinkCharset : "Signaro de la Ligita Rimedo", DlgGenStyle : "Stilo", // Image Dialog DlgImgTitle : "Atributoj de Bildo", DlgImgInfoTab : "Informoj pri Bildo", DlgImgBtnUpload : "Sendu al Servilo", DlgImgURL : "URL", DlgImgUpload : "Alŝuti", DlgImgAlt : "Anstataŭiga Teksto", DlgImgWidth : "Larĝo", DlgImgHeight : "Alto", DlgImgLockRatio : "Konservi Proporcion", DlgBtnResetSize : "Origina Grando", DlgImgBorder : "Bordero", DlgImgHSpace : "HSpaco", DlgImgVSpace : "VSpaco", DlgImgAlign : "Ĝisrandigo", DlgImgAlignLeft : "Maldekstre", DlgImgAlignAbsBottom: "Abs Malsupre", DlgImgAlignAbsMiddle: "Abs Centre", DlgImgAlignBaseline : "Je Malsupro de Teksto", DlgImgAlignBottom : "Malsupre", DlgImgAlignMiddle : "Centre", DlgImgAlignRight : "Dekstre", DlgImgAlignTextTop : "Je Supro de Teksto", DlgImgAlignTop : "Supre", DlgImgPreview : "Vidigi Aspekton", DlgImgAlertUrl : "Bonvolu tajpi la URL de la bildo", DlgImgLinkTab : "Link", //MISSING // Flash Dialog DlgFlashTitle : "Flash Properties", //MISSING DlgFlashChkPlay : "Auto Play", //MISSING DlgFlashChkLoop : "Loop", //MISSING DlgFlashChkMenu : "Enable Flash Menu", //MISSING DlgFlashScale : "Scale", //MISSING DlgFlashScaleAll : "Show all", //MISSING DlgFlashScaleNoBorder : "No Border", //MISSING DlgFlashScaleFit : "Exact Fit", //MISSING // Link Dialog DlgLnkWindowTitle : "Ligilo", DlgLnkInfoTab : "Informoj pri la Ligilo", DlgLnkTargetTab : "Celo", DlgLnkType : "Tipo de Ligilo", DlgLnkTypeURL : "URL", DlgLnkTypeAnchor : "Ankri en tiu ĉi paĝo", DlgLnkTypeEMail : "Retpoŝto", DlgLnkProto : "Protokolo", DlgLnkProtoOther : "<alia>", DlgLnkURL : "URL", DlgLnkAnchorSel : "Elekti Ankron", DlgLnkAnchorByName : "Per Ankronomo", DlgLnkAnchorById : "Per Elementidentigilo", DlgLnkNoAnchors : "<Ne disponeblas ankroj en la dokumento>", DlgLnkEMail : "Retadreso", DlgLnkEMailSubject : "Temlinio", DlgLnkEMailBody : "Mesaĝa korpo", DlgLnkUpload : "Alŝuti", DlgLnkBtnUpload : "Sendi al Servilo", DlgLnkTarget : "Celo", DlgLnkTargetFrame : "<kadro>", DlgLnkTargetPopup : "<ŝprucfenestro>", DlgLnkTargetBlank : "Nova Fenestro (_blank)", DlgLnkTargetParent : "Gepatra Fenestro (_parent)", DlgLnkTargetSelf : "Sama Fenestro (_self)", DlgLnkTargetTop : "Plej Supra Fenestro (_top)", DlgLnkTargetFrameName : "Nomo de Kadro", DlgLnkPopWinName : "Nomo de Ŝprucfenestro", DlgLnkPopWinFeat : "Atributoj de la Ŝprucfenestro", DlgLnkPopResize : "Grando Ŝanĝebla", DlgLnkPopLocation : "Adresobreto", DlgLnkPopMenu : "Menubreto", DlgLnkPopScroll : "Rulumlisteloj", DlgLnkPopStatus : "Statobreto", DlgLnkPopToolbar : "Ilobreto", DlgLnkPopFullScrn : "Tutekrane (IE)", DlgLnkPopDependent : "Dependa (Netscape)", DlgLnkPopWidth : "Larĝo", DlgLnkPopHeight : "Alto", DlgLnkPopLeft : "Pozicio de Maldekstro", DlgLnkPopTop : "Pozicio de Supro", DlnLnkMsgNoUrl : "Bonvolu entajpi la URL-on", DlnLnkMsgNoEMail : "Bonvolu entajpi la retadreson", DlnLnkMsgNoAnchor : "Bonvolu elekti ankron", DlnLnkMsgInvPopName : "The popup name must begin with an alphabetic character and must not contain spaces", //MISSING // Color Dialog DlgColorTitle : "Elekti", DlgColorBtnClear : "Forigi", DlgColorHighlight : "Emfazi", DlgColorSelected : "Elektita", // Smiley Dialog DlgSmileyTitle : "Enmeti Mienvinjeton", // Special Character Dialog DlgSpecialCharTitle : "Enmeti Specialan Signon", // Table Dialog DlgTableTitle : "Atributoj de Tabelo", DlgTableRows : "Linioj", DlgTableColumns : "Kolumnoj", DlgTableBorder : "Bordero", DlgTableAlign : "Ĝisrandigo", DlgTableAlignNotSet : "<Defaŭlte>", DlgTableAlignLeft : "Maldekstre", DlgTableAlignCenter : "Centre", DlgTableAlignRight : "Dekstre", DlgTableWidth : "Larĝo", DlgTableWidthPx : "Bitbilderoj", DlgTableWidthPc : "elcentoj", DlgTableHeight : "Alto", DlgTableCellSpace : "Interspacigo de Ĉeloj", DlgTableCellPad : "Ĉirkaŭenhava Plenigado", DlgTableCaption : "Titolo", DlgTableSummary : "Summary", //MISSING DlgTableHeaders : "Headers", //MISSING DlgTableHeadersNone : "None", //MISSING DlgTableHeadersColumn : "First column", //MISSING DlgTableHeadersRow : "First Row", //MISSING DlgTableHeadersBoth : "Both", //MISSING // Table Cell Dialog DlgCellTitle : "Atributoj de Celo", DlgCellWidth : "Larĝo", DlgCellWidthPx : "bitbilderoj", DlgCellWidthPc : "elcentoj", DlgCellHeight : "Alto", DlgCellWordWrap : "Linifaldo", DlgCellWordWrapNotSet : "<Defaŭlte>", DlgCellWordWrapYes : "Jes", DlgCellWordWrapNo : "Ne", DlgCellHorAlign : "Horizonta Ĝisrandigo", DlgCellHorAlignNotSet : "<Defaŭlte>", DlgCellHorAlignLeft : "Maldekstre", DlgCellHorAlignCenter : "Centre", DlgCellHorAlignRight: "Dekstre", DlgCellVerAlign : "Vertikala Ĝisrandigo", DlgCellVerAlignNotSet : "<Defaŭlte>", DlgCellVerAlignTop : "Supre", DlgCellVerAlignMiddle : "Centre", DlgCellVerAlignBottom : "Malsupre", DlgCellVerAlignBaseline : "Je Malsupro de Teksto", DlgCellType : "Cell Type", //MISSING DlgCellTypeData : "Data", //MISSING DlgCellTypeHeader : "Header", //MISSING DlgCellRowSpan : "Linioj Kunfanditaj", DlgCellCollSpan : "Kolumnoj Kunfanditaj", DlgCellBackColor : "Fono", DlgCellBorderColor : "Bordero", DlgCellBtnSelect : "Elekti...", // Find and Replace Dialog DlgFindAndReplaceTitle : "Find and Replace", //MISSING // Find Dialog DlgFindTitle : "Serĉi", DlgFindFindBtn : "Serĉi", DlgFindNotFoundMsg : "La celteksto ne estas trovita.", // Replace Dialog DlgReplaceTitle : "Anstataŭigi", DlgReplaceFindLbl : "Serĉi:", DlgReplaceReplaceLbl : "Anstataŭigi per:", DlgReplaceCaseChk : "Kongruigi Usklecon", DlgReplaceReplaceBtn : "Anstataŭigi", DlgReplaceReplAllBtn : "Anstataŭigi Ĉiun", DlgReplaceWordChk : "Tuta Vorto", // Paste Operations / Dialog PasteErrorCut : "La sekurecagordo de via TTT-legilo ne permesas, ke la redaktilo faras eltondajn operaciojn. Bonvolu uzi la klavaron por tio (ctrl-X).", PasteErrorCopy : "La sekurecagordo de via TTT-legilo ne permesas, ke la redaktilo faras kopiajn operaciojn. Bonvolu uzi la klavaron por tio (ctrl-C).", PasteAsText : "Interglui kiel Tekston", PasteFromWord : "Interglui el Word", DlgPasteMsg2 : "Please paste inside the following box using the keyboard (<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.", //MISSING DlgPasteSec : "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 DlgPasteIgnoreFont : "Ignore Font Face definitions", //MISSING DlgPasteRemoveStyles : "Remove Styles definitions", //MISSING // Color Picker ColorAutomatic : "Aŭtomata", ColorMoreColors : "Pli da Koloroj...", // Document Properties DocProps : "Dokumentaj Atributoj", // Anchor Dialog DlgAnchorTitle : "Ankraj Atributoj", DlgAnchorName : "Ankra Nomo", DlgAnchorErrorName : "Bv tajpi la ankran nomon", // Speller Pages Dialog DlgSpellNotInDic : "Ne trovita en la vortaro", DlgSpellChangeTo : "Ŝanĝi al", DlgSpellBtnIgnore : "Malatenti", DlgSpellBtnIgnoreAll : "Malatenti Ĉiun", DlgSpellBtnReplace : "Anstataŭigi", DlgSpellBtnReplaceAll : "Anstataŭigi Ĉiun", DlgSpellBtnUndo : "Malfari", DlgSpellNoSuggestions : "- Neniu propono -", DlgSpellProgress : "Literumkontrolado daŭras...", DlgSpellNoMispell : "Literumkontrolado finita: neniu fuŝo trovita", DlgSpellNoChanges : "Literumkontrolado finita: neniu vorto ŝanĝita", DlgSpellOneChange : "Literumkontrolado finita: unu vorto ŝanĝita", DlgSpellManyChanges : "Literumkontrolado finita: %1 vortoj ŝanĝitaj", IeSpellDownload : "Literumada Kontrolilo ne instalita. Ĉu vi volas elŝuti ĝin nun?", // Button Dialog DlgButtonText : "Teksto (Valoro)", DlgButtonType : "Tipo", DlgButtonTypeBtn : "Button", //MISSING DlgButtonTypeSbm : "Submit", //MISSING DlgButtonTypeRst : "Reset", //MISSING // Checkbox and Radio Button Dialogs DlgCheckboxName : "Nomo", DlgCheckboxValue : "Valoro", DlgCheckboxSelected : "Elektita", // Form Dialog DlgFormName : "Nomo", DlgFormAction : "Ago", DlgFormMethod : "Metodo", // Select Field Dialog DlgSelectName : "Nomo", DlgSelectValue : "Valoro", DlgSelectSize : "Grando", DlgSelectLines : "Linioj", DlgSelectChkMulti : "Permesi Plurajn Elektojn", DlgSelectOpAvail : "Elektoj Disponeblaj", DlgSelectOpText : "Teksto", DlgSelectOpValue : "Valoro", DlgSelectBtnAdd : "Aldoni", DlgSelectBtnModify : "Modifi", DlgSelectBtnUp : "Supren", DlgSelectBtnDown : "Malsupren", DlgSelectBtnSetValue : "Agordi kiel Elektitan Valoron", DlgSelectBtnDelete : "Forigi", // Textarea Dialog DlgTextareaName : "Nomo", DlgTextareaCols : "Kolumnoj", DlgTextareaRows : "Vicoj", // Text Field Dialog DlgTextName : "Nomo", DlgTextValue : "Valoro", DlgTextCharWidth : "Signolarĝo", DlgTextMaxChars : "Maksimuma Nombro da Signoj", DlgTextType : "Tipo", DlgTextTypeText : "Teksto", DlgTextTypePass : "Pasvorto", // Hidden Field Dialog DlgHiddenName : "Nomo", DlgHiddenValue : "Valoro", // Bulleted List Dialog BulletedListProp : "Atributoj de Bula Listo", NumberedListProp : "Atributoj de Numera Listo", DlgLstStart : "Start", //MISSING DlgLstType : "Tipo", DlgLstTypeCircle : "Cirklo", DlgLstTypeDisc : "Disc", //MISSING DlgLstTypeSquare : "Kvadrato", DlgLstTypeNumbers : "Ciferoj (1, 2, 3)", DlgLstTypeLCase : "Minusklaj Literoj (a, b, c)", DlgLstTypeUCase : "Majusklaj Literoj (A, B, C)", DlgLstTypeSRoman : "Malgrandaj Romanaj Ciferoj (i, ii, iii)", DlgLstTypeLRoman : "Grandaj Romanaj Ciferoj (I, II, III)", // Document Properties Dialog DlgDocGeneralTab : "Ĝeneralaĵoj", DlgDocBackTab : "Fono", DlgDocColorsTab : "Koloroj kaj Marĝenoj", DlgDocMetaTab : "Metadatumoj", DlgDocPageTitle : "Paĝotitolo", DlgDocLangDir : "Skribdirekto de la Lingvo", DlgDocLangDirLTR : "De maldekstro dekstren (LTR)", DlgDocLangDirRTL : "De dekstro maldekstren (LTR)", DlgDocLangCode : "Lingvokodo", DlgDocCharSet : "Signara Kodo", DlgDocCharSetCE : "Central European", //MISSING DlgDocCharSetCT : "Chinese Traditional (Big5)", //MISSING DlgDocCharSetCR : "Cyrillic", //MISSING DlgDocCharSetGR : "Greek", //MISSING DlgDocCharSetJP : "Japanese", //MISSING DlgDocCharSetKR : "Korean", //MISSING DlgDocCharSetTR : "Turkish", //MISSING DlgDocCharSetUN : "Unicode (UTF-8)", //MISSING DlgDocCharSetWE : "Western European", //MISSING DlgDocCharSetOther : "Alia Signara Kodo", DlgDocDocType : "Dokumenta Tipo", DlgDocDocTypeOther : "Alia Dokumenta Tipo", DlgDocIncXHTML : "Inkluzivi XHTML Deklaroj", DlgDocBgColor : "Fona Koloro", DlgDocBgImage : "URL de Fona Bildo", DlgDocBgNoScroll : "Neruluma Fono", DlgDocCText : "Teksto", DlgDocCLink : "Ligilo", DlgDocCVisited : "Vizitita Ligilo", DlgDocCActive : "Aktiva Ligilo", DlgDocMargins : "Paĝaj Marĝenoj", DlgDocMaTop : "Supra", DlgDocMaLeft : "Maldekstra", DlgDocMaRight : "Dekstra", DlgDocMaBottom : "Malsupra", DlgDocMeIndex : "Ŝlosilvortoj de la Dokumento (apartigita de komoj)", DlgDocMeDescr : "Dokumenta Priskribo", DlgDocMeAuthor : "Verkinto", DlgDocMeCopy : "Kopirajto", DlgDocPreview : "Aspekto", // Templates Dialog Templates : "Templates", //MISSING DlgTemplatesTitle : "Content Templates", //MISSING DlgTemplatesSelMsg : "Please select the template to open in the editor<br />(the actual contents will be lost):", //MISSING DlgTemplatesLoading : "Loading templates list. Please wait...", //MISSING DlgTemplatesNoTpl : "(No templates defined)", //MISSING DlgTemplatesReplace : "Replace actual contents", //MISSING // About Dialog DlgAboutAboutTab : "Pri", DlgAboutBrowserInfoTab : "Informoj pri TTT-legilo", DlgAboutLicenseTab : "License", //MISSING DlgAboutVersion : "versio", DlgAboutInfo : "Por pli da informoj, vizitu", // Div Dialog DlgDivGeneralTab : "General", //MISSING DlgDivAdvancedTab : "Advanced", //MISSING DlgDivStyle : "Style", //MISSING DlgDivInlineStyle : "Inline Style" //MISSING };
JavaScript