• Get the Flash Player to see the slideshow.
  • Categories

  • Authors

  • Great Quotes

    Arithmetic is being able to count up to twenty without taking off your shoes. — Mickey Mouse

Get in touch...

To have a chat about
your CMS needs...

Call us 0207 193 2014
or
Email us on

Posts Tagged ‘DCT’

Configuring the default TinyMCE toolbar

Monday, March 2nd, 2009

TinyMCE out of the box includes 3 toolbars which consist of various plugin options.
This can be very helpful in general use.  However, when conforming to a certain style according to a web site, the multiple options available can potentially be obstructive.

The default toolbars in TinyMCE can be configured to consist of only options you want an end user to see and use.

Solution:

Browse to the folder iw-home/httpd/iw/tinymce/config
(iw-home = Location of where TeamSite installed)

Open the file custom_config.js in a text editor. Edit the following lines, with the choice of;
- Removing options,
- Rearranging the options to various locations of the toolbar,
- Add further options

IWTinyMCECustomConfig(”custom1″, “toolbarRow”,
“whitespace,styleselect,fontselect,fontsizeselect,forecolor,\
|,bold,italic,underline”);
IWTinyMCECustomConfig(”custom1″, “toolbarRow”,
“bullist,numlist,|,outdent,indent,|,justifyleft,justifycenter,justifyright,\
justifyfull,|,undo,redo,|,link,unlink”);
IWTinyMCECustomConfig(”custom1″, “toolbarRow”,
“hr,removeformat,visualaid,|,charmap,inserttime,insertdate,image”);

There are various extra options you can add (These options are known as plug-ins). Extra supported plugin options are covered in the article – Plugin options available for TinyMCE

Once you have edited the toolbar to your requirements, the end user will visualise the customised toolbar in their DCT’s

Creating a custom toolbar in TinyMCE

Friday, February 27th, 2009

TinyMCE out of the box includes 3 toolbars which consist of various plug-in options.
This can be very helpful in general use.  However, when conforming to a certain style according to a web site, the multiple options available can potentially be obstructive.

TinyMCE can be configured to create a new toolbar which can consist of only options you want an end user to see and use.  The custom toolbar created can be applied to specified Data Capture Template (DCT); personolising your DCT according to Web Site needs.

Solution:

Browse to the folder iw-home/httpd/iw/tinymce/config
(iw-home = Location of where TeamSite installed)

Open the file custom_config.js in a text editor.  Add the following lines

IWTinyMCECustomConfig(”my_custom_toolbar”, “toolbarRow”,
“bold,forecolor,|,pastetext,pasteword,|,bullist,numlist,|,undo,redo,|
,anchor,link,unlink|,table”);

In this solution I am creating a toolbar named my_custom_toolbar
I have created a toolbar which gives the end user the options;

- Bold Font, Change the Font Colour
- Paste Text without formatting, Paste text with formatting
- Bullet List, Number List
- Undo, Redo
- Inset/Edit Anchor, Insert/Edit Link, Insert a new Table

To configure this to a selected DCT field, you need to ensure the field in the datacapture.cfg comprises the following code;

<textarea required=”t” external-editor=”tinymce” external-editor-config=”my_custom_toolbar” cols=”75″ rows=”5″></textarea>

In the code above, it is saying the field must be filled in by the end user (this is optional), who will only see the my_custom_toolbar (created earlier in this blog) in the DCT for this particular field.

The screenshot below shows the custom toolbar created for the DCT

Custom Toolbar created for DCT

How to remove formatting when pasting into TinyMCE

Thursday, February 26th, 2009

TinyMCE is fairly new to TeamSite, and there have been multiple issues, which  have been experienced.  One of the issues includes, when pasting from a word document into a TeamSite Data Capture Template (DCT) field which comprises TinyMCE; formatting of the selected text pasted comes in the DCT field without removing the formatting.

This can be a major issue on projects where a website conforms to a certain style.

Solution:

Browse to the folder iw-home/httpd/iw/tinymce/config
(iw-home = Location of where TeamSite installed)

Open the file custom_config.js in a text editor.  Now there are 2 options which you can consider;

1. Add options which will remove formatting to the existing default toolbars
2. Create a custom toolbar with the option of remove formatting

Option 1:
If you want to add to the options to the current toolbars, you would add pastetext,pasteword to the selected toolbar row

pastetext  - will paste the selected content as text
pasteword - will paste the selected content with formatting, but in line with the style set out for the template

For information on how to modify the default TinyMCE toolbar, please refer to the blog – Configuring the default TinyMCE toolbar

Option 2:
You would create a custom toolbar along with adding pastetext,pasteword to the new toolbar.

For information on how to create a custom toolbar, please refer to the blog – Creating a custom toolbar in TinyMCE

Plugin Options:
Once you have applied one of the options you can also consider looking at modifying the plugin options with;

[paste_create_paragraphs]
If enabled double linefeeds are converted to paragraph elements when using the plain text dialog. This is enabled by default.
[paste_create_linebreaks]
If enabled single linefeeds are converted to hard line break elements when using the plain text dialog. This is enabled by default.
[paste_force_cleanup_wordpaste]
If disabled then normal cleanup will not be performed after wordpaste. This option is enabled by default.
[paste_use_dialog]
MSIE specific option, if you set this to true both Mozilla and MSIE will present a paste dialog. If you set it to false pasting in MSIE will be done directly. This option is set to true by default.
[paste_auto_cleanup_on_paste]
MSIE specific option. If you enable this feature, a word paste will be executed when the user copy/paste content to the editor. This feature is disabled by default.
[paste_convert_middot_lists]
If this feature is enabled middot lists are converted into UL lists, these will be assigned a special class.
[paste_unindented_list_class]
This option enables you to specify what class to assign to the UL list of middot converted lists. Middot lists are unindented in MS Office. This option defaults to “unIndentedList”.
[paste_convert_headers_to_strong]
This feature converts H1-6 elements to strong elements on paste, this is feature is disabled by default.
[paste_remove_spans]
This enables you to control if the word parse operation should remove or keep span elements, they will be removed by default.
[paste_remove_styles]
This enables you to control if the word parse operation should remove or keep style attributes, they will be removed by default.

To customise these options you would add in code (file mentioned above) as the example shown below;

IWTinyMCECustomConfig(”my_custom_toolbar”, “paste_create_paragraphs”, false);

You should now be able to paste into a TeamSite DCT field which comprises TinyMCE with the option of formatted text or unformatted text