Bug #2867 - The online editor: Optimizations for speed, providing compressed versions for almost all plugin javascripts for initialization.

skala
Ivan Tcholakov 16 years ago
parent 1f4206394c
commit 9ff6d282f6
  1. 11
      main/inc/lib/fckeditor/editor/plugins/ImageManager/fckpackager.xml
  2. 1
      main/inc/lib/fckeditor/editor/plugins/ImageManager/fckplugin_compressed.js
  3. 11
      main/inc/lib/fckeditor/editor/plugins/asciimath/fckpackager.xml
  4. 1
      main/inc/lib/fckeditor/editor/plugins/asciimath/fckplugin_compressed.js
  5. 11
      main/inc/lib/fckeditor/editor/plugins/audio/fckpackager.xml
  6. 1
      main/inc/lib/fckeditor/editor/plugins/audio/fckplugin_compressed.js
  7. 11
      main/inc/lib/fckeditor/editor/plugins/autogrow/fckpackager.xml
  8. 1
      main/inc/lib/fckeditor/editor/plugins/autogrow/fckplugin_compressed.js
  9. 3
      main/inc/lib/fckeditor/editor/plugins/customizations/fckpackager.xml
  10. 19
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin_load.js
  11. 1
      main/inc/lib/fckeditor/editor/plugins/customizations/fckplugin_load_compressed.js
  12. 11
      main/inc/lib/fckeditor/editor/plugins/dragresizetable/fckpackager.xml
  13. 1
      main/inc/lib/fckeditor/editor/plugins/dragresizetable/fckplugin_compressed.js
  14. 11
      main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fckpackager.xml
  15. 1
      main/inc/lib/fckeditor/editor/plugins/fckEmbedMovies/fckplugin_compressed.js
  16. 11
      main/inc/lib/fckeditor/editor/plugins/flvPlayer/fckpackager.xml
  17. 1
      main/inc/lib/fckeditor/editor/plugins/flvPlayer/fckplugin_compressed.js
  18. 11
      main/inc/lib/fckeditor/editor/plugins/googlemaps/fckpackager.xml
  19. 1
      main/inc/lib/fckeditor/editor/plugins/googlemaps/fckplugin_compressed.js
  20. 11
      main/inc/lib/fckeditor/editor/plugins/imgmap/fckpackager.xml
  21. 1
      main/inc/lib/fckeditor/editor/plugins/imgmap/fckplugin_compressed.js
  22. 11
      main/inc/lib/fckeditor/editor/plugins/mimetex/fckpackager.xml
  23. 1
      main/inc/lib/fckeditor/editor/plugins/mimetex/fckplugin_compressed.js
  24. 11
      main/inc/lib/fckeditor/editor/plugins/prompt/fckpackager.xml
  25. 2
      main/inc/lib/fckeditor/editor/plugins/prompt/fckplugin.js
  26. 1
      main/inc/lib/fckeditor/editor/plugins/prompt/fckplugin_compressed.js
  27. 11
      main/inc/lib/fckeditor/editor/plugins/tablecommands/fckpackager.xml
  28. 1
      main/inc/lib/fckeditor/editor/plugins/tablecommands/fckplugin_compressed.js
  29. 11
      main/inc/lib/fckeditor/editor/plugins/wikilink/fckpackager.xml
  30. 1
      main/inc/lib/fckeditor/editor/plugins/wikilink/fckplugin_compressed.js
  31. 11
      main/inc/lib/fckeditor/editor/plugins/youtube/fckpackager.xml
  32. 1
      main/inc/lib/fckeditor/editor/plugins/youtube/fckplugin_compressed.js
  33. 4
      main/inc/lib/fckeditor/myconfig.js

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

File diff suppressed because one or more lines are too long

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
if (typeof AMprocessNode!='function'){LoadScript(FCKConfig.ScriptASCIIMathML);};notifyIfNoMathML=false;translateASCIIMath=false;mathfontsize="1.1em";FCKCommands.RegisterCommand('asciimath',new FCKDialogCommand(FCKLang['DlgAsciiMath'],FCKLang['DlgAsciiMath'],FCKConfig.PluginsPath+'asciimath/fck_asciimath.html',800,550));var oAsciiMathItem=new FCKToolbarButton('asciimath',FCKLang['DlgAsciiMath']);oAsciiMathItem.IconPath=FCKConfig.PluginsPath+'asciimath/asciimath.gif';FCKToolbarItems.RegisterItem('asciimath',oAsciiMathItem);FCK.ContextMenu.RegisterListener({AddItems:function(A,B,C){if (FCKAsciiMath.FindFormulaContainer(B)){A.AddSeparator();A.AddItem('asciimath',FCKLang['DlgAsciiMath'],oAsciiMathItem.IconPath);}}});FCK.RegisterDoubleClickHandler(function (A){if (FCKAsciiMath.FindFormulaContainer(A)){FCKCommands.GetCommand('asciimath').Execute();}},null);var FCKAsciiMath={};FCKAsciiMath.GetSearchElementFromSelection=function(){var A=FCK.Selection.GetSelectedElement();if (!A){A=FCK.Selection.GetBoundaryParentElement(true);};return A;};FCKAsciiMath.IsFormula=function(A){if (A&&A.nodeName&&A.nodeName.IEquals('span')&&A.className&&A.className.indexOf('AM')!=-1){return true;};return false;};FCKAsciiMath.FindFormulaContainer=function(A){var B=A;while (B){if (!B.nodeName){continue;};if (B.nodeName.IEquals('body','table')){break;};if (FCKAsciiMath.IsFormula(B)){return B;};if (B.parentNode){B=B.parentNode;}else{break;}};return null;};FCKAsciiMath.IsParsed=function(A){return A.getElementsByTagName('math')[0]?true:false;};FCKAsciiMath.GetFormula=function(A){var B='';if (FCKAsciiMath.IsFormula(A)){if (FCKAsciiMath.IsParsed(A)){if (A.title){B=A.title;}}else{B=A.innerHTML;}};return B.replace(/`/g,'');};FCKAsciiMath.Delete=function(){var A=FCKAsciiMath.FindFormulaContainer(FCKAsciiMath.GetSearchElementFromSelection());if (A){FCK.Selection.SelectNode(A);}else{return;};if (FCKBrowserInfo.IsIE){var B=FCK.EditorDocument.createElement('span');B.innerHTML='&nbsp;';B=A.parentNode.insertBefore(B,A);FCK.Selection.SelectNode(B);};FCK.Selection.Delete();if (FCKBrowserInfo.IsIE){FCKUndo.SaveUndoStep();A.parentNode.removeChild(A);}};var FCKAsciiMathProcessor=FCKDocumentProcessor.AppendNew();FCKAsciiMathProcessor.ProcessDocument=function(A){var B=FCK.EditorDocument.getElementsByTagName('SPAN');var C;var i=B.length-1;while (i>=0&&(C=B[i--])){if (FCKAsciiMath.IsFormula(C)&&!FCKAsciiMath.IsParsed (C)){var D=C.cloneNode(true);D.title=C.innerHTML;AMprocessNode(D,false);D.setAttribute('_fckfakelement','true',0);D.setAttribute('_fckrealelement',FCKTempBin.AddElement(C),0);D.onresizestart=function(){FCK.EditorWindow.event.returnValue=false;return false;};C.parentNode.insertBefore(D,C);C.parentNode.removeChild(C);}}};FCKAsciiMath.SetListeners=function(){if (FCK.EditMode!=FCK_EDITMODE_WYSIWYG){return;};if (!FCKBrowserInfo.IsIE){FCK.EditorDocument.addEventListener('click',function(e){var A=FCKAsciiMath.FindFormulaContainer(e.target);if (A){FCKSelection.SelectNode(A);}},true);FCK.EditorDocument.addEventListener('keypress',function(e){var B=e.keyCode||e.which;switch (B){case 37:case 39:case 38:case 40:case 36:case 35:case 33:case 34:break;case 8:case 46:if (FCKAsciiMath.FindFormulaContainer(FCKAsciiMath.GetSearchElementFromSelection())){FCKAsciiMath.Delete();if (e.preventDefault) e.preventDefault();if (e.stopPropagation) e.stopPropagation();break;};default:if (FCKAsciiMath.FindFormulaContainer(FCKAsciiMath.GetSearchElementFromSelection())){if (e.preventDefault) e.preventDefault();if (e.stopPropagation) e.stopPropagation();};break;}},true);}else{FCKAsciiMath.KeyDownIE=function(e){if (!e) e=window.event;var B=e.keyCode;switch (B){case 8:case 46:if (FCKAsciiMath.FindFormulaContainer(FCKAsciiMath.GetSearchElementFromSelection())){FCKAsciiMath.Delete();e.cancelBubble=true;break;};default:break;}};FCKTools.AddEventListener(FCK.EditorDocument.body,'keydown',FCKAsciiMath.KeyDownIE);}};FCK.Events.AttachEvent('OnAfterSetHTML',FCKAsciiMath.SetListeners);FCK.UpdateLinkedField=function(){if (FCKConfig.FullPage){var A=FCK.EditorDocument.getElementsByTagName('html')[0];var B;if (typeof A=='object'){B=A.getElementsByTagName('HEAD')[0];};if (typeof B=='object'){var C=false;var D=FCK.EditorDocument.getElementsByTagName('SPAN');var E;var i=D.length-1;while (i>=0&&(E=D[i--])){if (FCKAsciiMath.IsFormula(E)){C=true;break;}};var F=false;var G=FCK.GetData(false).match(/<head\s?[^>]*>(.*?)<\/head\s*>/i)[1];if (G){if (G.indexOf('ASCIIMathML.js')!=-1){F=true;}};if (!F){script=FCK.EditorDocument.createElement('script');script.setAttribute('src',FCKConfig.ScriptASCIIMathML);script.setAttribute('type','text/javascript');B.appendChild(script);}}};var H=FCK.GetData(FCKConfig.FormatOutput);if (FCKConfig.HtmlEncodeOutput) H=FCKTools.HTMLEncode(H);FCK.LinkedField.value=H;FCK.Events.FireEvent('OnAfterLinkedFieldUpdate');};

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
FCKCommands.RegisterCommand('MP3',new FCKDialogCommand(FCKLang['DlgAudioTitle'],FCKLang['DlgAudioTitle']+' (mp3)',FCKConfig.PluginsPath+'audio/fck_audio.html',600,310));var oAudioItem=new FCKToolbarButton('MP3',FCKLang['DlgAudioTitle']+' (mp3)');oAudioItem.IconPath=FCKConfig.PluginsPath+'audio/audio.gif';FCKToolbarItems.RegisterItem('MP3',oAudioItem);

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
var FCKAutoGrow={MIN_HEIGHT:window.frameElement.offsetHeight,Check:function(){var A=FCKAutoGrow.GetHeightDelta();if (A!=0){var B=window.frameElement.offsetHeight+A;B=FCKAutoGrow.GetEffectiveHeight(B);if (B!=window.frameElement.height){window.frameElement.style.height=B+"px";if (typeof window.onresize=='function'){window.onresize();}}}},CheckEditorStatus:function(A,B){if (B==FCK_STATUS_COMPLETE) FCKAutoGrow.Check();},GetEffectiveHeight:function(A){if (A<FCKAutoGrow.MIN_HEIGHT) A=FCKAutoGrow.MIN_HEIGHT;else{var B=FCKConfig.AutoGrowMax;if (B&&B>0&&A>B) A=B;};return A;},GetHeightDelta:function(){var A=FCK.EditorDocument;var B;var C;if (FCKBrowserInfo.IsIE){B=FCK.EditorWindow.frameElement.offsetHeight;C=A.body.scrollHeight;}else{B=FCK.EditorWindow.innerHeight;C=A.body.offsetHeight+(parseInt(FCKDomTools.GetCurrentElementStyle(A.body,'margin-top'),10)||0)+(parseInt(FCKDomTools.GetCurrentElementStyle(A.body,'margin-bottom'),10)||0);};return C-B;},SetListeners:function(){if (FCK.EditMode!=FCK_EDITMODE_WYSIWYG) return;FCK.EditorWindow.attachEvent('onscroll',FCKAutoGrow.Check);FCK.EditorDocument.attachEvent('onkeyup',FCKAutoGrow.Check);}};FCK.AttachToOnSelectionChange(FCKAutoGrow.Check);if (FCKBrowserInfo.IsIE) FCK.Events.AttachEvent('OnAfterSetHTML',FCKAutoGrow.SetListeners);FCK.Events.AttachEvent('OnStatusChange',FCKAutoGrow.CheckEditorStatus);

@ -8,4 +8,7 @@
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
<PackageFile path="fckplugin_load_compressed.js">
<File path="fckplugin_load.js" />
</PackageFile>
</Package>

@ -80,12 +80,27 @@ FCKPlugin.prototype.Load = function()
// Add the main plugin script.
// Logic-modification about loading compressed version of some plugins.
//LoadScript( this.Path + 'fckplugin.js' ) ;
var load_source = ( window.document.location.toString().indexOf('fckeditor.original.html') != -1 ) ;
var file;
switch ( this.Name )
{
case 'asciimath':
case 'audio':
case 'autogrow':
case 'customizations':
file = load_source ? 'fckplugin.js' : 'fckplugin_compressed.js';
case 'dragresizetable':
case 'fckEmbedMovies':
case 'flvPlayer':
case 'googlemaps':
case 'ImageManager':
case 'imgmap':
case 'mimetex':
case 'prompt':
case 'tablecommands':
case 'wikilink':
case 'youtube':
file = ( window.document.location.toString().indexOf('fckeditor.original.html') != -1 )
? 'fckplugin.js'
: 'fckplugin_compressed.js';
break;
default:
file = 'fckplugin.js';

@ -0,0 +1 @@
FCKPlugin.prototype.Load=function(){switch (this.Name){case 'dragresizetable':case 'tablecommands':case 'ImageManager':case 'prompt':this.AvailableLangs=null;this.AvailableLangs=[];break;case 'customizations':case 'audio':case 'fckEmbedMovies':case 'flvPlayer':case 'youtube':case 'googlemaps':case 'mimetex':case 'wikilink':case 'imgmap':break;default:LoadScript(this.Path+'lang/en.js');};if (this.AvailableLangs.length>0){var A;if (this.AvailableLangs.IndexOf(FCKLanguageManager.ActiveLanguage.Code)>=0) A=FCKLanguageManager.ActiveLanguage.Code;else A=this.AvailableLangs[0];LoadScript(this.Path+'lang/'+A+'.js');};var B;switch (this.Name){case 'asciimath':case 'audio':case 'autogrow':case 'customizations':case 'dragresizetable':case 'fckEmbedMovies':case 'flvPlayer':case 'googlemaps':case 'ImageManager':case 'imgmap':case 'mimetex':case 'prompt':case 'tablecommands':case 'wikilink':case 'youtube':B=(window.document.location.toString().indexOf('fckeditor.original.html')!=-1)?'fckplugin.js':'fckplugin_compressed.js';break;default:B='fckplugin.js';};LoadScript(this.Path+B);};

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

File diff suppressed because one or more lines are too long

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
FCKCommands.RegisterCommand('EmbedMovies',new FCKDialogCommand(FCKLang['DlgEmbedMoviesTitle'],FCKLang['DlgEmbedMoviesTitle'],FCKConfig.PluginsPath+'fckEmbedMovies/fck_embedmovies.html',600,440));var oVideoItem=new FCKToolbarButton('EmbedMovies',FCKLang['DlgEmbedMoviesTitle']);oVideoItem.IconPath=FCKConfig.PluginsPath+'fckEmbedMovies/embedmovies.gif';FCKToolbarItems.RegisterItem('EmbedMovies',oVideoItem);

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
FCKCommands.RegisterCommand('flvPlayer',new FCKDialogCommand(FCKLang['DlgFLVPlayerTitle'],FCKLang['DlgFLVPlayerTitle'],FCKConfig.PluginsPath+'flvPlayer/flvPlayer.html',800,570));var oFlvPlayerItem=new FCKToolbarButton('flvPlayer',FCKLang['DlgFLVPlayerTitle']);oFlvPlayerItem.IconPath=FCKPlugins.Items['flvPlayer'].Path+'flvPlayer.gif';FCKToolbarItems.RegisterItem('flvPlayer',oFlvPlayerItem);

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

File diff suppressed because one or more lines are too long

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
imgmapCommand_GetState=function() {if (FCK.EditMode!=FCK_EDITMODE_WYSIWYG) return FCK_TRISTATE_DISABLED;var A=FCK.Selection.GetSelectedElement();if (A&&A.tagName=='IMG'){if (!FCK.IsRealImage(A)){return FCK_TRISTATE_DISABLED;};if (A.getAttribute('usemap')) return FCK_TRISTATE_ON;return FCK_TRISTATE_OFF;};return FCK_TRISTATE_DISABLED;};FCKCommands.RegisterCommand('imgmapPopup',new FCKDialogCommand(FCKLang.imgmapDlgName,FCKLang.imgmapDlgTitle,FCKPlugins.Items['imgmap'].Path+'popup.html',750,580,imgmapCommand_GetState));var imgmapButton=new FCKToolbarButton('imgmapPopup',FCKLang.imgmapBtn,null,null,false,true);if (/\/editor\/skins\/(.*)\//.test(FCKConfig.SkinPath)) imgmapButton.IconPath=FCKPlugins.Items['imgmap'].Path+'images/icon_'+RegExp.$1+'.gif';else imgmapButton.IconPath=FCKPlugins.Items['imgmap'].Path+'images/editor_icon.gif';FCKToolbarItems.RegisterItem('imgmapPopup',imgmapButton);FCK.ContextMenu.RegisterListener({AddItems:function(A,B,C) {if (FCK.IsRealImage(B)){A.AddItem('imgmapPopup',FCKLang.imgmapDlgTitle,imgmapButton.IconPath);}}});

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
FCKCommands.RegisterCommand('mimetex',new FCKDialogCommand(FCKLang['DlgMimeTeX'],FCKLang['DlgMimeTeX'],FCKConfig.PluginsPath+'mimetex/mimetex.html',800,550));var oMimeTeXItem=new FCKToolbarButton('mimetex',FCKLang['DlgMimeTeX']);oMimeTeXItem.IconPath=FCKConfig.PluginsPath+'mimetex/mimetex.gif';FCKToolbarItems.RegisterItem('mimetex',oMimeTeXItem);FCK.ContextMenu.RegisterListener({AddItems:function(A,B,C){if (C=='IMG'&&B.getAttribute('src')&&B.getAttribute('src').toString().indexOf('/cgi-bin/mimetex')>=0){A.AddSeparator();A.AddItem('mimetex',FCKLang['DlgMimeTeX'],oMimeTeXItem.IconPath);}}});FCK.RegisterDoubleClickHandler(function (A){if (A.nodeName.IEquals('img')&&A.getAttribute('src')&&A.getAttribute('src').toString().indexOf('/cgi-bin/mimetex')>=0){FCKCommands.GetCommand('mimetex').Execute();}},'IMG');

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -45,7 +45,7 @@ FCKDialog.Prompt = function( message, default_value, action, title, width, heigh
}
var custom_value = {} ;
custom_value.default_value = default_value
custom_value.default_value = default_value ;
custom_value.action = action ;
custom_value.message = message ;

@ -0,0 +1 @@
FCKDialog.Prompt=function(A,B,C,D,E,F){if (!A){A='&nbsp;';};if (!D){D='&nbsp;';};if (!B){B='';};if (!E){E=500;};if (!F){F=200;};var G={};G.default_value=B;G.action=C;G.message=A;FCKDialog.OpenDialog('FCKDialog_Prompt',D,FCKConfig.PluginsPath+'prompt/fck_prompt.html',E,F,G);};

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
FCKToolbarItems.RegisterItem('TableInsertRowAfter',new FCKToolbarButton('TableInsertRowAfter',FCKLang.InsertRowAfter,null,null,null,true,62));FCKToolbarItems.RegisterItem('TableDeleteRows',new FCKToolbarButton('TableDeleteRows',FCKLang.DeleteRows,null,null,null,true,63));FCKToolbarItems.RegisterItem('TableInsertColumnAfter',new FCKToolbarButton('TableInsertColumnAfter',FCKLang.InsertColumnAfter,null,null,null,true,64));FCKToolbarItems.RegisterItem('TableDeleteColumns',new FCKToolbarButton('TableDeleteColumns',FCKLang.DeleteColumns,null,null,null,true,65));FCKToolbarItems.RegisterItem('TableInsertCellAfter',new FCKToolbarButton('TableInsertCellAfter',FCKLang.InsertCellAfter,null,null,null,true,58));FCKToolbarItems.RegisterItem('TableDeleteCells',new FCKToolbarButton('TableDeleteCells',FCKLang.DeleteCells,null,null,null,true,59));FCKToolbarItems.RegisterItem('TableMergeCells',new FCKToolbarButton('TableMergeCells',FCKLang.MergeCells,null,null,null,true,60));FCKToolbarItems.RegisterItem('TableHorizontalSplitCell',new FCKToolbarButton('TableHorizontalSplitCell',FCKLang.HorizontalSplitCell,null,null,null,true,61));FCKToolbarItems.RegisterItem('TableVerticalSplitCell',new FCKToolbarButton('TableVerticalSplitCell',FCKLang.VerticalSplitCell,null,null,null,true,61));FCKToolbarItems.RegisterItem('TableCellProp',new FCKToolbarButton('TableCellProp',FCKLang.CellProperties,null,null,null,true,57));

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
FCKCommands.RegisterCommand('Wikilink',new FCKDialogCommand('Wikilink',FCKLang.WikilinkDlgTitle,FCKPlugins.Items['wikilink'].Path+'fck_wikilink.html',350,250));var oPlaceholderItem=new FCKToolbarButton('Wikilink',FCKLang.WikilinkBtn);oPlaceholderItem.IconPath=FCKPlugins.Items['wikilink'].Path+'wikilink.gif';FCKToolbarItems.RegisterItem('Wikilink',oPlaceholderItem);var FCKPlaceholders={};FCKPlaceholders.Add=function(A){var B=FCK.InsertElement('span');this.SetupSpan(B,A);};FCKPlaceholders.SetupSpan=function(A,B){A.innerHTML='[[ '+B+' ]]';A.style.backgroundColor='#ffff00';A.style.color='#000000';if (FCKBrowserInfo.IsGecko) A.style.cursor='default';A._fckplaceholder=B;A.contentEditable=false;A.onresizestart=function(){FCK.EditorWindow.event.returnValue=false;return false;}};FCKPlaceholders._SetupClickListener=function(){FCKPlaceholders._ClickListener=function(e){if (e.target.tagName=='SPAN'&&e.target._fckplaceholder) FCKSelection.SelectNode(e.target);};FCK.EditorDocument.addEventListener('click',FCKPlaceholders._ClickListener,true);};FCK.ContextMenu.RegisterListener({AddItems:function (A,B,C){if (!B){return;};if (B.nodeName.IEquals('span')&&B._fckplaceholder){A.AddSeparator();A.AddItem('Wikilink',FCKLang.WikilinkDlgTitle,FCKConfig.PluginsPath+'wikilink/wikilink.gif');}} });FCKPlaceholders.OnDoubleClick=function(A){if (A.tagName=='SPAN'&&A._fckplaceholder) FCKCommands.GetCommand('Wikilink').Execute();};FCK.RegisterDoubleClickHandler(FCKPlaceholders.OnDoubleClick,'SPAN');FCKPlaceholders.Exist=function(A){var B=FCK.EditorDocument.getElementsByTagName('SPAN');for (var i=0;i<B.length;i++){if (B[i]._fckplaceholder==A) return true;};return false;};if (FCKBrowserInfo.IsIE){FCKPlaceholders.Redraw=function(){if (FCK.EditMode!=FCK_EDITMODE_WYSIWYG) return;var A=FCK.EditorDocument.body.innerText.match(/\[\[[^\[\]]+\]\]/g);if (!A) return;var B=FCK.EditorDocument.body.createTextRange();for (var i=0;i<A.length;i++){if (B.findText(A[i])){var C=A[i].match(/\[\[\s*([^\]]*?)\s*\]\]/)[1];B.pasteHTML('<span style="color: #000000; background-color: #ffff00" contenteditable="false" _fckplaceholder="'+C+'">'+A[i]+'</span>');}}}}else{FCKPlaceholders.Redraw=function(){if (FCK.EditMode!=FCK_EDITMODE_WYSIWYG) return;var A=FCK.EditorDocument.createTreeWalker(FCK.EditorDocument.body,NodeFilter.SHOW_TEXT,FCKPlaceholders._AcceptNode,true);var B=[];while ((oNode=A.nextNode())){B[B.length]=oNode;};for (var n=0;n<B.length;n++){var C=B[n].nodeValue.split(/(\[\[[^\[\]]+\]\])/g);for (var i=0;i<C.length;i++){if (C[i].length>0){if (C[i].indexOf('[[')==0){var D=C[i].match(/\[\[\s*([^\]]*?)\s*\]\]/)[1];var E=FCK.EditorDocument.createElement('span');FCKPlaceholders.SetupSpan(E,D);B[n].parentNode.insertBefore(E,B[n]);}else B[n].parentNode.insertBefore(FCK.EditorDocument.createTextNode(C[i]),B[n]);}};B[n].parentNode.removeChild(B[n]);};FCKPlaceholders._SetupClickListener();};FCKPlaceholders._AcceptNode=function(A){if (/\[\[[^\[\]]+\]\]/.test(A.nodeValue)) return NodeFilter.FILTER_ACCEPT;else return NodeFilter.FILTER_SKIP;}};FCK.Events.AttachEvent('OnAfterSetHTML',FCKPlaceholders.Redraw);FCKXHtml.TagProcessors['span']=function(A,B){if (B._fckplaceholder) A=FCKXHtml.XML.createTextNode('[['+B._fckplaceholder+']]');else FCKXHtml._AppendChildNodes(A,B,false);return A;};

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Package>
<Test></Test>
<Header><![CDATA[]]></Header>
<Constants>
<Constant name="" value="" />
</Constants>
<PackageFile path="fckplugin_compressed.js">
<File path="fckplugin.js" />
</PackageFile>
</Package>

@ -0,0 +1 @@
FCKCommands.RegisterCommand('YouTube',new FCKDialogCommand(FCKLang['DlgYouTubeTitle'],FCKLang['DlgYouTubeTitle'],FCKConfig.PluginsPath+'youtube/youtube.html',600,440));var oYouTubeItem=new FCKToolbarButton('YouTube',FCKLang['YouTubeTip']);oYouTubeItem.IconPath=FCKConfig.PluginsPath+'youtube/youtube.gif';FCKToolbarItems.RegisterItem('YouTube',oYouTubeItem);

@ -55,7 +55,9 @@ FCKConfig.SmileyWindowHeight = 250 ;
FCKConfig.AvailableLanguages = 'en,af,ar,bg,bn,bs,ca,cs,da,de,el,en-au,en-ca,en-uk,eo,es,et,eu,fa,fi,fo,fr-ca,fr,gl,gu,he,hi,hr,hu,is,it,ja,km,ko,lt,lv,mn,ms,nb,nl,no,pl,pt-br,pt,ro,ru,sk,sl,sr-latn,sr,sv,th,tr,uk,vi,zh-cn,zh' ;
// This script selects for loading source/compressed versions of some javascripts and ensures that the English language
// would be shown for plugins, if they are not provided with the requiested language files.
LoadScript( FCKConfig.PluginsPath + 'customizations/fckplugin_load.js' ) ; // Please, do not disable this script.
LoadScript( ( window.document.location.toString().indexOf('fckeditor.original.html') != -1 ) // Please, do not disable this script.
? ( FCKConfig.PluginsPath + 'customizations/fckplugin_load.js' )
: ( FCKConfig.PluginsPath + 'customizations/fckplugin_load_compressed.js' ) ) ;
// Reading the list of the enabled in myconfig.php plugins.
FCKConfig.LoadPlugin = eval( '(' + FCKConfig.PageConfig.LoadPlugin + ')' ) ;
// Loading the enabled plugins.

Loading…
Cancel
Save