Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
text_indicator.inc
1 <?php
18 global $ROOT_PATH;
19 include_once($ROOT_PATH.'wysiwyg_plugin.inc');
20 
35 {
36 
44  function text_indicator() {
45  $this->_add_button('textindicator','','','','');
46  }
47 
48 
56  ?>
57  case "textindicator":
58  if (!text) {
59  try {
60  with (btn.element.style) {
61  backgroundColor = HTMLArea._makeColor(doc.queryCommandValue("backcolor"));
62  color = HTMLArea._makeColor(doc.queryCommandValue("forecolor"));
63  fontFamily = doc.queryCommandValue("fontname");
64  fontWeight = doc.queryCommandState("bold") ? "bold" : "normal";
65  fontStyle = doc.queryCommandState("italic") ? "italic" : "normal";
66  }
67  } catch (e) {
68  with (btn.element.style) {
69  backgroundColor = "#FFFFFF";
70  color = "#000000";
71  }
72  }
73  }
74  break;
75  <?php
76  }
77 
78 
86  ?>
87  case "textindicator":
88  el = document.createElement("div");
89  el.appendChild(document.createTextNode("A"));
90  el.className = "htmlarea-indicator";
91  el.title = HTMLArea.I18N.tooltips.textindicator;
92  var obj = {
93  name: txt, // the button name (i.e. 'bold')
94  element: el, // the UI element (DIV)
95  enabled: true, // is it enabled?
96  active: false, // is it pressed?
97  text: false, // enabled in text mode?
98  cmd: "textindicator", // the command ID
99  state: setButtonStatus // for changing state
100  };
101  tb_objects[txt] = obj;
102  break;
103  <?php
104  }
105 
106 }
107 
108 ?>