Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Commit a8f1013

Browse files
committed
Updated demo, added tinymce 3.5.8 to demo/lib
1 parent 17f3ee4 commit a8f1013

File tree

250 files changed

+24257
-1
lines changed

Some content is hidden

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

250 files changed

+24257
-1
lines changed

demo/demo.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
99
<title>AngularUI - TinyMCE Demo</title>
1010
<base href=".."></base>
11-
<script type="text/javascript" src="test/lib/tinymce358.js"></script>
11+
<script type="text/javascript" src="demo/lib/tiny_mce.js"></script>
1212
<script type="text/javascript" src="components/angular/angular.js"></script>
1313
<script type="text/javascript" src="src/tinymce.js"></script>
1414
</head>

demo/lib/langs/en.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/lib/plugins/advhr/css/advhr.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
2+
.panel_wrapper div.current {height:80px;}
3+
#width {width:50px; vertical-align:middle;}
4+
#width2 {width:50px; vertical-align:middle;}
5+
#size {width:100px;}

demo/lib/plugins/advhr/editor_plugin.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* editor_plugin_src.js
3+
*
4+
* Copyright 2009, Moxiecode Systems AB
5+
* Released under LGPL License.
6+
*
7+
* License: http://tinymce.moxiecode.com/license
8+
* Contributing: http://tinymce.moxiecode.com/contributing
9+
*/
10+
11+
(function() {
12+
tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
13+
init : function(ed, url) {
14+
// Register commands
15+
ed.addCommand('mceAdvancedHr', function() {
16+
ed.windowManager.open({
17+
file : url + '/rule.htm',
18+
width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
19+
height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
20+
inline : 1
21+
}, {
22+
plugin_url : url
23+
});
24+
});
25+
26+
// Register buttons
27+
ed.addButton('advhr', {
28+
title : 'advhr.advhr_desc',
29+
cmd : 'mceAdvancedHr'
30+
});
31+
32+
ed.onNodeChange.add(function(ed, cm, n) {
33+
cm.setActive('advhr', n.nodeName == 'HR');
34+
});
35+
36+
ed.onClick.add(function(ed, e) {
37+
e = e.target;
38+
39+
if (e.nodeName === 'HR')
40+
ed.selection.select(e);
41+
});
42+
},
43+
44+
getInfo : function() {
45+
return {
46+
longname : 'Advanced HR',
47+
author : 'Moxiecode Systems AB',
48+
authorurl : 'http://tinymce.moxiecode.com',
49+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
50+
version : tinymce.majorVersion + "." + tinymce.minorVersion
51+
};
52+
}
53+
});
54+
55+
// Register plugin
56+
tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
57+
})();

demo/lib/plugins/advhr/js/rule.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
var AdvHRDialog = {
2+
init : function(ed) {
3+
var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
4+
5+
w = dom.getAttrib(n, 'width');
6+
f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
7+
f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
8+
f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
9+
selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
10+
},
11+
12+
update : function() {
13+
var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
14+
15+
h = '<hr';
16+
17+
if (f.size.value) {
18+
h += ' size="' + f.size.value + '"';
19+
st += ' height:' + f.size.value + 'px;';
20+
}
21+
22+
if (f.width.value) {
23+
h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
24+
st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
25+
}
26+
27+
if (f.noshade.checked) {
28+
h += ' noshade="noshade"';
29+
st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
30+
}
31+
32+
if (ed.settings.inline_styles)
33+
h += ' style="' + tinymce.trim(st) + '"';
34+
35+
h += ' />';
36+
37+
ed.execCommand("mceInsertContent", false, h);
38+
tinyMCEPopup.close();
39+
}
40+
};
41+
42+
tinyMCEPopup.requireLangPack();
43+
tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);

demo/lib/plugins/advhr/langs/en_dlg.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

demo/lib/plugins/advhr/rule.htm

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<title>{#advhr.advhr_desc}</title>
5+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
6+
<script type="text/javascript" src="js/rule.js"></script>
7+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
8+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
9+
<link href="css/advhr.css" rel="stylesheet" type="text/css" />
10+
</head>
11+
<body role="application">
12+
<form onsubmit="AdvHRDialog.update();return false;" action="#">
13+
<div class="tabs">
14+
<ul>
15+
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
16+
</ul>
17+
</div>
18+
19+
<div class="panel_wrapper">
20+
<div id="general_panel" class="panel current">
21+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
22+
<tr role="group" aria-labelledby="width_label">
23+
<td><label id="width_label" for="width">{#advhr_dlg.width}</label></td>
24+
<td class="nowrap">
25+
<input id="width" name="width" type="text" value="" class="mceFocus" />
26+
<span style="display:none;" id="width_unit_label">{#advhr_dlg.widthunits}</span>
27+
<select name="width2" id="width2" aria-labelledby="width_unit_label">
28+
<option value="">px</option>
29+
<option value="%">%</option>
30+
</select>
31+
</td>
32+
</tr>
33+
<tr>
34+
<td><label for="size">{#advhr_dlg.size}</label></td>
35+
<td><select id="size" name="size">
36+
<option value="">{#advhr_dlg.normal}</option>
37+
<option value="1">1</option>
38+
<option value="2">2</option>
39+
<option value="3">3</option>
40+
<option value="4">4</option>
41+
<option value="5">5</option>
42+
</select></td>
43+
</tr>
44+
<tr>
45+
<td><label for="noshade">{#advhr_dlg.noshade}</label></td>
46+
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
47+
</tr>
48+
</table>
49+
</div>
50+
</div>
51+
52+
<div class="mceActionPanel">
53+
<input type="submit" id="insert" name="insert" value="{#insert}" />
54+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
55+
</div>
56+
</form>
57+
</body>
58+
</html>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#src_list, #over_list, #out_list {width:280px;}
2+
.mceActionPanel {margin-top:7px;}
3+
.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
4+
.checkbox {border:0;}
5+
.panel_wrapper div.current {height:305px;}
6+
#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
7+
#align, #classlist {width:150px;}
8+
#width, #height {vertical-align:middle; width:50px; text-align:center;}
9+
#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
10+
#class_list {width:180px;}
11+
input {width: 280px;}
12+
#constrain, #onmousemovecheck {width:auto;}
13+
#id, #dir, #lang, #usemap, #longdesc {width:200px;}

demo/lib/plugins/advimage/editor_plugin.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)