Ticket #555 (closed defect: invalid)

Opened 8 years ago

Last modified 8 years ago

delete dropdown

Reported by: bloodangel Owned by: gogo
Priority: normal Milestone:
Component: Xinha Core Version:
Severity: normal Keywords:
Cc:

Description

hi,

can i delete the dropdownmenu for fontsize and fontclasses? the user should only use the css classes.

thx

Change History

Changed 8 years ago by mharrisonline

This will remove the dropdowns from the toolbar. Replace the line that has the minus (probably line 311?) with the line that has the plus before it.

  this.toolbar =
  [
    ["popupeditor"],
+	["separator","bold","italic","underline","strikethrough"],
-  ["separator","formatblock","fontname","fontsize","bold","italic","underline","strikethrough"],
    ["separator","forecolor","hilitecolor","textindicator"],
    ["separator","subscript","superscript"],
    ["linebreak","separator","justifyleft","justifycenter","justifyright","justifyfull"],
    ["separator","insertorderedlist","insertunorderedlist","outdent","indent"],
    ["separator","inserthorizontalrule","createlink","insertimage","inserttable"],
    ["separator","undo","redo","selectall","print"], (HTMLArea.is_gecko ? [] : ["cut","copy","paste","overwrite","saveas"]),
    ["separator","killword","clearfonts","removeformat","toggleborders","splitblock","lefttoright", "righttoleft"],
    ["separator","htmlmode","showhelp","about"]
  ];

That will do it. To prevent your users from downloading unneeded code, remove these lines:

  this.fontname = {
    "— font —":         '',
    "Arial":	   'arial,helvetica,sans-serif',
    "Courier New":	   'courier new,courier,monospace',
    "Georgia":	   'georgia,times new roman,times,serif',
    "Tahoma":	   'tahoma,arial,helvetica,sans-serif',
    "Times New Roman": 'times new roman,times,serif',
    "Verdana":	   'verdana,arial,helvetica,sans-serif',
    "impact":	   'impact',
    "WingDings":	   'wingdings'
  };

  this.fontsize = {
    "— size —"  : "",
    "1 (8 pt)" : "1",
    "2 (10 pt)": "2",
    "3 (12 pt)": "3",
    "4 (14 pt)": "4",
    "5 (18 pt)": "5",
    "6 (24 pt)": "6",
    "7 (36 pt)": "7"
  };

  this.formatblock = {
    "— format —"  : "",
    "Heading 1": "h1",
    "Heading 2": "h2",
    "Heading 3": "h3",
    "Heading 4": "h4",
    "Heading 5": "h5",
    "Heading 6": "h6",
    "Normal"   : "p",
    "Address"  : "address",
    "Formatted": "pre"
  };

Changed 8 years ago by niko

  • status changed from new to closed
  • resolution set to invalid

or you follow the NewbieGuide and modify the toolbar through the config-object.

if you need help ask in the forum.

Note: See TracTickets for help on using tickets.