wymeditor 0.5.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +20 -0
- data/README.rdoc +49 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/app/helpers/wymeditor_helper.rb +12 -0
- data/lib/generators/wymeditor/install_generator.rb +14 -0
- data/public/javascripts/wymeditor/GPL-license.txt +278 -0
- data/public/javascripts/wymeditor/MIT-license.txt +20 -0
- data/public/javascripts/wymeditor/README +33 -0
- data/public/javascripts/wymeditor/examples/01-basic.html +56 -0
- data/public/javascripts/wymeditor/examples/02-custom-language.html +56 -0
- data/public/javascripts/wymeditor/examples/03-plugin.html +64 -0
- data/public/javascripts/wymeditor/examples/04-multiple-instances.html +67 -0
- data/public/javascripts/wymeditor/examples/05-custom-dialog.html +102 -0
- data/public/javascripts/wymeditor/examples/06-custom-menu.html +73 -0
- data/public/javascripts/wymeditor/examples/07-custom-button.html +74 -0
- data/public/javascripts/wymeditor/examples/08-custom-panel.html +63 -0
- data/public/javascripts/wymeditor/examples/09-two-panels.html +52 -0
- data/public/javascripts/wymeditor/examples/10-resizable.html +60 -0
- data/public/javascripts/wymeditor/examples/11-custom-parser.html +75 -0
- data/public/javascripts/wymeditor/examples/12-custom-layout.html +107 -0
- data/public/javascripts/wymeditor/examples/13-silver-skin.html +61 -0
- data/public/javascripts/wymeditor/examples/14-more-inline-elements.html +168 -0
- data/public/javascripts/wymeditor/examples/15-rdfa-editor.html +188 -0
- data/public/javascripts/wymeditor/examples/README +46 -0
- data/public/javascripts/wymeditor/examples/index.html +53 -0
- data/public/javascripts/wymeditor/examples/styles.css +64 -0
- data/public/javascripts/wymeditor/jquery/GPL-LICENSE.txt +278 -0
- data/public/javascripts/wymeditor/jquery/MIT-LICENSE.txt +20 -0
- data/public/javascripts/wymeditor/jquery/README +67 -0
- data/public/javascripts/wymeditor/jquery/jquery.js +11 -0
- data/public/javascripts/wymeditor/jquery/jquery.ui.draggable.js +1 -0
- data/public/javascripts/wymeditor/jquery/jquery.ui.js +1 -0
- data/public/javascripts/wymeditor/jquery/jquery.ui.resizable.js +1 -0
- data/public/javascripts/wymeditor/jquery/jquery.ui.sortable.js +1 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-blockquote.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-h1.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-h2.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-h3.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-h4.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-h5.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-h6.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-p.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/lbl-pre.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/wymiframe.css +90 -0
- data/public/javascripts/wymeditor/wymeditor/iframe/default/wymiframe.html +26 -0
- data/public/javascripts/wymeditor/wymeditor/jquery.wymeditor.js +4688 -0
- data/public/javascripts/wymeditor/wymeditor/jquery.wymeditor.min.js +1 -0
- data/public/javascripts/wymeditor/wymeditor/jquery.wymeditor.pack.js +1 -0
- data/public/javascripts/wymeditor/wymeditor/lang/bg.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/ca.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/cs.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/cy.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/de.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/en.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/es.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/fa.js +46 -0
- data/public/javascripts/wymeditor/wymeditor/lang/fi.js +44 -0
- data/public/javascripts/wymeditor/wymeditor/lang/fr.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/gl.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/he.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/hr.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/hu.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/it.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/nb.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/nl.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/nn.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/pl.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/pt-br.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/pt.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/ru.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/sv.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/tr.js +45 -0
- data/public/javascripts/wymeditor/wymeditor/lang/zh_cn.js +47 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/embed/jquery.wymeditor.embed.js +52 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +127 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +57 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/resizable/readme.txt +124 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/tidy/README +19 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +82 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/tidy/tidy.php +36 -0
- data/public/javascripts/wymeditor/wymeditor/plugins/tidy/wand.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/compact/icons.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/compact/skin.css +134 -0
- data/public/javascripts/wymeditor/wymeditor/skins/compact/skin.js +35 -0
- data/public/javascripts/wymeditor/wymeditor/skins/default/icons.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/default/skin.css +133 -0
- data/public/javascripts/wymeditor/wymeditor/skins/default/skin.js +40 -0
- data/public/javascripts/wymeditor/wymeditor/skins/minimal/images/bg.header.gif +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/minimal/skin.css +131 -0
- data/public/javascripts/wymeditor/wymeditor/skins/minimal/skin.js +30 -0
- data/public/javascripts/wymeditor/wymeditor/skins/silver/COPYING +674 -0
- data/public/javascripts/wymeditor/wymeditor/skins/silver/README +27 -0
- data/public/javascripts/wymeditor/wymeditor/skins/silver/images/bg.header.gif +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/silver/images/icons.silver.gif +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/silver/skin.css +297 -0
- data/public/javascripts/wymeditor/wymeditor/skins/silver/skin.js +61 -0
- data/public/javascripts/wymeditor/wymeditor/skins/twopanels/icons.png +0 -0
- data/public/javascripts/wymeditor/wymeditor/skins/twopanels/skin.css +134 -0
- data/public/javascripts/wymeditor/wymeditor/skins/twopanels/skin.js +39 -0
- data/public/javascripts/wymeditor/wymeditor/skins/wymeditor_icon.png +0 -0
- data/public/javascripts/wymrails.js +4 -0
- data/test/helper.rb +10 -0
- data/test/test_wymrails.rb +7 -0
- metadata +205 -0
@@ -0,0 +1,74 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<!--
|
3
|
+
* WYMeditor : what you see is What You Mean web-based editor
|
4
|
+
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
|
5
|
+
* Dual licensed under the MIT (MIT-license.txt)
|
6
|
+
* and GPL (GPL-license.txt) licenses.
|
7
|
+
*
|
8
|
+
* For further information visit:
|
9
|
+
* http://www.wymeditor.org/
|
10
|
+
*
|
11
|
+
* File Name:
|
12
|
+
* 07-custom-button.html
|
13
|
+
* WYMeditor integration example - custom button.
|
14
|
+
* See the documentation for more info.
|
15
|
+
*
|
16
|
+
* File Authors:
|
17
|
+
* Jean-Francois Hovinne - http://www.hovinne.com/
|
18
|
+
-->
|
19
|
+
<html>
|
20
|
+
<head>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
22
|
+
<title>WYMeditor</title>
|
23
|
+
<script type="text/javascript" src="../jquery/jquery.js"></script>
|
24
|
+
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript">
|
27
|
+
|
28
|
+
jQuery(function() {
|
29
|
+
jQuery('.wymeditor').wymeditor({
|
30
|
+
|
31
|
+
html: '<p>Hello, World!<\/p>',
|
32
|
+
stylesheet: 'styles.css',
|
33
|
+
|
34
|
+
postInit: function(wym) {
|
35
|
+
|
36
|
+
//construct the button's html
|
37
|
+
var html = "<li class='wym_tools_newbutton'>"
|
38
|
+
+ "<a name='NewButton' href='#'"
|
39
|
+
+ " style='background-image:"
|
40
|
+
+ " url(../wymeditor/skins/default/icons.png)'>"
|
41
|
+
+ "Do something"
|
42
|
+
+ "</a></li>";
|
43
|
+
|
44
|
+
//add the button to the tools box
|
45
|
+
jQuery(wym._box)
|
46
|
+
.find(wym._options.toolsSelector + wym._options.toolsListSelector)
|
47
|
+
.append(html);
|
48
|
+
|
49
|
+
//handle click event
|
50
|
+
jQuery(wym._box)
|
51
|
+
.find('li.wym_tools_newbutton a').click(function() {
|
52
|
+
//do something
|
53
|
+
wym.paste('Lorem ipsum dolor sit amet, consectetuer adipiscing elit.');
|
54
|
+
return(false);
|
55
|
+
});
|
56
|
+
}
|
57
|
+
});
|
58
|
+
});
|
59
|
+
|
60
|
+
</script>
|
61
|
+
|
62
|
+
</head>
|
63
|
+
|
64
|
+
<body>
|
65
|
+
<h1>WYMeditor integration example - custom button</h1>
|
66
|
+
<p><a href="http://www.wymeditor.org/">WYMeditor</a> is a web-based XHTML WYSIWYM editor.</p>
|
67
|
+
<form method="post" action="">
|
68
|
+
<textarea class="wymeditor"></textarea>
|
69
|
+
<input type="submit" class="wymupdate" />
|
70
|
+
</form>
|
71
|
+
|
72
|
+
</body>
|
73
|
+
|
74
|
+
</html>
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<!--
|
3
|
+
* WYMeditor : what you see is What You Mean web-based editor
|
4
|
+
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
|
5
|
+
* Dual licensed under the MIT (MIT-license.txt)
|
6
|
+
* and GPL (GPL-license.txt) licenses.
|
7
|
+
*
|
8
|
+
* For further information visit:
|
9
|
+
* http://www.wymeditor.org/
|
10
|
+
*
|
11
|
+
* File Name:
|
12
|
+
* 08-custom-panel.html
|
13
|
+
* WYMeditor integration example - custom panel.
|
14
|
+
* See the documentation for more info.
|
15
|
+
*
|
16
|
+
* File Authors:
|
17
|
+
* Jean-Francois Hovinne - http://www.hovinne.com/
|
18
|
+
-->
|
19
|
+
<html>
|
20
|
+
<head>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
22
|
+
<title>WYMeditor</title>
|
23
|
+
<script type="text/javascript" src="../jquery/jquery.js"></script>
|
24
|
+
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript">
|
27
|
+
|
28
|
+
jQuery(function() {
|
29
|
+
jQuery('.wymeditor').wymeditor({
|
30
|
+
|
31
|
+
html: '<p>Hello, World!<\/p>',
|
32
|
+
stylesheet: 'styles.css',
|
33
|
+
|
34
|
+
postInit: function(wym) {
|
35
|
+
//render the containers box as a panel
|
36
|
+
//and remove the span containing the '>'
|
37
|
+
jQuery(wym._box).find(wym._options.containersSelector)
|
38
|
+
.removeClass('wym_dropdown')
|
39
|
+
.addClass('wym_panel')
|
40
|
+
.find('h2 > span')
|
41
|
+
.remove();
|
42
|
+
//adjust the editor's height
|
43
|
+
jQuery(wym._box).find(wym._options.iframeSelector)
|
44
|
+
.css('height', '250px');
|
45
|
+
}
|
46
|
+
});
|
47
|
+
});
|
48
|
+
|
49
|
+
</script>
|
50
|
+
|
51
|
+
</head>
|
52
|
+
|
53
|
+
<body>
|
54
|
+
<h1>WYMeditor integration example - custom panel</h1>
|
55
|
+
<p><a href="http://www.wymeditor.org/">WYMeditor</a> is a web-based XHTML WYSIWYM editor.</p>
|
56
|
+
<form method="post" action="">
|
57
|
+
<textarea class="wymeditor"></textarea>
|
58
|
+
<input type="submit" class="wymupdate" />
|
59
|
+
</form>
|
60
|
+
|
61
|
+
</body>
|
62
|
+
|
63
|
+
</html>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<!--
|
3
|
+
* WYMeditor : what you see is What You Mean web-based editor
|
4
|
+
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
|
5
|
+
* Dual licensed under the MIT (MIT-license.txt)
|
6
|
+
* and GPL (GPL-license.txt) licenses.
|
7
|
+
*
|
8
|
+
* For further information visit:
|
9
|
+
* http://www.wymeditor.org/
|
10
|
+
*
|
11
|
+
* File Name:
|
12
|
+
* 09-two-panels.html
|
13
|
+
* WYMeditor integration example - two panels.
|
14
|
+
* See the documentation for more info.
|
15
|
+
*
|
16
|
+
* File Authors:
|
17
|
+
* Jean-Francois Hovinne - http://www.hovinne.com/
|
18
|
+
-->
|
19
|
+
<html>
|
20
|
+
<head>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
22
|
+
<title>WYMeditor</title>
|
23
|
+
<script type="text/javascript" src="../jquery/jquery.js"></script>
|
24
|
+
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript">
|
27
|
+
|
28
|
+
jQuery(function() {
|
29
|
+
jQuery('.wymeditor').wymeditor({
|
30
|
+
|
31
|
+
html: '<p>Hello, World!<\/p>',
|
32
|
+
stylesheet: 'styles.css',
|
33
|
+
skin: 'twopanels'
|
34
|
+
|
35
|
+
});
|
36
|
+
});
|
37
|
+
|
38
|
+
</script>
|
39
|
+
|
40
|
+
</head>
|
41
|
+
|
42
|
+
<body>
|
43
|
+
<h1>WYMeditor integration example - two panels</h1>
|
44
|
+
<p><a href="http://www.wymeditor.org/">WYMeditor</a> is a web-based XHTML WYSIWYM editor.</p>
|
45
|
+
<form method="post" action="">
|
46
|
+
<textarea class="wymeditor"></textarea>
|
47
|
+
<input type="submit" class="wymupdate" />
|
48
|
+
</form>
|
49
|
+
|
50
|
+
</body>
|
51
|
+
|
52
|
+
</html>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<!--
|
3
|
+
* WYMeditor : what you see is What You Mean web-based editor
|
4
|
+
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
|
5
|
+
* Dual licensed under the MIT (MIT-license.txt)
|
6
|
+
* and GPL (GPL-license.txt) licenses.
|
7
|
+
*
|
8
|
+
* For further information visit:
|
9
|
+
* http://www.wymeditor.org/
|
10
|
+
*
|
11
|
+
* File Name:
|
12
|
+
* 10-resizable.html
|
13
|
+
* WYMeditor integration example - resizable plugin.
|
14
|
+
* See the documentation for more info.
|
15
|
+
*
|
16
|
+
* File Authors:
|
17
|
+
* Jean-Francois Hovinne - http://www.hovinne.com/
|
18
|
+
-->
|
19
|
+
<html>
|
20
|
+
<head>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
22
|
+
<title>WYMeditor</title>
|
23
|
+
<script type="text/javascript" src="../jquery/jquery.js"></script>
|
24
|
+
<!-- REQUIRED: jQuery UI and jQuery UI resizable -->
|
25
|
+
<script type="text/javascript" src="../jquery/jquery.ui.js"></script>
|
26
|
+
<script type="text/javascript" src="../jquery/jquery.ui.resizable.js"></script>
|
27
|
+
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.js"></script>
|
28
|
+
<script type="text/javascript" src="../wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js"></script>
|
29
|
+
<script type="text/javascript" src="../wymeditor/plugins/resizable/jquery.wymeditor.resizable.js"></script>
|
30
|
+
|
31
|
+
<script type="text/javascript">
|
32
|
+
|
33
|
+
jQuery(function() {
|
34
|
+
jQuery('.wymeditor').wymeditor({
|
35
|
+
|
36
|
+
html: '<p>Hello, World!<\/p>',
|
37
|
+
stylesheet: 'styles.css',
|
38
|
+
postInit: function(wym) {
|
39
|
+
|
40
|
+
wym.hovertools();
|
41
|
+
wym.resizable();
|
42
|
+
}
|
43
|
+
});
|
44
|
+
});
|
45
|
+
|
46
|
+
</script>
|
47
|
+
|
48
|
+
</head>
|
49
|
+
|
50
|
+
<body>
|
51
|
+
<h1>WYMeditor integration example - resizable plugin</h1>
|
52
|
+
<p><a href="http://www.wymeditor.org/">WYMeditor</a> is a web-based XHTML WYSIWYM editor.</p>
|
53
|
+
<form method="post" action="">
|
54
|
+
<textarea class="wymeditor"></textarea>
|
55
|
+
<input type="submit" class="wymupdate" />
|
56
|
+
</form>
|
57
|
+
|
58
|
+
</body>
|
59
|
+
|
60
|
+
</html>
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<!--
|
3
|
+
* WYMeditor : what you see is What You Mean web-based editor
|
4
|
+
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
|
5
|
+
* Dual licensed under the MIT (MIT-license.txt)
|
6
|
+
* and GPL (GPL-license.txt) licenses.
|
7
|
+
*
|
8
|
+
* For further information visit:
|
9
|
+
* http://www.wymeditor.org/
|
10
|
+
*
|
11
|
+
* File Name:
|
12
|
+
* 11-custom-parser.html
|
13
|
+
* Custom XHTML parser example.
|
14
|
+
* See the documentation for more info.
|
15
|
+
*
|
16
|
+
* File Authors:
|
17
|
+
* Jean-Francois Hovinne - http://www.hovinne.com/
|
18
|
+
-->
|
19
|
+
<html>
|
20
|
+
<head>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
22
|
+
<title>WYMeditor</title>
|
23
|
+
<script type="text/javascript" src="../jquery/jquery.js"></script>
|
24
|
+
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript">
|
27
|
+
|
28
|
+
WYMeditor.XhtmlLexer.prototype.addTokens = function() {
|
29
|
+
// These tokens are for Radiant CMS radius tags
|
30
|
+
this.addEntryPattern("</?r:", 'Text', 'Text');
|
31
|
+
this.addExitPattern(">", 'Text');
|
32
|
+
|
33
|
+
this.addCommentTokens('Text');
|
34
|
+
this.addScriptTokens('Text');
|
35
|
+
this.addCssTokens('Text');
|
36
|
+
this.addTagTokens('Text');
|
37
|
+
};
|
38
|
+
|
39
|
+
|
40
|
+
//Define allowed attributes and their values for <p>
|
41
|
+
WYMeditor.XhtmlValidator._tags['p'] = {
|
42
|
+
'attributes': {
|
43
|
+
'align':/^(right|left|center|justify)$/,
|
44
|
+
'0':'name'
|
45
|
+
}
|
46
|
+
};
|
47
|
+
|
48
|
+
//Add runat="server" attribute to <a> and <img>
|
49
|
+
jQuery.extend(WYMeditor.XhtmlValidator._tags['a']['attributes'], {'runat':/^(server)$/});
|
50
|
+
jQuery.extend(WYMeditor.XhtmlValidator._tags['img']['attributes'], {'runat':/^(server)$/});
|
51
|
+
|
52
|
+
jQuery(function() {
|
53
|
+
jQuery('.wymeditor').wymeditor({
|
54
|
+
html: '<p><a runat="server"><em>Runat server</em> link.</a></p>'
|
55
|
+
+ '<p align="right">Right aligned paragraph.</p>'
|
56
|
+
+ '<p><r:test>This text is inside a radius tag.</r:test></p>'
|
57
|
+
+ '<p>Nothing special here.</p>'
|
58
|
+
});
|
59
|
+
});
|
60
|
+
|
61
|
+
</script>
|
62
|
+
|
63
|
+
</head>
|
64
|
+
|
65
|
+
<body>
|
66
|
+
<h1>WYMeditor custom XHTML parser example</h1>
|
67
|
+
<p><a href="http://www.wymeditor.org/">WYMeditor</a> is a web-based XHTML WYSIWYM editor.</p>
|
68
|
+
<form method="post" action="">
|
69
|
+
<textarea class="wymeditor"></textarea>
|
70
|
+
<input type="submit" class="wymupdate" />
|
71
|
+
</form>
|
72
|
+
|
73
|
+
</body>
|
74
|
+
|
75
|
+
</html>
|
@@ -0,0 +1,107 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<!--
|
3
|
+
* WYMeditor : what you see is What You Mean web-based editor
|
4
|
+
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
|
5
|
+
* Dual licensed under the MIT (MIT-license.txt)
|
6
|
+
* and GPL (GPL-license.txt) licenses.
|
7
|
+
*
|
8
|
+
* For further information visit:
|
9
|
+
* http://www.wymeditor.org/
|
10
|
+
*
|
11
|
+
* File Name:
|
12
|
+
* 12-custom-layout.html
|
13
|
+
* Basic editor integration example with customisation of the default layout.
|
14
|
+
* See the documentation for more info.
|
15
|
+
*
|
16
|
+
* File Authors:
|
17
|
+
* Jean-Francois Hovinne (jf.hovinne a-t wymeditor dotorg)
|
18
|
+
-->
|
19
|
+
<html>
|
20
|
+
<head>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
22
|
+
<title>WYMeditor</title>
|
23
|
+
<script type="text/javascript" src="../jquery/jquery.js"></script>
|
24
|
+
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript">
|
27
|
+
|
28
|
+
jQuery(function() {
|
29
|
+
|
30
|
+
jQuery('.wymeditor').wymeditor({
|
31
|
+
|
32
|
+
stylesheet: 'styles.css',
|
33
|
+
|
34
|
+
//classes panel
|
35
|
+
classesItems: [
|
36
|
+
{'name': 'date', 'title': 'PARA: Date', 'expr': 'p'},
|
37
|
+
{'name': 'hidden-note', 'title': 'PARA: Hidden note',
|
38
|
+
'expr': 'p[@class!="important"]'},
|
39
|
+
{'name': 'important', 'title': 'PARA: Important',
|
40
|
+
'expr': 'p[@class!="hidden-note"]'},
|
41
|
+
{'name': 'border', 'title': 'IMG: Border', 'expr': 'img'},
|
42
|
+
{'name': 'special', 'title': 'LIST: Special', 'expr': 'ul, ol'}
|
43
|
+
],
|
44
|
+
|
45
|
+
//we customize the XHTML structure of WYMeditor by overwriting
|
46
|
+
//the value of boxHtml. In this example, "CONTAINERS" and
|
47
|
+
//"CLASSES" have been moved from "wym_area_right" to "wym_area_top":
|
48
|
+
boxHtml: "<div class='wym_box'>"
|
49
|
+
+ "<div class='wym_area_top'>"
|
50
|
+
+ WYMeditor.TOOLS
|
51
|
+
+ WYMeditor.CONTAINERS
|
52
|
+
+ WYMeditor.CLASSES
|
53
|
+
+ "</div>"
|
54
|
+
+ "<div class='wym_area_left'></div>"
|
55
|
+
+ "<div class='wym_area_right'>"
|
56
|
+
+ "</div>"
|
57
|
+
+ "<div class='wym_area_main'>"
|
58
|
+
+ WYMeditor.HTML
|
59
|
+
+ WYMeditor.IFRAME
|
60
|
+
+ WYMeditor.STATUS
|
61
|
+
+ "</div>"
|
62
|
+
+ "<div class='wym_area_bottom'>"
|
63
|
+
+ "</div>"
|
64
|
+
+ "</div>",
|
65
|
+
|
66
|
+
//postInit is a function called when WYMeditor instance is ready
|
67
|
+
//wym is the WYMeditor instance
|
68
|
+
postInit: function(wym) {
|
69
|
+
|
70
|
+
//we make all sections in area_top render as dropdown menus:
|
71
|
+
jQuery(wym._box)
|
72
|
+
//first we have to select them:
|
73
|
+
.find(".wym_area_top .wym_section")
|
74
|
+
//then we remove the existing class which make some of them render as a panels:
|
75
|
+
.removeClass("wym_panel")
|
76
|
+
//then we add the class which will make them render as a dropdown menu:
|
77
|
+
.addClass("wym_dropdown")
|
78
|
+
//finally we add some css to make the dropdown menus look better:
|
79
|
+
.css("width", "160px")
|
80
|
+
.css("float", "left")
|
81
|
+
.css("margin-right", "5px")
|
82
|
+
.find("ul")
|
83
|
+
.css("width", "140px");
|
84
|
+
|
85
|
+
//add a ">" character to the title of the new dropdown menus (visual cue)
|
86
|
+
jQuery(this._box).find(".wym_tools, .wym_classes ")
|
87
|
+
.find(WYMeditor.H2)
|
88
|
+
.append("<span> ></span>");
|
89
|
+
}
|
90
|
+
});
|
91
|
+
});
|
92
|
+
|
93
|
+
</script>
|
94
|
+
|
95
|
+
</head>
|
96
|
+
|
97
|
+
<body>
|
98
|
+
<h1>WYMeditor basic integration example with simple skin customisation</h1>
|
99
|
+
<p><a href="http://www.wymeditor.org/">WYMeditor</a> is a web-based XHTML WYSIWYM editor.</p>
|
100
|
+
<form method="post" action="">
|
101
|
+
<textarea class="wymeditor"></textarea>
|
102
|
+
<input type="submit" class="wymupdate" />
|
103
|
+
</form>
|
104
|
+
|
105
|
+
</body>
|
106
|
+
|
107
|
+
</html>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<!--
|
3
|
+
* WYMeditor : what you see is What You Mean web-based editor
|
4
|
+
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
|
5
|
+
* Dual licensed under the MIT (MIT-license.txt)
|
6
|
+
* and GPL (GPL-license.txt) licenses.
|
7
|
+
*
|
8
|
+
* For further information visit:
|
9
|
+
* http://www.wymeditor.org/
|
10
|
+
*
|
11
|
+
* File Name:
|
12
|
+
* 13-silver-skin.html
|
13
|
+
* WYMeditor integration example - hovertools and resizable plugins, using silver skin.
|
14
|
+
* See the documentation for more info.
|
15
|
+
*
|
16
|
+
* File Authors:
|
17
|
+
* Jean-Francois Hovinne - http://www.hovinne.com/
|
18
|
+
-->
|
19
|
+
<html>
|
20
|
+
<head>
|
21
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
22
|
+
<title>WYMeditor</title>
|
23
|
+
<script type="text/javascript" src="../jquery/jquery.js"></script>
|
24
|
+
<!-- OPTIONAL: jQuery UI and jQuery UI resizable -->
|
25
|
+
<script type="text/javascript" src="../jquery/jquery.ui.js"></script>
|
26
|
+
<script type="text/javascript" src="../jquery/jquery.ui.resizable.js"></script>
|
27
|
+
<script type="text/javascript" src="../wymeditor/jquery.wymeditor.min.js"></script>
|
28
|
+
<script type="text/javascript" src="../wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js"></script>
|
29
|
+
<script type="text/javascript" src="../wymeditor/plugins/resizable/jquery.wymeditor.resizable.js"></script>
|
30
|
+
|
31
|
+
<script type="text/javascript">
|
32
|
+
|
33
|
+
jQuery(function() {
|
34
|
+
jQuery('.wymeditor').wymeditor({
|
35
|
+
|
36
|
+
html: '<p>Hello, World!<\/p>', //set editor's value
|
37
|
+
stylesheet: 'styles.css', //styles to load
|
38
|
+
skin: 'silver', //activate silver skin
|
39
|
+
postInit: function(wym) {
|
40
|
+
|
41
|
+
wym.hovertools(); //activate hovertools
|
42
|
+
wym.resizable(); //and resizable plugins
|
43
|
+
}
|
44
|
+
});
|
45
|
+
});
|
46
|
+
|
47
|
+
</script>
|
48
|
+
|
49
|
+
</head>
|
50
|
+
|
51
|
+
<body>
|
52
|
+
<h1>WYMeditor integration example - resizable plugin</h1>
|
53
|
+
<p><a href="http://www.wymeditor.org/">WYMeditor</a> is a web-based XHTML WYSIWYM editor.</p>
|
54
|
+
<form method="post" action="">
|
55
|
+
<textarea class="wymeditor"></textarea>
|
56
|
+
<input type="submit" class="wymupdate" />
|
57
|
+
</form>
|
58
|
+
|
59
|
+
</body>
|
60
|
+
|
61
|
+
</html>
|