WYMeditor Fieldtype for ExpressionEngine…
I’ve just knocked together a quick WYMeditor Fieldtype which I’m happy to share with anyone that’s interested.
Its built on Brandon Kelly’s excellent Fieldframe framework, so you’ll need to grab that, and enable jQuery in the cp via your favorite flavor.
I haven’t written any docs yet, but if you are familiar with any other Fieldframe Fieldtypes, you’ll know what to do to get it up and running.
The editor is bundled in there for this release (WYMeditor 0.5 rc 1), I plan to remove it for the next version but until I write some docs, and improve it a little, this willl do :)
Usual disclaimers apply: back up your shit and don’t come crying if this somehow ruins your life ;)
Some notes before you download:
I am using this as an excersize to learn php, EE coding, and FieldFrame Dev so it is quite rough around the edges. My updates are quite frequent (at the moment) so check back for code updates.
I’m testing this in quite a narrow environment and haven’t put it through any broad testing. I’m on a mac, running MAMP with PHP 5, publishing with Safari 4 & Firefox 3.5 on ExpressionEngine 1.6.7 - It seems to work ok for me....
Download Iain WYMeditor
Update 4:
v0.1.0 FieldType now has settings to define a css file for publishers, example in there.Update 3:
v0.0.3 Minor bug fixes applied for when multiple cells and single fields are on the same publish page.Update 2: I’ve moved the code over to Google code along with Crumbee
Update 1:
v0.0.2 - Just fixed a bug that doubled up the fields when more than one are on a publish page.
5 comments…
By iain on August 11th 2009Sorry ‘bout that, updated the title attribute not the link :)
Should be fine now…
By ContextDesign on August 11th 2009This looks great - if only I could get it to work ; (
When I go to the Custom Fields page after installing, I get errors:
Notice: Undefined variable: cell_row_count in /home/user/public_html/mysite.com/system/extensions/fieldtypes/iain_wymeditor/ft.iain_wymeditor.php on line 68
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/user/public_html/mysite.com/system/extensions/fieldtypes/iain_wymeditor/ft.iain_wymeditor.php:68) in /home/user/public_html/mysite.com/system/extensions/ext.lg_htaccess_generator_ext.php on line 672
And when I assign it to a field, I get a JS error and no editor:
$ is not a function
[Break on this error] $(”.submitBox input").addClass("wymupdate");\n
By iain on August 11th 2009Sorry about that, I’ve responded in the EE forum thread you started and will update the code after I do some other tweaks tonight.
By Tom on November 03rd 2009Great fieldtype! WYMeditor looks much cleaner than Brandon’s Wygwam extension.
The only thing I still need is moving the sidebar with containers and classes buttons to the top. For example like in the following set-up:
http://files.wymeditor.org/wymeditor/trunk/src/examples/12-custom-layout.htmlI tried to change the js-settings in the php-file but it returns a white screen. Is it possible to give us an example on how to make changes to the editor-layout?


