public
Description: Wysiwyg input for Jeditable.
Homepage: http://www.appelsiini.net/2008/9/wysiwyg-for-jeditable
Clone URL: git://github.com/tuupola/jquery_jeditable_wysiwyg.git
jquery_jeditable_wysiwyg / wysiwyg.html
100644 125 lines (98 sloc) 3.683 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
 
/* No hardoced URL's in examples. Just copy the folder to server. */
$folder = str_replace(basename($_SERVER['PHP_SELF']), '', $_SERVER['PHP_SELF']);
$url = sprintf('http://%s%sphp/', $_SERVER['SERVER_NAME'], $folder);
 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" debug="true">
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Jeditable WYSIWYG Custom Input Demo</title>
<meta name="generator" content="Mephisto" />
<link href="http://www.appelsiini.net/stylesheets/main2.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/atom+xml" href="http://feeds.feedburner.com/tuupola" title="Atom feed" />
<script src="/mint/?js" type="text/javascript"></script>
 
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"" type="text/javascript" charset="utf-8"></script>
<script src="wysiwyg/jquery.wysiwyg.js" type="text/javascript"></script>
<link rel="stylesheet" href="wysiwyg/jquery.wysiwyg.css" type="text/css" media="screen" charset="utf-8">
 
<script src="../jquery.jeditable.js" type="text/javascript" charset="utf-8"></script>
<script src="jquery.jeditable.wysiwyg.js" type="text/javascript"></script>
 
<script type="text/javascript" charset="utf-8">
$(function() {
  
  /* Fix FireBug */
  /*
if ($.browser.mozilla) {
window.loadFirebugConsole();
};
*/
  
  /* Handle links inside editable area. */
  $('.editable > a').bind('click', function() {
      $(this).parent().trigger('click');
      return false;
  });
  
  $('#wysiwyg_1').editable('<?php print $url ?>save.php', {
    indicator : '<img src="../img/indicator.gif">',
    type : 'wysiwyg',
    width : 640,
    height : 'auto',
    onblur : 'ignore',
    submit : 'OK',
    cancel : 'Cancel'
  });
 
  $('#wysiwyg_2').editable('<?php print $url ?>save.php', {
    indicator : '<img src="../img/indicator.gif">',
    type : 'wysiwyg',
    width : 640,
    height : 'auto',
    onblur : 'ignore',
    submit : 'OK',
    cancel : 'Cancel',
    wysiwyg : { controls : { separator04 : { visible : true },
                               insertOrderedList : { visible : true },
                               insertUnorderedList : { visible : true }
                }
    }
  });
    
});
</script>
 
<style type="text/css">
#sidebar {
  width: 0px;
}
 
#content {
  width: 770px;
}
</style>
 
</head>
 
<body>
  <div id="wrap">
    <div id="header">
      <p>
        <h1>Jeditable</h1><br />
        <small>Edit in place plugin for jQuery.</small>
        <ul id="nav">
          <li id="first"><a href="/" class="active">weblog</a></li>
          <li><a href="/projects" class="last">projects</a></li>
        </ul>
      </p>
    </div>
    <div id="content">
      
    <div class="entry">
            
    <p>You might also want to check <a href="../custom.html">other custom inputs demo</a>.
 
    <h2>Default settings</h2>
    
    <div style="width: 640px" class="editable" id="wysiwyg_1"><?php print file_get_contents($url . 'load.php?id=wysiwyg_1') ?></div>
    </div>
 
    <h2>Extra settings</h2>
    
    <div style="width: 640px" class="editable" id="wysiwyg_2"><?php print file_get_contents($url . 'load.php?id=wysiwyg_2') ?></div>
    </div>
    
    <div id="sidebar">
 
  </div>
  
  <div id="footer">
  </div>
 
  <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
  <script type="text/javascript">
    _uacct = "UA-190966-1";
    urchinTracker();
  </script>
 
</body>
</html>