Matrix WYSIWYG: To use, or not to use
There has been some debate recently in my head about what to do with the matrix wysiwyg editor. There are some positives, such as html tidy, access to linking assets in the asset map, etc. But there are many problems with it, mine being how much bloated javascript is inserted into each page.
Since my main focus right now is figuring out how I can implement ajax where ever I can, the Matrix wysiwyg editor posed a large problem. Because of the large amounts of external javascript files, and large amounts of code, it was very hard to implement it with ajax, and still have it work. Since I am using the jquery GET function, it loads my ajax content in using innerHTML. And, as most of us know, sometimes that can be a problem. It was becoming so tricky to initiate the wysiwyg editor after loading it into a div, that I started rethinking it all together.
I had looked at other solutions in the past. FCK Editor, and TinyMCE, both are nice editors, but both are really bloated! So, I went on the search for an alternative. And, I eventually found what I was looking for.
I found a very light weight, small wysiwyg editor, that is only 2 files! One .js file, and one .gif file. The wysiwyg editor if called NicEdit (strangly enough it has my name in it) It is such a difference from those editors that contain hundreds of files and a million features. In our situation, we only need basic formating options. We don't need anything advanced, and for this application, we don't need to let users link to any other pages in Matrix, so having a need to link with the asset map is not valid here. So I am pretty happy with how it turned out, and it loads very well using ajax which makes me happy! And, it writes nice XHTML code, which is a bonus. I also think that the project will have a great future, and some awesome new features will be continually added.
The editor is easily loaded into every text area, or you can configure it per text area id.
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() }); 
Some of the greatest thing about this editor is how customizable it is. You can customize all of the buttons, showing all, none, or just a few. You can use it as an inline editor, and have your text change to an editable box on clicking it. You can also have the editor buttons detatched from the textarea's that you are editing, and you can edit multiple instances of the editor using one button control area. Very cool! I am pretty excited about it, and am very happy about this choice. Of course I will still be using the Matrix editor in a few places like standard page editing, but for most of our applications, NicEdit is the way to go.

So how did you integrate nice edit with MySource Matrix? Sorry if I'm missing something obvious
thomas murphy said... June 3, 2009 at 3:53 PM
NicEdit was just working on metadata fields, not replacing the Matrix editor.
I never ended up using that solution though.
Nic Hubbard said... June 3, 2009 at 4:03 PM
Post a Comment