I've seen much requests here for a better source area, though CKEditor would like to keep this function neat and simple with a plain textarea, while it's still very convenient to enhance the source mode on the fly by integrate with other editor, for demonstrating that, here is an sample for integrate CKEditor with codemirror for rich xhtml editing.
Already Known Bug:
1. Currently the source area height is incorrect within IE;
2. Has compatibility problem with 'Maximize' function;
3. Has compability problem with collapsable toolbar.
Installation: Simplify apply the attached patch file to the nightly build, sorry for the crudeness. ( The plugins repository is comming soon!)
Wed, 05/06/2009 - 20:44
#1
Re: CKEditor Plugin: Rich source editing mode
And thank you for this useful plugin integration.
I have a small problem, if i switch the editor to Source View (and CodeMirror takes over) and i save the data through POST, the modified values in textarea don't appear in the $_POST variable. I'm sure this is something related to CodeMirror.
Thanks
Re: CKEditor Plugin: Rich source editing mode
holderElement.$.clientHeight out of the CodeMirror initilisation and put into a variable to set the height instead.
i.e.
-M-
Re: CKEditor Plugin: Rich source editing mode
Re: CKEditor Plugin: Rich source editing mode
Can you package this plugin ?
I used it in drupal & Wordpress, and its realy embarrassing that the editor doesn't update correctly the fields.
Thanks in advance.
Re: CKEditor Plugin: Rich source editing mode
Re: CKEditor Plugin: Rich source editing mode
HI Zanpakutō, thanks for the updated plugin and it's demonstration page looks really good, it's right the kind of plugin authority that we would love to see
Just one small question, isn't the "mirrorSnapshot" command added by you plays the same functionality with editor::updateElement ? FYI this method will be auto invoked before every form submit, requires no extra efforts.
Re: CKEditor Plugin: Rich source editing mode
Hi garry,
That's actually the old version and I haven't had chance to update it, also I've managed to get resize working now not grow though, grow was added just after I'd got fullscreen working in source mode.
As far as updateElement goes, yes, I added the mirrorSnapshot command to do just that but only in source mode because it wasn't auto updating the element before submitting the form.
I'm not quite sure I follow how to use updateElement to do it the way you are suggesting. Any further pointers you can give me please?
I'm not sure about the auto invoke part.
I'm thinking a CKEditor plugins site wouldn't be such a bad idea, with tutorials and some premium plugins mixed in with free ones. It's just finding the time. Unfortunately, I'm starting to find CKEditor is like taking a sledgehammer to a walnut for most things I want to do of recent. The API is great, yet the size of the thing is just too big and the use of an iframe tag as the editing area are starting to put me off wanting to continue developing projects with it.
Saying that, I'm still implementing it for the time being.
Thanks for the feedback. Much appreciated,
Zanpakutō
Re: CKEditor Plugin: Rich source editing mode
@Zanpakutō: I think one minor improvement would be the addition of some type of marker/indicator on the non-source side indicating any location of code, perhaps a one char something like: "◻". Otherwise it's a bit too easy to delete any code if it happens to be intertwined with the text.
That would be sufficient, but beyond that would be either separate characters for php/script/styles or a single character with different colors.
Re: CKEditor Plugin: Rich source editing mode
I guess one problem is form tag.
I usually put CKEditor middle of form.
Since form tag can not be nested, It's problem.
And some times, I use multiple CKEditor on same page.
Is there anyway I can avoid this limitation?