Initial Commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
(function () {
|
||||
|
||||
tinymce.create('tinymce.plugins.deflist', {
|
||||
init: function (ed, url) {
|
||||
ed.addCommand('mceDeflist', function () {
|
||||
|
||||
defListBuilder();
|
||||
|
||||
});
|
||||
|
||||
ed.addButton('deflist', {
|
||||
title: 'Definition List',
|
||||
cmd: 'mceDeflist'
|
||||
});
|
||||
|
||||
ed.onNodeChange.add(function (ed, cm, n) {
|
||||
cm.setActive('deflist', n.nodeName == 'DT' || n.nodeName == 'DD');
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
createControl: function (n, cm) {
|
||||
return null;
|
||||
},
|
||||
|
||||
getInfo: function () {
|
||||
return {
|
||||
longname: 'Definition List',
|
||||
author: '',
|
||||
authorurl: '',
|
||||
infourl: '',
|
||||
version: "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
tinymce.PluginManager.add('deflist', tinymce.plugins.deflist);
|
||||
})();
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
(function () {
|
||||
|
||||
tinymce.create('tinymce.plugins.file', {
|
||||
init: function (ed, url) {
|
||||
ed.addCommand('mceFile', function () {
|
||||
|
||||
uploadPrompt();
|
||||
|
||||
});
|
||||
|
||||
ed.addButton('file', {
|
||||
title: 'Upload a File',
|
||||
cmd: 'mceFile'
|
||||
});
|
||||
//
|
||||
// ed.onNodeChange.add(function(ed, cm, n) {
|
||||
// cm.setActive('deflist', n.nodeName == 'DT' || n.nodeName == 'DD');
|
||||
// });
|
||||
|
||||
},
|
||||
|
||||
createControl: function (n, cm) {
|
||||
return null;
|
||||
},
|
||||
|
||||
getInfo: function () {
|
||||
return {
|
||||
longname: 'File Upload Interface',
|
||||
author: '',
|
||||
authorurl: '',
|
||||
infourl: '',
|
||||
version: "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
tinymce.PluginManager.add('file', tinymce.plugins.file);
|
||||
})();
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
(function () {
|
||||
|
||||
tinymce.create('tinymce.plugins.images', {
|
||||
init: function (ed, url) {
|
||||
ed.addCommand('mceImages', function () {
|
||||
|
||||
imageEditBuilder(false);
|
||||
|
||||
});
|
||||
|
||||
ed.addButton('image', {
|
||||
title: 'Add or Edit an Image',
|
||||
cmd: 'mceImages'
|
||||
});
|
||||
|
||||
ed.onNodeChange.add(function (ed, cm, n) {
|
||||
cm.setActive('image', n.nodeName == 'IMG');
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
createControl: function (n, cm) {
|
||||
return null;
|
||||
},
|
||||
|
||||
getInfo: function () {
|
||||
return {
|
||||
longname: 'neocms Image Editor',
|
||||
author: '',
|
||||
authorurl: '',
|
||||
infourl: '',
|
||||
version: "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
tinymce.PluginManager.add('images', tinymce.plugins.images);
|
||||
})();
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
(function () {
|
||||
|
||||
tinymce.create('tinymce.plugins.links', {
|
||||
init: function (ed, url) {
|
||||
|
||||
ed.addCommand('mceLinks', function () {
|
||||
makeLink();
|
||||
});
|
||||
|
||||
ed.addButton('link', {
|
||||
title: 'Add or Edit a Link',
|
||||
cmd: 'mceLinks'
|
||||
});
|
||||
|
||||
ed.onNodeChange.add(function (ed, cm, n) {
|
||||
cm.setActive('link', n.nodeName == 'A');
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
createControl: function (n, cm) {
|
||||
return null;
|
||||
},
|
||||
|
||||
getInfo: function () {
|
||||
return {
|
||||
longname: 'neocms Link Editor',
|
||||
author: '',
|
||||
authorurl: '',
|
||||
infourl: '',
|
||||
version: "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
tinymce.PluginManager.add('links', tinymce.plugins.links);
|
||||
})();
|
||||
File diff suppressed because one or more lines are too long
+36
@@ -0,0 +1,36 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var PasteTextDialog = {
|
||||
init: function () {
|
||||
this.resize();
|
||||
},
|
||||
|
||||
insert: function () {
|
||||
var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
|
||||
|
||||
// Convert linebreaks into paragraphs
|
||||
if (document.getElementById('linebreaks').checked) {
|
||||
lines = h.split(/\r?\n/);
|
||||
if (lines.length > 1) {
|
||||
h = '';
|
||||
tinymce.each(lines, function (row) {
|
||||
h += '<p>' + row + '</p>';
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content: h});
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
resize: function () {
|
||||
var vp = tinyMCEPopup.dom.getViewPort(window), el;
|
||||
|
||||
el = document.getElementById('content');
|
||||
|
||||
el.style.width = (vp.w - 20) + 'px';
|
||||
el.style.height = (vp.h - 90) + 'px';
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
tinyMCEPopup.requireLangPack();
|
||||
|
||||
var PasteWordDialog = {
|
||||
init: function () {
|
||||
var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = '';
|
||||
|
||||
// Create iframe
|
||||
el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>';
|
||||
ifr = document.getElementById('iframe');
|
||||
doc = ifr.contentWindow.document;
|
||||
|
||||
// Force absolute CSS urls
|
||||
css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")];
|
||||
css = css.concat(tinymce.explode(ed.settings.content_css) || []);
|
||||
tinymce.each(css, function (u) {
|
||||
cssHTML += '<link href="' + ed.documentBaseURI.toAbsolute('' + u) + '" rel="stylesheet" type="text/css" />';
|
||||
});
|
||||
|
||||
// Write content into iframe
|
||||
doc.open();
|
||||
doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>');
|
||||
doc.close();
|
||||
|
||||
doc.designMode = 'on';
|
||||
this.resize();
|
||||
|
||||
window.setTimeout(function () {
|
||||
ifr.contentWindow.focus();
|
||||
}, 10);
|
||||
},
|
||||
|
||||
insert: function () {
|
||||
var h = document.getElementById('iframe').contentWindow.document.body.innerHTML;
|
||||
|
||||
tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content: h, wordContent: true});
|
||||
tinyMCEPopup.close();
|
||||
},
|
||||
|
||||
resize: function () {
|
||||
var vp = tinyMCEPopup.dom.getViewPort(window), el;
|
||||
|
||||
el = document.getElementById('iframe');
|
||||
|
||||
if (el) {
|
||||
el.style.width = (vp.w - 20) + 'px';
|
||||
el.style.height = (vp.h - 90) + 'px';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog);
|
||||
@@ -0,0 +1,5 @@
|
||||
tinyMCE.addI18n('en.paste_dlg', {
|
||||
text_title: "Use CTRL+V on your keyboard to paste the text into the window.",
|
||||
text_linebreaks: "Keep linebreaks",
|
||||
word_title: "Use CTRL+V on your keyboard to paste the text into the window."
|
||||
});
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
(function () {
|
||||
|
||||
tinymce.create('tinymce.plugins.tables', {
|
||||
init: function (ed, url) {
|
||||
ed.addCommand('mceTables', function () {
|
||||
|
||||
makeTable();
|
||||
|
||||
});
|
||||
|
||||
ed.addButton('table', {
|
||||
title: 'Add a Table',
|
||||
cmd: 'mceTables'
|
||||
});
|
||||
//
|
||||
// ed.onNodeChange.add(function(ed, cm, n) {
|
||||
// cm.setActive('link', n.nodeName == 'A');
|
||||
// });
|
||||
|
||||
},
|
||||
|
||||
createControl: function (n, cm) {
|
||||
return null;
|
||||
},
|
||||
|
||||
getInfo: function () {
|
||||
return {
|
||||
longname: 'neocms Table Creator',
|
||||
author: '',
|
||||
authorurl: '',
|
||||
infourl: '',
|
||||
version: "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
tinymce.PluginManager.add('tables', tinymce.plugins.tables);
|
||||
})();
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
(function () {
|
||||
|
||||
tinymce.create('tinymce.plugins.video', {
|
||||
init: function (ed, url) {
|
||||
ed.addCommand('mceVideo', function () {
|
||||
|
||||
videoPrompt();
|
||||
|
||||
});
|
||||
|
||||
ed.addButton('video', {
|
||||
title: 'Embed Video',
|
||||
cmd: 'mceVideo'
|
||||
});
|
||||
|
||||
ed.onNodeChange.add(function (ed, cm, n) {
|
||||
cm.setActive('video', n.nodeName == 'EMBED' || n.nodeName == 'OBJECT');
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
createControl: function (n, cm) {
|
||||
return null;
|
||||
},
|
||||
|
||||
getInfo: function () {
|
||||
return {
|
||||
longname: 'Video Embed',
|
||||
author: '',
|
||||
authorurl: '',
|
||||
infourl: '',
|
||||
version: "1.0"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
tinymce.PluginManager.add('video', tinymce.plugins.video);
|
||||
})();
|
||||
Reference in New Issue
Block a user