Skip to content

Commit 4037725

Browse files
committed
Update to TinyMCE 4.2.6
1 parent c1f24c2 commit 4037725

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+11918
-4481
lines changed

.jshintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"browser": true,
3-
"camelcase": true,
3+
"camelcase": false,
44
"curly": true,
55
"eqeqeq": true,
66
"eqnull": true,

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Changelog
2+
=========
3+
4+
* 0.0.10 - Update to TinyMCE 4.2.6

LICENSE.md renamed to LICENSE.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 ITCase
3+
Copyright (c) 2015 ITCase
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,9 @@ In your code:
5858
class ModelFoo(models.Model):
5959
content = TinyMCEModelField('Foo content')
6060
61-
if you using south you must use add_introspection_rules construction
61+
if you using South you must use add_introspection_rules construction
6262
6363
.. code-block:: python
6464
6565
from south.modelsinspector import add_introspection_rules
6666
add_introspection_rules([], ["^tinymce_4\.fields\.TinyMCEModelField"])
67-

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "django-tinymce-4",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"homepage": "https://github.com/ITCase/django-tinymce-4",
55
"authors": [
66
"ITCase <[email protected]>"
@@ -15,6 +15,6 @@
1515
"tests"
1616
],
1717
"dependencies": {
18-
"tinymce": "~4.1.9"
18+
"tinymce": "~4.2.6"
1919
}
2020
}

tinymce_4/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# -*- coding: utf-8 -*-
2-
__version__ = '0.0.9'
2+
__version__ = '0.0.10'
Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1+
'use strict';
2+
13
var FileBrowserDialogue = {
2-
init : function () {
3-
// remove tinymce stylesheet.
4-
var allLinks = document.getElementsByTagName("link");
5-
allLinks[allLinks.length-1].parentNode.removeChild(allLinks[allLinks.length-1]);
6-
},
7-
fileSubmit : function (FileURL) {
8-
var URL = FileURL;
9-
var args = top.tinymce.activeEditor.windowManager.getParams();
10-
var win = args.window;
11-
12-
// insert information now
13-
win.document.getElementById(args.input).value = URL;
14-
15-
// close popup window
16-
top.tinymce.activeEditor.windowManager.close();
17-
}
4+
init : function () {
5+
// remove tinymce stylesheet.
6+
var allLinks = document.getElementsByTagName('link');
7+
allLinks[allLinks.length-1].parentNode.removeChild(
8+
allLinks[allLinks.length-1]);
9+
},
10+
fileSubmit : function (FileURL) {
11+
var URL = FileURL;
12+
var args = top.tinymce.activeEditor.windowManager.getParams();
13+
var win = args.window;
14+
15+
// Insert information now
16+
win.document.getElementById(args.input).value = URL;
17+
18+
// Close popup window
19+
top.tinymce.activeEditor.windowManager.close();
20+
}
1821
};

tinymce_4/static/tinymce_4/settings/django-filebrowser.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
function DjangoFilebrowser(field_name, url, type, win) {
1+
'use strict';
22

3-
'use strict';
3+
function DjangoFilebrowser(field_name, url, type, win) {
44

55
var editor = win.tinyMCE.activeEditor,
6-
cmsURL = '/admin/filebrowser/browse/?pop=2';
6+
cmsURL = '/admin/filebrowser/browse/?pop=2';
7+
78
cmsURL += '&type=' + type;
89

910
editor.windowManager.open({

tinymce_4/static/tinymce_4/settings/full.js

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
'use strict';
2+
23
/*global tinymce: false*/
34

45
if ($ === undefined) $ = django.jQuery;
56

67
function change_image_alignment(node, styles) {
7-
if (node.nodeName == "IMG") {
8+
if (node.nodeName === 'IMG') {
89
$(node).removeAttr('style');
910
if (styles) {
1011
$(node).css('margin', '5px');
@@ -30,8 +31,8 @@ tinymce.init({
3031
'save table contextmenu directionality emoticons template paste textcolor'
3132
],
3233

33-
plugin_preview_width : "730",
34-
plugin_preview_height : "550",
34+
plugin_preview_width : '730',
35+
plugin_preview_height : '550',
3536

3637
menu : {
3738
edit: {
@@ -115,37 +116,37 @@ tinymce.init({
115116
},
116117

117118
style_formats: [
118-
{ title: "Headers", items: [
119-
{ title: "Header 1", format: "h1" },
120-
{ title: "Header 2", format: "h2" },
121-
{ title: "Header 3", format: "h3" },
122-
{ title: "Header 4", format: "h4" },
123-
{ title: "Header 5", format: "h5" },
124-
{ title: "Header 6", format: "h6" }
119+
{ title: 'Headers', items: [
120+
{ title: 'Header 1', format: 'h1' },
121+
{ title: 'Header 2', format: 'h2' },
122+
{ title: 'Header 3', format: 'h3' },
123+
{ title: 'Header 4', format: 'h4' },
124+
{ title: 'Header 5', format: 'h5' },
125+
{ title: 'Header 6', format: 'h6' }
125126
]},
126-
{ title: "Inline", items: [
127-
{ title: "Bold", icon: "bold", format: "bold" },
128-
{ title: "Italic", icon: "italic", format: "italic" },
129-
{ title: "Underline", icon: "underline", format: "underline" },
130-
{ title: "Strikethrough", icon: "strikethrough", format: "strikethrough" },
131-
{ title: "Superscript", icon: "superscript", format: "superscript" },
132-
{ title: "Subscript", icon: "subscript", format: "subscript" },
133-
{ title: "Code", icon: "code", format: "code" }
127+
{ title: 'Inline', items: [
128+
{ title: 'Bold', icon: 'bold', format: 'bold' },
129+
{ title: 'Italic', icon: 'italic', format: 'italic' },
130+
{ title: 'Underline', icon: 'underline', format: 'underline' },
131+
{ title: 'Strikethrough', icon: 'strikethrough', format: 'strikethrough' },
132+
{ title: 'Superscript', icon: 'superscript', format: 'superscript' },
133+
{ title: 'Subscript', icon: 'subscript', format: 'subscript' },
134+
{ title: 'Code', icon: 'code', format: 'code' }
134135
]},
135-
{ title: "Blocks", items: [
136-
{ title: "Paragraph", format: "p" },
137-
{ title: "Blockquote", format: "blockquote" },
138-
{ title: "Div", format: "div" },
139-
{ title: "Pre", format: "pre" }
136+
{ title: 'Blocks', items: [
137+
{ title: 'Paragraph', format: 'p' },
138+
{ title: 'Blockquote', format: 'blockquote' },
139+
{ title: 'Div', format: 'div' },
140+
{ title: 'Pre', format: 'pre' }
140141
]},
141-
{ title: "Alignment", items: [
142-
{ title: "Left", icon: "alignleft", format: "alignleft" },
143-
{ title: "Center", icon: "aligncenter", format: "aligncenter" },
144-
{ title: "Right", icon: "alignright", format: "alignright" },
145-
{ title: "Justify", icon: "alignjustify", format: "alignjustify" }
142+
{ title: 'Alignment', items: [
143+
{ title: 'Left', icon: 'alignleft', format: 'alignleft' },
144+
{ title: 'Center', icon: 'aligncenter', format: 'aligncenter' },
145+
{ title: 'Right', icon: 'alignright', format: 'alignright' },
146+
{ title: 'Justify', icon: 'alignjustify', format: 'alignjustify' }
146147
]},
147148
],
148-
fontsize_formats:"8px 10px 12px 14px 16px 18px 20px 22px 24px 26px 28px 36px 48px 72px",
149+
fontsize_formats: '8px 10px 12px 14px 16px 18px 20px 22px 24px 26px 28px 36px 48px 72px',
149150

150151
// Callbacks
151152
file_browser_callback: DjangoFilebrowser
Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
1+
'use strict';
12
/*global tinymce: false*/
23

34
tinymce.init({
45
selector: 'textarea.tinymce',
56
theme: 'modern',
67
relative_urls: false,
78
style_formats: [
8-
{ title: "Headers", items: [
9-
{ title: "Header 1", format: "h1" },
10-
{ title: "Header 2", format: "h2" },
11-
{ title: "Header 3", format: "h3" },
12-
{ title: "Header 4", format: "h4" },
13-
{ title: "Header 5", format: "h5" },
14-
{ title: "Header 6", format: "h6 "}
9+
{ title: 'Headers', items: [
10+
{ title: 'Header 1', format: 'h1' },
11+
{ title: 'Header 2', format: 'h2' },
12+
{ title: 'Header 3', format: 'h3' },
13+
{ title: 'Header 4', format: 'h4' },
14+
{ title: 'Header 5', format: 'h5' },
15+
{ title: 'Header 6', format: 'h6 '}
1516
]},
16-
{ title: "Inline", items: [
17-
{ title: "Bold", icon: "bold", format: "bold" },
18-
{ title: "Italic", icon: "italic", format: "italic" },
19-
{ title: "Underline", icon: "underline", format: "underline" },
20-
{ title: "Strikethrough", icon: "strikethrough", format: "strikethrough" },
21-
{ title: "Superscript", icon: "superscript", format: "superscript" },
22-
{ title: "Subscript", icon: "subscript", format: "subscript" },
23-
{ title: "Code", icon: "code", format: "code "}
17+
{ title: 'Inline', items: [
18+
{ title: 'Bold', icon: 'bold', format: 'bold' },
19+
{ title: 'Italic', icon: 'italic', format: 'italic' },
20+
{ title: 'Underline', icon: 'underline', format: 'underline' },
21+
{ title: 'Strikethrough', icon: 'strikethrough', format: 'strikethrough' },
22+
{ title: 'Superscript', icon: 'superscript', format: 'superscript' },
23+
{ title: 'Subscript', icon: 'subscript', format: 'subscript' },
24+
{ title: 'Code', icon: 'code', format: 'code '}
2425
]},
25-
{ title: "Blocks", items: [
26-
{ title: "Paragraph", format: "p" },
27-
{ title: "Blockquote", format: "blockquote" },
28-
{ title: "Div", format: "div" },
29-
{ title: "Pre", format: "pre "}
26+
{ title: 'Blocks', items: [
27+
{ title: 'Paragraph', format: 'p' },
28+
{ title: 'Blockquote', format: 'blockquote' },
29+
{ title: 'Div', format: 'div' },
30+
{ title: 'Pre', format: 'pre '}
3031
]},
31-
{ title: "Alignment", items: [
32-
{ title: "Left", icon: "alignleft", format: "alignleft" },
33-
{ title: "Center", icon: "aligncenter", format: "aligncenter" },
34-
{ title: "Right", icon: "alignright", format: "alignright" },
35-
{ title: "Justify", icon: "alignjustify", format: "alignjustify "}
32+
{ title: 'Alignment', items: [
33+
{ title: 'Left', icon: 'alignleft', format: 'alignleft' },
34+
{ title: 'Center', icon: 'aligncenter', format: 'aligncenter' },
35+
{ title: 'Right', icon: 'alignright', format: 'alignright' },
36+
{ title: 'Justify', icon: 'alignjustify', format: 'alignjustify'}
3637
]},
3738
],
3839
});

0 commit comments

Comments
 (0)