Opened 17 years ago

Closed 17 years ago

#7 closed New Feature (fixed)

New sample file

Reported by: Alfonso Owned by: Alfonso
Priority: Normal Milestone: FCKeditor 2.4
Component: General Version:
Keywords: Cc:


Based on (the file provided doesn't work with the current version, and instead of a testcase I think that a sample describes much better its use)

I've cleaned up, removed bad code and so this sample provides a simple example about how to properly use the API instead of having in a tracker a bad example of directly accessing the iframe contents.

It might also be the a partial answer to some questions about how to load initially the editor in source mode (but that could be another file using just the proper events)

Attachments (2)

sample12.html (4.6 KB) - added by Alfonso 17 years ago.
file for /fckeditor/_samples/html/sample12.html
sample13.html (5.0 KB) - added by Frederico Caldeira Knabben 17 years ago.

Download all attachments as: .zip

Change History (6)

Changed 17 years ago by Alfonso

Attachment: sample12.html added

file for /fckeditor/_samples/html/sample12.html

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Should we really add this one to the package? I still find it a little bit confusing, but actually much better than the proposed one in the tracker. I think we would benefit more on updating the tracker, appending your sample there.

Regarding this one, it would be nice if we would implement something in the API that automatically switches the editor in a textarea. Maybe something available only if ReplaceTextarea() has been used to create the editor instance (otherwise we would have problems with the hidden field).

comment:2 Changed 17 years ago by Alfonso

I also have my doubts about the best way to put this sample, but I think that having several samples about different features and how to use them can help the people that want to learn and use as soon as possible the editor. If they think that some feature isn't possible they can go and use another editor, but if they have some easy samples they can try to understand how it's done. The sample doesn't have to be a complex page, just something that the user can check and it can bring him some new ideas. Another sample that I want to setup is to simulate the partial editing of a full page because some people doesn't seem to understand that it's very easy.

If we are willing to add something to the API I think that it would be enough to add just a SetVisibility(bVisible) method that hides/shows the highest level iframe, so the user calls first the ReplaceTextarea and then he takes care of showing/hiding the textarea or editor and updating the value of each element properly.

Another option (non exclusive to the previous ones, we can have all of them) would be to have a way to load the editor directly in source mode without the code being parsed by the browser. This one is of course the one that would take most job.

Changed 17 years ago by Frederico Caldeira Knabben

Attachment: sample13.html added

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.4
Owner: set to Alfonso

I've completely reviewed the proposed sample and created a new one. I've removed code that was not related to the task the sample is proposed to solve, simplifying it. I've also commented it and uniformed to our coding style standards. It has been renamed to sample13 as sample12 is already committed in the SVN and is related to the enter key handler.

Alfonso, fell free to make the necessary changes to this file and commit it to the SVN. Remember that the samples list must also be updated. Thanks ;)

comment:4 Changed 17 years ago by Alfonso

Resolution: fixed
Status: newclosed

I've fixed two typos and I have added it to SVN. The strange thing is that trying to test any sample in IE or Firefox I got an error but it did seems to work fine afterwards, so I don't know what's the problem. Maybe the SVN version wasn't ready to be tested?

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy