Ticket #4507 (closed New Feature: fixed)

Opened 5 years ago

Last modified 9 months ago

Adding a new 'save' event

Reported by: garry.yao Owned by: tobiasz.cudnik
Priority: Normal Milestone:
Component: Core : Output Data Version: 3.0
Keywords: HasPatch Cc:

Description

Many users are looking for a easy way to override the default save button behavior, i.e. ajax post. A new 'save' event could be fired by save plugin on editor instance level to make this customization happen.

Attachments

4507.patch (909 bytes) - added by Dekel 5 years ago.
patch for #4507

Change History

comment:1 Changed 5 years ago by fredck

  • Milestone changed from CKEditor 3.2 to CKEditor 3.3

Changed 5 years ago by Dekel

patch for #4507

comment:2 Changed 5 years ago by Dekel

patch attached.

usage (In the configuration file) :

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	// config.uiColor = '#AADC6E';
	
	config.saveFunction = function(data) {
		alert(data)
	}
};

comment:3 Changed 5 years ago by fredck

  • Keywords HasPatch added
  • Milestone changed from CKEditor 3.3 to CKEditor 3.x

We should simply use our standard event system here on the CKEDITOR.editor class.

comment:4 Changed 5 years ago by bronson

fredck, true, but right now the button is grayed out if the editor isn't in a form. How would you enable it so the callback could fire?

It would be OK by me if the save button was always enabled and didn't check to see if the editor was in a form or not... not sure if this has legacy issues though.

comment:5 Changed 4 years ago by fredck

  • Milestone CKEditor 3.x deleted

Milestone CKEditor 3.x deleted

comment:6 Changed 4 years ago by wwalc

  • Status changed from new to confirmed
  • Milestone set to CKEditor 3.6

comment:7 Changed 4 years ago by tobiasz.cudnik

  • Status changed from confirmed to assigned
  • Owner set to tobiasz.cudnik

comment:8 Changed 4 years ago by wwalc

  • Version set to 3.0

comment:9 Changed 4 years ago by garry.yao

  • Status changed from assigned to pending
  • Keywords HasPatch removed

I don't see there a necessary for this into core now, as an ajax save could be instead provided by a custom save plugin (resolves the form sensitive state problem also).

comment:10 Changed 4 years ago by fredck

  • Keywords HasPatch added
  • Status changed from pending to confirmed

@bronson, you're right. At this point, maybe the configuration option would do it well.

@garry.yao, the idea is making it deadly simple, so it's definitely a valid need.

comment:11 Changed 4 years ago by fredck

  • Milestone CKEditor 3.6 deleted

comment:12 Changed 9 months ago by Reinmar

  • Status changed from confirmed to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy