Opened 15 years ago
Closed 11 years ago
#4507 closed New Feature (fixed)
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 (1)
Change History (13)
comment:1 Changed 15 years ago by
Milestone: | CKEditor 3.2 → CKEditor 3.3 |
---|
Changed 15 years ago by
Attachment: | 4507.patch added |
---|
comment:2 Changed 15 years ago by
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 15 years ago by
Keywords: | HasPatch added |
---|---|
Milestone: | CKEditor 3.3 → CKEditor 3.x |
We should simply use our standard event system here on the CKEDITOR.editor class.
comment:4 Changed 15 years ago by
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:6 Changed 14 years ago by
Milestone: | → CKEditor 3.6 |
---|---|
Status: | new → confirmed |
comment:7 Changed 14 years ago by
Owner: | set to Tobiasz Cudnik |
---|---|
Status: | confirmed → assigned |
comment:8 Changed 14 years ago by
Version: | → 3.0 |
---|
comment:9 Changed 14 years ago by
Keywords: | HasPatch removed |
---|---|
Status: | assigned → pending |
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 14 years ago by
Keywords: | HasPatch added |
---|---|
Status: | pending → 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 14 years ago by
Milestone: | CKEditor 3.6 |
---|
comment:12 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
patch for #4507