April 2009
3 posts
Update to YUI Editor Code View Problem
I over complicated things in my previous solution, and found a better solution while trying to get the WYSIWYG editor to work inside an AJAX form using rails’ remote_form_for. Using the YUI editor example, set handleSubmit to false and add this right after the MyEditor.render(); // Nate's better Handle Submit function myHandleFormSubmit(e){ if(state == 'off') { ...
Apr 24th
Trying to use the YUI WYSIWYG RTE as a code editor
Our CityGates app uses the YUI WYSIWYG Rich Text Editor to for all large text areas.  Unfortunately, it does not have code / source editing support out of the box.  To implement it, you must use some custom code to toggle the textarea / WYSIWYG visibility. The example from YUI does not use handleSubmit. This means that when a user submits the form from the WYSIWYG editor the textarea does not get...
Apr 17th
jQuery Cycle Different Effects for Previous and...
jQuery Cycle plugin is fantastic.  However, there is a little bit of inconsistantcy when using it as a left/right slideshow.  You click the next arrow, it goes right. You click the previous arrow, it goes left right.  The following code allows you to have different effects based on previous/ next button clicks. Demo jQuery(document).ready(function(){ $('#blink_headlines').cycle({ fx:...
Apr 17th
3 notes