Custom Query

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (1 - 100 of 321)

1 2 3 4
Ticket Summary Keywords Owner Type Status Priority
#2024 FCKDialog IE selection error when in source view Confirmed IE HasPatch Review+ Martin Kou Bug closed Must have (possibly next milestone)
Description

When trying to display a dialog using the new FCKDialog while on IE while in source view an error occurs.

IE says "'selection' is null or not an object"

I managed to track this error down to /fckeditor/editor/_source/internals/fckdialog.js line 112.

I don't understand in internal workings of FCKEditor fully. I have managed to work out that it's due to it trying to access the Editor which isn't about while in source view.

Adding a check for the EditMode and using the EditingArea.Textarea to select the selection seems to fix the problem. I'm not 100% sure this is the correct fix so an FCKEditor core dev will have to read though the patch I've attached.

#2324 add support for <source> tag Confirmed HasPatch New Feature closed Must have (possibly next milestone)
Description

it would be nice to see <source> tag handled better by the editor. <source> tag is added by the syntax highlighter extension (http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi)

#3120 # (pound sign) is not correctly escaped in file urls HasPatch Review+ Michael Osipov Bug closed Must have (possibly next milestone)
Description

File and folder names containing # are not correctly escaped.

The problematic spot is frmresourceslist.html, line 92:

window.top.opener.SetUrl( encodeURI( fileUrl ).replace( '#', '%23' ) ) ;

The replace function replaces at most one pound sign. Files won't get encoded correctly and are not accessible through the file browser.

I have attached a patch which works. This should make into 2.6.5.

An alternative would be to sanitize the character.

#3708 [webkit] inline style doesn't work for collpased range Webkit Confirmed HasPatch Garry Yao Bug closed Must have (possibly next milestone)
Description

Reproducing Procedures

  1. Open the replace by class example page in Safari4;
  2. Click inside the text line to result in a collapsed the selection;
  3. Click on any inline style button, e.g. Bold.
    • Actual Result: Style tag is not happened at the selection position.
#76 Display default labels on toolbar combos HasPatch Aleksey Onopriyenko New Feature closed Normal
Description

Instead of having the toolbar combos with no label when the selection doesn't reflect any of the combos options, it would be nice to have the possibility to set a default label to be shown. This would be useful mainly for the Font combo, where one could decide to show the default font name.

The provided patch is a implementation proposal.

#117 FCK.IsDirty() fails in Source view HasPatch Alfonso Martínez de Lizarrondo Bug closed Normal
Description

The check is run against EditorDocument so now that the object is destroyed it raises an error, but previously it did return a wrong state while the user changed the source in the textarea.

	IsDirty : function()
	{
		return ( this.StartupValue != this.EditorDocument.body.innerHTML ) ;
	},

	ResetIsDirty : function()
	{
		if ( this.EditorDocument.body )
			this.StartupValue = this.EditorDocument.body.innerHTML ;
	},
#205 IE: <br> removed from the end of paragraphs Confirmed HasPatch SD-COE Martin Kou Bug closed Normal
Description

If you have the following code in the WYSIWYG

<p>line one</p> <p>line two</p>

If at the end of line one you try and insert a <br> it gets removed when you view the source. However if you insert it at the start of line two then it is fine.

This has been replicated in IE 6 & 7 Works fine in Firefox

#210 More Flexible Upload Directory Control HasPatch New Feature closed Normal
Description

I am using FCK2.4 under cold fusion. I appreciate that one can control the image upload directory on a "per-session" basis and indeed have previously done just this.

However there are occasions when it is absolutely necessary to have each browser instance have its own unique image directory. Say, for example that a CMS manager operator opens one window (with image directory "a/") and then opens another with image directory "b/" to cut and paste some text from that window to the first one. On a session basis the window "b" will hijack the upload directory of window "a" and so any subsequent file activity on window will go to the wrong place. The user might not even notice.

I regard this as bizarre and unnecessary behaviour. I have modified FCK so that it behave the way I want and I am hoping my modifications will be integrated by someone who knows what they are doing in a more clinical and correct manner!!

This is what I did:

After creating the CF object with:

fckEditor = createObject("component", basepath & "FCKeditor");

I added:

fckEditor.Config["UserFilesPath"] = FCKUserFiles;

where FCKUserFiles is my control directory variable

In fckeditor.cfc line 205 ",UserFilesPath" added to end of lconfig. This is where it picks up the variable passed above. The result of this is that the html line (where my instance is called "pageText" is added to the form instance calling FCK. You can see my custom path.

<input type="hidden" id="pageText_Config" value="CustomConfigurationsPath=/fishing2006/FCKeditor/myconfig.js&amp; ToolbarStartExpanded=true&amp;UserFilesPath=fishing2006/userfiles/charters/69&amp; EditorAreaCSS=/fishing2006/include/site.css" style="display:none" />

Now it gets difficult because IE calls up the file browser with showModaldialog whereas gecko spawn another browser. I had to get the UserFiles data over to this window somehow. It then has to be passed to he actual file browser connector.

In editor/js/fckeditorcod_ie.js

On about line 92 (since this code is obfuscated) Look for the showModalDialog on about line 92 and then insert this line before it assuming that the letter A refers to the second argument showModalDialog. For the gecko version it is easier and handled later.

A.UserFilesPath =FCKConfig.UserFilesPath;

In editor/editor/fckdialog.html Line 37 add

var UserFilesPath (create variable)

and then line 45-47

UserFilesPath =  window.dialogArguments.UserFilesPath;
if (window.opener) UserFilesPath = window.opener.FCKConfig.UserFilesPath;
//(this is for gecko because on IE it uses a showModalDialog box and there is no window.opener)

In editor/_source/internals/fckdialog.js Line 90-91

if ( sKey == 'UserFilesPath' )	// My new userfiles path.
	FCKConfig[ sKey ] = sVal ;

In editor/filemanager/browser/default/browser.html Line 50

var sConnUserFilesPath =  window.opener.top.UserFilesPath;

Line 70,74

var sUrl = this.ConnectorUrl + 'Command=' + command ;
sUrl += '&Type=' + this.ResourceType ;
sUrl += '&UserFilesPath=' + encodeURIComponent(sConnUserFilesPath) ;
sUrl += '&CurrentFolder=' + encodeURIComponent( this.CurrentFolder ) ;

In editor/filemanager/browser/default/frmupload.html Line 38-39

sUrl += '&Type=' + resourceType ;
sUrl += '&UserFilesPath=' + encodeURIComponent(window.top.sConnUserFilesPath);
sUrl += '&CurrentFolder=' + encodeURIComponent( folderPath ) ;

In connectors/cfm/connector.cfm Line 46

<cfparam name="url.UserFilesPath" default="thisdirectoryhere">

Line 52-53

userFilesPath = URLDecode(url.UserFilesPath);
//	userFilesPath = config.userFilesPath; (commented out the original)

I hope you are all as confused as I was. Well you get the general idea. Pass the userfiles directory right from the form instance calling FCK up to the file browser connector. Believe it or not this works and I believe should be incorporated as an official change it is so useful!!

#230 Change the default <br> when pasting plain txt with CRLF HasPatch New Feature closed Normal
Description

Sirs, I may seem a pest after my request for more flexible instance directory control but my bosses also asked me to change the paste text behaviour from inserting <br> for line breaks to in this case a <p> or maybe a <div>

I added this to FCKConfig.js (v2.4)

FCKConfig.EntityForCR = "<p>";

And then modified the following files:

fckeditorcode_ie.js approx line 31

FCKTools.HTMLEncode(A).replace(/\n/g,FCKConfig.EntityForCR)

fckeditorcode_gecko.js approx line 34

where it says FCKTools.HTMLEncode just after that tack this at the end A=A.blah bit

A=A.replace(/\n/g,FCKConfig.EntityForCR);return A;

Heaven knows it works! Is this a good idea? Probably not!!

Julian

#232 New code for PHP classe of FCKeditor HasPatch New Feature closed Normal
Description

Hello,

This ticket is here, for propose a new version of classe for PHP 5.x. This new classe using singleton, less ressource asked, and an implementation more easy in our script file.

We can to speak about it with that ticket and check how to ameliorate it.

The new code :

<?php 
/*
 * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * "Support Open Source software. What about a donation today?"
 * 
 * File Name: fckeditor.php
 * 	This is the integration file for PHP.
 * 	
 * 	It defines the FCKeditor class that can be used to create editor
 * 	instances in PHP pages on server side.
 * 
 * File Authors:
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
 * Modification Authors : 
 * 		Alexandre Joly (webmaster@game-anime.com)
 * 		Modification description : Using Singleton
 * 		For PHP > 5.x		
 */

class FCKeditor
{
	private static $Config ;

	private function __construct(){}

	static function CreateHtml($InstanceName, $BasePath='/fckeditor/', $ToolbarSet = 'Default', $Value = '', $Width = '100%', $Height = '200')
	{
		self::$Config = array();
		$HtmlValue = htmlspecialchars( $Value ) ;

		$Html = '<div>' ;
		
		if ( self::IsCompatible() )
		{
			if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" )
				$File = 'fckeditor.original.html' ;
			else
				$File = 'fckeditor.html' ;

			$Link = $BasePath.'editor/'.$File.'?InstanceName='.$InstanceName;
			
			if ( $ToolbarSet != '' )
				$Link .= '&amp;Toolbar='.$ToolbarSet;

			/* 
			 * First field : Render the linked hidden field. 
			 * Seconde field : Render the configurations hidden field.
			 * Third field : Render the editor IFRAME.
			 */
			$Html .= 
			'<input type="hidden" id="'.$InstanceName.'" name="'.$InstanceName.'" value="'.$HtmlValue.'" style="display:none" /> 
			<input type="hidden" id="'.$InstanceName.'___Config" value="" '.self::GetConfigFieldString().' style="display:none" />
			<iframe id="'.$InstanceName.'___Frame" src="'.$Link.'" width="'.$Width.'" height="'.$Height.'" frameborder="0" scrolling="no"></iframe>';
		}
		else
		{
			if ( strpos( $Width, '%' ) === false )
				$WidthCSS = $Width . 'px' ;
			else
				$WidthCSS = $Width ;

			if ( strpos( $Height, '%' ) === false )
				$HeightCSS = $Height . 'px' ;
			else
				$HeightCSS = $Height ;

			$Html .= '<textarea name="'.$InstanceName.'" rows="4" cols="40" style="width: '.$WidthCSS.'; height: '.$HeightCSS.';">'.$HtmlValue.'</textarea>';
		}

		$Html .= '</div>' ;
		
		return $Html ;
	}

	private static function IsCompatible()
	{
		$sAgent = $_SERVER['HTTP_USER_AGENT'] ;

		if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
		{
			$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
			return ($iVersion >= 5.5) ;
		}
		else if ( strpos($sAgent, 'Gecko/') !== false )
		{
			$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
			return ($iVersion >= 20030210) ;
		}
		else
			return false ;
	}

	private static function GetConfigFieldString()
	{
		$sParams = '' ;
		$bFirst = true ;

		foreach ( self::$Config as $sKey => $sValue )
		{
			if ( $bFirst == false )
				$sParams .= '&amp;' ;
			else
				$bFirst = false ;
			
			if ( $sValue === true )
				$sParams .= self::EncodeConfig( $sKey ) . '=true' ;
			else if ( $sValue === false )
				$sParams .= self::EncodeConfig( $sKey ) . '=false' ;
			else
				$sParams .= self::EncodeConfig( $sKey ) . '=' . self::EncodeConfig( $sValue ) ;
		}
		
		return $sParams ;
	}

	private static function EncodeConfig( $valueToEncode )
	{
		$chars = array( 
			'&' => '%26', 
			'=' => '%3D', 
			'"' => '%22' ) ;

		return strtr( $valueToEncode,  $chars ) ;
	}
}

?>
#233 JScript implementation of FCKEditor HasPatch New Feature closed Normal
#243 Form Empties Contents (due to nested <p>'s) Confirmed HasPatch Frederico Caldeira Knabben Bug closed Normal
Description

Here's an issue that appeared to be fixed in 2.4 after Frederico noticed it, but it is back to needing repair in 2.4.1. I was JUST getting ready to put out the new version... :)

  1. Go to the demo. http://www.fckeditor.net/demo
  2. Press ENTER after the text that is already in the editor.
  3. Click the form button to add a form container (any data is fine).
  4. Put the cursor inside the form container and add a text field (any data is fine)
  5. Press ENTER after the text field.
  6. Now click the source button off and on twice to watch the form container "shake out" the element.

I believe it has to do with the form being creatd inside <p> tags and then the form element being placed inside nested <p> tags once ENTER is pressed after it. So when the <p> nesting is being repaired (to make valid) by the editor, it takes the contents with it...not good.

I tried to look up the 2.4 testing forum to find my original post and Frederico's fix post, but I couldn't find the thread (removed?).

Anyway, please, please, repair that again, Frederico.

Thank you, Tom

#275 My solution for images automatic resizing HasPatch New Feature closed Normal
Description

I add my own resizing utility functions in new file imgresize.php

this new file must be placed in editor/filemanager/upload/php/ and

editor/filemanager/browser/default/connectors/php/ dirs

In this file editor/filemanager/browser/default/frmupload.html i change form, added new fields with resize dimensions WxH and quality selector

On server side changed editor/filemanager/upload/php/upload.php
and

editor/filemanager/browser/default/connectors/php/commands.php

See changed source in attachments

#288 Modify linker to allow internal CMS links. HasPatch New Feature closed Normal
Description

Internal Links Modification

I have been modifying the CMSContent plugin posted on the forums to work with the Drupal CMS.

While in development, I realized that this plugin would be a great addition to the core of FCK. Perhaps adding an option to specify something that should be prepended to CMS links so they are consistent after host or folder changes.

For example, in the default linker, there could be another tab for "Internal Link" which would display a list or tree of the pages in the site. The only difference between selecting one of these internal links and a regular link is that it would prepend, in Drupal's case, "internal:" to the url.

Areas to consider

  • A list a pages of the CMS is required. Perhaps calls a PHP, ASP, or whatever script that returns some JSON of Titles and URLs.
  • All internal links would need to have the proper structure appended, but this could be taken care of by the script call.
  • Anything in the preview would need to have the 'internal:' or whatever replaced to display correctly. The replacement string could be set in the FCK config at load time.

Requirements supplied to FCK

  • Script location to return list of Titles and URLs
  • Replacement for special string to allow previews to work ie 'internal:' => '/webdev/testing_drupal_site/'

I am just thinking aloud, so please feel free to chime in.

#408 Overwrite Uploaded Files HasPatch New Feature closed Normal
Description

What about a Request for Overwriting the uploaded Files instead of Incrementing a number which is added to the Filename? My Userfiles Folders are full of different Files in different Versions.

#409 Thumbnail preview for Uploaded Pictures HasPatch New Feature closed Normal
Description

What about a thumbnail view of the Uploaded Files, that would make it even easier to find the files.

#548 Context menu should recursively allow user to edit parent's Tags HasPatch New Feature closed Normal
Description

If you have :

<P>
  <DIV>
    <TABLE>
      <TR>
        <TD>
        Cursor here
        </TD>
      </TR>
    </TABLE>
  </DIV>
</P>

And you right click where 'Cursor here' is, the context menu should show :


Edit Table Cell
Edit Table Row
Edit Table
Edit DIV
Edit P


All the hierarchy until you reach the <BODY> Tag. Else, how are you suppose to edit the style of a the P tag for instance? ...

#602 Syntax highlight and go to line SF HasPatch New Feature confirmed Normal
Description

It would be a great idea to be able to use highlighting in source mode like you get in some text editors for coding.

a button for go to line would be great because sometimes you have this huuuge files and you got an error on line 345. Would be great for debugging.


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=972673&group_id=75348&atid=543656

#613 Support for any directory SF HasPatch New Feature closed Normal
Description

I don't know if this is a improve or what, but it's very useful. My example is based on fckeditor.php

I suggest replace the line 38, by these lines:

$FCK_PATH =
str_replace("\\",'/',substr(dirname(__FILE__),strlen($_SERVER['DOCUMENT_ROOT'])));
if (!ereg('/$', $FCK_PATH)){
$FCK_PATH .= '/';
}
// directory where FCKeditor files are located
$this->BasePath = $FCK_PATH;

These lines load the base path automatically...


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1101990&group_id=75348&atid=543656

#625 Relative URLs SF HasPatch New Feature closed Normal
Description

It would be nice if there was a way to put in a relative URL from the link dialog box without having to select the protocol type as "other". Perhaps adding "Relative URL" to the list of URL types along with email and anchor would be appropriate, and just have it bring up a div similar to the normal URL but without the protocol?


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1171898&group_id=75348&atid=543656

#681 SpellerPages ignores text after links SF Confirmed HasPatch Bug closed Normal
Description

When using the SpellerPages spell check function, try spell checking the following:

This is mispeled here is a link and this is mispeled too

where the word "link" is a link. SpellerPages detects the first "mispeled" as an error but ignores the one after the link.


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1334262&group_id=75348&atid=543653

#685 Missing TemplatesXmlPath Property in FCKeditor.cs SF HasPatch Bug closed Normal
Description

The ablility to set a custom path for Templates is missing in .NET versions. I added the below code to FCKeditor.cs and corrected issue.

/// <summary>
/// TemplatesXmlPath- added because suppose
/// to be there
/// </summary>
[ Category("Configurations") ]
public string TemplatesXmlPath
{
set { this.Config["TemplatesXmlPath"] = value ; }
}

Moved from SF:[[Bhttp://sourceforge.net/tracker/index.php?func=detail&aid=1346349&group_id=75348&atid=543653R]]

#709 CustomConfigurationPath doesn't support virtual root ~ SF HasPatch Bug closed Normal
Description

If a site is in a virtual root directory, vroot (via the ~ symbol)like this: www.mydomain.com/vroot/FCKEditor, My BasePath="~/FCKEditor".

This doesn't work for CustomConfigurationPath. I can't use CustomConfigurationPath="~/FCKEditorConfig/fckconfig.js". I have to used CustomConfigurationPath="/vroot/FCKEditorConfig/fckconfig.js".


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1466887&group_id=75348&atid=543653

#857 tab index as a html form element SF HasPatch New Feature closed Normal
Description

it will be great to set a tab index for the fck-textarea

see me patch for the php class

1403823 insert tabindex in fckeditor.php


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1403830&group_id=75348&atid=543656

#862 SpellerPages for PHP while Safe Mode is On (solution within) SF HasPatch New Feature closed Normal
Description

I've been using the FCKEditor for Joomla plugin, that mostly uses the PHP side of things.

Because of the usage of shell_exec, it is not possible to use aspell is Safe Mode is on.

However, I've made a few changes to print_checker_results() in editor/dialog/fck_spellerpages/server-scripts/spellchecker.php that should provide aspell functionality while Safe Mode is on.

The there are two security settings that will be required, however.

First, you must allow the operation of proc_open. Secondly, you must have aspell located or linked into your safe_mode_exec_dir.

Things to note about these changes:

I'm not primarily a PHP coder, but I've dabbled. There are probably better ways to do what I've done, but these get the job done.

I did have a version that streamed the $tempfile straight out to the read pipe, but decided to read from the file instead, for simplicity.

Also decided to keep the error file if things didnt go so well.

Anyway, I hope these changes get added to the next release. If there is a more formal way I should be submitting this, like a patch, please let me know.

Here are the changes:

// from when the tempfile is generated
fclose($fh);

$othertemp = tempnam($tempfiledir, 'aspell_error_');^M
$descarray = array (
0 => array("file", $tempfile, "r"),
1 => array("pipe", "w"),
2 => array("file", $othertemp, "a"));

$process = proc_open($aspell_prog . " " . $aspell_opts,
$descarray, $pipes);

if (is_resource($process)) {
$aspellret = '';
while (!feof($pipes[1])) {
$aspellret .= fread($pipes[1], 8192);
}
fclose($pipes[1]);
$rc = proc_close($process);
}

// previous read if( $aspellret = shell_exec( $cmd )) {
if( $rc == 0) {^M
unlink($othertemp); // remove error file if no error
$linesout = explode( "\n", $aspellret );^M
// continue process the output as normal

Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1417319&group_id=75348&atid=543656

#870 Images resized by control points, less pixelated SF HasPatch New Feature closed Normal
Description

Here is a proposal that would solve pixelation problems from using a browser to resize images.

It sure would be slick if FCKeditor had an option to insert images in the form: /fckeditor/image_resizer.php? image=selected_image.jpg&w=300&h=123

This image_resizer.php script would use Imagemagick, GD, or another util to resize the image, store a cached copy of it on disk, and output the image.

Now FCKeditor could ran a check every 500ms or so to see if any images had changed dimensions from being dragged via control points, and if they did, then it would update their src URL, adjusting the width and height parameters appropriately.

Voila, no more pixelated images, and no having to explain to someone to resize via Photoshop.


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1446677&group_id=75348&atid=543656

#875 Make editor detectable on server side SF HasPatch New Feature closed Normal
Description

One problem my company has encountered is detecting if this editor was used. Unfortunately, not all browsers support this great editor. So, especially when you're using it in a 450,000-member forum, you start to hear complaints when some people's text is formatted and others' isn't.

We set a format=y/n flag in our database on each message, but we are having ot set it to 'n' on everything because carriage returns will be doubled if we format messages upon display that have already been edited by the FCKeditor.

So, we made this temporary change to fckeditor.php in the function CreateHtml():

$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config
\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\"
/
>" ;

-to-

$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config
\" name=\"{$this->InstanceName}___Config\" value=\"" . $this-
>GetConfigFieldString() . "\" style=\"display:none\" />" ;

That way, we can detect that that field was editing using the FCKeditor by

testing for

isset($_POST['body___Config'])

and setting the y/n flagaccordingly.

Just an idea.

Nicholas

#883 FTP upload for picturs with the PHP connector SF HasPatch New Feature closed Normal
Description

It seems to be more security than change rights to the directory system. Soring files vie PHP ftp command is even better. You must only change the rights for a temporary directory and not for your working dir.


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1482502&group_id=75348&atid=543656

#904 Lotus Notes Domino Connector upload parameter SF HasPatch New Feature closed Normal
Description

Most of the implementations of FCKEditor for Lotus Notes Domino completely disable the ability to upload including the discussion you link to here https://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/09467d31ceb6c94885257084006b57db?OpenDocument.

I've implemented a version that has very light changes to your code, specifically fck_flash.js, fck_image.js and fck_link.js.

The core problem that domino has, is that when a file is uploaded, the name of the <input type="file"> must use a name, specified by the processing design element that process it.

If you could make these 3 tiny changes it would prevent us from having to muck with them and allow an unmodified FCKEditor install to work fully functional with Domino.

in fck_flash.js near

if ( FCKConfig.FlashUpload )
GetE('frmUpload').action =
FCKConfig.FlashUploadURL ;

Add also:

if(FCKConfig.FlashUploadName)
GetE
("txtUploadFile").name=FCKConfig.FlashUploadName;

in fck_image.js near

if ( FCKConfig.ImageUpload )
GetE('frmUpload').action =
FCKConfig.ImageUploadURL ;

Add also:

if(FCKConfig.ImageUploadName)
GetE
("txtUploadFile").name=FCKConfig.ImageUploadName;

in fck_link.js near

if ( FCKConfig.LinkUpload )
GetE('frmUpload').action =
FCKConfig.LinkUploadURL ;

Add also:

if(FCKConfig.LinkUploadName)
GetE
("txtUploadFile").name=FCKConfig.LinkUploadName;

I've blogged about it here.

http://www.dwightwilbanks.org/dwightwilbanks/blog.nsf/d6plinks/SERR-6KEBTH

As you can see, the impact is very light, on everyone else, but, significant to us.


Moved from SF:
http://sourceforge.net/tracker/index.php?func=detail&aid=1503078&group_id=75348&atid=543656

#993 Preserve formatting of ProtectedSource elements HasPatch New Feature closed Normal
Description

The FCK.GetXHTML() displays the content in a dirty format(no new line characters). It is different from what the user actually sees in the actual file. It would be good if FCK editor did not mess around with the format of the file and leave the content as it is. This can be enabled as a configurable property in the FCKConfig.js file so that any user who wants the editor to handle formatting can enable it too.

Anusha

#1015 Badly nested italic/bold markup can cause round-trip problems from MediaWiki markup to FCK and back to MediaWiki HasPatch Bug closed Normal
Description

The MediaWiki markup

a''b'''c''d'''e

changes to the markup

a''b'''c''''''''d'''e

when converted to FCK and back to MediaWiki markup (by changing to wikitext mode, entering the markup given as an example, then changing out of and back into wikitext mode); the second markup is incorrect, as it renders as normal a, italic b, bold italic c, three apostrophes, normal d, bold e, rather than normal a, italic b, bold italic c, bold d, notmal e. I suspect this is because the correct HTML for the example markup is

a<i>b<b>c</b></i><b>d</e>e

and the markup produced by substituting two apostrophes for each opening or closing i and three apostrophes for each opening or closing b produces the output that FCK gave; this is, however, incorrect, as the MediaWiki parser doesn't interpret more than five apostrophes in a row correctly. The wikimarkup produced by the editor should be equivalent to the original in such a case, either by detecting this and similar conditions to recreate the original, or by using HTML tags rather than apostrophes to prevent such a long string of consecutive apostrophes (for instance, one correct version of the markup is

a''b'''c'''''<b>d</b>e

, produced by using HTML rather than wikimarkup at the point where the sixth apostrophe would otherwise be created).

#1019 FCKTableCommand are not context sensitive Confirmed HasPatch Bug closed Normal
Description

The FCKTableCommand class is not context sensitive and this causes the icons from the tablecommands plugin to always be active even if the user is outside of a table.

It should be easy to add correct GetState function to this class.

Something like:

if(FCK.EditorDocument != null){

if(FCKSelection.HasAncestorNode('TABLE')){

return FCK_TRISTATE_OFF ;

}

} return FCK_TRISTATE_DISABLED;

#1055 onerror handler for editing area Confirmed HasPatch Review+ Martin Kou New Feature closed Normal
Description

In FCKEditingArea one can see the commented lines with a todo task.

// 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 ; }

Fortunately I've found a possible solution. An error handler can be attached to the iframe's content window by adding the script tag that does it during the rendering of iframe's body (see below). It seems that the dynamic attaching of the handler is not implemented in IE.

var oDoc = this.Document = this.Window.document ;

oDoc.open() ;
oDoc.write('<script>window.onerror = function() { alert( 'Error!' ) ; return true ; };</scr'+'ipt>') ;
oDoc.write( html ) ;
oDoc.close() ;

#1058 replace LCASE with LOWER in SQL HasPatch Bug closed Normal
Description

I'm using postgres for mediawiki storage and found a problem with the FCKEditor plugin when searching for a link to add. Postgresql only recognises LOWER as a lowercase SQL function but MySQL recognises LCASE as well. I suggest changing LCASE in the FCKEditor plugin code to LOWER then it should be compatible with both.

The changes are in FCKeditorSajax.body.php, lines 58 and 105.

#1063 Norwegian language files: Inconsistency with naming of anchor HasPatch Bug closed Normal
Description

This applies to the Norwegian language files.

When inserting a link in the editor and selecting to link to an anchor, the text says "Lenke til bokmerke i teksten" (bookmark is used instead of anchor). The Norwegian word for anchor (anker) is used everywhere else and should also be used for the key DlgLnkTypeAnchor.

I'm attaching two patch files with the suggested change. Please correct me if I'm wrong.

#1084 Norwegian: Missing translation for "Format" Normal (DIV) HasPatch Bug closed Normal
Description

The summary says it all. The second choice in the Format dropdown is "undefined" in Norwegian. I'm attaching patch files for no.js and nb.js

#1092 Norwegian: Suggested changes to the norwegian language files HasPatch Bug closed Normal
Description

The word "celleegenskaper" is used several places, but "celle egenskaper" is used for DlgCellTitle. "celleegenskaper" is the right one.

"pixels" is translated to "pixeler"; Norwegian has several words that can be used, but pixeler is more like an imported English word. The more correct word would be "piksler".

I'm attaching patchfiles with the suggested changes.

#1252 Thai language for fckeditor 2.4.3 HasPatch Bug closed Normal
Description

Thai language for fckeditor 2.4.3

#1338 Avoid hardcoding border width for Gecko browsers HasPatch Pending Bug closed Normal
Description

Gecko browsers assume that xEditingArea has a 1-pixel border. Changing this to be determined dynamically would allow greater customizability in skins (for example, a borderless editor or an editor with a beveled border).

#1349 Mozilla style="-moz-style: -moz-initial" HasPatch Bug closed Normal
Description

Sometimes mozilla can pollute html with -moz-xxx: moz-initial styles.

This breaks w3c style validation, and is unnecessary and annoying.

Can I suggest that when the editor switches to source, a regexp replace is ran that removes these styles.

Something like this would do the trick...

if(FCKBrowserInfo.IsGeckoLike)
{
	sHTML = sHTML.replace( /\s*-moz-[^:]+: -moz-initial\s*;/g, '' ) ;
}

Cheers

Scott

#1362 Fix link generated when image uploaded on server SF HasPatch Bug closed Normal
Description

When you upload directly an image on the server with the c# adapter, the url is not resolved then you have to fix it or the generated link won't be usable without a hand modification.

FredCK.FCKeditorV2.Uploader.cs (V 2.1)
line 92: function SendResults

Response.Write( "window.parent.OnUploadCompleted(" + errorNumber + ",'" + fileUrl.Replace( "'", "\\'" ) + "','" + ResolveUrl(fileName.Replace( "'", "\\'" )
+ "','" + customMsg.Replace( "'", "\\'" )) + "') ;" ) ;

Moved from sourceforge Original author: anonymous

#1364 ASP.NET control TextChanged event SF HasPatch New Feature closed Normal
Description
Index: FCKeditor.cs
===================================================================
--- FCKeditor.cs (revision 118)
+++ FCKeditor.cs (working copy)
@@ -390,7 +390,7 @@

#region Postback Handling

- public bool LoadPostData(string postDataKey,
System.Collections.Specialized.NameValueCollection postCollection)
+ public virtual bool LoadPostData(string postDataKey,
System.Collections.Specialized.NameValueCollection postCollection)
{
if ( postCollection[postDataKey] != this.Value )
{
@@ -400,11 +400,22 @@
return false ;
}

- public void RaisePostDataChangedEvent()
+ public virtual void RaisePostDataChangedEvent()
{
- // Do nothing
+ OnTextChanged(EventArgs.Empty);
}

#endregion
- }
+
+ #region Event Handlers
+
+ public event EventHandler TextChanged;
+
+ protected void OnTextChanged(EventArgs e)
+ {
+ if (TextChanged != null) TextChanged(this, e);
+ }
+
+ #endregion
+ }
}

Moved from sourceforge
Original author: Marcus L

#1371 Getting InstanceName though iframe ID SF HasPatch New Feature closed Normal
Description

FCKEditor currently communicates the InstanceName to fckeditor.html by setting it in the GET string.

Due to a restriction (not really relevant to describe here) in our case the use of a GET string was impossible.

We found a way to work around this by extracting the InstanceName from the ID of the enclosing iframe instead of from the GET-string. Relevant code snippet:

var frameid = this.frameElement.id;
var InstanceName = frameid.substring(0, frameid.length - 8);

It might be a nice idea to use this instead of looking at the GET-string.


Moved from sourceforge
Original author: Arnout Engelen

#1379 OnRequestEnd breaks CFM Connector Confirmed HasPatch Bug closed Normal
Description

If you are using an OnRequestEnd.cfm file with your coldfusion site, and the OnRequestEnd.cfm outputs any content, the CFM connector will not show any files in the browser.

To fix, add a <cfabort> tag to the end of the connector.cfm file in <siteroot>/fckeditor/editor/filemanager/browser/default/connectors/ cfm/


Moved from SF

Original Author: Joris de Beer

#1380 remove special characters in uploaded file URL HasPatch New Feature closed Normal
Description

Add the following line in the /filemanager/browser/default/connectors/php/commands.php file in order to replace all characters unreadable in an URL by an underscore (_)

In function FileUpload around line 143 after

// Get the uploaded file name.
$sFileName = $oFile['name'] ;
$sOriginalFileName = $sFileName ;

#### LINE TO ADD ####

$sFileName = eregi_replace("[^a-z0-9.]", "_", $sFileName);

Could be a lot improved because it only keep the numerical and alphabetical characters and the point (for file extension) but it was enough for my need ;-)

Cheers Nicolas


Moved from SF

#1385 FCKeditor Converts to HTML on "Edit Conflict" Confirmed HasPatch Bug closed Normal
Description

If you're in the process of making an edit and someone else edits the page, an "edit conflict" occurs. HOWEVER, unlike normal WikiText edits, FCKeditor compares the "new edited page" against an HTML marked-up version including your change.

As such, you can't just copy and paste the segments that you want to add to the new article. It's all lost in a bunch of HTML mark-up.

#1406 IsDirty is always dirty if you have flash added HasPatch Bug closed Normal
Description

The IsDirty flag is always set to true on load of a flash element. I have done a fix on: FCKeditor.prototype.Version = '2.4.3' ; FCKeditor.prototype.VersionBuild = '15657' ;

file is attached

#1410 Category Management within FCKeditor Confirmed HasPatch Deimon New Feature closed Normal
Description

I like fckeditor for Mediawiki a lot. What I would find useful (and so might others) is some sort of Category Manager. By this I simply mean the ability to assign/create a category for the current document from the menu. It would access the database and create a dropdown (or pop-up, doesn't matter which) which would allow the user to select (or create new) a category for the current document.

Thanks for the amazing hard work that went into the creation of fckeditor. I was afraid I was going to have to create something like it myself, and that would be way beyond me.

David Barker

#1418 FCKToolbarSet Detached Toolbar Flicker HasPatch Bug closed Normal
Description

When the toolbar is detached, and using the IFRAME mode, the toolbar can flicker on load as as it adjusts its size. There is a browser hack which adjusts the frame height using setTimeout() with a delay of 1 second,

I beleive the way that this is implemented could be improved.

The code is: window.onload = function () {adjust(); window.setTimeout( adjust, 1000 ); }

  • The initial call to adjust() is not needed as when it adjusts, on most browsers it adjusts to the wrong size anyway (causing flicker)
  • There does not appear to be a need for the 1000ms delay (calling it via setTimeout ensures anyway that the DOM has been fully constructed before calling the function)

I suggest that this be changed to simply:

window.setTimeout( adjust, 0 );

I have attached a patch.

#1432 Patch for template: line breaks in IE and documentation preview HasPatch Bug closed Normal
Description

IE does not seem to retain line breaks in templates. In addition, I added a tab to the template dialog to see the templates page (it will display a documentation on the selected template if there is a noinclude part).

In FCKeditorParser.body.php

$this->fck_mw_strtr_span['Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw'] = '<span class="fck_mw_template">'.str_replace(array("\r\n", "\n", "\r"),"fckLR",$inner).'</span>';

In fckplugin.js:

case 'fck_mw_template' :		
stringBuilder.push( FCKTools.HTMLDecode(htmlNode.innerHTML).replace(/fckLR/g,'\r\n') ) ;
return ;

In FCKeditorSjax.body.php, add:

function wfSajaxSearchTemplateFCKeditor($empty)
{
    global $wgContLang, $wgOut; 
    $ns = NS_TEMPLATE;

    $db =& wfGetDB( DB_SLAVE );
    $res = $db->select( 'page', 'page_title',
    array(  'page_namespace' => $ns),
    "wfSajaxSearch"
    );

    $ret = "";
    while ( $row = $db->fetchObject( $res ) ) {
        $ret .= $row->page_title ."\n";
    }

    return $ret;
}

The patched template.html is in attachment.

#1437 Patch to properly handle MW Special Tags HasPatch Bug closed Normal
Description

Replace the line breaks in special tags to be sure not to lose them in IE6. Also give the special tags a common class to be able to identify them in fckplugins.js and replace it by an image, like templates.

In FCKeditorParser.body.php:

    private function fck_addToStrtr($text) {
        $key = 'Fckmw'.$this->fck_mw_strtr_span_counter.'fckmw';
        $this->fck_mw_strtr_span_counter++;
        $this->fck_mw_strtr_span[$key] = str_replace(array("\r\n", "\n", "\r"),"fckLR",$text);
        return $key;
    }


function fck_genericTagHook( $str, $argv, $parser ) {
        if (empty($argv)) {
            $ret = "<span class=\"fck_mw_special\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\">"; //YC
        }
        else {
            $ret = "<span class=\"fck_mw_special\" _fck_mw_customtag=\"true\" _fck_mw_tagname=\"".$this->fck_mw_taghook."\""; //YC

In FCKeditorSajax.body.php:

function wfSajaxSearchSpecialTagFCKeditor($empty)
{
    global $wgParser;

    $ret = "";
    foreach ($wgParser->getTags() as $h) {
        if (!in_array($h, array("pre"))) {
            $ret .= $h ."\n";
        }
    }
    return $ret;
}

In fckplugin.js:

tbButton = new FCKToolbarButton( 'MW_Special', 'Special Tag', 'Insert/Edit Special Tag' ) ;
tbButton.IconPath = FCKConfig.PluginsPath + 'mediawiki/images/tb_icon_special.gif' ;
FCKToolbarItems.RegisterItem( 'MW_Special', tbButton ) ;

FCKCommands.RegisterCommand( 'MW_Special', new FCKDialogCommand( 'MW_Special', 'Special Tag Properties', FCKConfig.PluginsPath + 'mediawiki/dialogs/special.html', 400, 330 ) ) ; //YC

---------------------------------
// Text Node.
case 3 :
	var parentIsSpecialTag = htmlNode.parentNode.className.IEquals( 'fck_mw_special', 'fck_mw_template' ) ; //YC
	var textValue = htmlNode.nodeValue;
	
	if ( !parentIsSpecialTag ) //YC
	{
		if (!this._IsInPre(htmlNode))
			textValue = textValue.replace( /[\n\t]/g, ' ' ) ; 
	
		textValue = FCKTools.HTMLEncode( textValue ) ;
		textValue = textValue.replace( /\u00A0/g, '&nbsp;' ) ;
		
		if ( !htmlNode.previousSibling ||
			( stringBuilder.length > 0 && stringBuilder[ stringBuilder.length - 1 ].EndsWith( '\n' ) ) )
		{
			textValue = textValue.LTrim() ;
		}

		if ( !htmlNode.nextSibling )
			textValue = textValue.RTrim() ;

		textValue = textValue.replace( / {2,}/g, ' ' ) ;

		if ( this._IsInsideCell )
			textValue = textValue.replace( /\|/g, '&#124;' ) ;
		
	}
	else 
	{
		textValue = FCKTools.HTMLDecode(textValue).replace(/fckLR/g,'\r\n');
	}

---------------------------------
// MediaWiki document processor.
FCKDocumentProcessor.AppendNew().ProcessDocument = function( document )
{
	// Templates and magic words.
	var aSpans = document.getElementsByTagName( 'SPAN' ) ;

	var eSpan ;
	var i = aSpans.length - 1 ;
	while ( i >= 0 && ( eSpan = aSpans[i--] ) )
	{
		var className = null ;
		switch ( eSpan.className )
		{
			case 'fck_mw_ref' :
				className = 'FCK__MWRef' ;
			case 'fck_mw_references' :
				if ( className == null )
					className = 'FCK__MWReferences' ;
			case 'fck_mw_template' :
				if ( className == null ) //YC
					className = 'FCK__MWTemplate' ; //YC
			case 'fck_mw_magic' :
				if ( className == null )
					className = 'FCK__MWMagicWord' ;
			case 'fck_mw_special' : //YC
				if ( className == null )
					className = 'FCK__MWSpecial' ;
---------------------------------
// Context menu for templates.
FCK.ContextMenu.RegisterListener({
	AddItems : function( contextMenu, tag, tagName )
	{
		if ( tagName == 'IMG' )
		{
			if ( tag.getAttribute( '_fck_mw_template' ) )
			{
				contextMenu.AddSeparator() ;
				contextMenu.AddItem( 'MW_Template', 'Template Properties' ) ;
			}
			if ( tag.getAttribute( '_fck_mw_magic' ) )
			{
				contextMenu.AddSeparator() ;
				contextMenu.AddItem( 'MW_MagicWord', 'Modify Redirect' ) ;
			}
			if ( tag.getAttribute( '_fck_mw_special' ) ) //YC
			{
				contextMenu.AddSeparator() ;
				contextMenu.AddItem( 'MW_Special', 'Special Tag Properties' ) ;
			}

Dialog special.html in attachment.

#1483 German language Support (Preferences) -> MediaWiki+FCKeditor HasPatch New Feature closed Normal
Description

I translated the language file to German.

#1488 new php5 connector Confirmed HasPatch New Feature closed Normal
Description

Description of changes:

Continued with the update to proper php5

  • Removed depreciated 'var' tag from properties, added proper keywords.
  • Cleaned up the User Agent code
  • Separated out the public methods from the helper methods

Removed EncodeConfig method and replaced all occurrences of it with the php urlencode function

Optimized how the strings were formed (concatenating as opposed to embedding, which tends to run slower)

Refractored some odd if/else conditionals to use the ternary conditional instead

Added an 'ID' property so developers can specify the ID instead of using the InstanceName

The biggest thing about this is that I made changes so it matched the PHP5 OOP structure. PHP5 is backwards compatible with PHP4, so this class still worked, but work on PHP6 is underway and I doubt it will be backwards compatible all the way back to PHP4 so I brought everything up to date.

There were a couple of other changes, mostly to just make more efficient use of PHP. All the methods still return the same information (except for EncodeConfig, which wasn't really called by the public anyways). Default behavior is still the same- if a developer doesn't specify the ID, for instance, it still defaults to the InstanceName. I was able to drop the file into a couple of different places where I've used FCKeditor without having any issues.

#1531 Update Spanish Translation for Placeholder Plugin HasPatch Review+ Martin Kou New Feature closed Normal
Description

In /FCKeditor/trunk/editor/plugins/placeholder/lang/ I've seen that spanish translation (es.js) not exist! So I made a simple translation for this file.

I attach the file.

Also I use filemanager from Fckeditor, but this feature don't have any files for translation in others languages. Please, You can check this!

#1545 Support packing namespace constants ( jsMyObject.MYCONSTANT=1; ) HasPatch New Feature closed Normal
Description

Our project has many namespace constants which we want to be packed.

Below shows constant declarations we wish to have processed:

In the javascript:

jsTreeView.EXPAND  	 = 1;
jsTreeView.COLLAPSE      = 2;
jsTreeView.TOGGLE  	 = 3;

In the FCKPackager.xml:

<Constant name="jsTreeView.EXPAND" value="1"/>
<Constant name="jsTreeView.COLLAPSE" value="2"/>
<Constant name="jsTreeView.TOGGLE" value="3"/>

We modified fckpackager.php to support packing these. I'm posting our changes here for consideration.

The following method was modified in class FCKConstantProcessor:

	function Process( $script )
	{
		if ( !$this->HasConstants )
			return $script;

		$output = $script ;

		if ( $this->RemoveDeclaration )
		{
			// /var\s+(?:BASIC_COLOR_RED|BASIC_COLOR_BLUE)\s*=.+?;/
			// remove if global constant
			$output = preg_replace(
				'/var\\s+(?:' . $this->_ContantsRegexPart . ')\\s*=.+?;/m',
				'', $output ) ;

			// remove if namespace constant  (jsMyObject.MYCONSTANT=1;)
			$output = preg_replace(
				'/(?<!\\w)(?:' . $this->_ContantsRegexPart . ')\\s*=[^=]+?;/m',
				'', $output ) ;
		}

		$output = preg_replace_callback(
			'/(?<!var\\s|...\.|\\w)(?:' . $this->_ContantsRegexPart . ')(?!\\w|\\s*=[^=])/',
			array( &$this, '_Contant_Replace_Evaluator' ), $output ) ;

		return $output ;
	}

The above also includes the possible fix noted in #1244

#1563 CSS Table Support (Code Attached) HasPatch New Feature confirmed Normal
Description

My site uses css to define some default tables. fckEditor table dialog can not overwrite the css system, because the css has prioiry over html atributes. We have recoded the table dialogs to add css rules dynamicly to the page. Files attached with code and screen dumps.

#1576 Editor height is always =300px Pending WorksForMe HasPatch Bug closed Normal
Description

MediaWiki 1.11.0, browsers: FireFox 2.0, MSIE 7.0

Editor height is always set to 300. Proposition: In file FCKeditor/FCKeditor.body.php replace lines

function onLoadFCKeditor()
[...]
height = ( !height || height < 300 ) ? 300 : height ;

with code:

function onLoadFCKeditor() {

 var box = document.getElementById('wpTextbox1');
 if ( box ) {

  var height = $wgFCKEditorHeight ;
  if ( height == 0 ) {

   height = box.offsetHeight;
   var tBar = document.getElementById('toolbar');
   if ( tBar )
    height += tBar.offsetHeight;
   height += 1;

   if ( ! height ) {
    var aTop = tBar;
    if ( ! aTop )
     aTop = box;
    var aBottom = document.getElementById('editpage-copywarn');

    if ( aTop && aBottom )
     height = aBottom.offsetTop - aTop.offsetTop - 6;
   }
  }

  // Enforce a minimum height.
  height = ( !height || height < 300 ) ? 300 : height ;
#1608 RegisterDoubleClickHandler overwrites HasPatch Bug closed Normal
Description

Problem: When you call RegisterDoubleClickHandler for a certain tag, i.e. IMG, the new handler will overwrite the old one in all cases. Desired behavior: Both old and new handlers will get called.

Example: Let's say you have a handler that checks to see if the IMG tag is of class "x". If so, it will alert(1) when you click on an image with CSS class of "x". But if you register a new handler for IMG, say for example one that is for class of "y" - this will overwrite the handler for IMG's with class "x" and the alert will not get called.

Proposed patch:

Replace the existing RegisterDoubleClickHandler with this function:

// Register objects that can handle double click operations.
FCK.RegisterDoubleClickHandler = function( handlerFunction, tag )
{
  if (FCK.RegisteredDoubleClickHandlers[tag.toUpperCase()])
  {
    var oldfunction = FCK.RegisteredDoubleClickHandlers[ tag.toUpperCase() ];
    FCK.RegisteredDoubleClickHandlers[ tag.toUpperCase() ] = function(arg)
    {
      oldfunction(arg);
      handlerFunction(arg);
    }
    return;
  }
  FCK.RegisteredDoubleClickHandlers[ tag.toUpperCase() ] = handlerFunction;
}

Moved from http://sourceforge.net/tracker/index.php?func=detail&aid=1618399&group_id=75348&atid=543655

#1610 IsCompatible Function and Pocket IE HasPatch Bug closed Normal
Description

If FCKeditor finds a Pocket IE it marks it as compatible but nothing loads on the screen.

I've modified the IsCompatible Function for ASP integration with:

Private Function IsCompatible()
(...)
If InStr(sAgent, "Windows CE") > 0 Then ' Check Pocket IE
IsCompatible = False
(..)

Now the editor not load on Pocket IE and it display the textarea!

Regards,

Simone


Moved from http://sourceforge.net/tracker/index.php?func=detail&aid=1385128&group_id=75348&atid=543655

#1611 use JS to "detect" browser-JS-capability HasPatch New Feature closed Normal
Description

This is the fckeditor.php file as I've also sent it to Frederico.

It obsoletes the isCompatible() method and uses javascript itself to "detect" if it is compatible. Simply by using document.write().

It also detects/converts the Width and Height members better to html attribute values.

It was based on 2.1.

<?php
/*
* FCKeditor - The text editor for internet
* Copyright (C) 2003-2005 Frederico Caldeira Knabben
*
* Licensed under the terms of the GNU Lesser General
Public License:
* http://www.opensource.org/licenses/lgpl-license.php
*
* For further information visit:
* http://www.fckeditor.net/
*
* "Support Open Source software. What about a donation
today?"
*
* File Name: fckeditor.php
* This is the integration file for PHP.
*
* It defines the FCKeditor class that can be used to
create editor
* instances in PHP pages on server side.
*
* File Authors:
* Frederico Caldeira Knabben (fredck@fckeditor.net)
* Daniel HAHLER (https://www.thequod.de/contact)
*/

class FCKeditor
{
var $InstanceName ;
var $BasePath = '/FCKeditor/' ;
var $Width = '100%' ;
var $Height = '200px' ;
var $ToolbarSet = 'Default' ;
var $Value = '' ;
var $Config = array();
/**
* @var int The number of rows for the textarea
element (used as non-JS-fallback).
*/
var $TextareaRows = 8;
/**
* @var int The number of cols for the textarea
element (used as non-JS-fallback).
*/
var $TextareaCols = 40;


// PHP 5 Constructor (by Marcus Bointon
<coolbru@users.sourceforge.net>)
function __construct( $instanceName )
{
$this->InstanceName = $instanceName ;
$this->BasePath = '/FCKeditor/' ;
$this->Width = '100%' ;
$this->Height = '200' ;
$this->ToolbarSet = 'Default' ;
$this->Value = '' ;

$this->Config = array() ;
}

// PHP 4 Contructor
function FCKeditor( $instanceName )
{
$this->__construct( $instanceName ) ;
}


function Create()
{
echo $this->CreateHtml() ;
}


/**
* Create the HTML that will either display the input-
and iframe-elements or
* a simple textarea for non-Javascript browsers.
*
* Javascript-"detection" is done by using JS to write
the inputs/iframe for
* FCKeditor and putting the textarea tag into the
following noscript tag.
*
* @return string
*/
function CreateHtml()
{
$HtmlValue = htmlspecialchars( $this->Value ) ;

if ( isset( $_GET['fcksource'] ) &&
$_GET['fcksource'] == "true" )
$File = 'fckeditor.original.html' ;
else
$File = 'fckeditor.html' ;
$Link =
"{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}"
;

if ( $this->ToolbarSet != '' )
$Link .= "&amp;Toolbar={$this->ToolbarSet}" ;

// Set width and height for textarea (fallback)
if ( is_numeric( $this->Width ) )
$WidthCSS = $this->Width . 'px' ;
else
$WidthCSS = $this->Width ;

if ( is_numeric( $this->Height ) )
$HeightCSS = $this->Height . 'px' ;
else
$HeightCSS = $this->Height ;


$Html = '<div>' ;

// The Javascript part
$Html .= '<script type="text/javascript">'
// Render the linked hidden field.
.'document.write( \'<input type="hidden"
id="'.$this->InstanceName.'"
name="'.$this->InstanceName.'" value="'
.preg_replace( array( '#\r?\n#', "#'#" ),
array( '\\n', "\'" ),
$HtmlValue )
.'" />'
// Render the configurations hidden field.
.'<input type="hidden"
id="'.$this->InstanceName.'___Config"
value="'.$this->GetConfigFieldString().'" />'
// Render the editor IFRAME.
.'<iframe id="'.$this->InstanceName.'___Frame"
src="'.$Link.'" width="'.$this->Width.'"
height="'.$this->Height.'" frameborder="no"
scrolling="no">'
.'<\/iframe>'
."' );</script>";

// Render the textarea for non-Javascript
$Html .= "<noscript><textarea
name=\"{$this->InstanceName}\"
rows=\"{$this->TextareaRows}\"
cols=\"{$this->TextareaCols}\" style=\"width:
{$WidthCSS}; height: {$HeightCSS}\"
wrap=\"virtual\">{$HtmlValue}</textarea></noscript>" ;

$Html .= '</div>' ;

return $Html ;
}


function GetConfigFieldString()
{
$sParams = '' ;
$bFirst = true ;

foreach ( $this->Config as $sKey => $sValue )
{
if ( $bFirst == false )
$sParams .= '&amp;' ;
else
$bFirst = false ;

if ( $sValue === true )
$sParams .= $this->EncodeConfig( $sKey ) . '=true' ;
else if ( $sValue === false )
$sParams .= $this->EncodeConfig( $sKey ) . '=false' ;
else
$sParams .= $this->EncodeConfig( $sKey ) . '=' .
$this->EncodeConfig( $sValue ) ;
}

return $sParams ;
}


function EncodeConfig( $valueToEncode )
{
$chars = array(
'&' => '%26',
'=' => '%3D',
'"' => '%22' ) ;

return strtr( $valueToEncode, $chars ) ;
}
}

?>

Moved from http://sourceforge.net/tracker/index.php?func=detail&aid=1333904&group_id=75348&atid=543655

Note, newlines and tabs have been destroyed by SourceForge, I have't tried to recreate them.

#1630 Source view: Undo removes all content HasPatch Discussion New Feature closed Normal
Description

Browsers: Firefox 2.0.0.11 (win+lin), IE6+7

  1. Go to http://www.fckeditor.net/demo/
  2. Open source view
  3. Press ctrl+z

What happens: All the content is removed.

What I expect: Only changes that I've done to be removed, not all the source.

You'll have to use ctrl+y (or ctrl+shift+z) to get the content back because the undo/redo buttons in the tool bar are deactivated. Personally I think that's ok, but several users claim to know about the ctrl+z shortcut and not the redo shortcut.

#1650 Patch for FCKeditor 2.5 to implement upload filename regexp checking HasPatch Bug closed Normal
Description

This is a feature request previously mentioned in #306 but updated for FCKeditor 2.5 now that has been released.

It includes all the client-side changes and an example PHP implementation. Translation to other languages should be straightforward.

Patch attached.

#1651 Patch for FCKeditor 2.5 to implement upload filename clash behaviour control HasPatch Bug closed Normal
Description

This is a feature request previously mentioned in #306 but updated for FCKeditor 2.5 now that has been released.

It includes all the client-side changes and an example PHP implementation. Translation to other languages should be possible.

Patch attached.

#1683 Context menu still "shows" even if containing zero items HasPatch Bug closed Normal
Description

This patch makes contextual menus fall back to browser default behavior if they don't contain any items.

#1690 Linking to same page sub-header fails HasPatch Bug closed Normal
Description

Change 1008 caused further issues with the formating of anchor links. Anchor links that do not define the page before the anchor causes the anchor to be removed each time the FCKparser parses the document.

For example: [[#Sub_Heading|Link To Subheading]] when parsed again by the FCKparser will generate the output [[|Link To Subheading]]. However, when removing the fix in 1008 the correct output is generated however the original issue 1386 re-appears.

#1815 Small optimization for PHP instantiation of FCKeditor HasPatch Wiktor Walc Task closed Normal
Description

The instantiation of FCKeditor from PHP can be done slightly faster. At the moment there is code being executed in FCKeditor_IsCompatibleBrowser() that in most situations will never be used. This patch solves this.

#1828 Problem with Find/Replace Confirmed HasPatch Review+ Martin Kou Bug closed Normal
Description

Step to reproduce:

  1. Enter into FCKEditor text: "212221"
  2. Call dialog "Find/Replace"
  3. Enter search string: "21"
  4. Click button "Find" - we get selection 212221 - right
  5. Click button "Find" - we get selection 212221 - wrong

Thanks.

#1834 FCKeditor ASP - HasPatch New Feature closed Normal
Description

fckeditor line 56,57,58 Old:

Public Sub Create( instanceName )
	Response.Write CreateHtml( instanceName )
End Sub

New:

Public Function Create( instanceName )
	Create = CreateHtml( instanceName )
End Function

When creating the FCKeditor:

strMyVariable = oFCKeditor.Create("FCKeditor1")

Now I can do watever i want with the variable. And have more controle of the position and stuff. In this way, the website developer can control the complete editor.

You can think about this feature form template's and stuff.

Greetings, Jeffrey Grune (Keep up the good work :D)

#1846 New Translation for Korean HasPatch Review+ Martin Kou New Feature closed Normal
Description

Some more items are added for ko.js

#1858 FF:cannot format entire table column - adds code outside <td></td> tags of 1st cell HasPatch Firefox Bug closed Normal
Description

To replicate the bug, create a table with more than one row, enter text into cells then select content of an entire column or row. Select a formatting option such as BOLD or Right Align. Result: firstly, the entire column is not affected secondly, the first cell stuffs up. In the right align example (shown below) the first <td> is altered, placing two empty <p> tags and css styles. In the editor it looks like another cell has been added to the table.

I get a similar issue when trying to format the whole table as "normal" paragraph text.

<table border="1" cellpadding="0" cellspacing="0">

<tbody>

<tr>

<p style="text-align: right;">&nbsp;</p> <td style="text-align: right;">aaaaa</td> <p style="text-align: right;">&nbsp;</p> <td>aaa</td>

</tr> <tr>

<td>aa</td> <td>aa</td>

</tr>

</tbody>

</table>

#1890 Table Styles: Border, Background color HasPatch New Feature closed Normal
Description

Hi guys,

I did some recoding of fck_table.html

For the user interface I copied the border color and background color from fck_tablecell.html, so the fcklang will still carry 'cell' instead of 'table'.

If you like it, i can clean up the code and take that part on me.

I have added the border-style myself.

So to have a translation for it, add the following lines to the language javascript files. (I have only English, Spanish, Dutch)

en.js: DlgTableBorderStyle : "Border Style", es.js: DlgTableBorderStyle : "Stilo de Borde", nl.js: DlgTableBorderStyle : "Randstijl",

the file fck_table.html will be attached.

Note, to have a better view on the dialog, you need to update the size of the dialog window in fckcommands.js

case 'Table' : oCommand = new FCKDialogCommand( 'Table' , FCKLang.DlgTableTitle , 'dialog/fck_table.html' , 480, 300 ) ; break ;

I hope you like it.

#1908 HtmlEncodeOutput unescapes incorrectly on some strings HasPatch Review+ Alfonso Martínez de Lizarrondo Bug closed Normal
Description

In FCKeditor.LoadPostData() the code that handles reverting the HtmlEncodeOutput changes does not work properly for strings that contain "&amp;lt;" or "&amp;gt;". The current code replaces '&amp;' before '&lt;' and '&gt;' which causes the strings mentioned to be converted to '<' and '>' respectively. What should happen is that the '&amp;' replacement should happen after the '&lt;' and '&gt;' replacement. This allows the strings to be converted to '&lt;' and '&gt;' which I believe is the proper decoding.

Here is a patch that fixes this problem.

Index: FCKeditor.cs
===================================================================
--- FCKeditor.cs        (revision 1585)
+++ FCKeditor.cs        (working copy)
@@ -456,9 +456,9 @@
                        // Revert the HtmlEncodeOutput changes.
                        if ( this.Config["HtmlEncodeOutput"] != "false" )
                        {
-                               postedValue = postedValue.Replace( "&amp;", "&" ) ;
                                postedValue = postedValue.Replace( "&lt;", "<" ) ;
                                postedValue = postedValue.Replace( "&gt;", ">" ) ;
+                               postedValue = postedValue.Replace("&amp;", "&");
                        }

                        if ( postedValue != this.Value )
#1917 mergedown error / three cell Confirmed IE HasPatch Review+ Martin Kou Bug closed Normal
Description

two cell mergedown ok! three cell mergedown table broken.

#1961 generate both Id and Name for anchors HasPatch Alfonso Martínez de Lizarrondo New Feature closed Normal
Description

Currently the anchors do create just <a name=""> but, if also an id is automatically generated, then it can help to do dynamical effects on the page (for example clicking on a link and smoothly scroll to the anchor pointed by the link)

Some people even state that only IDs should be generated as names are just something from the past, but that's another battle.

#2044 I lose titles on my tables with the MediaWiki plugin Confirmed HasPatch Bug closed Normal
Description

When I switch to the Wikitext version, I lose the titles on my tables.

I use a nightly build (2008/03/05).

I realized a small patch for the /plugins/mediawiki/fckplugin.js file. You must change the line 317 "stringBuilder.push( '|' ) ;" with the text bellow (in the "table" switch/case of the _AppendNode function).

if (htmlNode.rows[r].cells[c].tagName.toLowerCase()=="th") {

stringBuilder.push( '!' ) ;

} else {

stringBuilder.push( '|' ) ;

}

Best regards.

#2058 Tweak fckeditor.py to support WSGI HasPatch Bug closed Normal
Description

The fckeditor.py module assumes a CGI environment by hardwiring os.environ into FCKeditor.IsCompatible. The attached patch adds an Environ attribute to the class, which, if set after instantiation but before Create is called, will be used instead of os.environ. This allows the caller to use the module in a long running process, for example, by substituting a WSGI environ for the CGI environ.

#2124 Path problem under Windows Confirmed HasPatch Bug closed Normal
Description

Hello!

I noticed that FCKeditor's PHP Connector doesn't work under Windows. Linux is work as expected.

The problem is in io.php file on line 156: $sRealPath = realpath( './' ) ;

Under windows $sRealPath will be "c:\....\editor\filemanager\connectors\php\".

That last backslash is the problem, it doesn't appear on linux systems. Thats why line 168

if ( $position === false
$position <> strlen( $sRealPath ) - strlen( $sSelfPath ) ) is true.

I suggest to change this:

$sRealPath = realpath( './' ) ;

to

$sRealPath = realpath( '.' ) ;

On linux systems these calls are equivalent, but under windows second one would work as expected.

#2140 Firefox (MacOSX): Invalid capturing of enter-key event HasPatch Bug closed Normal
Description

Japanese users always use Japanese input method. We must type enter-key to input Japanese characters. FCKeditor unintentionally captures such key down events on Firefox2.0.0.x on MacOSX. Consequently, FCKeditor inputs <br /> or <p></p> whenever a user inputs Japanese characters.

This problem is avoided by capturing a keypress event instead of a keydown event for enter-key.

I attach patched version of fckkeystrokehandler.js for your information.

Browser: Firefox 2.0.0.14 OS: MacOSX 10.5.2

#2151 Contextmenu mispositioned when editor in div with scrollbar Firefox HasPatch Bug closed Normal
Description

When the editor is in a div with a scrollbar the contextmenu and style menu is misalinged.

There was once ticket #135 which seem to cover the same so this might be a new bug introduced in 2.6.

I'll attach a patch which fixes this for firefox.

#2153 add web.config to avoid errors in themed aspnet pages Discussion HasPatch New Feature closed Normal
Description

If you are greeted with the following error when trying to upload files using the file manager:

Using themed css files requires a header control on the page. (e.g. <head runat="server" />).

You don't need aspnet themes within the fckeditor folder, so simply add a web.config file in the folder, with the following content:

<configuration>

<system.web>

<pages styleSheetTheme=""> </pages>

</system.web>

</configuration>

#2158 Links cause spellerpages to go out of sync and not complete, ending with error. HasPatch Bug closed Normal
Description

I have set up spellerpages on my wiki. When I attempt to use it on any page that includes any type of wiki link in this form Text? it goes out of sync, and all following words are out of sync. Then when the page is done checking, I get an error "Error: Not in dictionary" text missing. I then can't save any of the editing changes, and must cancel out.

This happens with any page containing a Category link, which is most of them.

If you scroll to find the link that breaks things, in the top spell check window, the text appears as a link is surrounded by "_fcksavedurl="Link">Text and links to something like:

"category:<input readonly class="

in the case of a Category link at the bottom of the page.

#2183 Extended file management HasPatch New Feature closed Normal
Description

Some FCKEditor filemanager users want to rename files and folders and delete files and folders.

The changes are done, and attached to this Feature Request. The only thing is: the changes were done in PHP connector, but not in the other ones.

#2203 Multiple span problem HasPatch IBM Frederico Caldeira Knabben Bug closed Normal
Description

span span span span span multiple span multiple span

I select a word, apply a font face, and a font size. View the code that just added two spans, not one as I would expect. If I make any more changes to the word it will just keep on adding spans.

#2220 Encode email "mailto:" links Confirmed HasPatch Review+ New Feature closed Normal
Description

So far the email address typed in the link dialog gets packed as a href-attribute unencoded into the html source. This is easy for spambots to be scanned and so it is necessary to at least obscure the mail address. This proposal provides a possibility to encode the email address using the simple String.fromCharCode() technique.

We modify the file "editor/dialog/fck_link/fck_link.js" such that the method oParser.CreateEMailUri returns the email href-attribute not in plain text but encoded.

Replace the return statement of the oParser.CreateEMailUri method

  return sBaseUri + sParams ;

by

  var uri = sBaseUri + sParams ;
  var urj = '' ;
  for ( var i = 0; i < uri.length; i ++ ) {
    if ( i > 0 ) { urj += ','; }
    urj += uri.charCodeAt(i) ;
  }
  return 'javascript:location.href=String.fromCharCode(' + urj + ')' ;

As the "protocol" of the link is no more "mailto", we should implement also a decoder that from the encoded href-attribute gets back the email address as well as the subject and the body. This is important if the CKEditor user wants to edit again an encoded email link. This is not yet implemented.

#2232 Send the current element values as parameters to the FileBrowser (link dialog) HasPatch New Feature confirmed Normal
Description

In the link dialog, upon a click on "Browse Server" the current FCKeditor simply calls a uri defined by the configuration value

FCKConfig.LinkBrowserURL = "..." ;

Assume we defined a custom link browser. Of course we could use in our custom link browser the javascript command

opener.GetE("txtUrl").value

to access the current value given in the url textfield of the link dialog. But this is a client side action. Wouldn't it be great to have also a server-side possibility to know the current value?

I propose the following: Add some keys (placeholders) to the LinkBrowserURL which then gets replaced by the current values.

FCKConfig.LinkBrowserURL = "custom.php?url=URL&proto=PROTOCOL" ;

Implementation: It is easy to implement this feature. In the file "editor/dialog/fck_link/fck_link.js" replace

function BrowseServer()
{
	OpenFileBrowser( FCKConfig.LinkBrowserURL, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ;
}

by

function BrowseServer()
{
	var uri = FCKConfig.LinkBrowserURL ;
	uri = uri.replace( /URL/g, encodeURIComponent(GetE("txtUrl").value) ) ;
	uri = uri.replace( /PROTOCOL/g, encodeURIComponent(GetE("cmbLinkProtocol").value) ) ;

	OpenFileBrowser( uri, FCKConfig.LinkBrowserWindowWidth, FCKConfig.LinkBrowserWindowHeight ) ;
}
#2244 FCKeditorAPI::InitializeAPI, work inside nested iframes HasPatch Bug closed Normal
Description

If you load fckeditor inside nested iframes, and create and destroy instances of fckEditor, some really really wierd things can go on which mess up the form.submit() method.

Can I suggest changing the API to use the absolute topmost window object of the browser.

See attached patch.

#2253 Empty anchor tags being removed. Confirmed HasPatch Bug closed Normal
Description

If you make the code <a href="bob"></a> FCKeditor will eat it at it's first opportunity. Since this is perfectly valid code I'm pretty sure this was an introduced bug while trying to fix SF-BUG 1556878. They tried to fix the outcome not the cause and then removed perfectly valid xhtml in the process.

The easiest way to reproduce this is as follows:

  1. Start an FCKEditor.
  2. Go to source mode (in FCKEditor)
  3. Type in <a href="bob"></a> (note nothing in the contents area of the anchor)
  4. Go to WYSIWYG mode.
  5. Go back to source mode.

You'll find that your typing has vanished.

Here's the fix. The source file is editor/_source/internals/fckxhtml.js in function FCKXHtml.TagProcessors .

If you remove the following lines the "expected" behavior returns.

                // 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 ;

The real code that gets run is editor/js/fckeditorcode_gecko.js and editor/js/fckeditorcode_ie.js .

It's a little tricky to edit this because the lines are huge. Remove the following text from both files and you'll be golden:

if (B.innerHTML.Trim().length==0&&!B.name) return false;

I suggest this code somehow makes it into the codebase as a fix.

--

Jeffrey Hundstad

#2260 Expose TextNode on Toolbar Button HasPatch New Feature closed Normal
Description

I just created a patch to the editor source in order to expose the textNode that is the text of a text-only button in the toolbar. I needed this functionality in order to support a character counter plugin. I could see this sort of functionality being useful in other plugins as well that want to update toolbar button text.

Here's some sample code using the changed version: (charsCounterButton is defined as a global variable when created) charsCounterButton._UIButton.TextNode.nodeValue = 'Left: ' + this.LeftChars ;

#2285 Select Drop Downs not hiding when opening a Panel HasPatch Bug closed Normal
Description

If you open up a select, for example, "Format" then open a panel, for example "Image Properties" in FF2 (or according to Fred, also FF3), the select does not always (and usually NOT) close. Once you close the panel, clicking in the editor will no longer cause the drop down to lose focus and hide as it normally would.

See http://www.screencast.com/users/DShafik/folders/Jing/media/9d936ce0-0f1a-41b8-ac8f-09d2e579e1d8 for a demo of the behavior.

#2326 Using SpellerPages/aspell causing odd behavior HasPatch Bug closed Normal
Description

I first reported this over at the Drupal module's issue page since that's where I first noticed it, but according to the author, it is directly a FCKeditor bug. I'll cut and paste what I already pasted there:

Since I started running my own Drupal site, and using FCKeditor as my in place WYSIWYG editor, I've noticed that there are times when using the integrated spell checker results in it always being one word off, making it completely useless. It doesn't always happen, but in about 50% of my posts I end up with a spell checker that is always one word off from the word it's viewing, so you never can tell what you're changing. See the attached images from my actual use case if you don't know what I mean. It also seems to have this issue specifically around links in the page, as you can see from the pictures, and actually displays the code. Once it breaks like this it is stuck that way. Opening the page again results in the same behaviour being reproduced. My guess is that it's choking on some code in the post... but since it's code generated by FCKeditor, it's an internal issue.

I'm using Firefox 3, FCKeditor 2.6.2, the latest Drupal module for 6.2, and a backend of Speller Pages (aspell) on a Linux box. My guess is that it is a FCKeditor problem, but might as well start here.

#2329 Dragresizetable Plugin: Use Relative Column Widths for Relative Tables HasPatch Bug closed Normal
Description

When a table uses a relative width, the dragresizetable plugin should also use relative column widths. Otherwise the total width of the columns could be smaller or larger than the total width of the table.

I have attached a patch to do this.

#2344 Completing Persian Translation HasPatch Bug closed Normal
Description

The Persian translation (fa.js file) is not completely translated. The appropriate patch for completing traslation is attached

#2350 Autogrow stopped working in FCKeditor 2.6.2 HasPatch Bug closed Normal
Description

Autogrow plugin does not function any more (FF3.0 / IE6 / IE7 / Opera 9.5x).

Also noted here: http://www.fckeditor.net/forums/viewtopic.php?p=27040#p27040

#2353 Image resized by mouse doesn't preserve its new size on save HasPatch None Bug closed Normal
Description

Hi, I´m running FCKeditor in Mediawiki 1.12. I am having trouble with the image uploading. I have 2 main issues:

  1. When selecting an image, the preview doesn´t appear
  2. I can resize the image with the mouse but when I save the page it goes back to its original size.

I´ve already checked out ticket #407 and its fix in Changeset 339; my fck_image.js is just like 339 but still I´m experiencing trouble.

Q: Is FCKeditor 2.5.1 the newest version for Mediawiki??

Thanks, cableguy

ps: running Apache 2.2

#2375 [PATCH] FCKeditor.Net - Name attribute for iframe tag is not outputted HasPatch Bug closed Normal
Description

The name attribute is necessary for some browsers to interact with the iframe as a frame using JavaScript.
Example:

frames['fckeditor'].FCK.InsertHtml("<p>hi</p>");

Without the name attribute, this code will fail in IE and Firefox.

A patch has been attached to add the name attribute to the iframe tag.

#2386 Patch for function wfSajaxSearchArticleFCKeditor HasPatch Review+ Bug closed Normal
Description

The function searches by default only the NS_MAIN namespace. It does not extract the namespace from search term and thus does not find articles that are not located in NS_MAIN.

The below code adds this functionality:


function wfSajaxSearchArticleFCKeditor( $term ) {

global $wgContLang, $wgOut,$wgExtraNamespaces;

$limit = 10;

$ns = NS_MAIN;

$term = $wgContLang->checkTitleEncoding( $wgContLang->recodeInput( js_unescape( $term ) ) );

if (strpos($term, "Category:") === 0) {

$ns = NS_CATEGORY; $term = substr($term, 9); $prefix = "Category:";

} else if (strpos($term, ":Category:") === 0) {

$ns = NS_CATEGORY; $term = substr($term, 10); $prefix = ":Category:";

} else if (strpos($term,":")) {

$pos = strpos($term,":"); $find_ns = array_search(substr($term,0,$pos),$wgExtraNamespaces); if ($find_ns) {

$ns = $find_ns; $prefix = substr($term,0,$pos+1); $term = substr($term,$pos+1);

}

}


#2403 Enforce EnterMode HasPatch New Feature closed Normal
Description

This is similar to #1464 (possibly a duplicate?).

When the enter mode is set to 'div' and you are inside a preexisting <p>, hitting enter inserts a new <p> not a <div>. Now I understand that this is sometimes useful, but I'm currently using FCKeditor for online email composition, and here our customers expect hitting enter to always give them one space, and due to wanting to support bi-directional support we can't use br mode.

The fix for this is very simple - I've added a new preference FCKEditor.ForceEnterMode which takes a boolean value (and should probably default to false). When set to true it will always use the given tag, even if it is splitting the opposite tag.

I've attached a patch.

#2436 Bold / italic formatted spaces copied from Word are stripped out HasPatch Bug closed Normal
Description

See attached MS Word file, where a space between two words has been formatted as bold (but the words aren't bold themselves).

  1. Copy the paragraph from Word.
  2. Paste into FCKEditor using "Paste from Word"
  3. "Ignore Font Face definitions" and "Remove Styles definitions" are both checked.
  4. Result: <p><div>This is atest</div></p> (the space has been stripped out)

Tested in IE7 and Firefox 3, using Windows XP and Word 2003.

#2470 Disable content links for SpellerPages HasPatch Bug closed Normal
Description

The user can break SpellerPages by navigating the wordWindow with links. Appending the following lines of code to the end of the writeBody() function of 'wordWindow.js' effectively disables these links:

	var find = /<a(\s[^\>]*)href=\"[^\"]*\"(.*?)\<\/a\>/gi;
	var repl = '<span style="color:blue;text-decoration:underline"$1$2</span>';
	//d.body.innerHTML = d.body.innerHTML.replace(find,repl); //memory leak for IE?
	var doc = d.body.innerHTML.replace(find,repl);
	d.body.innerHTML = doc;

(Note this suggestion is also included in the solutions I've attached to ticket #2326)

#2471 Ukrainian language file updates HasPatch Review+ Artur Formella Task closed Normal
Description

All missing options have been translated.

1 2 3 4
Note: See TracQuery for help on using queries.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy