The TinyMCE WYSIWYG editor is a critical module for many sites. Yet, it remains difficult for non-technical users to configure. This module would jumpstart that process by automating the process of setting up a flexible, secure starting configuration.

The TinyMCE Defaults module will:

1. Give the authenticated user role rights to access TinyMCE (check/add values in the permissions table)
2. Create a default profile for TinyMCE named "default" and allow the authenticated user role to use this profile (tinymce_role table)
3. Make filtered html the default input filter, and adjust the tags permitted in this filter (variables table) --

Projected Use:

1. A site user installs TinyMCE.
2. A site user then installs the TinyMCE Defaults module, which delivers a secure configuration of the module with a mouse click.

Ideally, the module will create a new link within the "Site Configuration" options: Set TinyMCE defaults. This page will have a single button: Create/Restore TinyMCE defaults.

Obviously, this module will have a dependency on TinyMCE.

I'm attaching a zip file with three sql dumps -- these dumps are databases. The first is a core drupal install; the second is a database after TinyMCE has been installed; the third is the db after TinyMCE has been configured. The settings for the TinyMCE module can be pulled by doing a diff on the second and third database dumps. Once a student claims this task, I'd be glad to go through the process of configuring TinyMCE via the web UI with them if needed.

Deliverables/Tasks:

1. Verify that the tags included for the input filter are okay. I used this page as a resource, but it's always good to check. -- for the record, the tags used are:

<a> <b> <blockquote> <br> <caption> <center> <code> <col> <colgroup> <dd> <del> <div> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <i> <img> <li> <ol> <p> <span> <strong> <sub> <sup> <table> <tbody> <td> <tfoot> <th> <thead> <tr> <u> <ul> <tr>

2. As part of the development process, get feedback from people within the TinyMCE group on g.d.o: http://groups.drupal.org/tinymce-development -- this feedback will take the form of posting an announcement about the module within the group

3. Write the module for Drupal 5.x.

4. Once this module is written for 5.x, we can create a follow up task to port it to 6.x

The primary contact for this module will be Bill Fitzgerald

Comments

aclight’s picture

Title: GHOP Task -- TinyMCE Config module » GHOP #119: TinyMCE Config module
snufkin’s picture

Status: Active » Postponed (maintainer needs more info)

Claimed by corsix

corsix’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new2.11 KB

Attached is the module for Drupal 5.x
Currently awaiting approval of my subscription request to the TinyMCE group so that I can get feedback from them.

bonobo’s picture

I'll test this now and get back to you --

Thanks for your work on this!

Cheers,

Bill

bonobo’s picture

This works well, except for two things:

1. In my testing environment, the true/false settings need to be enclosed in single quotes to take -- in other words, change true to 'true' on lines 94, 95, 96, 99, 140, 141, 142, 143, 144, and 146.

2. Within the Cleanup and output settings, check within the TinyMCE group as to the best settings here:

The five options are:

Verify HTML:
Preformatted:
Convert <font> tags to styles:
Remove linebreaks:
Apply source formatting:

Currently, they are set to True, True, True, False, True -- In my experience, setting Verify HTML and Preformatted to True breaks html input in some cases. I'd like to get feedback from the TinyMCE group as to the best settings here.

Also, in case this didn't come across, this module is great -- it is a huge usability improvement for TinyMCE. Thank you for your work on it.

Cheers, and Happy New Year :),

Bill

corsix’s picture

StatusFileSize
new2.11 KB

Replaced the trues with 'true's (and the falses with 'false's for completeness). Also posted to the TinyMCE group to see if they have any comments about the cleanup & output settings.

bonobo’s picture

StatusFileSize
new5.75 KB

this is up and working -- I added some small tweaks based on this thread: http://groups.drupal.org/node/7908

New module attached --

If this gets a short readme.txt to explain what the module does, this is set to roll --

@corsix: do you have cvs access to create a project for this? If you want it, you should apply and reference your other GHOP work, and keep the code rolling!

sun’s picture

Status: Needs review » Needs work

- <col>, <colgroup> tags can be removed safely.
- By default, all WYSIWYG editors are using <strong>, <em> instead of <b>, <i>, so the latter ones can be removed safely.
- <pre> is missing in the list.
- Since themes are likely to output Heading 1, at least <h1> looks like it can be removed safely. Thus, Heading 1 should also be removed form the list of allowed formats in this TinyMCE profile.

corsix’s picture

StatusFileSize
new2.55 KB

sun:
Removed col, colgroup and h1 and added pre.
Did not remove b or i, as the copy of TinyMCE I use here to test things with used b and i to make things bold/italic. If it does that for me, you can be sure it does it for others. As this module is designed to make things work in all cases, and the b/i are not causing any danger by remaining, I left them in.

bonobo:
Added a readme, added onto the admin page a short description of the steps it performs. I'll also be putting in a CVS access request soon.

corsix’s picture

Status: Needs work » Needs review

Oops, should have marked this for review.

bonobo’s picture

Status: Needs review » Reviewed & tested by the community

Looks great to me -- nice work on this.

Cheers,

Bill

bonobo’s picture

@corsix --

Will you be creating a project for this?

If not, we'll do it.

Let me know what you'd prefer.

corsix’s picture

bonobo’s picture

Sweet!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.