Edit File by line
/home/barbar84/www/wp-inclu.../js/tinymce/themes/inlite
File: theme.js
var tabsHtml = '';
[9500] Fix | Delete
var prefix = self.classPrefix;
[9501] Fix | Delete
self.preRender();
[9502] Fix | Delete
layout.preRender(self);
[9503] Fix | Delete
self.items().each(function (ctrl, i) {
[9504] Fix | Delete
var id = self._id + '-t' + i;
[9505] Fix | Delete
ctrl.aria('role', 'tabpanel');
[9506] Fix | Delete
ctrl.aria('labelledby', id);
[9507] Fix | Delete
tabsHtml += '<div id="' + id + '" class="' + prefix + 'tab" ' + 'unselectable="on" role="tab" aria-controls="' + ctrl._id + '" aria-selected="false" tabIndex="-1">' + self.encode(ctrl.settings.title) + '</div>';
[9508] Fix | Delete
});
[9509] Fix | Delete
return '<div id="' + self._id + '" class="' + self.classes + '" hidefocus="1" tabindex="-1">' + '<div id="' + self._id + '-head" class="' + prefix + 'tabs" role="tablist">' + tabsHtml + '</div>' + '<div id="' + self._id + '-body" class="' + self.bodyClasses + '">' + layout.renderHtml(self) + '</div>' + '</div>';
[9510] Fix | Delete
},
[9511] Fix | Delete
postRender: function () {
[9512] Fix | Delete
var self = this;
[9513] Fix | Delete
self._super();
[9514] Fix | Delete
self.settings.activeTab = self.settings.activeTab || 0;
[9515] Fix | Delete
self.activateTab(self.settings.activeTab);
[9516] Fix | Delete
this.on('click', function (e) {
[9517] Fix | Delete
var targetParent = e.target.parentNode;
[9518] Fix | Delete
if (targetParent && targetParent.id === self._id + '-head') {
[9519] Fix | Delete
var i = targetParent.childNodes.length;
[9520] Fix | Delete
while (i--) {
[9521] Fix | Delete
if (targetParent.childNodes[i] === e.target) {
[9522] Fix | Delete
self.activateTab(i);
[9523] Fix | Delete
}
[9524] Fix | Delete
}
[9525] Fix | Delete
}
[9526] Fix | Delete
});
[9527] Fix | Delete
},
[9528] Fix | Delete
initLayoutRect: function () {
[9529] Fix | Delete
var self = this;
[9530] Fix | Delete
var rect, minW, minH;
[9531] Fix | Delete
minW = funcs.getSize(self.getEl('head')).width;
[9532] Fix | Delete
minW = minW < 0 ? 0 : minW;
[9533] Fix | Delete
minH = 0;
[9534] Fix | Delete
self.items().each(function (item) {
[9535] Fix | Delete
minW = Math.max(minW, item.layoutRect().minW);
[9536] Fix | Delete
minH = Math.max(minH, item.layoutRect().minH);
[9537] Fix | Delete
});
[9538] Fix | Delete
self.items().each(function (ctrl) {
[9539] Fix | Delete
ctrl.settings.x = 0;
[9540] Fix | Delete
ctrl.settings.y = 0;
[9541] Fix | Delete
ctrl.settings.w = minW;
[9542] Fix | Delete
ctrl.settings.h = minH;
[9543] Fix | Delete
ctrl.layoutRect({
[9544] Fix | Delete
x: 0,
[9545] Fix | Delete
y: 0,
[9546] Fix | Delete
w: minW,
[9547] Fix | Delete
h: minH
[9548] Fix | Delete
});
[9549] Fix | Delete
});
[9550] Fix | Delete
var headH = funcs.getSize(self.getEl('head')).height;
[9551] Fix | Delete
self.settings.minWidth = minW;
[9552] Fix | Delete
self.settings.minHeight = minH + headH;
[9553] Fix | Delete
rect = self._super();
[9554] Fix | Delete
rect.deltaH += headH;
[9555] Fix | Delete
rect.innerH = rect.h - rect.deltaH;
[9556] Fix | Delete
return rect;
[9557] Fix | Delete
}
[9558] Fix | Delete
});
[9559] Fix | Delete
[9560] Fix | Delete
var TextBox = Widget.extend({
[9561] Fix | Delete
init: function (settings) {
[9562] Fix | Delete
var self = this;
[9563] Fix | Delete
self._super(settings);
[9564] Fix | Delete
self.classes.add('textbox');
[9565] Fix | Delete
if (settings.multiline) {
[9566] Fix | Delete
self.classes.add('multiline');
[9567] Fix | Delete
} else {
[9568] Fix | Delete
self.on('keydown', function (e) {
[9569] Fix | Delete
var rootControl;
[9570] Fix | Delete
if (e.keyCode === 13) {
[9571] Fix | Delete
e.preventDefault();
[9572] Fix | Delete
self.parents().reverse().each(function (ctrl) {
[9573] Fix | Delete
if (ctrl.toJSON) {
[9574] Fix | Delete
rootControl = ctrl;
[9575] Fix | Delete
return false;
[9576] Fix | Delete
}
[9577] Fix | Delete
});
[9578] Fix | Delete
self.fire('submit', { data: rootControl.toJSON() });
[9579] Fix | Delete
}
[9580] Fix | Delete
});
[9581] Fix | Delete
self.on('keyup', function (e) {
[9582] Fix | Delete
self.state.set('value', e.target.value);
[9583] Fix | Delete
});
[9584] Fix | Delete
}
[9585] Fix | Delete
},
[9586] Fix | Delete
repaint: function () {
[9587] Fix | Delete
var self = this;
[9588] Fix | Delete
var style, rect, borderBox, borderW, borderH = 0, lastRepaintRect;
[9589] Fix | Delete
style = self.getEl().style;
[9590] Fix | Delete
rect = self._layoutRect;
[9591] Fix | Delete
lastRepaintRect = self._lastRepaintRect || {};
[9592] Fix | Delete
var doc = domGlobals.document;
[9593] Fix | Delete
if (!self.settings.multiline && doc.all && (!doc.documentMode || doc.documentMode <= 8)) {
[9594] Fix | Delete
style.lineHeight = rect.h - borderH + 'px';
[9595] Fix | Delete
}
[9596] Fix | Delete
borderBox = self.borderBox;
[9597] Fix | Delete
borderW = borderBox.left + borderBox.right + 8;
[9598] Fix | Delete
borderH = borderBox.top + borderBox.bottom + (self.settings.multiline ? 8 : 0);
[9599] Fix | Delete
if (rect.x !== lastRepaintRect.x) {
[9600] Fix | Delete
style.left = rect.x + 'px';
[9601] Fix | Delete
lastRepaintRect.x = rect.x;
[9602] Fix | Delete
}
[9603] Fix | Delete
if (rect.y !== lastRepaintRect.y) {
[9604] Fix | Delete
style.top = rect.y + 'px';
[9605] Fix | Delete
lastRepaintRect.y = rect.y;
[9606] Fix | Delete
}
[9607] Fix | Delete
if (rect.w !== lastRepaintRect.w) {
[9608] Fix | Delete
style.width = rect.w - borderW + 'px';
[9609] Fix | Delete
lastRepaintRect.w = rect.w;
[9610] Fix | Delete
}
[9611] Fix | Delete
if (rect.h !== lastRepaintRect.h) {
[9612] Fix | Delete
style.height = rect.h - borderH + 'px';
[9613] Fix | Delete
lastRepaintRect.h = rect.h;
[9614] Fix | Delete
}
[9615] Fix | Delete
self._lastRepaintRect = lastRepaintRect;
[9616] Fix | Delete
self.fire('repaint', {}, false);
[9617] Fix | Delete
return self;
[9618] Fix | Delete
},
[9619] Fix | Delete
renderHtml: function () {
[9620] Fix | Delete
var self = this;
[9621] Fix | Delete
var settings = self.settings;
[9622] Fix | Delete
var attrs, elm;
[9623] Fix | Delete
attrs = {
[9624] Fix | Delete
id: self._id,
[9625] Fix | Delete
hidefocus: '1'
[9626] Fix | Delete
};
[9627] Fix | Delete
global$4.each([
[9628] Fix | Delete
'rows',
[9629] Fix | Delete
'spellcheck',
[9630] Fix | Delete
'maxLength',
[9631] Fix | Delete
'size',
[9632] Fix | Delete
'readonly',
[9633] Fix | Delete
'min',
[9634] Fix | Delete
'max',
[9635] Fix | Delete
'step',
[9636] Fix | Delete
'list',
[9637] Fix | Delete
'pattern',
[9638] Fix | Delete
'placeholder',
[9639] Fix | Delete
'required',
[9640] Fix | Delete
'multiple'
[9641] Fix | Delete
], function (name) {
[9642] Fix | Delete
attrs[name] = settings[name];
[9643] Fix | Delete
});
[9644] Fix | Delete
if (self.disabled()) {
[9645] Fix | Delete
attrs.disabled = 'disabled';
[9646] Fix | Delete
}
[9647] Fix | Delete
if (settings.subtype) {
[9648] Fix | Delete
attrs.type = settings.subtype;
[9649] Fix | Delete
}
[9650] Fix | Delete
elm = funcs.create(settings.multiline ? 'textarea' : 'input', attrs);
[9651] Fix | Delete
elm.value = self.state.get('value');
[9652] Fix | Delete
elm.className = self.classes.toString();
[9653] Fix | Delete
return elm.outerHTML;
[9654] Fix | Delete
},
[9655] Fix | Delete
value: function (value) {
[9656] Fix | Delete
if (arguments.length) {
[9657] Fix | Delete
this.state.set('value', value);
[9658] Fix | Delete
return this;
[9659] Fix | Delete
}
[9660] Fix | Delete
if (this.state.get('rendered')) {
[9661] Fix | Delete
this.state.set('value', this.getEl().value);
[9662] Fix | Delete
}
[9663] Fix | Delete
return this.state.get('value');
[9664] Fix | Delete
},
[9665] Fix | Delete
postRender: function () {
[9666] Fix | Delete
var self = this;
[9667] Fix | Delete
self.getEl().value = self.state.get('value');
[9668] Fix | Delete
self._super();
[9669] Fix | Delete
self.$el.on('change', function (e) {
[9670] Fix | Delete
self.state.set('value', e.target.value);
[9671] Fix | Delete
self.fire('change', e);
[9672] Fix | Delete
});
[9673] Fix | Delete
},
[9674] Fix | Delete
bindStates: function () {
[9675] Fix | Delete
var self = this;
[9676] Fix | Delete
self.state.on('change:value', function (e) {
[9677] Fix | Delete
if (self.getEl().value !== e.value) {
[9678] Fix | Delete
self.getEl().value = e.value;
[9679] Fix | Delete
}
[9680] Fix | Delete
});
[9681] Fix | Delete
self.state.on('change:disabled', function (e) {
[9682] Fix | Delete
self.getEl().disabled = e.value;
[9683] Fix | Delete
});
[9684] Fix | Delete
return self._super();
[9685] Fix | Delete
},
[9686] Fix | Delete
remove: function () {
[9687] Fix | Delete
this.$el.off();
[9688] Fix | Delete
this._super();
[9689] Fix | Delete
}
[9690] Fix | Delete
});
[9691] Fix | Delete
[9692] Fix | Delete
var getApi = function () {
[9693] Fix | Delete
return {
[9694] Fix | Delete
Selector: Selector,
[9695] Fix | Delete
Collection: Collection$2,
[9696] Fix | Delete
ReflowQueue: ReflowQueue,
[9697] Fix | Delete
Control: Control$1,
[9698] Fix | Delete
Factory: global$b,
[9699] Fix | Delete
KeyboardNavigation: KeyboardNavigation,
[9700] Fix | Delete
Container: Container,
[9701] Fix | Delete
DragHelper: DragHelper,
[9702] Fix | Delete
Scrollable: Scrollable,
[9703] Fix | Delete
Panel: Panel,
[9704] Fix | Delete
Movable: Movable,
[9705] Fix | Delete
Resizable: Resizable,
[9706] Fix | Delete
FloatPanel: FloatPanel,
[9707] Fix | Delete
Window: Window,
[9708] Fix | Delete
MessageBox: MessageBox,
[9709] Fix | Delete
Tooltip: Tooltip,
[9710] Fix | Delete
Widget: Widget,
[9711] Fix | Delete
Progress: Progress,
[9712] Fix | Delete
Notification: Notification,
[9713] Fix | Delete
Layout: Layout$1,
[9714] Fix | Delete
AbsoluteLayout: AbsoluteLayout,
[9715] Fix | Delete
Button: Button,
[9716] Fix | Delete
ButtonGroup: ButtonGroup,
[9717] Fix | Delete
Checkbox: Checkbox,
[9718] Fix | Delete
ComboBox: ComboBox,
[9719] Fix | Delete
ColorBox: ColorBox,
[9720] Fix | Delete
PanelButton: PanelButton,
[9721] Fix | Delete
ColorButton: ColorButton,
[9722] Fix | Delete
ColorPicker: ColorPicker,
[9723] Fix | Delete
Path: Path,
[9724] Fix | Delete
ElementPath: ElementPath,
[9725] Fix | Delete
FormItem: FormItem,
[9726] Fix | Delete
Form: Form,
[9727] Fix | Delete
FieldSet: FieldSet,
[9728] Fix | Delete
FilePicker: FilePicker,
[9729] Fix | Delete
FitLayout: FitLayout,
[9730] Fix | Delete
FlexLayout: FlexLayout,
[9731] Fix | Delete
FlowLayout: FlowLayout,
[9732] Fix | Delete
FormatControls: FormatControls,
[9733] Fix | Delete
GridLayout: GridLayout,
[9734] Fix | Delete
Iframe: Iframe,
[9735] Fix | Delete
InfoBox: InfoBox,
[9736] Fix | Delete
Label: Label,
[9737] Fix | Delete
Toolbar: Toolbar$1,
[9738] Fix | Delete
MenuBar: MenuBar,
[9739] Fix | Delete
MenuButton: MenuButton,
[9740] Fix | Delete
MenuItem: MenuItem,
[9741] Fix | Delete
Throbber: Throbber,
[9742] Fix | Delete
Menu: Menu,
[9743] Fix | Delete
ListBox: ListBox,
[9744] Fix | Delete
Radio: Radio,
[9745] Fix | Delete
ResizeHandle: ResizeHandle,
[9746] Fix | Delete
SelectBox: SelectBox,
[9747] Fix | Delete
Slider: Slider,
[9748] Fix | Delete
Spacer: Spacer,
[9749] Fix | Delete
SplitButton: SplitButton,
[9750] Fix | Delete
StackLayout: StackLayout,
[9751] Fix | Delete
TabPanel: TabPanel,
[9752] Fix | Delete
TextBox: TextBox,
[9753] Fix | Delete
DropZone: DropZone,
[9754] Fix | Delete
BrowseButton: BrowseButton
[9755] Fix | Delete
};
[9756] Fix | Delete
};
[9757] Fix | Delete
var appendTo = function (target) {
[9758] Fix | Delete
if (target.ui) {
[9759] Fix | Delete
global$4.each(getApi(), function (ref, key) {
[9760] Fix | Delete
target.ui[key] = ref;
[9761] Fix | Delete
});
[9762] Fix | Delete
} else {
[9763] Fix | Delete
target.ui = getApi();
[9764] Fix | Delete
}
[9765] Fix | Delete
};
[9766] Fix | Delete
var registerToFactory = function () {
[9767] Fix | Delete
global$4.each(getApi(), function (ref, key) {
[9768] Fix | Delete
global$b.add(key, ref);
[9769] Fix | Delete
});
[9770] Fix | Delete
};
[9771] Fix | Delete
var Api = {
[9772] Fix | Delete
appendTo: appendTo,
[9773] Fix | Delete
registerToFactory: registerToFactory
[9774] Fix | Delete
};
[9775] Fix | Delete
[9776] Fix | Delete
Api.registerToFactory();
[9777] Fix | Delete
Api.appendTo(window.tinymce ? window.tinymce : {});
[9778] Fix | Delete
global.add('inlite', function (editor) {
[9779] Fix | Delete
var panel = create$3();
[9780] Fix | Delete
FormatControls.setup(editor);
[9781] Fix | Delete
Buttons.addToEditor(editor, panel);
[9782] Fix | Delete
return ThemeApi.get(editor, panel);
[9783] Fix | Delete
});
[9784] Fix | Delete
function Theme () {
[9785] Fix | Delete
}
[9786] Fix | Delete
[9787] Fix | Delete
return Theme;
[9788] Fix | Delete
[9789] Fix | Delete
}(window));
[9790] Fix | Delete
})();
[9791] Fix | Delete
[9792] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function