Opened 11 years ago

Closed 6 years ago

#2186 closed New Feature (invalid)

Allow content to be reset on first focus

Reported by: IsaacS Owned by:
Priority: Low Milestone:
Component: General Version:
Keywords: Cc:

Description

I am currently building a website in which I use FCKEditor in several places. In the login form, the field names are displayed inside the text boxes; when you click in either of them (the first time only) the content of both is set to blank.

I don't think that such a feature is available in FCKEditor, so would it be possible to enable it as an option (maybe in the PHP class eg. "$FCK->resetOnFocus = 1;" or something) in a future release of FCKEditor?

Thanks for the editor!!

Isaac

Change History (3)

comment:1 Changed 11 years ago by Artur Formella

Keywords: Confirmed added

comment:2 Changed 11 years ago by Artur Formella

It is very hard to do that. This code works in FF and IE but makes an error "Program Stopped Working" in Safari 3

var resetOnFirstFocus = true;
var newContent = '';

function myOnFocus( instance )
{
	if ( resetOnFirstFocus ) 
	{
		resetOnFirstFocus = false ; 
		instance.SetData( newContent ) ;
	}
}
FCK.Events.AttachEvent( 'OnFocus', myOnFocus ) ;

comment:3 Changed 6 years ago by Piotrek Koszuliński

Resolution: invalid
Status: confirmedclosed

This is not an idea for a core feature.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy