Posts

Showing posts from April, 2012

Reintialize TinyMCE after jQuery Load

Bump into the problem of reintializing TinyMCE textbox after replacing the DOM with jQuery load. The Problem After saving a form on a page (with multiple forms), I did a jQuery.load() to replace the DOM of the particular section. Then I run the initialization function to reinitialize all DOMs, including TinyMCE. I realized TinyMCE contents is not saved after this. Solution: Initial attempt After Google-ed for a while, I found this solution from StackOverflow . tinymce.execCommand('mceRemoveControl', true, 'editor_id'); So, to use it, it would be... _init = function() { /* Some other initialization code here */ tinymce.execCommand('mceRemoveControl', true, 'editor_id'); tinyMCE.init({ /* TinyMCE options */ }); } Oh, wait... Some issues: My ' editor_id ' is dynamic...  I have multiple textboxes Solution: Second attempt. Easy. Just use jQuery.each() to loop through all the textbox and remove TinyMCE control from each o...

[Guide] Samsung Galaxy S2 ICS

Image
For those of you who are like me - too impatient to wait for Samsung Singapore to release ICS update for i9100 Galaxy S2, can follow the following steps to flash to ICS (and in addition, flash to CM9). Ice Cream Sandwich  Android I9100XWLP7 4.0.3 (United Kingdom / Ireland) 1. Download ICS firmware http://www.hotfile.com/dl/153177481/9861a3a/I9100XWLP7_I9100XEULP5_XEU.zip.html 2. Boot into Download Mode Turn off phone. Vol Down + Home + Power 3. Odin Flash Guide http://forum.xda-developers.com/showthread.php?t=1075278 http://forum.xda-developers.com/showthread.php?t=1406664 ICS is cool, but... the official ROM is still laggy. So I decided to take further steps to mod it to CyanogenMod. So if you are like me, want a smooth UX, follow the following optional steps :) Root 3. CF-root by Chainfire . http://forum.xda-developers.com/showthread.php?t=1103399 4. Remove Yellow Triangle during startup, using TriangleAway from Chainfire . htt...