Bootstrap your CSS

A lot of webdevelopers do repeating tasks on each project they make. One of these repeating tasks is building your CSS too make the project look great! With bootstrap – which is a project of twitter – most of all CSS styling is already done for you and enables you to easily extend it.

You can find Bootstrap at :
http://twitter.github.com/bootstrap/

TinyMCE – Uncaught TypeError: cannot call method ‘push’ + spellChecker

Recently I tried to integrate the php spellchecker of TinyMCE into a project we’re working on, when I stumbled upon the error:

uncaught typeerror cannot call method ‘push’

Googling around I found the solution to the problem by upgrading the TinyMCE package to a newer version (3.4.5). Hope it helps – because I didn’t found that much information on the internet about it.

Trim UTF8 PHP

If you trim files that we’re exported using UTF8 encoding then be carefull that you also trim the non-breaking spaces in it. The default options of trim() do not include this, so you have to use the following code to be sure to also trim them:

// turn non breaking space into 'normal' string
// to behave exactly like a non-breaking space
$myHTML = " abc";
$nbSpace = array_flip(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES));
$converted = strtr($myHTML, $nbSpace);
// trim utf8 non breaking spaces
$converted = trim($converted,chr(0xC2).chr(0xA0));