Tuesday, March 13, 2007

Exploring the Properties of the HTML Editor Field Control

I was trying to figure out the easiest way to hide/show buttons on the HTML Editor Field Control.

Strangely, there's some documentation on the topic but it doesn't go into the details about the buttons.

I thought I'd write about the results of my little experiment. The following tabulates the buttons that get activated/deactivated when specific properties are turned on/off.


PropertyValueButtons Activated
(Default)
  • Cut
  • Copy
  • Paste
  • Undo
  • Redo
  • Left-to-right
  • Right-to-left
  • Remove Inline Styles
  • Help
  • Select
  • Apply Paragraph Format - Normal

AllowFonts
DisableBasicFormattingButtons
True
False
  • Font
  • Font Size
  • Text Color
  • Text Highlight Color
  • Align Left
  • Center
  • Align Right
Allow HeadingsTrue
  • Apply Paragraph format
    • Address
    • Heading 1
    • Heading 2
    • Heading 3
    • Heading 4
    • Heading 5
    • Heading 6
AllowHtmlSourceEditingTrueEdit HTML Source
Allow Hyperlinks
AllowExternalUrls
True
True
  • Insert/Edit Hyperlink (allows external URLs as well)
  • Remove Hyperlink
Allow Hyperlinks
AllowExternalUrls
True
False
  • Insert/Edit Hyperlink (allows only internal URLs)
  • Remove Hyperlink
AllowImagesTrue
  • Insert/Edit Image
Allow ListsTrue
  • Numbered Lists
  • Bulleted Lists
  • Apply Paragraph Format
    • Bulleted List
    • Definition
    • Definition Term
    • Directory List
    • Menu List
    • Numbered List
AllowReusableContentTrue
  • Insert Reusable Content
AllowTablesTrue
  • Insert Table
  • Edit Table
  • Show/Hide Gridlines
  • Table Operations
  • Merge Cell
  • Change Column Width and Row Height
AllowTextMarkup
DisableBasicFormattingButtons
True
True
  • Apply Paragraph Format -Formatted
AllowTextMarkup
DisableBasicFormattingButtons
True
False
  • Apply Paragraph Format -Formatted
  • Bold
  • Italics
  • Underline
  • Align Left
  • Center>
  • Align Right
  • Decrease Indent
  • Increase Indent
DisableCustomStylesFalse
  • Styles

There's an additional property, DisableBasicFormattingButtons, which as the name suggests, disables basic formatting buttons. And these are the buttons it considers "basic:

PropertyValueButtons Deactivated
DisableBasicFormattingButtonsFalse
  • Font Size
  • Font
  • Bold
  • Italics
  • Underline
  • Align Left
  • Center
  • Align Right
  • Decrease Indent
  • Increase Indent
  • Text Color
  • Text Highlight Color

2 Comments:

At 11:40 PM, Anonymous AMcK said...

Thanks, Mei Ying. I think you may have saved us a shedload of work!

 
At 5:31 AM, Blogger Ryan said...

Thank you for article :)

Any idea how to change the 'Enter Mode'? By this I mean the control uses paragraph tags by default, would be neat to change this to be a line break, br tag.

Thanks!

 

Post a Comment

<< Home