Opened 16 years ago
Closed 14 years ago
#3279 closed Bug (duplicate)
CKEDITOR.replace(el) breaks save button's submit action
Reported by: | Colin Wismean | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | SVN (CKEditor) - OLD |
Keywords: | Cc: |
Description
Working with "divreplace.html" from the samples folder, the "Save" button will not post back/submit the form that it is related to.
The "Save" button works fine in other areas, so I am assuming that its when you use CKEDITOR.replace() that it breaks. I have followed the javascript to its final method call when you click the button, and all seems the same.
Using Firebug, if I replace the onclick method call with [form name].submit() it works fine.
Could the "Save" button not picking up the correct name of the form when the CKEDITOR.replace(el).
Thanks
Attachments (2)
Change History (15)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
http://ckeditor.com/ckeditor/3.0b2/_samples/divreplace.html
Double click on the div, hit the "save" icon in the editor. The page doesn't submit.
comment:3 Changed 16 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
The save function require at least one wrapping 'form' surrounding in order to perform the submit, so 'divreplace.html' example page is not a certificate playground for this feature, please use other pages for this feature.
BTW,please use our nightly build page for testing.
comment:4 follow-up: 7 Changed 16 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
I have downloaded the nightly build, I have added it to my project, I have checked if a form was wrapped around my local copy - which it was - and although the new interface looks awesome, the save button is now disabled.
I have attached a file ( you will need to change file references ) but if this isn't a bug, are you able to show how to enable the "Save" functionality when the div replace method is used?
comment:5 Changed 16 years ago by
Keywords: | Confirmed added |
---|---|
Owner: | set to Artur Formella |
Status: | reopened → new |
Version: | → SVN (CKEditor) |
Changed 16 years ago by
Attachment: | 3279.patch added |
---|
comment:6 Changed 16 years ago by
Keywords: | Review? added |
---|
comment:7 Changed 16 years ago by
Replying to colin.wiseman: Thanks for the provided sample page, but it's meaningless to submit a surrounding form of the replaced 'div' since no form fields existed, it's different from replace a 'textarea'.CKEditor won't establish form fields automatically in this case, so instead of relaying on the 'save', the data should be fetched from editor.getData() function and get submmited with your own codes.
comment:8 Changed 16 years ago by
Hi,
Thanks for the reply. So basically what you are saying is, by using a CKEDITOR.reaplce(div) i cannot use the inbuilt "Save" button on the CKEditor toolbar. I would have to supply my users a seperate button that would use another method e.g. an ajax postback to a url with the value from the editor.
Seems a bit of a faff really but easily doable and kinda understandable - nothing to submit etc.
Quick question then, is there a way I can hook into the "Save" button, enable it, but replace the "Save" event's function with my own function - so i can do an ajax save type of thing...
Thanks for your time on this.
comment:9 Changed 16 years ago by
colin.wiseman, you can use
<form onsubmit="mySubmit(); return false">
Patch provides abstraction of the input. User just want to have CKeditor in form.
I was thinking about "save" event which could be canceled to stop normal submitting. Save button could be active even without form element but if "save" event has listeners. Usage of this would be very easy.
comment:10 Changed 16 years ago by
Milestone: | → CKEditor 3.x |
---|
comment:11 Changed 15 years ago by
Owner: | Artur Formella deleted |
---|
comment:13 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | review → closed |
This feature is to be covered by #4507.
Could you please provide a sample page for reproducing purpose?