html

Drupal 6 - The CKEditor is removing/deleting CODE tags

I had a problem using the CKEditor with Drupal 6 where the CKEditor would not display <code> tags properly in the editor, and would then delete trailing spaces after the <code> tag. After some digging around, I finally found that I needed to comment out the following line in the ckeditor.config.js of my CKEditor module installation:

Parsing 'real world' HTML with Scala and HTMLCleaner

While XML parsers work great for well-formed XML, out in the 'real world' internet, you can't count on HTML being XHTML, or even being well-formatted. As a result, various 'HTML cleaner' libraries for Java have appeared. They attempt to clean up the HTML so you can parse it.

iPhone and iPad JavaScript dialogs (alert, confirm, prompt) and windows

iPhone JavaScript dialogs FAQ: Can I use JavaScript windows and dialogs in my iPhone HTML app (the JavaScript alert dialog, confirm dialog, and prompt dialog)?

Yes you can. According to Apple's iOS Safari web documentation, you can use "iPhone JavaScript windows and dialogs" that are supported by iOS. Here's how.

A Drupal form select/options field example (dropdown box)

Drupal form FAQ: How do I create an HTML SELECT/OPTIONS field in a Drupal form?

Solution: If you'd like to create an HTML SELECT field (a dropdown box) in a Drupal form that looks something like this:

A Drupal 7 form SELECT OPTIONS field example

there are at least two ways to do so.

A Drupal theme table example

Summary: A Drupal "theme table" example, where I show how to generate an HTML table from a Drupal module, using the Drupal theme function (and specifically not the theme_table function).

My HTML CSS "Sketch" prototype project

As I mentioned in my earlier Mac HTML (FrontPage) prototyping and my Mac HTML/CSS Napkin prototying theme articles, I've created my own HTML and CSS "prototyping" theme, which I've now named "Sketch".

As you can see from the screenshots below, my Sketch prototyping theme lets you rapidly create HTML forms and web pages with a theme that intentionally looks like a "back of the envelope" sketch.

My HTML/CSS prototyping theme (a "Napkin" look and feel)

As I mentioned in my earlier Mac HTML prototyping article, I've created my own "prototyping" theme, basically an HTML/CSS version of the Java Napkin Look and Feel project, as well as this Flex napkin skin project.

Rapid Mac HTML form prototyping

Earlier this week I needed to create some HTML prototypes for a client, and when I looked around for simple Mac OS X HTML form prototyping tools, I was disappointed to see, well, nothing.

Five to ten years ago I used to sit down with clients and create HTML form prototypes using Microsoft FrontPage, and since their 2000 version, it was actually very good. It created very clean code, kept your changes in tact, and was as simple as could be to create HTML forms.

A Drupal form custom HTML DIV CSS wrapper example

Drupal form custom HTML FAQ: How can I wrap some custom HTML around a Drupal form, like placing a wrapper DIV tag around my form so I can add some custom CSS to style my form/div?

You can wrap an HTML DIV tag around your Drupal form by using the form prefix and suffix properties, like this:

$form['#prefix'] = '<div class="my-form-class">';
$form['#suffix'] = '</div>';

You can do this anywhere in your Drupal form builder function, so a larger part of your Drupal form builder function might look like this:

A Drupal form submit button and submit handler function example

Drupal form submit button and handler FAQ: How do I create a Drupal form with a Drupal submit button? Also, how do I create a Drupal form submission handler function?

Assuming that you're comfortable with creating a Drupal form, you can add a submit button to your Drupal form very easily, like this:

Syndicate content