Not registered
register now
DrupalCamp LA 2009

WYSIWYG: how to setup a visual html formatting interface

Note: this is an archived site. Visit us at http://ladrupal.org.
123
Sign In
  • TinyMCE
  • WYSIWYG
  • Beginner
  • Design & Usability
  • Site Building
Logistics
Day: 
Sunday
Time: 
5:00pm
Room: 
Microsoft room - DBH 1100 (2+)
Duration: 
One hour

View Presentation:

How to set up a WYSIWYG editor: the modules that make it easy vs the modules that make it awesome. Get it done right the first time!

WYSIWYG API (http://drupal.org/project/wysiwyg)
Better Formats (http://drupal.org/project/better_formats)
Filefield Insert (http://drupal.org/project/filefield_insert)
Image Resize Filter (http://drupal.org/project/image_resize_filter)

Presentation Takeaway:

This step by step demonstration will explain how to set up a WYSIWYG editor and supports image uploads and instant resizing using filefield (imagefield) and imagecache.

Full list of modules used for presentation

http://drupal.org/project/admin_menu
http://drupal.org/project/better_formats
http://drupal.org/project/cck
http://drupal.org/project/filefield
http://drupal.org/project/filefield_insert
http://drupal.org/project/filefield_sources
http://drupal.org/project/image_resize_filter
http://drupal.org/project/imageapi
http://drupal.org/project/imagecache
http://drupal.org/project/imagefield
http://drupal.org/project/wysiwyg

http://tinymce.moxiecode.com/download.php

DEMO SCRIPT:

Add new role for user group that will use the WYSIWYG, for example ‘editor’
View permissions and enable new role to add and edit the page content type.
Create new user to test the role and permissions.
Switch browser and authenticate as that user.
Create page
Enable modules
View WYSIWYG

Review options, download TinyMCE

Refresh WYSIWYG

Enable Buttons / interface options

View wysiwyg.css

Add css

Save tiny config

Set Defaults, move Editor role to top for roles

Flip to editor, edit page review new options

INLINE IMAGES

image cache horizontal 180 tall, vertical 200 wide

add file field, edit settings

flip to editor, add images inline.

  • Login to post comments

Comments

Some Advanced WYSIWYG features

Submitted by MikeyLikesIt on Sun, 2009-08-09 20:57.

It’s definitely a good idea to restrict what admins can do with Rich Text editors so that they can’t corrupt the design style of the website, but sometimes your client needs some extra control which may require an additional module to the ones mentioned above (WYSIWYG Filter – http://drupal.org/project/wysiwyg_filter).

If you enable extra buttons on the tinymce wysiwyg profile, you will notice that some of these features (text-alignment, image alignment, font-colors, etc.) don’t work.

Install WYSIWYG Filter module. Under the Input Formats, enable the WYSIWYG Filter and disable drupal’s default HTML Filter.

WYSIWYG Filter Settings:

These settings depend on what functionality you want to allow your users to have. You should sychronize these setting to match up with the buttons that you enable in the WYSIWYG profile. The module default are good and safe. Below are more liberal examples:

RESTRICTED access which doesn’t include images:

@[style],
a[!href|target&grt;_blank|title],
em, strong, strike, sub, sup, i, b,
ul, ol, li, dl, dt, dd,
p[align&grt;center?justify?left?right], br, hr,
div[align&grt;center?justify?left?right], span,
address, blockquote, pre, cite, code,
h3, h4, h5, h6

Style Properties:
text-align
text-properties
margins

MOST HTML settings:

@[class|style|title],
a[href|target],
img[src|width|height|alt|border:0],
em/i, strong/b, strike, del, sub, sup, q, acronym, samp, kbd,
ul, ol, li, dl, dt, dd,
p[align&grt;center?justify?left?right], br, hr,
div[align&grt;center?justify?left?right], span,
table[width|cellpadding|cellspacing=0|border=0], tr[align|valign], td[align|valign|width], tbody, th[align|valign|width], thead, tfoot, colgroup, col, caption,
address, blockquote, pre, cite, code,
h1, h2, h3, h4, h5, h6

Style Properties
color
text-align
margin
padding

  • Login to post comments
  • Schedule
  • About
  • Attendees
  • Sponsors
  • News
  • Drupalchix
  • Venue
  • Sessions
  • Forums
  • FAQ
  • Contact Us

About magicspark

Full Name
jason chinn

Company
magicspark

Link to web site
http://www.magicspark.com

Interest
Arts and Music

View full user profile

Attendees

Filter Sessions

  • All Sessions
  • Your Picks
  • Most Popular
  • Business Side
  • Code & Development
  • Design & Usability
  • Drupalchix
  • Performance and Scalability
  • Showcase & Strategy
  • Site Building
Drupalchix Panel Talk

Buy our Drupal Camp LA shirtBuy our Drupal Camp LA shirt

Become a Sponsor

Attendees

View All

Drupalchix Information

View all Sponsors

  • News
  • FAQ
  • About LADrupal
  • Become a Sponsor
  • Twitter

Designed and Built by This By Them
Powered by Drupal 6 / copyright © 2009