id int32 0 58k | repo stringlengths 5 67 | path stringlengths 4 116 | func_name stringlengths 0 58 | original_string stringlengths 52 373k | language stringclasses 1
value | code stringlengths 52 373k | code_tokens list | docstring stringlengths 4 11.8k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 86 226 |
|---|---|---|---|---|---|---|---|---|---|---|---|
48,300 | sadiqhabib/tinymce-dist | tinymce.full.js | selectionChange | function selectionChange(e) {
var pointRng;
// Check if the button is down or not
if (e.button) {
// Create range from mouse position
pointRng = rngFromPoint(e.x, e.y);
if (pointRng) {
// Check if pointRange is before/after selection then... | javascript | function selectionChange(e) {
var pointRng;
// Check if the button is down or not
if (e.button) {
// Create range from mouse position
pointRng = rngFromPoint(e.x, e.y);
if (pointRng) {
// Check if pointRange is before/after selection then... | [
"function",
"selectionChange",
"(",
"e",
")",
"{",
"var",
"pointRng",
";",
"// Check if the button is down or not",
"if",
"(",
"e",
".",
"button",
")",
"{",
"// Create range from mouse position",
"pointRng",
"=",
"rngFromPoint",
"(",
"e",
".",
"x",
",",
"e",
"."... | Fires while the selection is changing | [
"Fires",
"while",
"the",
"selection",
"is",
"changing"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L34828-L34849 |
48,301 | sadiqhabib/tinymce-dist | tinymce.full.js | restoreFocusOnKeyDown | function restoreFocusOnKeyDown() {
if (!editor.inline) {
editor.on('keydown', function () {
if (document.activeElement == document.body) {
editor.getWin().focus();
}
});
}
} | javascript | function restoreFocusOnKeyDown() {
if (!editor.inline) {
editor.on('keydown', function () {
if (document.activeElement == document.body) {
editor.getWin().focus();
}
});
}
} | [
"function",
"restoreFocusOnKeyDown",
"(",
")",
"{",
"if",
"(",
"!",
"editor",
".",
"inline",
")",
"{",
"editor",
".",
"on",
"(",
"'keydown'",
",",
"function",
"(",
")",
"{",
"if",
"(",
"document",
".",
"activeElement",
"==",
"document",
".",
"body",
")... | iOS has a bug where it's impossible to type if the document has a touchstart event
bound and the user touches the document while having the on screen keyboard visible.
The touch event moves the focus to the parent document while having the caret inside the iframe
this fix moves the focus back into the iframe document. | [
"iOS",
"has",
"a",
"bug",
"where",
"it",
"s",
"impossible",
"to",
"type",
"if",
"the",
"document",
"has",
"a",
"touchstart",
"event",
"bound",
"and",
"the",
"user",
"touches",
"the",
"document",
"while",
"having",
"the",
"on",
"screen",
"keyboard",
"visibl... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L34929-L34937 |
48,302 | sadiqhabib/tinymce-dist | tinymce.full.js | blockCmdArrowNavigation | function blockCmdArrowNavigation() {
if (Env.mac) {
editor.on('keydown', function (e) {
if (VK.metaKeyPressed(e) && !e.shiftKey && (e.keyCode == 37 || e.keyCode == 39)) {
e.preventDefault();
editor.selection.getSel().modify('move', e.keyCode == 37 ? 'backward' :... | javascript | function blockCmdArrowNavigation() {
if (Env.mac) {
editor.on('keydown', function (e) {
if (VK.metaKeyPressed(e) && !e.shiftKey && (e.keyCode == 37 || e.keyCode == 39)) {
e.preventDefault();
editor.selection.getSel().modify('move', e.keyCode == 37 ? 'backward' :... | [
"function",
"blockCmdArrowNavigation",
"(",
")",
"{",
"if",
"(",
"Env",
".",
"mac",
")",
"{",
"editor",
".",
"on",
"(",
"'keydown'",
",",
"function",
"(",
"e",
")",
"{",
"if",
"(",
"VK",
".",
"metaKeyPressed",
"(",
"e",
")",
"&&",
"!",
"e",
".",
... | Firefox on Mac OS will move the browser back to the previous page if you press CMD+Left arrow.
You might then loose all your work so we need to block that behavior and replace it with our own. | [
"Firefox",
"on",
"Mac",
"OS",
"will",
"move",
"the",
"browser",
"back",
"to",
"the",
"previous",
"page",
"if",
"you",
"press",
"CMD",
"+",
"Left",
"arrow",
".",
"You",
"might",
"then",
"loose",
"all",
"your",
"work",
"so",
"we",
"need",
"to",
"block",
... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L34977-L34986 |
48,303 | sadiqhabib/tinymce-dist | tinymce.full.js | replaceString | function replaceString(content, search, replace) {
var index = 0;
do {
index = content.indexOf(search, index);
if (index !== -1) {
content = content.substring(0, index) + replace + content.substr(index + search.length);
index += replace.length - search.lengt... | javascript | function replaceString(content, search, replace) {
var index = 0;
do {
index = content.indexOf(search, index);
if (index !== -1) {
content = content.substring(0, index) + replace + content.substr(index + search.length);
index += replace.length - search.lengt... | [
"function",
"replaceString",
"(",
"content",
",",
"search",
",",
"replace",
")",
"{",
"var",
"index",
"=",
"0",
";",
"do",
"{",
"index",
"=",
"content",
".",
"indexOf",
"(",
"search",
",",
"index",
")",
";",
"if",
"(",
"index",
"!==",
"-",
"1",
")"... | Replaces strings without regexps to avoid FF regexp to big issue | [
"Replaces",
"strings",
"without",
"regexps",
"to",
"avoid",
"FF",
"regexp",
"to",
"big",
"issue"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L36153-L36166 |
48,304 | sadiqhabib/tinymce-dist | tinymce.full.js | function (selection) {
var rng = selection.getSel().getRangeAt(0);
var startContainer = rng.startContainer;
return startContainer.nodeType === 3 ? startContainer.parentNode : startContainer;
} | javascript | function (selection) {
var rng = selection.getSel().getRangeAt(0);
var startContainer = rng.startContainer;
return startContainer.nodeType === 3 ? startContainer.parentNode : startContainer;
} | [
"function",
"(",
"selection",
")",
"{",
"var",
"rng",
"=",
"selection",
".",
"getSel",
"(",
")",
".",
"getRangeAt",
"(",
"0",
")",
";",
"var",
"startContainer",
"=",
"rng",
".",
"startContainer",
";",
"return",
"startContainer",
".",
"nodeType",
"===",
"... | Returns the raw element instead of the fake cE=false element | [
"Returns",
"the",
"raw",
"element",
"instead",
"of",
"the",
"fake",
"cE",
"=",
"false",
"element"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L37199-L37203 | |
48,305 | sadiqhabib/tinymce-dist | tinymce.full.js | function (targetNode, caretNode) {
var targetBlock = editor.dom.getParent(targetNode, editor.dom.isBlock);
var caretBlock = editor.dom.getParent(caretNode, editor.dom.isBlock);
return targetBlock && !isInSameBlock(targetBlock, caretBlock) && hasNormalCaretPosition(targetBlock);
} | javascript | function (targetNode, caretNode) {
var targetBlock = editor.dom.getParent(targetNode, editor.dom.isBlock);
var caretBlock = editor.dom.getParent(caretNode, editor.dom.isBlock);
return targetBlock && !isInSameBlock(targetBlock, caretBlock) && hasNormalCaretPosition(targetBlock);
} | [
"function",
"(",
"targetNode",
",",
"caretNode",
")",
"{",
"var",
"targetBlock",
"=",
"editor",
".",
"dom",
".",
"getParent",
"(",
"targetNode",
",",
"editor",
".",
"dom",
".",
"isBlock",
")",
";",
"var",
"caretBlock",
"=",
"editor",
".",
"dom",
".",
"... | Checks if the target node is in a block and if that block has a caret position better than the suggested caretNode this is to prevent the caret from being sucked in towards a cE=false block if they are adjacent on the vertical axis | [
"Checks",
"if",
"the",
"target",
"node",
"is",
"in",
"a",
"block",
"and",
"if",
"that",
"block",
"has",
"a",
"caret",
"position",
"better",
"than",
"the",
"suggested",
"caretNode",
"this",
"is",
"to",
"prevent",
"the",
"caret",
"from",
"being",
"sucked",
... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L37939-L37944 | |
48,306 | sadiqhabib/tinymce-dist | tinymce.full.js | Editor | function Editor(id, settings, editorManager) {
var self = this, documentBaseUrl, baseUri, defaultSettings;
documentBaseUrl = self.documentBaseUrl = editorManager.documentBaseURL;
baseUri = editorManager.baseURI;
defaultSettings = editorManager.defaultSettings;
/**
* Name/value col... | javascript | function Editor(id, settings, editorManager) {
var self = this, documentBaseUrl, baseUri, defaultSettings;
documentBaseUrl = self.documentBaseUrl = editorManager.documentBaseURL;
baseUri = editorManager.baseURI;
defaultSettings = editorManager.defaultSettings;
/**
* Name/value col... | [
"function",
"Editor",
"(",
"id",
",",
"settings",
",",
"editorManager",
")",
"{",
"var",
"self",
"=",
"this",
",",
"documentBaseUrl",
",",
"baseUri",
",",
"defaultSettings",
";",
"documentBaseUrl",
"=",
"self",
".",
"documentBaseUrl",
"=",
"editorManager",
"."... | Include documentation for all the events.
@include ../../../../../tools/docs/tinymce.Editor.js
Constructs a editor instance by id.
@constructor
@method Editor
@param {String} id Unique id for the editor.
@param {Object} settings Settings for the editor.
@param {tinymce.EditorManager} editorManager EditorManager ins... | [
"Include",
"documentation",
"for",
"all",
"the",
"events",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L38475-L38651 |
48,307 | sadiqhabib/tinymce-dist | tinymce.full.js | function (name) {
var self = this, callback = self.settings[name], scope;
if (!callback) {
return;
}
// Look through lookup
if (self.callbackLookup && (scope = self.callbackLookup[name])) {
callback = scope.func;
scope = scope.scope;
}
... | javascript | function (name) {
var self = this, callback = self.settings[name], scope;
if (!callback) {
return;
}
// Look through lookup
if (self.callbackLookup && (scope = self.callbackLookup[name])) {
callback = scope.func;
scope = scope.scope;
}
... | [
"function",
"(",
"name",
")",
"{",
"var",
"self",
"=",
"this",
",",
"callback",
"=",
"self",
".",
"settings",
"[",
"name",
"]",
",",
"scope",
";",
"if",
"(",
"!",
"callback",
")",
"{",
"return",
";",
"}",
"// Look through lookup",
"if",
"(",
"self",
... | Executes a legacy callback. This method is useful to call old 2.x option callbacks.
There new event model is a better way to add callback so this method might be removed in the future.
@method execCallback
@param {String} name Name of the callback to execute.
@return {Object} Return value passed from callback function... | [
"Executes",
"a",
"legacy",
"callback",
".",
"This",
"method",
"is",
"useful",
"to",
"call",
"old",
"2",
".",
"x",
"option",
"callbacks",
".",
"There",
"new",
"event",
"model",
"is",
"a",
"better",
"way",
"to",
"add",
"callback",
"so",
"this",
"method",
... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L39532-L39554 | |
48,308 | sadiqhabib/tinymce-dist | tinymce.full.js | function (name, defaultVal, type) {
var value = name in this.settings ? this.settings[name] : defaultVal, output;
if (type === 'hash') {
output = {};
if (typeof value === 'string') {
each(value.indexOf('=') > 0 ? value.split(/[;,](?![^=;,]*(?:[;,]|$))/) : value.split(',... | javascript | function (name, defaultVal, type) {
var value = name in this.settings ? this.settings[name] : defaultVal, output;
if (type === 'hash') {
output = {};
if (typeof value === 'string') {
each(value.indexOf('=') > 0 ? value.split(/[;,](?![^=;,]*(?:[;,]|$))/) : value.split(',... | [
"function",
"(",
"name",
",",
"defaultVal",
",",
"type",
")",
"{",
"var",
"value",
"=",
"name",
"in",
"this",
".",
"settings",
"?",
"this",
".",
"settings",
"[",
"name",
"]",
":",
"defaultVal",
",",
"output",
";",
"if",
"(",
"type",
"===",
"'hash'",
... | Returns a configuration parameter by name.
@method getParam
@param {String} name Configruation parameter to retrieve.
@param {String} defaultVal Optional default value to return.
@param {String} type Optional type parameter.
@return {String} Configuration parameter value or default value.
@example
// Returns a specifi... | [
"Returns",
"a",
"configuration",
"parameter",
"by",
"name",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L39607-L39631 | |
48,309 | sadiqhabib/tinymce-dist | tinymce.full.js | function (name, settings) {
var self = this;
if (settings.cmd) {
settings.onclick = function () {
self.execCommand(settings.cmd);
};
}
if (!settings.text && !settings.icon) {
settings.icon = name;
}
self.buttons = self.buttons ... | javascript | function (name, settings) {
var self = this;
if (settings.cmd) {
settings.onclick = function () {
self.execCommand(settings.cmd);
};
}
if (!settings.text && !settings.icon) {
settings.icon = name;
}
self.buttons = self.buttons ... | [
"function",
"(",
"name",
",",
"settings",
")",
"{",
"var",
"self",
"=",
"this",
";",
"if",
"(",
"settings",
".",
"cmd",
")",
"{",
"settings",
".",
"onclick",
"=",
"function",
"(",
")",
"{",
"self",
".",
"execCommand",
"(",
"settings",
".",
"cmd",
"... | Adds a button that later gets created by the theme in the editors toolbars.
@method addButton
@param {String} name Button name to add.
@param {Object} settings Settings object with title, cmd etc.
@example
// Adds a custom button to the editor that inserts contents when clicked
tinymce.init({
...
toolbar: 'example'
... | [
"Adds",
"a",
"button",
"that",
"later",
"gets",
"created",
"by",
"the",
"theme",
"in",
"the",
"editors",
"toolbars",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L39668-L39684 | |
48,310 | sadiqhabib/tinymce-dist | tinymce.full.js | function (name, settings) {
var self = this;
if (settings.cmd) {
settings.onclick = function () {
self.execCommand(settings.cmd);
};
}
self.menuItems = self.menuItems || {};
self.menuItems[name] = settings;
} | javascript | function (name, settings) {
var self = this;
if (settings.cmd) {
settings.onclick = function () {
self.execCommand(settings.cmd);
};
}
self.menuItems = self.menuItems || {};
self.menuItems[name] = settings;
} | [
"function",
"(",
"name",
",",
"settings",
")",
"{",
"var",
"self",
"=",
"this",
";",
"if",
"(",
"settings",
".",
"cmd",
")",
"{",
"settings",
".",
"onclick",
"=",
"function",
"(",
")",
"{",
"self",
".",
"execCommand",
"(",
"settings",
".",
"cmd",
"... | Adds a menu item to be used in the menus of the theme. There might be multiple instances
of this menu item for example it might be used in the main menus of the theme but also in
the context menu so make sure that it's self contained and supports multiple instances.
@method addMenuItem
@param {String} name Menu item n... | [
"Adds",
"a",
"menu",
"item",
"to",
"be",
"used",
"in",
"the",
"menus",
"of",
"the",
"theme",
".",
"There",
"might",
"be",
"multiple",
"instances",
"of",
"this",
"menu",
"item",
"for",
"example",
"it",
"might",
"be",
"used",
"in",
"the",
"main",
"menus"... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L39736-L39747 | |
48,311 | sadiqhabib/tinymce-dist | tinymce.full.js | function (predicate, items) {
var self = this, selector;
self.contextToolbars = self.contextToolbars || [];
// Convert selector to predicate
if (typeof predicate == "string") {
selector = predicate;
predicate = function (elm) {
return self.dom.is(elm, se... | javascript | function (predicate, items) {
var self = this, selector;
self.contextToolbars = self.contextToolbars || [];
// Convert selector to predicate
if (typeof predicate == "string") {
selector = predicate;
predicate = function (elm) {
return self.dom.is(elm, se... | [
"function",
"(",
"predicate",
",",
"items",
")",
"{",
"var",
"self",
"=",
"this",
",",
"selector",
";",
"self",
".",
"contextToolbars",
"=",
"self",
".",
"contextToolbars",
"||",
"[",
"]",
";",
"// Convert selector to predicate",
"if",
"(",
"typeof",
"predic... | Adds a contextual toolbar to be rendered when the selector matches.
@method addContextToolbar
@param {function/string} predicate Predicate that needs to return true if provided strings get converted into CSS predicates.
@param {String/Array} items String or array with items to add to the context toolbar. | [
"Adds",
"a",
"contextual",
"toolbar",
"to",
"be",
"rendered",
"when",
"the",
"selector",
"matches",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L39756-L39774 | |
48,312 | sadiqhabib/tinymce-dist | tinymce.full.js | function (pattern, desc, cmdFunc, scope) {
this.shortcuts.add(pattern, desc, cmdFunc, scope);
} | javascript | function (pattern, desc, cmdFunc, scope) {
this.shortcuts.add(pattern, desc, cmdFunc, scope);
} | [
"function",
"(",
"pattern",
",",
"desc",
",",
"cmdFunc",
",",
"scope",
")",
"{",
"this",
".",
"shortcuts",
".",
"add",
"(",
"pattern",
",",
"desc",
",",
"cmdFunc",
",",
"scope",
")",
";",
"}"
] | Adds a keyboard shortcut for some command or function.
@method addShortcut
@param {String} pattern Shortcut pattern. Like for example: ctrl+alt+o.
@param {String} desc Text description for the command.
@param {String/Function} cmdFunc Command name string or function to execute when the key is pressed.
@param {Object} ... | [
"Adds",
"a",
"keyboard",
"shortcut",
"for",
"some",
"command",
"or",
"function",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L39857-L39859 | |
48,313 | sadiqhabib/tinymce-dist | tinymce.full.js | function (cmd, ui, value, args) {
return this.editorCommands.execCommand(cmd, ui, value, args);
} | javascript | function (cmd, ui, value, args) {
return this.editorCommands.execCommand(cmd, ui, value, args);
} | [
"function",
"(",
"cmd",
",",
"ui",
",",
"value",
",",
"args",
")",
"{",
"return",
"this",
".",
"editorCommands",
".",
"execCommand",
"(",
"cmd",
",",
"ui",
",",
"value",
",",
"args",
")",
";",
"}"
] | Executes a command on the current instance. These commands can be TinyMCE internal commands prefixed with "mce" or
they can be build in browser commands such as "Bold". A compleate list of browser commands is available on MSDN or Mozilla.org.
This function will dispatch the execCommand function on each plugin, theme or... | [
"Executes",
"a",
"command",
"on",
"the",
"current",
"instance",
".",
"These",
"commands",
"can",
"be",
"TinyMCE",
"internal",
"commands",
"prefixed",
"with",
"mce",
"or",
"they",
"can",
"be",
"build",
"in",
"browser",
"commands",
"such",
"as",
"Bold",
".",
... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L39873-L39875 | |
48,314 | sadiqhabib/tinymce-dist | tinymce.full.js | function (args) {
var self = this, elm = self.getElement(), html;
if (elm) {
args = args || {};
args.load = true;
html = self.setContent(elm.value !== undefined ? elm.value : elm.innerHTML, args);
args.element = elm;
if (!args.no_events) {
... | javascript | function (args) {
var self = this, elm = self.getElement(), html;
if (elm) {
args = args || {};
args.load = true;
html = self.setContent(elm.value !== undefined ? elm.value : elm.innerHTML, args);
args.element = elm;
if (!args.no_events) {
... | [
"function",
"(",
"args",
")",
"{",
"var",
"self",
"=",
"this",
",",
"elm",
"=",
"self",
".",
"getElement",
"(",
")",
",",
"html",
";",
"if",
"(",
"elm",
")",
"{",
"args",
"=",
"args",
"||",
"{",
"}",
";",
"args",
".",
"load",
"=",
"true",
";"... | Loads contents from the textarea or div element that got converted into an editor instance.
This method will move the contents from that textarea or div into the editor by using setContent
so all events etc that method has will get dispatched as well.
@method load
@param {Object} args Optional content object, this get... | [
"Loads",
"contents",
"from",
"the",
"textarea",
"or",
"div",
"element",
"that",
"got",
"converted",
"into",
"an",
"editor",
"instance",
".",
"This",
"method",
"will",
"move",
"the",
"contents",
"from",
"that",
"textarea",
"or",
"div",
"into",
"the",
"editor"... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40008-L40026 | |
48,315 | sadiqhabib/tinymce-dist | tinymce.full.js | function (args) {
var self = this, elm = self.getElement(), html, form;
if (!elm || !self.initialized) {
return;
}
args = args || {};
args.save = true;
args.element = elm;
html = args.content = self.getContent(args);
if (!args.no_events) {
... | javascript | function (args) {
var self = this, elm = self.getElement(), html, form;
if (!elm || !self.initialized) {
return;
}
args = args || {};
args.save = true;
args.element = elm;
html = args.content = self.getContent(args);
if (!args.no_events) {
... | [
"function",
"(",
"args",
")",
"{",
"var",
"self",
"=",
"this",
",",
"elm",
"=",
"self",
".",
"getElement",
"(",
")",
",",
"html",
",",
"form",
";",
"if",
"(",
"!",
"elm",
"||",
"!",
"self",
".",
"initialized",
")",
"{",
"return",
";",
"}",
"arg... | Saves the contents from a editor out to the textarea or div element that got converted into an editor instance.
This method will move the HTML contents from the editor into that textarea or div by getContent
so all events etc that method has will get dispatched as well.
@method save
@param {Object} args Optional conte... | [
"Saves",
"the",
"contents",
"from",
"a",
"editor",
"out",
"to",
"the",
"textarea",
"or",
"div",
"element",
"that",
"got",
"converted",
"into",
"an",
"editor",
"instance",
".",
"This",
"method",
"will",
"move",
"the",
"HTML",
"contents",
"from",
"the",
"edi... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40037-L40087 | |
48,316 | sadiqhabib/tinymce-dist | tinymce.full.js | function (content, args) {
var self = this, body = self.getBody(), forcedRootBlockName, padd;
// Setup args object
args = args || {};
args.format = args.format || 'html';
args.set = true;
args.content = content;
// Do preprocessing
if (!args.no_events) {... | javascript | function (content, args) {
var self = this, body = self.getBody(), forcedRootBlockName, padd;
// Setup args object
args = args || {};
args.format = args.format || 'html';
args.set = true;
args.content = content;
// Do preprocessing
if (!args.no_events) {... | [
"function",
"(",
"content",
",",
"args",
")",
"{",
"var",
"self",
"=",
"this",
",",
"body",
"=",
"self",
".",
"getBody",
"(",
")",
",",
"forcedRootBlockName",
",",
"padd",
";",
"// Setup args object",
"args",
"=",
"args",
"||",
"{",
"}",
";",
"args",
... | Sets the specified content to the editor instance, this will cleanup the content before it gets set using
the different cleanup rules options.
@method setContent
@param {String} content Content to set to editor, normally HTML contents but can be other formats as well.
@param {Object} args Optional content object, this... | [
"Sets",
"the",
"specified",
"content",
"to",
"the",
"editor",
"instance",
"this",
"will",
"cleanup",
"the",
"content",
"before",
"it",
"gets",
"set",
"using",
"the",
"different",
"cleanup",
"rules",
"options",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40110-L40181 | |
48,317 | sadiqhabib/tinymce-dist | tinymce.full.js | function (content, args) {
if (args) {
content = extend({ content: content }, args);
}
this.execCommand('mceInsertContent', false, content);
} | javascript | function (content, args) {
if (args) {
content = extend({ content: content }, args);
}
this.execCommand('mceInsertContent', false, content);
} | [
"function",
"(",
"content",
",",
"args",
")",
"{",
"if",
"(",
"args",
")",
"{",
"content",
"=",
"extend",
"(",
"{",
"content",
":",
"content",
"}",
",",
"args",
")",
";",
"}",
"this",
".",
"execCommand",
"(",
"'mceInsertContent'",
",",
"false",
",",
... | Inserts content at caret position.
@method insertContent
@param {String} content Content to insert.
@param {Object} args Optional args to pass to insert call. | [
"Inserts",
"content",
"at",
"caret",
"position",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40245-L40251 | |
48,318 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this, elm;
if (!self.contentWindow) {
elm = self.iframeElement;
if (elm) {
self.contentWindow = elm.contentWindow;
}
}
return self.contentWindow;
} | javascript | function () {
var self = this, elm;
if (!self.contentWindow) {
elm = self.iframeElement;
if (elm) {
self.contentWindow = elm.contentWindow;
}
}
return self.contentWindow;
} | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
",",
"elm",
";",
"if",
"(",
"!",
"self",
".",
"contentWindow",
")",
"{",
"elm",
"=",
"self",
".",
"iframeElement",
";",
"if",
"(",
"elm",
")",
"{",
"self",
".",
"contentWindow",
"=",
"elm",
"... | Returns the iframes window object.
@method getWin
@return {Window} Iframe DOM window object. | [
"Returns",
"the",
"iframes",
"window",
"object",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40354-L40366 | |
48,319 | sadiqhabib/tinymce-dist | tinymce.full.js | function (url, name, elm) {
var self = this, settings = self.settings;
// Use callback instead
if (settings.urlconverter_callback) {
return self.execCallback('urlconverter_callback', url, elm, true, name);
}
// Don't convert link href since thats the CSS files that ge... | javascript | function (url, name, elm) {
var self = this, settings = self.settings;
// Use callback instead
if (settings.urlconverter_callback) {
return self.execCallback('urlconverter_callback', url, elm, true, name);
}
// Don't convert link href since thats the CSS files that ge... | [
"function",
"(",
"url",
",",
"name",
",",
"elm",
")",
"{",
"var",
"self",
"=",
"this",
",",
"settings",
"=",
"self",
".",
"settings",
";",
"// Use callback instead",
"if",
"(",
"settings",
".",
"urlconverter_callback",
")",
"{",
"return",
"self",
".",
"e... | URL converter function this gets executed each time a user adds an img, a or
any other element that has a URL in it. This will be called both by the DOM and HTML
manipulation functions.
@method convertURL
@param {string} url URL to convert.
@param {string} name Attribute name src, href etc.
@param {string/HTMLElement}... | [
"URL",
"converter",
"function",
"this",
"gets",
"executed",
"each",
"time",
"a",
"user",
"adds",
"an",
"img",
"a",
"or",
"any",
"other",
"element",
"that",
"has",
"a",
"URL",
"in",
"it",
".",
"This",
"will",
"be",
"called",
"both",
"by",
"the",
"DOM",
... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40411-L40433 | |
48,320 | sadiqhabib/tinymce-dist | tinymce.full.js | function (elm) {
var self = this, settings = self.settings, dom = self.dom, cls;
elm = elm || self.getBody();
if (self.hasVisual === undefined) {
self.hasVisual = settings.visual;
}
each(dom.select('table,a', elm), function (elm) {
var value;
swi... | javascript | function (elm) {
var self = this, settings = self.settings, dom = self.dom, cls;
elm = elm || self.getBody();
if (self.hasVisual === undefined) {
self.hasVisual = settings.visual;
}
each(dom.select('table,a', elm), function (elm) {
var value;
swi... | [
"function",
"(",
"elm",
")",
"{",
"var",
"self",
"=",
"this",
",",
"settings",
"=",
"self",
".",
"settings",
",",
"dom",
"=",
"self",
".",
"dom",
",",
"cls",
";",
"elm",
"=",
"elm",
"||",
"self",
".",
"getBody",
"(",
")",
";",
"if",
"(",
"self"... | Adds visual aid for tables, anchors etc so they can be more easily edited inside the editor.
@method addVisual
@param {Element} elm Optional root element to loop though to find tables etc that needs the visual aid. | [
"Adds",
"visual",
"aid",
"for",
"tables",
"anchors",
"etc",
"so",
"they",
"can",
"be",
"more",
"easily",
"edited",
"inside",
"the",
"editor",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40441-L40483 | |
48,321 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this;
if (!self.removed) {
self.save();
self.removed = 1;
self.unbindAllNativeEvents();
// Remove any hidden input
if (self.hasHiddenInput) {
DOM.remove(self.getElement().nextSibling);
}
if (!se... | javascript | function () {
var self = this;
if (!self.removed) {
self.save();
self.removed = 1;
self.unbindAllNativeEvents();
// Remove any hidden input
if (self.hasHiddenInput) {
DOM.remove(self.getElement().nextSibling);
}
if (!se... | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
";",
"if",
"(",
"!",
"self",
".",
"removed",
")",
"{",
"self",
".",
"save",
"(",
")",
";",
"self",
".",
"removed",
"=",
"1",
";",
"self",
".",
"unbindAllNativeEvents",
"(",
")",
";",
"// Remo... | Removes the editor from the dom and tinymce collection.
@method remove | [
"Removes",
"the",
"editor",
"from",
"the",
"dom",
"and",
"tinymce",
"collection",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40490-L40522 | |
48,322 | sadiqhabib/tinymce-dist | tinymce.full.js | function (automatic) {
var self = this, form;
// One time is enough
if (self.destroyed) {
return;
}
// If user manually calls destroy and not remove
// Users seems to have logic that calls destroy instead of remove
if (!automatic && !self.removed) {
... | javascript | function (automatic) {
var self = this, form;
// One time is enough
if (self.destroyed) {
return;
}
// If user manually calls destroy and not remove
// Users seems to have logic that calls destroy instead of remove
if (!automatic && !self.removed) {
... | [
"function",
"(",
"automatic",
")",
"{",
"var",
"self",
"=",
"this",
",",
"form",
";",
"// One time is enough",
"if",
"(",
"self",
".",
"destroyed",
")",
"{",
"return",
";",
"}",
"// If user manually calls destroy and not remove",
"// Users seems to have logic that cal... | Destroys the editor instance by removing all events, element references or other resources
that could leak memory. This method will be called automatically when the page is unloaded
but you can also call it directly if you know what you are doing.
@method destroy
@param {Boolean} automatic Optional state if the destro... | [
"Destroys",
"the",
"editor",
"instance",
"by",
"removing",
"all",
"events",
"element",
"references",
"or",
"other",
"resources",
"that",
"could",
"leak",
"memory",
".",
"This",
"method",
"will",
"be",
"called",
"automatically",
"when",
"the",
"page",
"is",
"un... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40532-L40579 | |
48,323 | sadiqhabib/tinymce-dist | tinymce.full.js | function (newCode) {
if (newCode) {
code = newCode;
this.rtl = this.data[newCode] ? this.data[newCode]._dir === 'rtl' : false;
}
} | javascript | function (newCode) {
if (newCode) {
code = newCode;
this.rtl = this.data[newCode] ? this.data[newCode]._dir === 'rtl' : false;
}
} | [
"function",
"(",
"newCode",
")",
"{",
"if",
"(",
"newCode",
")",
"{",
"code",
"=",
"newCode",
";",
"this",
".",
"rtl",
"=",
"this",
".",
"data",
"[",
"newCode",
"]",
"?",
"this",
".",
"data",
"[",
"newCode",
"]",
".",
"_dir",
"===",
"'rtl'",
":",... | Sets the current language code.
@method setCode
@param {String} newCode Current language code. | [
"Sets",
"the",
"current",
"language",
"code",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40638-L40643 | |
48,324 | sadiqhabib/tinymce-dist | tinymce.full.js | function (code, items) {
var langData = data[code];
if (!langData) {
data[code] = langData = {};
}
for (var name in items) {
langData[name] = items[name];
}
this.setCode(code);
} | javascript | function (code, items) {
var langData = data[code];
if (!langData) {
data[code] = langData = {};
}
for (var name in items) {
langData[name] = items[name];
}
this.setCode(code);
} | [
"function",
"(",
"code",
",",
"items",
")",
"{",
"var",
"langData",
"=",
"data",
"[",
"code",
"]",
";",
"if",
"(",
"!",
"langData",
")",
"{",
"data",
"[",
"code",
"]",
"=",
"langData",
"=",
"{",
"}",
";",
"}",
"for",
"(",
"var",
"name",
"in",
... | Adds translations for a specific language code.
@method add
@param {String} code Language code like sv_SE.
@param {Array} items Name/value array with English en_US to sv_SE. | [
"Adds",
"translations",
"for",
"a",
"specific",
"language",
"code",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40670-L40682 | |
48,325 | sadiqhabib/tinymce-dist | tinymce.full.js | function (text) {
var langData = data[code] || {};
/**
* number - string
* null, undefined and empty string - empty string
* array - comma-delimited string
* object - in [object Object]
* function - in [object Function]
*
* @param obj
... | javascript | function (text) {
var langData = data[code] || {};
/**
* number - string
* null, undefined and empty string - empty string
* array - comma-delimited string
* object - in [object Object]
* function - in [object Function]
*
* @param obj
... | [
"function",
"(",
"text",
")",
"{",
"var",
"langData",
"=",
"data",
"[",
"code",
"]",
"||",
"{",
"}",
";",
"/**\n * number - string\n * null, undefined and empty string - empty string\n * array - comma-delimited string\n * object - in [object Object]\n ... | Translates the specified text.
It has a few formats:
I18n.translate("Text");
I18n.translate(["Text {0}/{1}", 0, 1]);
I18n.translate({raw: "Raw string"});
@method translate
@param {String/Object/Array} text Text to translate.
@return {String} String that got translated. | [
"Translates",
"the",
"specified",
"text",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L40696-L40743 | |
48,326 | sadiqhabib/tinymce-dist | tinymce.full.js | function (defaultSettings) {
var baseUrl, suffix;
baseUrl = defaultSettings.base_url;
if (baseUrl) {
this.baseURL = new URI(this.documentBaseURL).toAbsolute(baseUrl.replace(/\/+$/, ''));
this.baseURI = new URI(this.baseURL);
}
suffix = defaultSettings.suffix... | javascript | function (defaultSettings) {
var baseUrl, suffix;
baseUrl = defaultSettings.base_url;
if (baseUrl) {
this.baseURL = new URI(this.documentBaseURL).toAbsolute(baseUrl.replace(/\/+$/, ''));
this.baseURI = new URI(this.baseURL);
}
suffix = defaultSettings.suffix... | [
"function",
"(",
"defaultSettings",
")",
"{",
"var",
"baseUrl",
",",
"suffix",
";",
"baseUrl",
"=",
"defaultSettings",
".",
"base_url",
";",
"if",
"(",
"baseUrl",
")",
"{",
"this",
".",
"baseURL",
"=",
"new",
"URI",
"(",
"this",
".",
"documentBaseURL",
"... | Overrides the default settings for editor instances.
@method overrideDefaults
@param {Object} defaultSettings Defaults settings object. | [
"Overrides",
"the",
"default",
"settings",
"for",
"editor",
"instances",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L41383-L41403 | |
48,327 | sadiqhabib/tinymce-dist | tinymce.full.js | function (editor) {
var self = this, editors = self.editors;
// Add named and index editor instance
editors[editor.id] = editor;
editors.push(editor);
toggleGlobalEvents(editors, true);
// Doesn't call setActive method since we don't want
// to fire a bunch of ... | javascript | function (editor) {
var self = this, editors = self.editors;
// Add named and index editor instance
editors[editor.id] = editor;
editors.push(editor);
toggleGlobalEvents(editors, true);
// Doesn't call setActive method since we don't want
// to fire a bunch of ... | [
"function",
"(",
"editor",
")",
"{",
"var",
"self",
"=",
"this",
",",
"editors",
"=",
"self",
".",
"editors",
";",
"// Add named and index editor instance",
"editors",
"[",
"editor",
".",
"id",
"]",
"=",
"editor",
";",
"editors",
".",
"push",
"(",
"editor"... | Adds an editor instance to the editor collection. This will also set it as the active editor.
@method add
@param {tinymce.Editor} editor Editor instance to add to the collection.
@return {tinymce.Editor} The same instance that got passed in. | [
"Adds",
"an",
"editor",
"instance",
"to",
"the",
"editor",
"collection",
".",
"This",
"will",
"also",
"set",
"it",
"as",
"the",
"active",
"editor",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L41642-L41666 | |
48,328 | sadiqhabib/tinymce-dist | tinymce.full.js | function (selector) {
var self = this, i, editors = self.editors, editor;
// Remove all editors
if (!selector) {
for (i = editors.length - 1; i >= 0; i--) {
self.remove(editors[i]);
}
return;
}
// Remove editors by selector
if ... | javascript | function (selector) {
var self = this, i, editors = self.editors, editor;
// Remove all editors
if (!selector) {
for (i = editors.length - 1; i >= 0; i--) {
self.remove(editors[i]);
}
return;
}
// Remove editors by selector
if ... | [
"function",
"(",
"selector",
")",
"{",
"var",
"self",
"=",
"this",
",",
"i",
",",
"editors",
"=",
"self",
".",
"editors",
",",
"editor",
";",
"// Remove all editors",
"if",
"(",
"!",
"selector",
")",
"{",
"for",
"(",
"i",
"=",
"editors",
".",
"length... | Removes a editor or editors form page.
@example
// Remove all editors bound to divs
tinymce.remove('div');
// Remove all editors bound to textareas
tinymce.remove('textarea');
// Remove all editors
tinymce.remove();
// Remove specific instance by id
tinymce.remove('#id');
@method remove
@param {tinymce.Editor/Stri... | [
"Removes",
"a",
"editor",
"or",
"editors",
"form",
"page",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L41700-L41748 | |
48,329 | sadiqhabib/tinymce-dist | tinymce.full.js | function (cmd, ui, value) {
var self = this, editor = self.get(value);
// Manager commands
switch (cmd) {
case "mceAddEditor":
if (!self.get(value)) {
new Editor(value, self.settings, self).render();
}
return true;
case "mc... | javascript | function (cmd, ui, value) {
var self = this, editor = self.get(value);
// Manager commands
switch (cmd) {
case "mceAddEditor":
if (!self.get(value)) {
new Editor(value, self.settings, self).render();
}
return true;
case "mc... | [
"function",
"(",
"cmd",
",",
"ui",
",",
"value",
")",
"{",
"var",
"self",
"=",
"this",
",",
"editor",
"=",
"self",
".",
"get",
"(",
"value",
")",
";",
"// Manager commands",
"switch",
"(",
"cmd",
")",
"{",
"case",
"\"mceAddEditor\"",
":",
"if",
"(",
... | Executes a specific command on the currently active editor.
@method execCommand
@param {String} cmd Command to perform for example Bold.
@param {Boolean} ui Optional boolean state if a UI should be presented for the command or not.
@param {String} value Optional value parameter like for example an URL to a link.
@retu... | [
"Executes",
"a",
"specific",
"command",
"on",
"the",
"currently",
"active",
"editor",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L41759-L41799 | |
48,330 | sadiqhabib/tinymce-dist | tinymce.full.js | load | function load() {
var key, data, value, pos = 0;
items = {};
// localStorage can be disabled on WebKit/Gecko so make a dummy storage
if (!hasOldIEDataSupport) {
return;
}
function next(end) {
var value, nextPos;
nextPos = end !== undefined ? pos + end : da... | javascript | function load() {
var key, data, value, pos = 0;
items = {};
// localStorage can be disabled on WebKit/Gecko so make a dummy storage
if (!hasOldIEDataSupport) {
return;
}
function next(end) {
var value, nextPos;
nextPos = end !== undefined ? pos + end : da... | [
"function",
"load",
"(",
")",
"{",
"var",
"key",
",",
"data",
",",
"value",
",",
"pos",
"=",
"0",
";",
"items",
"=",
"{",
"}",
";",
"// localStorage can be disabled on WebKit/Gecko so make a dummy storage",
"if",
"(",
"!",
"hasOldIEDataSupport",
")",
"{",
"ret... | Loads the userData string and parses it into the items structure. | [
"Loads",
"the",
"userData",
"string",
"and",
"parses",
"it",
"into",
"the",
"items",
"structure",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L42323-L42372 |
48,331 | sadiqhabib/tinymce-dist | tinymce.full.js | save | function save() {
var value, data = '';
// localStorage can be disabled on WebKit/Gecko so make a dummy storage
if (!hasOldIEDataSupport) {
return;
}
for (var key in items) {
value = items[key];
data += (data ? ',' : '') + key.length.toString(32) + ',' + key + ','... | javascript | function save() {
var value, data = '';
// localStorage can be disabled on WebKit/Gecko so make a dummy storage
if (!hasOldIEDataSupport) {
return;
}
for (var key in items) {
value = items[key];
data += (data ? ',' : '') + key.length.toString(32) + ',' + key + ','... | [
"function",
"save",
"(",
")",
"{",
"var",
"value",
",",
"data",
"=",
"''",
";",
"// localStorage can be disabled on WebKit/Gecko so make a dummy storage",
"if",
"(",
"!",
"hasOldIEDataSupport",
")",
"{",
"return",
";",
"}",
"for",
"(",
"var",
"key",
"in",
"items... | Saves the items structure into a the userData format. | [
"Saves",
"the",
"items",
"structure",
"into",
"a",
"the",
"userData",
"format",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L42377-L42399 |
48,332 | sadiqhabib/tinymce-dist | tinymce.full.js | function (items) {
var self = this, settings = self.settings, firstClass, lastClass, firstItem, lastItem;
firstClass = settings.firstControlClass;
lastClass = settings.lastControlClass;
items.each(function (item) {
item.classes.remove(firstClass).remove(lastClass).add(setting... | javascript | function (items) {
var self = this, settings = self.settings, firstClass, lastClass, firstItem, lastItem;
firstClass = settings.firstControlClass;
lastClass = settings.lastControlClass;
items.each(function (item) {
item.classes.remove(firstClass).remove(lastClass).add(setting... | [
"function",
"(",
"items",
")",
"{",
"var",
"self",
"=",
"this",
",",
"settings",
"=",
"self",
".",
"settings",
",",
"firstClass",
",",
"lastClass",
",",
"firstItem",
",",
"lastItem",
";",
"firstClass",
"=",
"settings",
".",
"firstControlClass",
";",
"lastC... | Applies layout classes to the container.
@private | [
"Applies",
"layout",
"classes",
"to",
"the",
"container",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L42869-L42894 | |
48,333 | sadiqhabib/tinymce-dist | tinymce.full.js | function (container) {
var self = this, html = '';
self.applyClasses(container.items());
container.items().each(function (item) {
html += item.renderHtml();
});
return html;
} | javascript | function (container) {
var self = this, html = '';
self.applyClasses(container.items());
container.items().each(function (item) {
html += item.renderHtml();
});
return html;
} | [
"function",
"(",
"container",
")",
"{",
"var",
"self",
"=",
"this",
",",
"html",
"=",
"''",
";",
"self",
".",
"applyClasses",
"(",
"container",
".",
"items",
"(",
")",
")",
";",
"container",
".",
"items",
"(",
")",
".",
"each",
"(",
"function",
"("... | Renders the specified container and any layout specific HTML.
@method renderHtml
@param {tinymce.ui.Container} container Container to render HTML for. | [
"Renders",
"the",
"specified",
"container",
"and",
"any",
"layout",
"specific",
"HTML",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L42902-L42912 | |
48,334 | sadiqhabib/tinymce-dist | tinymce.full.js | function (settings) {
var self = this, size;
self._super(settings);
settings = self.settings;
size = self.settings.size;
self.on('click mousedown', function (e) {
e.preventDefault();
});
self.on('touchstart', function (e) {
self.fire('click... | javascript | function (settings) {
var self = this, size;
self._super(settings);
settings = self.settings;
size = self.settings.size;
self.on('click mousedown', function (e) {
e.preventDefault();
});
self.on('touchstart', function (e) {
self.fire('click... | [
"function",
"(",
"settings",
")",
"{",
"var",
"self",
"=",
"this",
",",
"size",
";",
"self",
".",
"_super",
"(",
"settings",
")",
";",
"settings",
"=",
"self",
".",
"settings",
";",
"size",
"=",
"self",
".",
"settings",
".",
"size",
";",
"self",
".... | Constructs a new button instance with the specified settings.
@constructor
@param {Object} settings Name/value object with settings.
@setting {String} size Size of the button small|medium|large.
@setting {String} image Image to use for icon.
@setting {String} icon Icon to use for button. | [
"Constructs",
"a",
"new",
"button",
"instance",
"with",
"the",
"specified",
"settings",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L43052-L43080 | |
48,335 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var btnElm = this.getEl().firstChild,
btnStyle;
if (btnElm) {
btnStyle = btnElm.style;
btnStyle.width = btnStyle.height = "100%";
}
this._super();
} | javascript | function () {
var btnElm = this.getEl().firstChild,
btnStyle;
if (btnElm) {
btnStyle = btnElm.style;
btnStyle.width = btnStyle.height = "100%";
}
this._super();
} | [
"function",
"(",
")",
"{",
"var",
"btnElm",
"=",
"this",
".",
"getEl",
"(",
")",
".",
"firstChild",
",",
"btnStyle",
";",
"if",
"(",
"btnElm",
")",
"{",
"btnStyle",
"=",
"btnElm",
".",
"style",
";",
"btnStyle",
".",
"width",
"=",
"btnStyle",
".",
"... | Repaints the button for example after it's been resizes by a layout engine.
@method repaint | [
"Repaints",
"the",
"button",
"for",
"example",
"after",
"it",
"s",
"been",
"resizes",
"by",
"a",
"layout",
"engine",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L43104-L43114 | |
48,336 | sadiqhabib/tinymce-dist | tinymce.full.js | function (settings) {
var self = this;
self._super(settings);
self.on('click mousedown', function (e) {
e.preventDefault();
});
self.on('click', function (e) {
e.preventDefault();
if (!self.disabled()) {
self.checked(!self.checked());... | javascript | function (settings) {
var self = this;
self._super(settings);
self.on('click mousedown', function (e) {
e.preventDefault();
});
self.on('click', function (e) {
e.preventDefault();
if (!self.disabled()) {
self.checked(!self.checked());... | [
"function",
"(",
"settings",
")",
"{",
"var",
"self",
"=",
"this",
";",
"self",
".",
"_super",
"(",
"settings",
")",
";",
"self",
".",
"on",
"(",
"'click mousedown'",
",",
"function",
"(",
"e",
")",
"{",
"e",
".",
"preventDefault",
"(",
")",
";",
"... | Constructs a new Checkbox instance with the specified settings.
@constructor
@param {Object} settings Name/value object with settings.
@setting {Boolean} checked True if the checkbox should be checked by default. | [
"Constructs",
"a",
"new",
"Checkbox",
"instance",
"with",
"the",
"specified",
"settings",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L43322-L43340 | |
48,337 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this, settings = self.settings;
self.active(true);
if (!self.panel) {
var panelSettings = settings.panel;
// Wrap panel in grid layout if type if specified
// This makes it possible to add forms or other containers directly in the panel o... | javascript | function () {
var self = this, settings = self.settings;
self.active(true);
if (!self.panel) {
var panelSettings = settings.panel;
// Wrap panel in grid layout if type if specified
// This makes it possible to add forms or other containers directly in the panel o... | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
",",
"settings",
"=",
"self",
".",
"settings",
";",
"self",
".",
"active",
"(",
"true",
")",
";",
"if",
"(",
"!",
"self",
".",
"panel",
")",
"{",
"var",
"panelSettings",
"=",
"settings",
".",
... | Shows the panel for the button.
@method showPanel | [
"Shows",
"the",
"panel",
"for",
"the",
"button",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L44020-L44057 | |
48,338 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this, items = self.items();
if (!self.settings.formItemDefaults) {
self.settings.formItemDefaults = {
layout: 'flex',
autoResize: "overflow",
defaults: { flex: 1 }
};
}
// Wrap any labeled items in FormIte... | javascript | function () {
var self = this, items = self.items();
if (!self.settings.formItemDefaults) {
self.settings.formItemDefaults = {
layout: 'flex',
autoResize: "overflow",
defaults: { flex: 1 }
};
}
// Wrap any labeled items in FormIte... | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
",",
"items",
"=",
"self",
".",
"items",
"(",
")",
";",
"if",
"(",
"!",
"self",
".",
"settings",
".",
"formItemDefaults",
")",
"{",
"self",
".",
"settings",
".",
"formItemDefaults",
"=",
"{",
"... | This method gets invoked before the control is rendered.
@method preRender | [
"This",
"method",
"gets",
"invoked",
"before",
"the",
"control",
"is",
"rendered",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L44779-L44817 | |
48,339 | sadiqhabib/tinymce-dist | tinymce.full.js | function (html, callback) {
var self = this, body = this.getEl().contentWindow.document.body;
// Wait for iframe to initialize IE 10 takes time
if (!body) {
Delay.setTimeout(function () {
self.html(html);
});
} else {
body.innerHTML = html;
... | javascript | function (html, callback) {
var self = this, body = this.getEl().contentWindow.document.body;
// Wait for iframe to initialize IE 10 takes time
if (!body) {
Delay.setTimeout(function () {
self.html(html);
});
} else {
body.innerHTML = html;
... | [
"function",
"(",
"html",
",",
"callback",
")",
"{",
"var",
"self",
"=",
"this",
",",
"body",
"=",
"this",
".",
"getEl",
"(",
")",
".",
"contentWindow",
".",
"document",
".",
"body",
";",
"// Wait for iframe to initialize IE 10 takes time",
"if",
"(",
"!",
... | Inner HTML for the iframe.
@method html
@param {String} html HTML string to set as HTML inside the iframe.
@param {function} callback Optional callback to execute when the iframe body is filled with contents.
@return {tinymce.ui.Iframe} Current iframe control. | [
"Inner",
"HTML",
"for",
"the",
"iframe",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L46877-L46894 | |
48,340 | sadiqhabib/tinymce-dist | tinymce.full.js | function (toggle) {
var self = this, menu;
if (self.menu && self.menu.visible() && toggle !== false) {
return self.hideMenu();
}
if (!self.menu) {
menu = self.state.get('menu') || [];
// Is menu array then auto constuct menu control
if (menu.len... | javascript | function (toggle) {
var self = this, menu;
if (self.menu && self.menu.visible() && toggle !== false) {
return self.hideMenu();
}
if (!self.menu) {
menu = self.state.get('menu') || [];
// Is menu array then auto constuct menu control
if (menu.len... | [
"function",
"(",
"toggle",
")",
"{",
"var",
"self",
"=",
"this",
",",
"menu",
";",
"if",
"(",
"self",
".",
"menu",
"&&",
"self",
".",
"menu",
".",
"visible",
"(",
")",
"&&",
"toggle",
"!==",
"false",
")",
"{",
"return",
"self",
".",
"hideMenu",
"... | Shows the menu for the button.
@method showMenu | [
"Shows",
"the",
"menu",
"for",
"the",
"button",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L47314-L47368 | |
48,341 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this;
if (self.menu) {
self.menu.items().each(function (item) {
if (item.hideMenu) {
item.hideMenu();
}
});
self.menu.hide();
}
} | javascript | function () {
var self = this;
if (self.menu) {
self.menu.items().each(function (item) {
if (item.hideMenu) {
item.hideMenu();
}
});
self.menu.hide();
}
} | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
";",
"if",
"(",
"self",
".",
"menu",
")",
"{",
"self",
".",
"menu",
".",
"items",
"(",
")",
".",
"each",
"(",
"function",
"(",
"item",
")",
"{",
"if",
"(",
"item",
".",
"hideMenu",
")",
"... | Hides the menu for the button.
@method hideMenu | [
"Hides",
"the",
"menu",
"for",
"the",
"button",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L47375-L47387 | |
48,342 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this, settings = self.settings, menu, parent = self.parent();
parent.items().each(function (ctrl) {
if (ctrl !== self) {
ctrl.hideMenu();
}
});
if (settings.menu) {
menu = self.menu;
if (!menu) {
... | javascript | function () {
var self = this, settings = self.settings, menu, parent = self.parent();
parent.items().each(function (ctrl) {
if (ctrl !== self) {
ctrl.hideMenu();
}
});
if (settings.menu) {
menu = self.menu;
if (!menu) {
... | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
",",
"settings",
"=",
"self",
".",
"settings",
",",
"menu",
",",
"parent",
"=",
"self",
".",
"parent",
"(",
")",
";",
"parent",
".",
"items",
"(",
")",
".",
"each",
"(",
"function",
"(",
"ctr... | Shows the menu for the menu item.
@method showMenu | [
"Shows",
"the",
"menu",
"for",
"the",
"menu",
"item",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L47619-L47693 | |
48,343 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this;
if (self.menu) {
self.menu.items().each(function (item) {
if (item.hideMenu) {
item.hideMenu();
}
});
self.menu.hide();
self.aria('expanded', false);
}
return self;
} | javascript | function () {
var self = this;
if (self.menu) {
self.menu.items().each(function (item) {
if (item.hideMenu) {
item.hideMenu();
}
});
self.menu.hide();
self.aria('expanded', false);
}
return self;
} | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
";",
"if",
"(",
"self",
".",
"menu",
")",
"{",
"self",
".",
"menu",
".",
"items",
"(",
")",
".",
"each",
"(",
"function",
"(",
"item",
")",
"{",
"if",
"(",
"item",
".",
"hideMenu",
")",
"... | Hides the menu for the menu item.
@method hideMenu | [
"Hides",
"the",
"menu",
"for",
"the",
"menu",
"item",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L47700-L47715 | |
48,344 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this, time, factory;
function hideThrobber() {
if (self.throbber) {
self.throbber.hide();
self.throbber = null;
}
}
factory = self.settings.itemsFactory;
if (!factory) {
return;
}
if... | javascript | function () {
var self = this, time, factory;
function hideThrobber() {
if (self.throbber) {
self.throbber.hide();
self.throbber = null;
}
}
factory = self.settings.itemsFactory;
if (!factory) {
return;
}
if... | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
",",
"time",
",",
"factory",
";",
"function",
"hideThrobber",
"(",
")",
"{",
"if",
"(",
"self",
".",
"throbber",
")",
"{",
"self",
".",
"throbber",
".",
"hide",
"(",
")",
";",
"self",
".",
"t... | Loads new items from the factory items function.
@method load | [
"Loads",
"new",
"items",
"from",
"the",
"factory",
"items",
"function",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L48078-L48132 | |
48,345 | sadiqhabib/tinymce-dist | tinymce.full.js | function () {
var self = this;
self.items().each(function (ctrl) {
var settings = ctrl.settings;
if (settings.icon || settings.image || settings.selectable) {
self._hasIcons = true;
return false;
}
});
if (self.settings.itemsFactor... | javascript | function () {
var self = this;
self.items().each(function (ctrl) {
var settings = ctrl.settings;
if (settings.icon || settings.image || settings.selectable) {
self._hasIcons = true;
return false;
}
});
if (self.settings.itemsFactor... | [
"function",
"(",
")",
"{",
"var",
"self",
"=",
"this",
";",
"self",
".",
"items",
"(",
")",
".",
"each",
"(",
"function",
"(",
"ctrl",
")",
"{",
"var",
"settings",
"=",
"ctrl",
".",
"settings",
";",
"if",
"(",
"settings",
".",
"icon",
"||",
"sett... | Invoked before the menu is rendered.
@method preRender | [
"Invoked",
"before",
"the",
"menu",
"is",
"rendered",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L48152-L48173 | |
48,346 | sadiqhabib/tinymce-dist | tinymce.full.js | function (idx) {
var activeTabElm;
if (this.activeTabId) {
activeTabElm = this.getEl(this.activeTabId);
$(activeTabElm).removeClass(this.classPrefix + 'active');
activeTabElm.setAttribute('aria-selected', "false");
}
this.activeTabId = 't' + idx;
... | javascript | function (idx) {
var activeTabElm;
if (this.activeTabId) {
activeTabElm = this.getEl(this.activeTabId);
$(activeTabElm).removeClass(this.classPrefix + 'active');
activeTabElm.setAttribute('aria-selected', "false");
}
this.activeTabId = 't' + idx;
... | [
"function",
"(",
"idx",
")",
"{",
"var",
"activeTabElm",
";",
"if",
"(",
"this",
".",
"activeTabId",
")",
"{",
"activeTabElm",
"=",
"this",
".",
"getEl",
"(",
"this",
".",
"activeTabId",
")",
";",
"$",
"(",
"activeTabElm",
")",
".",
"removeClass",
"(",... | Activates the specified tab by index.
@method activateTab
@param {Number} idx Index of the tab to activate. | [
"Activates",
"the",
"specified",
"tab",
"by",
"index",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L49079-L49102 | |
48,347 | sadiqhabib/tinymce-dist | tinymce.full.js | function (editor, size) {
var toolbars = [], settings = editor.settings;
var addToolbar = function (items) {
if (items) {
toolbars.push(createToolbar(editor, items, size));
return true;
}
};
// Convert toolbar array to multiple options
if (Tools.isArra... | javascript | function (editor, size) {
var toolbars = [], settings = editor.settings;
var addToolbar = function (items) {
if (items) {
toolbars.push(createToolbar(editor, items, size));
return true;
}
};
// Convert toolbar array to multiple options
if (Tools.isArra... | [
"function",
"(",
"editor",
",",
"size",
")",
"{",
"var",
"toolbars",
"=",
"[",
"]",
",",
"settings",
"=",
"editor",
".",
"settings",
";",
"var",
"addToolbar",
"=",
"function",
"(",
"items",
")",
"{",
"if",
"(",
"items",
")",
"{",
"toolbars",
".",
"... | Creates the toolbars from config and returns a toolbar array.
@param {String} size Optional toolbar item size.
@return {Array} Array with toolbars. | [
"Creates",
"the",
"toolbars",
"from",
"config",
"and",
"returns",
"a",
"toolbar",
"array",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L50142-L50188 | |
48,348 | sadiqhabib/tinymce-dist | tinymce.full.js | function (rng) {
var bookmark = {};
var setupEndPoint = function (start) {
var offsetNode, container, offset;
container = rng[start ? 'startContainer' : 'endContainer'];
offset = rng[start ? 'startOffset' : 'endOffset'];
if (container.nodeType === 1) {
offsetNode... | javascript | function (rng) {
var bookmark = {};
var setupEndPoint = function (start) {
var offsetNode, container, offset;
container = rng[start ? 'startContainer' : 'endContainer'];
offset = rng[start ? 'startOffset' : 'endOffset'];
if (container.nodeType === 1) {
offsetNode... | [
"function",
"(",
"rng",
")",
"{",
"var",
"bookmark",
"=",
"{",
"}",
";",
"var",
"setupEndPoint",
"=",
"function",
"(",
"start",
")",
"{",
"var",
"offsetNode",
",",
"container",
",",
"offset",
";",
"container",
"=",
"rng",
"[",
"start",
"?",
"'startCont... | Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with
index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans
added to them since they can be restored after a dom operation.
So this: <p><b>|</b><b>|</b></p>
becomes: <p>... | [
"Returns",
"a",
"range",
"bookmark",
".",
"This",
"will",
"convert",
"indexed",
"bookmarks",
"into",
"temporary",
"span",
"elements",
"with",
"index",
"0",
"so",
"that",
"they",
"can",
"be",
"restored",
"properly",
"after",
"the",
"DOM",
"has",
"been",
"modi... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L52414-L52453 | |
48,349 | sadiqhabib/tinymce-dist | tinymce.full.js | genReplacer | function genReplacer(nodeName) {
var makeReplacementNode;
if (typeof nodeName != 'function') {
var stencilNode = nodeName.nodeType ? nodeName : doc.createElement(nodeName);
makeReplacementNode = function (fill, matchIndex) {
var clone = stencilNode.cloneNode(false);
... | javascript | function genReplacer(nodeName) {
var makeReplacementNode;
if (typeof nodeName != 'function') {
var stencilNode = nodeName.nodeType ? nodeName : doc.createElement(nodeName);
makeReplacementNode = function (fill, matchIndex) {
var clone = stencilNode.cloneNode(false);
... | [
"function",
"genReplacer",
"(",
"nodeName",
")",
"{",
"var",
"makeReplacementNode",
";",
"if",
"(",
"typeof",
"nodeName",
"!=",
"'function'",
")",
"{",
"var",
"stencilNode",
"=",
"nodeName",
".",
"nodeType",
"?",
"nodeName",
":",
"doc",
".",
"createElement",
... | Generates the actual replaceFn which splits up text nodes
and inserts the replacement element. | [
"Generates",
"the",
"actual",
"replaceFn",
"which",
"splits",
"up",
"text",
"nodes",
"and",
"inserts",
"the",
"replacement",
"element",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L57398-L57474 |
48,350 | sadiqhabib/tinymce-dist | tinymce.full.js | function(xs, f) {
for (var i = 0, len = xs.length; i < len; i++) {
var x = xs[i];
f(x, i, xs);
}
} | javascript | function(xs, f) {
for (var i = 0, len = xs.length; i < len; i++) {
var x = xs[i];
f(x, i, xs);
}
} | [
"function",
"(",
"xs",
",",
"f",
")",
"{",
"for",
"(",
"var",
"i",
"=",
"0",
",",
"len",
"=",
"xs",
".",
"length",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"var",
"x",
"=",
"xs",
"[",
"i",
"]",
";",
"f",
"(",
"x",
",",
"i",
","... | Unwound implementing other functions in terms of each. The code size is roughly the same, and it should allow for better optimisation. | [
"Unwound",
"implementing",
"other",
"functions",
"in",
"terms",
"of",
"each",
".",
"The",
"code",
"size",
"is",
"roughly",
"the",
"same",
"and",
"it",
"should",
"allow",
"for",
"better",
"optimisation",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L59208-L59213 | |
48,351 | sadiqhabib/tinymce-dist | tinymce.full.js | function (scope, predicate) {
var result = [];
var dom = scope.dom();
var children = Arr.map(dom.childNodes, Element.fromDom);
Arr.each(children, function (x) {
if (predicate(x)) {
result = result.concat([ x ]);
}
result = result.concat(filterDescendants(x, pre... | javascript | function (scope, predicate) {
var result = [];
var dom = scope.dom();
var children = Arr.map(dom.childNodes, Element.fromDom);
Arr.each(children, function (x) {
if (predicate(x)) {
result = result.concat([ x ]);
}
result = result.concat(filterDescendants(x, pre... | [
"function",
"(",
"scope",
",",
"predicate",
")",
"{",
"var",
"result",
"=",
"[",
"]",
";",
"var",
"dom",
"=",
"scope",
".",
"dom",
"(",
")",
";",
"var",
"children",
"=",
"Arr",
".",
"map",
"(",
"dom",
".",
"childNodes",
",",
"Element",
".",
"from... | inlined sugars PredicateFilter.descendants for file size | [
"inlined",
"sugars",
"PredicateFilter",
".",
"descendants",
"for",
"file",
"size"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L59643-L59655 | |
48,352 | sadiqhabib/tinymce-dist | tinymce.full.js | fixTableCaretPos | function fixTableCaretPos() {
editor.on('KeyDown SetContent VisualAid', function () {
var last;
// Skip empty text nodes from the end
for (last = editor.getBody().lastChild; last; last = last.previousSibling) {
if (last.nodeType == 3) {
if (last.nodeValue... | javascript | function fixTableCaretPos() {
editor.on('KeyDown SetContent VisualAid', function () {
var last;
// Skip empty text nodes from the end
for (last = editor.getBody().lastChild; last; last = last.previousSibling) {
if (last.nodeType == 3) {
if (last.nodeValue... | [
"function",
"fixTableCaretPos",
"(",
")",
"{",
"editor",
".",
"on",
"(",
"'KeyDown SetContent VisualAid'",
",",
"function",
"(",
")",
"{",
"var",
"last",
";",
"// Skip empty text nodes from the end",
"for",
"(",
"last",
"=",
"editor",
".",
"getBody",
"(",
")",
... | Fixes an issue on Gecko where it's impossible to place the caret behind a table This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled | [
"Fixes",
"an",
"issue",
"on",
"Gecko",
"where",
"it",
"s",
"impossible",
"to",
"place",
"the",
"caret",
"behind",
"a",
"table",
"This",
"fix",
"will",
"force",
"a",
"paragraph",
"element",
"after",
"the",
"table",
"but",
"only",
"when",
"the",
"forced_root... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L64545-L64583 |
48,353 | sadiqhabib/tinymce-dist | tinymce.full.js | fixTableCellSelection | function fixTableCellSelection() {
function tableCellSelected(ed, rng, n, currentCell) {
// The decision of when a table cell is selected is somewhat involved. The fact that this code is
// required is actually a pointer to the root cause of this bug. A cell is selected when the start
... | javascript | function fixTableCellSelection() {
function tableCellSelected(ed, rng, n, currentCell) {
// The decision of when a table cell is selected is somewhat involved. The fact that this code is
// required is actually a pointer to the root cause of this bug. A cell is selected when the start
... | [
"function",
"fixTableCellSelection",
"(",
")",
"{",
"function",
"tableCellSelected",
"(",
"ed",
",",
"rng",
",",
"n",
",",
"currentCell",
")",
"{",
"// The decision of when a table cell is selected is somewhat involved. The fact that this code is",
"// required is actually a poi... | this nasty hack is here to work around some WebKit selection bugs. | [
"this",
"nasty",
"hack",
"is",
"here",
"to",
"work",
"around",
"some",
"WebKit",
"selection",
"bugs",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L64586-L64645 |
48,354 | sadiqhabib/tinymce-dist | tinymce.full.js | deleteTable | function deleteTable() {
function placeCaretInCell(cell) {
editor.selection.select(cell, true);
editor.selection.collapse(true);
}
function clearCell(cell) {
editor.$(cell).empty();
Utils.paddCell(cell);
}
editor.on('keydown', function (e... | javascript | function deleteTable() {
function placeCaretInCell(cell) {
editor.selection.select(cell, true);
editor.selection.collapse(true);
}
function clearCell(cell) {
editor.$(cell).empty();
Utils.paddCell(cell);
}
editor.on('keydown', function (e... | [
"function",
"deleteTable",
"(",
")",
"{",
"function",
"placeCaretInCell",
"(",
"cell",
")",
"{",
"editor",
".",
"selection",
".",
"select",
"(",
"cell",
",",
"true",
")",
";",
"editor",
".",
"selection",
".",
"collapse",
"(",
"true",
")",
";",
"}",
"fu... | Delete table if all cells are selected. | [
"Delete",
"table",
"if",
"all",
"cells",
"are",
"selected",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L64650-L64697 |
48,355 | sadiqhabib/tinymce-dist | tinymce.full.js | styleTDTH | function styleTDTH(elm, name, value) {
if (elm.tagName === "TD" || elm.tagName === "TH") {
dom.setStyle(elm, name, value);
} else {
if (elm.children) {
for (var i = 0; i < elm.children.length; i++) {
styleTDTH(elm.children[i], name, v... | javascript | function styleTDTH(elm, name, value) {
if (elm.tagName === "TD" || elm.tagName === "TH") {
dom.setStyle(elm, name, value);
} else {
if (elm.children) {
for (var i = 0; i < elm.children.length; i++) {
styleTDTH(elm.children[i], name, v... | [
"function",
"styleTDTH",
"(",
"elm",
",",
"name",
",",
"value",
")",
"{",
"if",
"(",
"elm",
".",
"tagName",
"===",
"\"TD\"",
"||",
"elm",
".",
"tagName",
"===",
"\"TH\"",
")",
"{",
"dom",
".",
"setStyle",
"(",
"elm",
",",
"name",
",",
"value",
")",... | Explore the layers of the table till we find the first layer of tds or ths | [
"Explore",
"the",
"layers",
"of",
"the",
"table",
"till",
"we",
"find",
"the",
"first",
"layer",
"of",
"tds",
"or",
"ths"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L65261-L65271 |
48,356 | sadiqhabib/tinymce-dist | tinymce.full.js | getTopEdge | function getTopEdge(index, row) {
return {
index: index,
y: editor.dom.getPos(row).y
};
} | javascript | function getTopEdge(index, row) {
return {
index: index,
y: editor.dom.getPos(row).y
};
} | [
"function",
"getTopEdge",
"(",
"index",
",",
"row",
")",
"{",
"return",
"{",
"index",
":",
"index",
",",
"y",
":",
"editor",
".",
"dom",
".",
"getPos",
"(",
"row",
")",
".",
"y",
"}",
";",
"}"
] | Get the absolute position's top edge. | [
"Get",
"the",
"absolute",
"position",
"s",
"top",
"edge",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L65987-L65992 |
48,357 | sadiqhabib/tinymce-dist | tinymce.full.js | getBottomEdge | function getBottomEdge(index, row) {
return {
index: index,
y: editor.dom.getPos(row).y + row.offsetHeight
};
} | javascript | function getBottomEdge(index, row) {
return {
index: index,
y: editor.dom.getPos(row).y + row.offsetHeight
};
} | [
"function",
"getBottomEdge",
"(",
"index",
",",
"row",
")",
"{",
"return",
"{",
"index",
":",
"index",
",",
"y",
":",
"editor",
".",
"dom",
".",
"getPos",
"(",
"row",
")",
".",
"y",
"+",
"row",
".",
"offsetHeight",
"}",
";",
"}"
] | Get the absolute position's bottom edge. | [
"Get",
"the",
"absolute",
"position",
"s",
"bottom",
"edge",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L65995-L66000 |
48,358 | sadiqhabib/tinymce-dist | tinymce.full.js | getLeftEdge | function getLeftEdge(index, cell) {
return {
index: index,
x: editor.dom.getPos(cell).x
};
} | javascript | function getLeftEdge(index, cell) {
return {
index: index,
x: editor.dom.getPos(cell).x
};
} | [
"function",
"getLeftEdge",
"(",
"index",
",",
"cell",
")",
"{",
"return",
"{",
"index",
":",
"index",
",",
"x",
":",
"editor",
".",
"dom",
".",
"getPos",
"(",
"cell",
")",
".",
"x",
"}",
";",
"}"
] | Get the absolute position's left edge. | [
"Get",
"the",
"absolute",
"position",
"s",
"left",
"edge",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66003-L66008 |
48,359 | sadiqhabib/tinymce-dist | tinymce.full.js | getRightEdge | function getRightEdge(index, cell) {
return {
index: index,
x: editor.dom.getPos(cell).x + cell.offsetWidth
};
} | javascript | function getRightEdge(index, cell) {
return {
index: index,
x: editor.dom.getPos(cell).x + cell.offsetWidth
};
} | [
"function",
"getRightEdge",
"(",
"index",
",",
"cell",
")",
"{",
"return",
"{",
"index",
":",
"index",
",",
"x",
":",
"editor",
".",
"dom",
".",
"getPos",
"(",
"cell",
")",
".",
"x",
"+",
"cell",
".",
"offsetWidth",
"}",
";",
"}"
] | Get the absolute position's right edge. | [
"Get",
"the",
"absolute",
"position",
"s",
"right",
"edge",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66011-L66016 |
48,360 | sadiqhabib/tinymce-dist | tinymce.full.js | clearBars | function clearBars() {
var bars = editor.dom.select('.' + RESIZE_BAR_CLASS, getBody());
Tools.each(bars, function (bar) {
editor.dom.remove(bar);
});
} | javascript | function clearBars() {
var bars = editor.dom.select('.' + RESIZE_BAR_CLASS, getBody());
Tools.each(bars, function (bar) {
editor.dom.remove(bar);
});
} | [
"function",
"clearBars",
"(",
")",
"{",
"var",
"bars",
"=",
"editor",
".",
"dom",
".",
"select",
"(",
"'.'",
"+",
"RESIZE_BAR_CLASS",
",",
"getBody",
"(",
")",
")",
";",
"Tools",
".",
"each",
"(",
"bars",
",",
"function",
"(",
"bar",
")",
"{",
"edi... | Clear the bars. | [
"Clear",
"the",
"bars",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66086-L66091 |
48,361 | sadiqhabib/tinymce-dist | tinymce.full.js | generateBar | function generateBar(classToAdd, cursor, left, top, height, width, indexAttr, index) {
var bar = {
'data-mce-bogus': 'all',
'class': RESIZE_BAR_CLASS + ' ' + classToAdd,
'unselectable': 'on',
'data-mce-resize': false,
style: 'cursor: ' + cursor + '; ' +
... | javascript | function generateBar(classToAdd, cursor, left, top, height, width, indexAttr, index) {
var bar = {
'data-mce-bogus': 'all',
'class': RESIZE_BAR_CLASS + ' ' + classToAdd,
'unselectable': 'on',
'data-mce-resize': false,
style: 'cursor: ' + cursor + '; ' +
... | [
"function",
"generateBar",
"(",
"classToAdd",
",",
"cursor",
",",
"left",
",",
"top",
",",
"height",
",",
"width",
",",
"indexAttr",
",",
"index",
")",
"{",
"var",
"bar",
"=",
"{",
"'data-mce-bogus'",
":",
"'all'",
",",
"'class'",
":",
"RESIZE_BAR_CLASS",
... | Generates a resize bar object for the editor to add. | [
"Generates",
"a",
"resize",
"bar",
"object",
"for",
"the",
"editor",
"to",
"add",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66100-L66119 |
48,362 | sadiqhabib/tinymce-dist | tinymce.full.js | drawRows | function drawRows(rowPositions, tableWidth, tablePosition) {
Tools.each(rowPositions, function (rowPosition) {
var left = tablePosition.x,
top = rowPosition.y - RESIZE_BAR_THICKNESS / 2,
height = RESIZE_BAR_THICKNESS,
width = tableWidth;
editor.dom.add(ge... | javascript | function drawRows(rowPositions, tableWidth, tablePosition) {
Tools.each(rowPositions, function (rowPosition) {
var left = tablePosition.x,
top = rowPosition.y - RESIZE_BAR_THICKNESS / 2,
height = RESIZE_BAR_THICKNESS,
width = tableWidth;
editor.dom.add(ge... | [
"function",
"drawRows",
"(",
"rowPositions",
",",
"tableWidth",
",",
"tablePosition",
")",
"{",
"Tools",
".",
"each",
"(",
"rowPositions",
",",
"function",
"(",
"rowPosition",
")",
"{",
"var",
"left",
"=",
"tablePosition",
".",
"x",
",",
"top",
"=",
"rowPo... | Draw the row bars over the row borders. | [
"Draw",
"the",
"row",
"bars",
"over",
"the",
"row",
"borders",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66122-L66133 |
48,363 | sadiqhabib/tinymce-dist | tinymce.full.js | drawCols | function drawCols(cellPositions, tableHeight, tablePosition) {
Tools.each(cellPositions, function (cellPosition) {
var left = cellPosition.x - RESIZE_BAR_THICKNESS / 2,
top = tablePosition.y,
height = tableHeight,
width = RESIZE_BAR_THICKNESS;
editor.dom.... | javascript | function drawCols(cellPositions, tableHeight, tablePosition) {
Tools.each(cellPositions, function (cellPosition) {
var left = cellPosition.x - RESIZE_BAR_THICKNESS / 2,
top = tablePosition.y,
height = tableHeight,
width = RESIZE_BAR_THICKNESS;
editor.dom.... | [
"function",
"drawCols",
"(",
"cellPositions",
",",
"tableHeight",
",",
"tablePosition",
")",
"{",
"Tools",
".",
"each",
"(",
"cellPositions",
",",
"function",
"(",
"cellPosition",
")",
"{",
"var",
"left",
"=",
"cellPosition",
".",
"x",
"-",
"RESIZE_BAR_THICKNE... | Draw the column bars over the column borders. | [
"Draw",
"the",
"column",
"bars",
"over",
"the",
"column",
"borders",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66136-L66147 |
48,364 | sadiqhabib/tinymce-dist | tinymce.full.js | getTableDetails | function getTableDetails(table) {
return Tools.map(table.rows, function (row) {
var cells = Tools.map(row.cells, function (cell) {
var rowspan = cell.hasAttribute('rowspan') ? parseInt(cell.getAttribute('rowspan'), 10) : 1;
var colspan = cell.hasAttribute('colspan') ? parseIn... | javascript | function getTableDetails(table) {
return Tools.map(table.rows, function (row) {
var cells = Tools.map(row.cells, function (cell) {
var rowspan = cell.hasAttribute('rowspan') ? parseInt(cell.getAttribute('rowspan'), 10) : 1;
var colspan = cell.hasAttribute('colspan') ? parseIn... | [
"function",
"getTableDetails",
"(",
"table",
")",
"{",
"return",
"Tools",
".",
"map",
"(",
"table",
".",
"rows",
",",
"function",
"(",
"row",
")",
"{",
"var",
"cells",
"=",
"Tools",
".",
"map",
"(",
"row",
".",
"cells",
",",
"function",
"(",
"cell",
... | Get a matrix of the cells in each row and the rows in the table. | [
"Get",
"a",
"matrix",
"of",
"the",
"cells",
"in",
"each",
"row",
"and",
"the",
"rows",
"in",
"the",
"table",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66150-L66172 |
48,365 | sadiqhabib/tinymce-dist | tinymce.full.js | getTableGrid | function getTableGrid(tableDetails) {
function key(rowIndex, colIndex) {
return rowIndex + ',' + colIndex;
}
function getAt(rowIndex, colIndex) {
return access[key(rowIndex, colIndex)];
}
function getAllCells() {
var allCells = [];
Tools.... | javascript | function getTableGrid(tableDetails) {
function key(rowIndex, colIndex) {
return rowIndex + ',' + colIndex;
}
function getAt(rowIndex, colIndex) {
return access[key(rowIndex, colIndex)];
}
function getAllCells() {
var allCells = [];
Tools.... | [
"function",
"getTableGrid",
"(",
"tableDetails",
")",
"{",
"function",
"key",
"(",
"rowIndex",
",",
"colIndex",
")",
"{",
"return",
"rowIndex",
"+",
"','",
"+",
"colIndex",
";",
"}",
"function",
"getAt",
"(",
"rowIndex",
",",
"colIndex",
")",
"{",
"return"... | Get a grid model of the table. | [
"Get",
"a",
"grid",
"model",
"of",
"the",
"table",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66175-L66249 |
48,366 | sadiqhabib/tinymce-dist | tinymce.full.js | getColumnBlocks | function getColumnBlocks(tableGrid) {
var cols = range(0, tableGrid.grid.maxCols);
var rows = range(0, tableGrid.grid.maxRows);
return Tools.map(cols, function (col) {
function getBlock() {
var details = [];
for (var i = 0; i < rows.length; i++) {
... | javascript | function getColumnBlocks(tableGrid) {
var cols = range(0, tableGrid.grid.maxCols);
var rows = range(0, tableGrid.grid.maxRows);
return Tools.map(cols, function (col) {
function getBlock() {
var details = [];
for (var i = 0; i < rows.length; i++) {
... | [
"function",
"getColumnBlocks",
"(",
"tableGrid",
")",
"{",
"var",
"cols",
"=",
"range",
"(",
"0",
",",
"tableGrid",
".",
"grid",
".",
"maxCols",
")",
";",
"var",
"rows",
"=",
"range",
"(",
"0",
",",
"tableGrid",
".",
"grid",
".",
"maxRows",
")",
";",... | Attempt to get representative blocks for the width of each column. | [
"Attempt",
"to",
"get",
"representative",
"blocks",
"for",
"the",
"width",
"of",
"each",
"column",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66277-L66313 |
48,367 | sadiqhabib/tinymce-dist | tinymce.full.js | getRowBlocks | function getRowBlocks(tableGrid) {
var cols = range(0, tableGrid.grid.maxCols);
var rows = range(0, tableGrid.grid.maxRows);
return Tools.map(rows, function (row) {
function getBlock() {
var details = [];
for (var i = 0; i < cols.length; i++) {
va... | javascript | function getRowBlocks(tableGrid) {
var cols = range(0, tableGrid.grid.maxCols);
var rows = range(0, tableGrid.grid.maxRows);
return Tools.map(rows, function (row) {
function getBlock() {
var details = [];
for (var i = 0; i < cols.length; i++) {
va... | [
"function",
"getRowBlocks",
"(",
"tableGrid",
")",
"{",
"var",
"cols",
"=",
"range",
"(",
"0",
",",
"tableGrid",
".",
"grid",
".",
"maxCols",
")",
";",
"var",
"rows",
"=",
"range",
"(",
"0",
",",
"tableGrid",
".",
"grid",
".",
"maxRows",
")",
";",
... | Attempt to get representative blocks for the height of each row. | [
"Attempt",
"to",
"get",
"representative",
"blocks",
"for",
"the",
"height",
"of",
"each",
"row",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66316-L66342 |
48,368 | sadiqhabib/tinymce-dist | tinymce.full.js | getWidths | function getWidths(tableGrid, isPercentageBased, table) {
var cols = getColumnBlocks(tableGrid);
var backups = Tools.map(cols, function (col) {
return getInnerEdge(col.colIndex, col.element).x;
});
var widths = [];
for (var i = 0; i < cols.length; i++) {
v... | javascript | function getWidths(tableGrid, isPercentageBased, table) {
var cols = getColumnBlocks(tableGrid);
var backups = Tools.map(cols, function (col) {
return getInnerEdge(col.colIndex, col.element).x;
});
var widths = [];
for (var i = 0; i < cols.length; i++) {
v... | [
"function",
"getWidths",
"(",
"tableGrid",
",",
"isPercentageBased",
",",
"table",
")",
"{",
"var",
"cols",
"=",
"getColumnBlocks",
"(",
"tableGrid",
")",
";",
"var",
"backups",
"=",
"Tools",
".",
"map",
"(",
"cols",
",",
"function",
"(",
"col",
")",
"{"... | Attempt to get the css width from column representative cells. | [
"Attempt",
"to",
"get",
"the",
"css",
"width",
"from",
"column",
"representative",
"cells",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66442-L66462 |
48,369 | sadiqhabib/tinymce-dist | tinymce.full.js | getPixelHeight | function getPixelHeight(element) {
var heightString = getStyleOrAttrib(element, 'height');
var heightNumber = parseInt(heightString, 10);
if (isPercentageBasedSize(heightString)) {
heightNumber = 0;
}
return !isNaN(heightNumber) && heightNumber > 0 ?
heigh... | javascript | function getPixelHeight(element) {
var heightString = getStyleOrAttrib(element, 'height');
var heightNumber = parseInt(heightString, 10);
if (isPercentageBasedSize(heightString)) {
heightNumber = 0;
}
return !isNaN(heightNumber) && heightNumber > 0 ?
heigh... | [
"function",
"getPixelHeight",
"(",
"element",
")",
"{",
"var",
"heightString",
"=",
"getStyleOrAttrib",
"(",
"element",
",",
"'height'",
")",
";",
"var",
"heightNumber",
"=",
"parseInt",
"(",
"heightString",
",",
"10",
")",
";",
"if",
"(",
"isPercentageBasedSi... | Attempt to get the pixel height from a cell. | [
"Attempt",
"to",
"get",
"the",
"pixel",
"height",
"from",
"a",
"cell",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66465-L66477 |
48,370 | sadiqhabib/tinymce-dist | tinymce.full.js | getPixelHeights | function getPixelHeights(tableGrid) {
var rows = getRowBlocks(tableGrid);
var backups = Tools.map(rows, function (row) {
return getTopEdge(row.rowIndex, row.element).y;
});
var heights = [];
for (var i = 0; i < rows.length; i++) {
var span = rows[i].elemen... | javascript | function getPixelHeights(tableGrid) {
var rows = getRowBlocks(tableGrid);
var backups = Tools.map(rows, function (row) {
return getTopEdge(row.rowIndex, row.element).y;
});
var heights = [];
for (var i = 0; i < rows.length; i++) {
var span = rows[i].elemen... | [
"function",
"getPixelHeights",
"(",
"tableGrid",
")",
"{",
"var",
"rows",
"=",
"getRowBlocks",
"(",
"tableGrid",
")",
";",
"var",
"backups",
"=",
"Tools",
".",
"map",
"(",
"rows",
",",
"function",
"(",
"row",
")",
"{",
"return",
"getTopEdge",
"(",
"row",... | Attempt to get the css height from row representative cells. | [
"Attempt",
"to",
"get",
"the",
"css",
"height",
"from",
"row",
"representative",
"cells",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66480-L66500 |
48,371 | sadiqhabib/tinymce-dist | tinymce.full.js | determineDeltas | function determineDeltas(sizes, column, step, min, isPercentageBased) {
var result = sizes.slice(0);
function generateZeros(array) {
return Tools.map(array, function () {
return 0;
});
}
function onOneColumn() {
var deltas;
if (isPer... | javascript | function determineDeltas(sizes, column, step, min, isPercentageBased) {
var result = sizes.slice(0);
function generateZeros(array) {
return Tools.map(array, function () {
return 0;
});
}
function onOneColumn() {
var deltas;
if (isPer... | [
"function",
"determineDeltas",
"(",
"sizes",
",",
"column",
",",
"step",
",",
"min",
",",
"isPercentageBased",
")",
"{",
"var",
"result",
"=",
"sizes",
".",
"slice",
"(",
"0",
")",
";",
"function",
"generateZeros",
"(",
"array",
")",
"{",
"return",
"Tool... | Determine how much each column's css width will need to change. Sizes = result = pixels widths OR percentage based widths | [
"Determine",
"how",
"much",
"each",
"column",
"s",
"css",
"width",
"will",
"need",
"to",
"change",
".",
"Sizes",
"=",
"result",
"=",
"pixels",
"widths",
"OR",
"percentage",
"based",
"widths"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66504-L66576 |
48,372 | sadiqhabib/tinymce-dist | tinymce.full.js | recalculateWidths | function recalculateWidths(tableGrid, widths) {
var allCells = tableGrid.getAllCells();
return Tools.map(allCells, function (cell) {
var width = total(cell.colIndex, cell.colIndex + cell.colspan, widths);
return {
element: cell.element,
width: width,
... | javascript | function recalculateWidths(tableGrid, widths) {
var allCells = tableGrid.getAllCells();
return Tools.map(allCells, function (cell) {
var width = total(cell.colIndex, cell.colIndex + cell.colspan, widths);
return {
element: cell.element,
width: width,
... | [
"function",
"recalculateWidths",
"(",
"tableGrid",
",",
"widths",
")",
"{",
"var",
"allCells",
"=",
"tableGrid",
".",
"getAllCells",
"(",
")",
";",
"return",
"Tools",
".",
"map",
"(",
"allCells",
",",
"function",
"(",
"cell",
")",
"{",
"var",
"width",
"=... | Combine cell's css widths to determine widths of colspan'd cells. | [
"Combine",
"cell",
"s",
"css",
"widths",
"to",
"determine",
"widths",
"of",
"colspan",
"d",
"cells",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66587-L66597 |
48,373 | sadiqhabib/tinymce-dist | tinymce.full.js | recalculateCellHeights | function recalculateCellHeights(tableGrid, heights) {
var allCells = tableGrid.getAllCells();
return Tools.map(allCells, function (cell) {
var height = total(cell.rowIndex, cell.rowIndex + cell.rowspan, heights);
return {
element: cell.element,
height: height,... | javascript | function recalculateCellHeights(tableGrid, heights) {
var allCells = tableGrid.getAllCells();
return Tools.map(allCells, function (cell) {
var height = total(cell.rowIndex, cell.rowIndex + cell.rowspan, heights);
return {
element: cell.element,
height: height,... | [
"function",
"recalculateCellHeights",
"(",
"tableGrid",
",",
"heights",
")",
"{",
"var",
"allCells",
"=",
"tableGrid",
".",
"getAllCells",
"(",
")",
";",
"return",
"Tools",
".",
"map",
"(",
"allCells",
",",
"function",
"(",
"cell",
")",
"{",
"var",
"height... | Combine cell's css heights to determine heights of rowspan'd cells. | [
"Combine",
"cell",
"s",
"css",
"heights",
"to",
"determine",
"heights",
"of",
"rowspan",
"d",
"cells",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66600-L66610 |
48,374 | sadiqhabib/tinymce-dist | tinymce.full.js | recalculateRowHeights | function recalculateRowHeights(tableGrid, heights) {
var allRows = tableGrid.getAllRows();
return Tools.map(allRows, function (row, i) {
return {
element: row.element,
height: heights[i]
};
});
} | javascript | function recalculateRowHeights(tableGrid, heights) {
var allRows = tableGrid.getAllRows();
return Tools.map(allRows, function (row, i) {
return {
element: row.element,
height: heights[i]
};
});
} | [
"function",
"recalculateRowHeights",
"(",
"tableGrid",
",",
"heights",
")",
"{",
"var",
"allRows",
"=",
"tableGrid",
".",
"getAllRows",
"(",
")",
";",
"return",
"Tools",
".",
"map",
"(",
"allRows",
",",
"function",
"(",
"row",
",",
"i",
")",
"{",
"return... | Calculate row heights. | [
"Calculate",
"row",
"heights",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66613-L66621 |
48,375 | sadiqhabib/tinymce-dist | tinymce.full.js | adjustWidth | function adjustWidth(table, delta, index) {
var tableDetails = getTableDetails(table);
var tableGrid = getTableGrid(tableDetails);
function setSizes(newSizes, styleExtension) {
Tools.each(newSizes, function (cell) {
editor.dom.setStyle(cell.element, 'width', cell.width + s... | javascript | function adjustWidth(table, delta, index) {
var tableDetails = getTableDetails(table);
var tableGrid = getTableGrid(tableDetails);
function setSizes(newSizes, styleExtension) {
Tools.each(newSizes, function (cell) {
editor.dom.setStyle(cell.element, 'width', cell.width + s... | [
"function",
"adjustWidth",
"(",
"table",
",",
"delta",
",",
"index",
")",
"{",
"var",
"tableDetails",
"=",
"getTableDetails",
"(",
"table",
")",
";",
"var",
"tableGrid",
"=",
"getTableGrid",
"(",
"tableDetails",
")",
";",
"function",
"setSizes",
"(",
"newSiz... | Adjust the width of the column of table at index, with delta. | [
"Adjust",
"the",
"width",
"of",
"the",
"column",
"of",
"table",
"at",
"index",
"with",
"delta",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66632-L66683 |
48,376 | sadiqhabib/tinymce-dist | tinymce.full.js | adjustHeight | function adjustHeight(table, delta, index) {
var tableDetails = getTableDetails(table);
var tableGrid = getTableGrid(tableDetails);
var heights = getPixelHeights(tableGrid);
var newHeights = [], newTotalHeight = 0;
for (var i = 0; i < heights.length; i++) {
newHeight... | javascript | function adjustHeight(table, delta, index) {
var tableDetails = getTableDetails(table);
var tableGrid = getTableGrid(tableDetails);
var heights = getPixelHeights(tableGrid);
var newHeights = [], newTotalHeight = 0;
for (var i = 0; i < heights.length; i++) {
newHeight... | [
"function",
"adjustHeight",
"(",
"table",
",",
"delta",
",",
"index",
")",
"{",
"var",
"tableDetails",
"=",
"getTableDetails",
"(",
"table",
")",
";",
"var",
"tableGrid",
"=",
"getTableGrid",
"(",
"tableDetails",
")",
";",
"var",
"heights",
"=",
"getPixelHei... | Adjust the height of the row of table at index, with delta. | [
"Adjust",
"the",
"height",
"of",
"the",
"row",
"of",
"table",
"at",
"index",
"with",
"delta",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L66686-L66717 |
48,377 | sadiqhabib/tinymce-dist | tinymce.full.js | innerText | function innerText(html) {
var schema = new Schema(), domParser = new DomParser({}, schema), text = '';
var shortEndedElements = schema.getShortEndedElements();
var ignoreElements = Tools.makeMap('script noscript style textarea video audio iframe object', ' ');
var blockElements = schema.getBloc... | javascript | function innerText(html) {
var schema = new Schema(), domParser = new DomParser({}, schema), text = '';
var shortEndedElements = schema.getShortEndedElements();
var ignoreElements = Tools.makeMap('script noscript style textarea video audio iframe object', ' ');
var blockElements = schema.getBloc... | [
"function",
"innerText",
"(",
"html",
")",
"{",
"var",
"schema",
"=",
"new",
"Schema",
"(",
")",
",",
"domParser",
"=",
"new",
"DomParser",
"(",
"{",
"}",
",",
"schema",
")",
",",
"text",
"=",
"''",
";",
"var",
"shortEndedElements",
"=",
"schema",
".... | Gets the innerText of the specified element. It will handle edge cases
and works better than textContent on Gecko.
@param {String} html HTML string to get text from.
@return {String} String of text with line feeds. | [
"Gets",
"the",
"innerText",
"of",
"the",
"specified",
"element",
".",
"It",
"will",
"handle",
"edge",
"cases",
"and",
"works",
"better",
"than",
"textContent",
"on",
"Gecko",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L69341-L69396 |
48,378 | sadiqhabib/tinymce-dist | tinymce.full.js | pasteHtml | function pasteHtml(html, internalFlag) {
var args, dom = editor.dom, internal;
internal = internalFlag || InternalHtml.isMarked(html);
html = InternalHtml.unmark(html);
args = editor.fire('BeforePastePreProcess', { content: html, internal: internal }); // Internal event used by Quirks
... | javascript | function pasteHtml(html, internalFlag) {
var args, dom = editor.dom, internal;
internal = internalFlag || InternalHtml.isMarked(html);
html = InternalHtml.unmark(html);
args = editor.fire('BeforePastePreProcess', { content: html, internal: internal }); // Internal event used by Quirks
... | [
"function",
"pasteHtml",
"(",
"html",
",",
"internalFlag",
")",
"{",
"var",
"args",
",",
"dom",
"=",
"editor",
".",
"dom",
",",
"internal",
";",
"internal",
"=",
"internalFlag",
"||",
"InternalHtml",
".",
"isMarked",
"(",
"html",
")",
";",
"html",
"=",
... | Pastes the specified HTML. This means that the HTML is filtered and then
inserted at the current selection in the editor. It will also fire paste events
for custom user filtering.
@param {String} html HTML code to paste into the current selection.
@param {Boolean?} internalFlag Optional true/false flag if the contents... | [
"Pastes",
"the",
"specified",
"HTML",
".",
"This",
"means",
"that",
"the",
"HTML",
"is",
"filtered",
"and",
"then",
"inserted",
"at",
"the",
"current",
"selection",
"in",
"the",
"editor",
".",
"It",
"will",
"also",
"fire",
"paste",
"events",
"for",
"custom... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L69500-L69526 |
48,379 | sadiqhabib/tinymce-dist | tinymce.full.js | createPasteBin | function createPasteBin() {
var dom = editor.dom, body = editor.getBody();
var viewport = editor.dom.getViewPort(editor.getWin()), scrollTop = viewport.y, top = 20;
var scrollContainer;
lastRng = editor.selection.getRng();
if (editor.inline) {
scrollContainer = editor... | javascript | function createPasteBin() {
var dom = editor.dom, body = editor.getBody();
var viewport = editor.dom.getViewPort(editor.getWin()), scrollTop = viewport.y, top = 20;
var scrollContainer;
lastRng = editor.selection.getRng();
if (editor.inline) {
scrollContainer = editor... | [
"function",
"createPasteBin",
"(",
")",
"{",
"var",
"dom",
"=",
"editor",
".",
"dom",
",",
"body",
"=",
"editor",
".",
"getBody",
"(",
")",
";",
"var",
"viewport",
"=",
"editor",
".",
"dom",
".",
"getViewPort",
"(",
"editor",
".",
"getWin",
"(",
")",... | Creates a paste bin element as close as possible to the current caret location and places the focus inside that element
so that when the real paste event occurs the contents gets inserted into this element
instead of the current editor selection element. | [
"Creates",
"a",
"paste",
"bin",
"element",
"as",
"close",
"as",
"possible",
"to",
"the",
"current",
"caret",
"location",
"and",
"places",
"the",
"focus",
"inside",
"that",
"element",
"so",
"that",
"when",
"the",
"real",
"paste",
"event",
"occurs",
"the",
"... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L69571-L69683 |
48,380 | sadiqhabib/tinymce-dist | tinymce.full.js | getCaretRect | function getCaretRect(rng) {
var rects, textNode, node, container = rng.startContainer;
rects = rng.getClientRects();
if (rects.length) {
return rects[0];
}
if (!rng.collapsed || container.nodeType != 1) {
return;
}
node = ... | javascript | function getCaretRect(rng) {
var rects, textNode, node, container = rng.startContainer;
rects = rng.getClientRects();
if (rects.length) {
return rects[0];
}
if (!rng.collapsed || container.nodeType != 1) {
return;
}
node = ... | [
"function",
"getCaretRect",
"(",
"rng",
")",
"{",
"var",
"rects",
",",
"textNode",
",",
"node",
",",
"container",
"=",
"rng",
".",
"startContainer",
";",
"rects",
"=",
"rng",
".",
"getClientRects",
"(",
")",
";",
"if",
"(",
"rects",
".",
"length",
")",... | Returns the rect of the current caret if the caret is in an empty block before a
BR we insert a temporary invisible character that we get the rect this way we always get a proper rect.
TODO: This might be useful in core. | [
"Returns",
"the",
"rect",
"of",
"the",
"current",
"caret",
"if",
"the",
"caret",
"is",
"in",
"an",
"empty",
"block",
"before",
"a",
"BR",
"we",
"insert",
"a",
"temporary",
"invisible",
"character",
"that",
"we",
"get",
"the",
"rect",
"this",
"way",
"we",... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L69594-L69634 |
48,381 | sadiqhabib/tinymce-dist | tinymce.full.js | removePasteBin | function removePasteBin() {
if (pasteBinElm) {
var pasteBinClone;
// WebKit/Blink might clone the div so
// lets make sure we remove all clones
// TODO: Man o man is this ugly. WebKit is the new IE! Remove this if they ever fix it!
while ((pasteBinClone = edito... | javascript | function removePasteBin() {
if (pasteBinElm) {
var pasteBinClone;
// WebKit/Blink might clone the div so
// lets make sure we remove all clones
// TODO: Man o man is this ugly. WebKit is the new IE! Remove this if they ever fix it!
while ((pasteBinClone = edito... | [
"function",
"removePasteBin",
"(",
")",
"{",
"if",
"(",
"pasteBinElm",
")",
"{",
"var",
"pasteBinClone",
";",
"// WebKit/Blink might clone the div so",
"// lets make sure we remove all clones",
"// TODO: Man o man is this ugly. WebKit is the new IE! Remove this if they ever fix it!",
... | Removes the paste bin if it exists. | [
"Removes",
"the",
"paste",
"bin",
"if",
"it",
"exists",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L69688-L69706 |
48,382 | sadiqhabib/tinymce-dist | tinymce.full.js | getPasteBinHtml | function getPasteBinHtml() {
var html = '', pasteBinClones, i, clone, cloneHtml;
// Since WebKit/Chrome might clone the paste bin when pasting
// for example: <img style="float: right"> we need to check if any of them contains some useful html.
// TODO: Man o man is this ugly. WebKit is... | javascript | function getPasteBinHtml() {
var html = '', pasteBinClones, i, clone, cloneHtml;
// Since WebKit/Chrome might clone the paste bin when pasting
// for example: <img style="float: right"> we need to check if any of them contains some useful html.
// TODO: Man o man is this ugly. WebKit is... | [
"function",
"getPasteBinHtml",
"(",
")",
"{",
"var",
"html",
"=",
"''",
",",
"pasteBinClones",
",",
"i",
",",
"clone",
",",
"cloneHtml",
";",
"// Since WebKit/Chrome might clone the paste bin when pasting",
"// for example: <img style=\"float: right\"> we need to check if any o... | Returns the contents of the paste bin as a HTML string.
@return {String} Get the contents of the paste bin. | [
"Returns",
"the",
"contents",
"of",
"the",
"paste",
"bin",
"as",
"a",
"HTML",
"string",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L69713-L69735 |
48,383 | sadiqhabib/tinymce-dist | tinymce.full.js | pasteImageData | function pasteImageData(e, rng) {
var dataTransfer = e.clipboardData || e.dataTransfer;
function processItems(items) {
var i, item, reader, hadImage = false;
if (items) {
for (i = 0; i < items.length; i++) {
item = items[i];
if (/^image\/(jp... | javascript | function pasteImageData(e, rng) {
var dataTransfer = e.clipboardData || e.dataTransfer;
function processItems(items) {
var i, item, reader, hadImage = false;
if (items) {
for (i = 0; i < items.length; i++) {
item = items[i];
if (/^image\/(jp... | [
"function",
"pasteImageData",
"(",
"e",
",",
"rng",
")",
"{",
"var",
"dataTransfer",
"=",
"e",
".",
"clipboardData",
"||",
"e",
".",
"dataTransfer",
";",
"function",
"processItems",
"(",
"items",
")",
"{",
"var",
"i",
",",
"item",
",",
"reader",
",",
"... | Checks if the clipboard contains image data if it does it will take that data
and convert it into a data url image and paste that image at the caret location.
@param {ClipboardEvent} e Paste/drop event object.
@param {DOMRange} rng Rng object to move selection to.
@return {Boolean} true/false if the image data was f... | [
"Checks",
"if",
"the",
"clipboard",
"contains",
"image",
"data",
"if",
"it",
"does",
"it",
"will",
"take",
"that",
"data",
"and",
"convert",
"it",
"into",
"a",
"data",
"url",
"image",
"and",
"paste",
"that",
"image",
"at",
"the",
"caret",
"location",
"."... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L69840-L69869 |
48,384 | sadiqhabib/tinymce-dist | tinymce.full.js | isBrokenAndroidClipboardEvent | function isBrokenAndroidClipboardEvent(e) {
var clipboardData = e.clipboardData;
return navigator.userAgent.indexOf('Android') != -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0;
} | javascript | function isBrokenAndroidClipboardEvent(e) {
var clipboardData = e.clipboardData;
return navigator.userAgent.indexOf('Android') != -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0;
} | [
"function",
"isBrokenAndroidClipboardEvent",
"(",
"e",
")",
"{",
"var",
"clipboardData",
"=",
"e",
".",
"clipboardData",
";",
"return",
"navigator",
".",
"userAgent",
".",
"indexOf",
"(",
"'Android'",
")",
"!=",
"-",
"1",
"&&",
"clipboardData",
"&&",
"clipboar... | Chrome on Android doesn't support proper clipboard access so we have no choice but to allow the browser default behavior.
@param {Event} e Paste event object to check if it contains any data.
@return {Boolean} true/false if the clipboard is empty or not. | [
"Chrome",
"on",
"Android",
"doesn",
"t",
"support",
"proper",
"clipboard",
"access",
"so",
"we",
"have",
"no",
"choice",
"but",
"to",
"allow",
"the",
"browser",
"default",
"behavior",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L69877-L69881 |
48,385 | sadiqhabib/tinymce-dist | tinymce.full.js | isNumericList | function isNumericList(text) {
var found, patterns;
patterns = [
/^[IVXLMCD]{1,2}\.[ \u00a0]/, // Roman upper case
/^[ivxlmcd]{1,2}\.[ \u00a0]/, // Roman lower case
/^[a-z]{1,2}[\.\)][ \u00a0]/, // Alphabetical a-z
/^[A-Z]{1,2}[\.\)][ \u00a0]/, // Alphabetical A-Z
... | javascript | function isNumericList(text) {
var found, patterns;
patterns = [
/^[IVXLMCD]{1,2}\.[ \u00a0]/, // Roman upper case
/^[ivxlmcd]{1,2}\.[ \u00a0]/, // Roman lower case
/^[a-z]{1,2}[\.\)][ \u00a0]/, // Alphabetical a-z
/^[A-Z]{1,2}[\.\)][ \u00a0]/, // Alphabetical A-Z
... | [
"function",
"isNumericList",
"(",
"text",
")",
"{",
"var",
"found",
",",
"patterns",
";",
"patterns",
"=",
"[",
"/",
"^[IVXLMCD]{1,2}\\.[ \\u00a0]",
"/",
",",
"// Roman upper case",
"/",
"^[ivxlmcd]{1,2}\\.[ \\u00a0]",
"/",
",",
"// Roman lower case",
"/",
"^[a-z]{1... | Checks if the specified text starts with "1. " or "a. " etc. | [
"Checks",
"if",
"the",
"specified",
"text",
"starts",
"with",
"1",
".",
"or",
"a",
".",
"etc",
"."
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L70245-L70268 |
48,386 | sadiqhabib/tinymce-dist | tinymce.full.js | removeExplorerBrElementsAfterBlocks | function removeExplorerBrElementsAfterBlocks(html) {
// Only filter word specific content
if (!WordFilter.isWordContent(html)) {
return html;
}
// Produce block regexp based on the block elements in schema
var blockElements = [];
Tools.each(editor.schema.getBl... | javascript | function removeExplorerBrElementsAfterBlocks(html) {
// Only filter word specific content
if (!WordFilter.isWordContent(html)) {
return html;
}
// Produce block regexp based on the block elements in schema
var blockElements = [];
Tools.each(editor.schema.getBl... | [
"function",
"removeExplorerBrElementsAfterBlocks",
"(",
"html",
")",
"{",
"// Only filter word specific content",
"if",
"(",
"!",
"WordFilter",
".",
"isWordContent",
"(",
"html",
")",
")",
"{",
"return",
"html",
";",
"}",
"// Produce block regexp based on the block elemen... | Removes BR elements after block elements. IE9 has a nasty bug where it puts a BR element after each
block element when pasting from word. This removes those elements.
This:
<p>a</p><br><p>b</p>
Becomes:
<p>a</p><p>b</p> | [
"Removes",
"BR",
"elements",
"after",
"block",
"elements",
".",
"IE9",
"has",
"a",
"nasty",
"bug",
"where",
"it",
"puts",
"a",
"BR",
"element",
"after",
"each",
"block",
"element",
"when",
"pasting",
"from",
"word",
".",
"This",
"removes",
"those",
"elemen... | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L70761-L70792 |
48,387 | sadiqhabib/tinymce-dist | tinymce.full.js | getPatterns | function getPatterns() {
if (isPatternsDirty) {
patterns.sort(function (a, b) {
if (a.start.length > b.start.length) {
return -1;
}
if (a.start.length < b.start.length) {
return 1;
}
return 0;
});
... | javascript | function getPatterns() {
if (isPatternsDirty) {
patterns.sort(function (a, b) {
if (a.start.length > b.start.length) {
return -1;
}
if (a.start.length < b.start.length) {
return 1;
}
return 0;
});
... | [
"function",
"getPatterns",
"(",
")",
"{",
"if",
"(",
"isPatternsDirty",
")",
"{",
"patterns",
".",
"sort",
"(",
"function",
"(",
"a",
",",
"b",
")",
"{",
"if",
"(",
"a",
".",
"start",
".",
"length",
">",
"b",
".",
"start",
".",
"length",
")",
"{"... | Returns a sorted patterns list, ordered descending by start length | [
"Returns",
"a",
"sorted",
"patterns",
"list",
"ordered",
"descending",
"by",
"start",
"length"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L71984-L72002 |
48,388 | sadiqhabib/tinymce-dist | tinymce.full.js | findPattern | function findPattern(text) {
var patterns = getPatterns();
for (var i = 0; i < patterns.length; i++) {
if (text.indexOf(patterns[i].start) !== 0) {
continue;
}
if (patterns[i].end && text.lastIndexOf(patterns[i].end) != text.length - patterns[i].end.length) {
... | javascript | function findPattern(text) {
var patterns = getPatterns();
for (var i = 0; i < patterns.length; i++) {
if (text.indexOf(patterns[i].start) !== 0) {
continue;
}
if (patterns[i].end && text.lastIndexOf(patterns[i].end) != text.length - patterns[i].end.length) {
... | [
"function",
"findPattern",
"(",
"text",
")",
"{",
"var",
"patterns",
"=",
"getPatterns",
"(",
")",
";",
"for",
"(",
"var",
"i",
"=",
"0",
";",
"i",
"<",
"patterns",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"text",
".",
"indexOf",
"(",
... | Finds a matching pattern to the specified text | [
"Finds",
"a",
"matching",
"pattern",
"to",
"the",
"specified",
"text"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L72005-L72019 |
48,389 | sadiqhabib/tinymce-dist | tinymce.full.js | findEndPattern | function findEndPattern(text, offset, delta) {
var patterns, pattern, i;
// Find best matching end
patterns = getPatterns();
for (i = 0; i < patterns.length; i++) {
pattern = patterns[i];
if (pattern.end && text.substr(offset - pattern.end.length - delta, pattern.end... | javascript | function findEndPattern(text, offset, delta) {
var patterns, pattern, i;
// Find best matching end
patterns = getPatterns();
for (i = 0; i < patterns.length; i++) {
pattern = patterns[i];
if (pattern.end && text.substr(offset - pattern.end.length - delta, pattern.end... | [
"function",
"findEndPattern",
"(",
"text",
",",
"offset",
",",
"delta",
")",
"{",
"var",
"patterns",
",",
"pattern",
",",
"i",
";",
"// Find best matching end",
"patterns",
"=",
"getPatterns",
"(",
")",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"p... | Finds the best matching end pattern | [
"Finds",
"the",
"best",
"matching",
"end",
"pattern"
] | 3acf1e4fe83a541988fdca20f2aaf4e6dce72512 | https://github.com/sadiqhabib/tinymce-dist/blob/3acf1e4fe83a541988fdca20f2aaf4e6dce72512/tinymce.full.js#L72022-L72033 |
48,390 | tenorviol/xjs | lib/xjs.js | interpret | function interpret(source) {
var tree = parser.parse(source);
var js = [
'module.exports = function (out, globals) {',
' var end = false;',
' if (Object.getPrototypeOf(out) !== module.xjs.XjsStream.prototype) {',
' out = new module.xjs.XjsStream(out);',
' end = true;',
' }',
' ... | javascript | function interpret(source) {
var tree = parser.parse(source);
var js = [
'module.exports = function (out, globals) {',
' var end = false;',
' if (Object.getPrototypeOf(out) !== module.xjs.XjsStream.prototype) {',
' out = new module.xjs.XjsStream(out);',
' end = true;',
' }',
' ... | [
"function",
"interpret",
"(",
"source",
")",
"{",
"var",
"tree",
"=",
"parser",
".",
"parse",
"(",
"source",
")",
";",
"var",
"js",
"=",
"[",
"'module.exports = function (out, globals) {'",
",",
"' var end = false;'",
",",
"' if (Object.getPrototypeOf(out) !== modul... | Convert xjs source into javascript. | [
"Convert",
"xjs",
"source",
"into",
"javascript",
"."
] | 1f0744354b311066d6e58d11f9f5c602dae926af | https://github.com/tenorviol/xjs/blob/1f0744354b311066d6e58d11f9f5c602dae926af/lib/xjs.js#L51-L80 |
48,391 | princed/grunt-csswring | tasks/csswring.js | getMapOption | function getMapOption(from) {
if (typeof options.map === 'string') {
var mapPath = options.map + path.basename(from) + '.map';
if (grunt.file.exists(mapPath)) {
return grunt.file.read(mapPath);
}
}
return options.map;
} | javascript | function getMapOption(from) {
if (typeof options.map === 'string') {
var mapPath = options.map + path.basename(from) + '.map';
if (grunt.file.exists(mapPath)) {
return grunt.file.read(mapPath);
}
}
return options.map;
} | [
"function",
"getMapOption",
"(",
"from",
")",
"{",
"if",
"(",
"typeof",
"options",
".",
"map",
"===",
"'string'",
")",
"{",
"var",
"mapPath",
"=",
"options",
".",
"map",
"+",
"path",
".",
"basename",
"(",
"from",
")",
"+",
"'.map'",
";",
"if",
"(",
... | Returns an input source map if a map path was specified
or options.map value otherwise
@param {string} from
@returns {string|boolean|undefined} | [
"Returns",
"an",
"input",
"source",
"map",
"if",
"a",
"map",
"path",
"was",
"specified",
"or",
"options",
".",
"map",
"value",
"otherwise"
] | db199bde5b23b3abc6c3b43f4fe83e65fd765ac5 | https://github.com/princed/grunt-csswring/blob/db199bde5b23b3abc6c3b43f4fe83e65fd765ac5/tasks/csswring.js#L20-L30 |
48,392 | princed/grunt-csswring | tasks/csswring.js | setBanner | function setBanner(text) {
return function(css) {
css.prepend(postcss.comment({ text: text }));
// New line after banner
if (css.rules[1]) {
css.rules[1].before = '\n';
}
};
} | javascript | function setBanner(text) {
return function(css) {
css.prepend(postcss.comment({ text: text }));
// New line after banner
if (css.rules[1]) {
css.rules[1].before = '\n';
}
};
} | [
"function",
"setBanner",
"(",
"text",
")",
"{",
"return",
"function",
"(",
"css",
")",
"{",
"css",
".",
"prepend",
"(",
"postcss",
".",
"comment",
"(",
"{",
"text",
":",
"text",
"}",
")",
")",
";",
"// New line after banner",
"if",
"(",
"css",
".",
"... | Setup banner processor
@param {string} text
@returns {Function} | [
"Setup",
"banner",
"processor"
] | db199bde5b23b3abc6c3b43f4fe83e65fd765ac5 | https://github.com/princed/grunt-csswring/blob/db199bde5b23b3abc6c3b43f4fe83e65fd765ac5/tasks/csswring.js#L37-L46 |
48,393 | anyfs/anyfs | lib/plugins/core/move.js | move | function move(fs, a, b, method, cb) {
var parentA = path.dirname(a);
var parentB = path.dirname(b);
var nameA = path.basename(a);
var nameB = path.basename(b)
fs.metadata(a)
.then(function(metadata) {
return this.metadata(b)
.then(function(metadata) {
throw f... | javascript | function move(fs, a, b, method, cb) {
var parentA = path.dirname(a);
var parentB = path.dirname(b);
var nameA = path.basename(a);
var nameB = path.basename(b)
fs.metadata(a)
.then(function(metadata) {
return this.metadata(b)
.then(function(metadata) {
throw f... | [
"function",
"move",
"(",
"fs",
",",
"a",
",",
"b",
",",
"method",
",",
"cb",
")",
"{",
"var",
"parentA",
"=",
"path",
".",
"dirname",
"(",
"a",
")",
";",
"var",
"parentB",
"=",
"path",
".",
"dirname",
"(",
"b",
")",
";",
"var",
"nameA",
"=",
... | move file or directory - expensive way. | [
"move",
"file",
"or",
"directory",
"-",
"expensive",
"way",
"."
] | bbaec164fd74cbc977245af45b0b1e3d0772b6ff | https://github.com/anyfs/anyfs/blob/bbaec164fd74cbc977245af45b0b1e3d0772b6ff/lib/plugins/core/move.js#L7-L34 |
48,394 | caridy/es6-module-transpiler-system-formatter | lib/replacement.js | Replacement | function Replacement(nodePath, nodes) {
this.queue = [];
if (nodePath && nodes) {
this.queue.push([nodePath, nodes]);
}
} | javascript | function Replacement(nodePath, nodes) {
this.queue = [];
if (nodePath && nodes) {
this.queue.push([nodePath, nodes]);
}
} | [
"function",
"Replacement",
"(",
"nodePath",
",",
"nodes",
")",
"{",
"this",
".",
"queue",
"=",
"[",
"]",
";",
"if",
"(",
"nodePath",
"&&",
"nodes",
")",
"{",
"this",
".",
"queue",
".",
"push",
"(",
"[",
"nodePath",
",",
"nodes",
"]",
")",
";",
"}... | Represents a replacement of a node path with zero or more nodes.
@constructor
@param {ast-types.NodePath} nodePath
@param {Array.<ast-types.Node>} nodes | [
"Represents",
"a",
"replacement",
"of",
"a",
"node",
"path",
"with",
"zero",
"or",
"more",
"nodes",
"."
] | c6da4fb8319c057e52188b0dc2bd2dd648dcef05 | https://github.com/caridy/es6-module-transpiler-system-formatter/blob/c6da4fb8319c057e52188b0dc2bd2dd648dcef05/lib/replacement.js#L11-L16 |
48,395 | rtm/upward | src/Tst.js | consoleReporter | function consoleReporter(reports, options = {}) {
var hide = options.hide || {};
(function _consoleReporter(reports) {
reports.forEach(
({children, desc, status, counts, time, code, error}) => {
let countStr = makeCounts(counts);
let color = statusInfo[status].color;
let colorSt... | javascript | function consoleReporter(reports, options = {}) {
var hide = options.hide || {};
(function _consoleReporter(reports) {
reports.forEach(
({children, desc, status, counts, time, code, error}) => {
let countStr = makeCounts(counts);
let color = statusInfo[status].color;
let colorSt... | [
"function",
"consoleReporter",
"(",
"reports",
",",
"options",
"=",
"{",
"}",
")",
"{",
"var",
"hide",
"=",
"options",
".",
"hide",
"||",
"{",
"}",
";",
"(",
"function",
"_consoleReporter",
"(",
"reports",
")",
"{",
"reports",
".",
"forEach",
"(",
"(",... | Console reporter, which reports results on the console. | [
"Console",
"reporter",
"which",
"reports",
"results",
"on",
"the",
"console",
"."
] | 82495c34f70c9a4336a3b34cc6781e5662324c03 | https://github.com/rtm/upward/blob/82495c34f70c9a4336a3b34cc6781e5662324c03/src/Tst.js#L51-L73 |
48,396 | rtm/upward | src/Tst.js | htmlReporter | function htmlReporter(reports, options = {}) {
var {hide} = options;
hide = hide || {};
function htmlReporterOne({children, desc, status, counts, time, code}) {
var text = T(desc);
var attrs = {class: {[status]: true}};
if (children) {
return E('details') .
has([
E('summary') ... | javascript | function htmlReporter(reports, options = {}) {
var {hide} = options;
hide = hide || {};
function htmlReporterOne({children, desc, status, counts, time, code}) {
var text = T(desc);
var attrs = {class: {[status]: true}};
if (children) {
return E('details') .
has([
E('summary') ... | [
"function",
"htmlReporter",
"(",
"reports",
",",
"options",
"=",
"{",
"}",
")",
"{",
"var",
"{",
"hide",
"}",
"=",
"options",
";",
"hide",
"=",
"hide",
"||",
"{",
"}",
";",
"function",
"htmlReporterOne",
"(",
"{",
"children",
",",
"desc",
",",
"statu... | HTML reporter; returns an Array of DOM nodes. | [
"HTML",
"reporter",
";",
"returns",
"an",
"Array",
"of",
"DOM",
"nodes",
"."
] | 82495c34f70c9a4336a3b34cc6781e5662324c03 | https://github.com/rtm/upward/blob/82495c34f70c9a4336a3b34cc6781e5662324c03/src/Tst.js#L76-L96 |
48,397 | pghalliday/multiplex-stream | src/MultiplexStream.js | emitEvent | function emitEvent(emitter, event, data) {
process.nextTick(function() {
emitter.emit(event, data);
});
} | javascript | function emitEvent(emitter, event, data) {
process.nextTick(function() {
emitter.emit(event, data);
});
} | [
"function",
"emitEvent",
"(",
"emitter",
",",
"event",
",",
"data",
")",
"{",
"process",
".",
"nextTick",
"(",
"function",
"(",
")",
"{",
"emitter",
".",
"emit",
"(",
"event",
",",
"data",
")",
";",
"}",
")",
";",
"}"
] | force all events to be asynchronous | [
"force",
"all",
"events",
"to",
"be",
"asynchronous"
] | 5d425a5c5409d6fe3c1f98ea496e7a039c495920 | https://github.com/pghalliday/multiplex-stream/blob/5d425a5c5409d6fe3c1f98ea496e7a039c495920/src/MultiplexStream.js#L14-L18 |
48,398 | stayradiated/onepasswordjs | libs/sjcl.js | function (arr) {
var out = [], bl = sjcl.bitArray.bitLength(arr), i, tmp;
for (i=0; i<bl/8; i++) {
if ((i&3) === 0) {
tmp = arr[i/4];
}
out.push(tmp >>> 24);
tmp <<= 8;
}
return out;
} | javascript | function (arr) {
var out = [], bl = sjcl.bitArray.bitLength(arr), i, tmp;
for (i=0; i<bl/8; i++) {
if ((i&3) === 0) {
tmp = arr[i/4];
}
out.push(tmp >>> 24);
tmp <<= 8;
}
return out;
} | [
"function",
"(",
"arr",
")",
"{",
"var",
"out",
"=",
"[",
"]",
",",
"bl",
"=",
"sjcl",
".",
"bitArray",
".",
"bitLength",
"(",
"arr",
")",
",",
"i",
",",
"tmp",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"bl",
"/",
"8",
";",
"i",
"++"... | Convert from a bitArray to an array of bytes. | [
"Convert",
"from",
"a",
"bitArray",
"to",
"an",
"array",
"of",
"bytes",
"."
] | 6f37d31bd5e7e57489885e89ef9df88e8197a2c3 | https://github.com/stayradiated/onepasswordjs/blob/6f37d31bd5e7e57489885e89ef9df88e8197a2c3/libs/sjcl.js#L58-L68 | |
48,399 | stayradiated/onepasswordjs | libs/sjcl.js | function (bytes) {
var out = [], i, tmp=0;
for (i=0; i<bytes.length; i++) {
tmp = tmp << 8 | bytes[i];
if ((i&3) === 3) {
out.push(tmp);
tmp = 0;
}
}
if (i&3) {
out.push(sjcl.bitArray.partial(8*(i&3), tmp));
}
return out;
} | javascript | function (bytes) {
var out = [], i, tmp=0;
for (i=0; i<bytes.length; i++) {
tmp = tmp << 8 | bytes[i];
if ((i&3) === 3) {
out.push(tmp);
tmp = 0;
}
}
if (i&3) {
out.push(sjcl.bitArray.partial(8*(i&3), tmp));
}
return out;
} | [
"function",
"(",
"bytes",
")",
"{",
"var",
"out",
"=",
"[",
"]",
",",
"i",
",",
"tmp",
"=",
"0",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"bytes",
".",
"length",
";",
"i",
"++",
")",
"{",
"tmp",
"=",
"tmp",
"<<",
"8",
"|",
"bytes",
... | Convert from an array of bytes to a bitArray. | [
"Convert",
"from",
"an",
"array",
"of",
"bytes",
"to",
"a",
"bitArray",
"."
] | 6f37d31bd5e7e57489885e89ef9df88e8197a2c3 | https://github.com/stayradiated/onepasswordjs/blob/6f37d31bd5e7e57489885e89ef9df88e8197a2c3/libs/sjcl.js#L70-L83 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.