Hans Rasmussen

info@hansrasmussen.com, +46 (0)760480046

Customizing WordPress WYSIWYG editor TinyMCE

Since WordPress 3.0 there is a function to apply editor styles to the default WYSIWYG editor TinyMCE. By using the function add_editor_style(); you can define the stylesheet where you have your editor styles defined. Typically you put the call in your theme’s functions.php file. Default the function looks in your themes root folder for the [...]

Remove automatic links by default when adding images to your pages and posts in WordPress

When you insert images from your gallery in WordPress you will notice that all your images are linked with the url to your original image upload. Notice also that WordPress suggests a link in the Link URL field. Under the field you will also have 3 buttons, “None”, “File URL” and “Post URL”. If you [...]

Hidden content is revealed when forwarding HTML e-mails

I’ve been involved in a project where we generate UI that have personlized content depending on scope. To speed up things we also rendered these UI components to send the same result embedded in an e-mail. The e-mail looks ok when you read it. However, to my suprise, it seems like when you forward these [...]

Empty scr attribute on image element causing reload

Be aware when using empty scr attributes in your webpages, as they cause loads to either the same page as the element is specified from or a load of the default page in the same directory where the page is located (depending on browser implementation). If your page / default page has some session handling [...]

Validation with jQuery validator plugin

Reference http://docs.jquery.com/Plugins/Validation/   Setup A reference to jQuery validator plugin <script type=”text/javascript” src=”http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js”></script>   A reference to jQuery <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js”></script>   Configuration – simple on class and attribute level It is possible to declare your validation rules in various ways. It is suggested primarily to try it on class and attribute level and secondary [...]

E4tRlaMr987VZ112