Feature #17789 » rtehtmlarea_feature_6712_3.patch
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js (working copy) | ||
---|---|---|
}
|
||
break;
|
||
default:
|
||
if (editor._toolbarObjects[editor.config.hotKeyList[key]]) {
|
||
if (editor._toolbarObjects[editor.config.hotKeyList[key].cmd]) {
|
||
cmd = editor.config.hotKeyList[key].cmd;
|
||
if(cmd == "FormatBlock") value = (HTMLArea.is_ie || HTMLArea.is_safari) ? "<p>" : "p";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if(cmd) {
|
||
if(cmd && !editor.config.hotKeyList[key].action) {
|
||
editor.execCommand(cmd, false, value);
|
||
HTMLArea._stopEvent(ev);
|
||
return false;
|
||
... | ... | |
var toolbar = this.editorConfiguration.toolbar;
|
||
var n = toolbar.length;
|
||
for ( var i = 0; i < n; ++i ) {
|
||
if (toolbar[i].join(",").indexOf(buttonId) != -1) {
|
||
var buttonInToolbar = new RegExp( "^(" + toolbar[i].join("|") + ")$", "i");
|
||
if (buttonInToolbar.test(buttonId)) {
|
||
return true;
|
||
}
|
||
}
|
||
... | ... | |
if (buttonConfiguration.hotKey) {
|
||
var hotKeyConfiguration = {
|
||
id : buttonConfiguration.hotKey,
|
||
cmd : buttonConfiguration.id,
|
||
action : hotKeyAction
|
||
};
|
||
return this.registerHotKey(hotKeyConfiguration);
|
||
... | ... | |
},
|
||
|
||
/**
|
||
* Returns the buttonId corresponding to the hotkey, if any
|
||
*
|
||
* @param string key: the hotkey
|
||
*
|
||
* @return string the buttonId or ""
|
||
*/
|
||
translateHotKey : function(key) {
|
||
if (typeof(this.editorConfiguration.hotKeyList[key]) !== "undefined") {
|
||
var buttonId = this.editorConfiguration.hotKeyList[key].cmd;
|
||
if (typeof(buttonId) !== "undefined") {
|
||
return buttonId;
|
||
} else {
|
||
return "";
|
||
}
|
||
}
|
||
return "";
|
||
},
|
||
|
||
/**
|
||
* The toolbar refresh handler of the plugin
|
||
* This function may be defined by the plugin subclass.
|
||
* If defined, the function will be invoked whenever the toolbar state is refreshed.
|
typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultInline/default-inline.js (working copy) | ||
---|---|---|
*/
|
||
onButtonPress : function (editor, id, UI, param) {
|
||
// Could be a button or its hotkey
|
||
var buttonId = DefaultInline.hotKeyList[id]?DefaultInline.hotKeyList[id]:id;
|
||
var buttonId = this.translateHotKey(id);
|
||
buttonId = buttonId ? buttonId : id;
|
||
editor.focusEditor();
|
||
try {
|
||
editor._doc.execCommand(buttonId, UI, param);
|
||
... | ... | |
var buttonId, n = buttonList.length, commandState;
|
||
for (var i = 0; i < n; ++i) {
|
||
buttonId = buttonList[i][0];
|
||
if (typeof(editor._toolbarObjects[buttonId]) !== "undefined") {
|
||
if (this.isButtonInToolbar(buttonId)) {
|
||
commandState = false;
|
||
if ((editor._editMode != "textmode")) {
|
||
try {
|
||
... | ... | |
["Underline", null]
|
||
];
|
||
/* The list of hotkeys handled by this plugin */
|
||
DefaultInline.hotKeyList = {
|
||
b : "Bold",
|
||
i : "Italic",
|
||
s : "StrikeThrough",
|
||
u : "Underline"
|
||
};
|
||
- « Previous
- 1
- 2
- 3
- Next »