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

Commit ecc2d39

Browse files
committed
change dependency versioning, change example
1 parent 8a102bd commit ecc2d39

24 files changed

+20
-101
lines changed

bower.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@
2121
],
2222
"dependencies": {
2323
"jquery": ">=1.9.0",
24-
"medium-editor": "~5.10",
24+
"medium-editor": "^5.15.0",
2525
"handlebars": "~4.0.0",
2626
"blueimp-file-upload": "~9.11.1",
2727
"jquery-sortable": "~0.9.12"
28-
},
29-
"devDependencies": {
30-
"jquery-cycle2": "~2.1.6"
3128
}
3229
}

examples/css/demo.css

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
body {
2-
font-family: Georgia, Times, 'Times New Roman', serif;
3-
font-size: 16px;
4-
line-height: 20px;
5-
}
6-
7-
.top-bar {
8-
position: fixed;
9-
top: 0;
10-
left: 0;
11-
width: auto;
12-
z-index: 10;
13-
padding: 10px;
14-
background-color: #000;
15-
background-color: rgba(0, 0, 0, .8);
16-
box-shadow: 0 0 4px #000;
17-
box-sizing: border-box;
18-
color: #ccc;
19-
font-size: 12px;
20-
font-weight: bold;
21-
text-align: center;
22-
text-transform: uppercase;
2+
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
3+
font-size: 22px;
4+
line-height: 30px;
235
}
246

257
#container {
@@ -35,12 +17,13 @@ body {
3517
padding: 0 0 20px 0;
3618
}
3719

38-
h3 {
20+
h2 {
3921
font-size: 32px;
4022
line-height: 42px;
23+
text-align: center;
4124
}
4225

43-
h4 {
26+
h3 {
4427
font-size: 26px;
4528
line-height: 32px;
4629
}

examples/index.html

Lines changed: 13 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,15 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width">
6-
<title>medium editor | example</title>
6+
<title>medium-editor-insert-plugin | example</title>
77
<link rel="stylesheet" href="css/normalize.css">
88
<link rel="stylesheet" href="css/demo.css">
99
<link rel="stylesheet" href="../bower_components/medium-editor/dist/css/medium-editor.min.css">
10-
<link rel="stylesheet" href="../bower_components/medium-editor/dist/css/themes/default.css" id="medium-editor-theme">
10+
<link rel="stylesheet" href="../bower_components/medium-editor/dist/css/themes/default.css">
1111
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
1212
<link rel="stylesheet" href="../dist/css/medium-editor-insert-plugin.min.css">
1313

1414
<style>
15-
.medium-insert-images-slideshow figure {
16-
width: 100%;
17-
}
18-
19-
.medium-insert-images-slideshow figure img {
20-
margin: 0;
21-
}
22-
2315
.medium-insert-images.medium-insert-images-grid.small-grid figure {
2416
width: 10%;
2517
}
@@ -40,45 +32,22 @@
4032
<body>
4133
<a href="https://github.com/orthes/medium-editor-insert-plugin"><img style="position: absolute; top: 0; right: 0; border: 0; z-index: 5000;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub"></a>
4234

43-
<div class="top-bar">
44-
Theme:
45-
<select id="sel-themes">
46-
<option value="../bower_components/medium-editor/dist/css/themes/default" selected>default</option>
47-
<option value="../bower_components/medium-editor/dist/css/themes/roman">roman</option>
48-
<option value="../bower_components/medium-editor/dist/css/themes/mani">mani</option>
49-
<option value="../bower_components/medium-editor/dist/css/themes/flat">flat</option>
50-
<option value="../bower_components/medium-editor/dist/css/themes/bootstrap">bootstrap</option>
51-
</select>
52-
</div>
53-
<br><br>
54-
5535
<div id="container">
5636
<div class="editable" data-placeholder="Type some text">
57-
<h3>jQuery insert plugin for MediumEditor</h3>
58-
59-
<p>This is <strong>a demo</strong> of jQuery insert plugin for MediumEditor.</p>
60-
61-
<blockquote>HINT: This whole website is an editable editor. You can click on text and start typing.</blockquote>
62-
63-
<p>If you want to insert an image, <strong>create a new empty paragraph</strong> and the plugin's button will appear on the left. From there it's pretty self-explanatory. Have fun.</p>
37+
<h2>jQuery insert plugin for MediumEditor</h2>
6438

65-
<h4>What to do next?</h4>
39+
<p>My father’s family name being Pirrip, and my Christian name Philip, my infant tongue could make of both names nothing longer or more explicit than Pip. So, I called myself Pip, and came to be called Pip.</p>
6640

67-
<p>Please, go to <a href="https://github.com/orthes/medium-editor-insert-plugin">our GitHub repository</a> for installation and configuration info. Did you find a bug, have an idea or want to contribute? Great! Do not miss our <a href="https://github.com/orthes/medium-editor-insert-plugin/issues">issues page on GitHub</a>.</p>
68-
69-
<h4>Contributors</h4>
70-
71-
<p>This plugin is brought to you thanks to these great contributors from all around the world:</p>
72-
73-
<div class="medium-insert-images medium-insert-images-grid small-grid">
74-
<figure><img src="uploads/312938.jpg" alt=""></figure><figure><img src="uploads/19343.jpg" alt=""></figure><figure><img src="uploads/39333.jpg" alt=""></figure><figure><img src="uploads/1228229.jpg" alt=""></figure><figure><img src="uploads/594298.jpg" alt=""></figure><figure><img src="uploads/1101183.jpg" alt=""></figure><figure><img src="uploads/1790778.jpg" alt=""></figure><figure><img src="uploads/1270102.jpg" alt=""></figure><figure><img src="uploads/93555.png" alt=""></figure><figure><img src="uploads/1891369.jpg" alt=""></figure><figure><img src="uploads/1642674.png" alt=""></figure><figure><img src="uploads/431361.jpg" alt=""></figure><figure><img src="uploads/883073.jpg" alt=""></figure><figure><img src="uploads/1485056.jpg" alt=""></figure><figure><img src="uploads/1064889.jpg" alt=""></figure><figure><img src="uploads/62333.png" alt=""></figure><figure><img src="uploads/433501.jpg" alt=""></figure><figure><img src="uploads/714146.jpg" alt=""></figure><figure><img src="uploads/882228.jpg" alt=""></figure><figure><img src="uploads/28841.jpg" alt=""></figure>
41+
<div class="medium-insert-images">
42+
<figure contenteditable="false">
43+
<img src="./uploads/01.jpg" alt="">
44+
<figcaption contenteditable="true">So, I called myself Pip, and came to be called Pip.</figcaption>
45+
</figure>
7546
</div>
7647

77-
<p><em>... And yes, you can create this nice images grid with the plugin. And much more...</em></p>
78-
79-
<h4>License</h4>
48+
<p>I give Pirrip as my father’s family name, on the authority of his tombstone and my sister,—Mrs. Joe Gargery, who married the blacksmith. As I never saw my father or my mother, and never saw any likeness of either of them (for their days were long before the days of photographs), my first fancies regarding what they were like were unreasonably derived from their tombstones. The shape of the letters on my father’s, gave me an odd idea that he was a square, stout, dark man, with curly black hair. From the character and turn of the inscription, “Also Georgiana Wife of the Above,” I drew a childish conclusion that my mother was freckled and sickly. To five little stone lozenges, each about a foot and a half long, which were arranged in a neat row beside their grave, and were sacred to the memory of five little brothers of mine,—who gave up trying to get a living, exceedingly early in that universal struggle,—I am indebted for a belief I religiously entertained that they had all been born on their backs with their hands in their trousers-pockets, and had never taken them out in this state of existence.</p>
8049

81-
<p>The plugin is free and released under MIT license.</p>
50+
<p>Ours was the marsh country, down by the river, within, as the river wound, twenty miles of the sea. My first most vivid and broad impression of the identity of things seems to me to have been gained on a memorable raw afternoon towards evening. At such a time I found out for certain that this bleak place overgrown with nettles was the churchyard; and that Philip Pirrip, late of this parish, and also Georgiana wife of the above, were dead and buried; and that Alexander, Bartholomew, Abraham, Tobias, and Roger, infant children of the aforesaid, were also dead and buried; and that the dark flat wilderness beyond the churchyard, intersected with dikes and mounds and gates, with scattered cattle feeding on it, was the marshes; and that the low leaden line beyond was the river; and that the distant savage lair from which the wind was rushing was the sea; and that the small bundle of shivers growing afraid of it all and beginning to cry, was Pip.</p>
8251
</div>
8352

8453
<footer>
@@ -95,50 +64,20 @@ <h4>License</h4>
9564
<script src="../bower_components/handlebars/handlebars.runtime.min.js"></script>
9665
<script src="../bower_components/jquery-sortable/source/js/jquery-sortable-min.js"></script>
9766

98-
<script src="../bower_components/jquery-cycle2/build/jquery.cycle2.min.js"></script>
99-
<script src="../bower_components/jquery-cycle2/build/plugin/jquery.cycle2.center.min.js"></script>
100-
10167
<!--<script src="../dist/js/medium-editor-insert-plugin.min.js"></script>-->
10268
<script src="../src/js/templates.js"></script>
10369
<script src="../src/js/core.js"></script>
10470
<script src="../src/js/embeds.js"></script>
10571
<script src="../src/js/images.js"></script>
10672

10773
<script>
108-
var editor = new MediumEditor('.editable', {
109-
buttonLabels: 'fontawesome'
110-
});
74+
var editor = new MediumEditor('.editable');
11175

11276
$(function () {
11377
$('.editable').mediumInsert({
114-
editor: editor,
115-
addons: {
116-
images: {
117-
styles: {
118-
slideshow: {
119-
label: '<span class="fa fa-play"></span>',
120-
added: function ($el) {
121-
$el
122-
.data('cycle-center-vert', true)
123-
.cycle({
124-
slides: 'figure'
125-
});
126-
},
127-
removed: function ($el) {
128-
$el.cycle('destroy');
129-
}
130-
}
131-
},
132-
actions: false
133-
}
134-
}
78+
editor: editor
13579
});
13680
});
137-
138-
var cssLink = document.getElementById('medium-editor-theme');
139-
document.getElementById('sel-themes').addEventListener('change', function () {
140-
cssLink.href = this.value + '.css';
141-
});
14281
</script>
14382
</body>
14483
</html>

examples/uploads/01.jpg

183 KB
Loading

examples/uploads/1064889.jpg

-31.3 KB
Binary file not shown.

examples/uploads/1101183.jpg

-11.3 KB
Binary file not shown.

examples/uploads/1228229.jpg

-36.3 KB
Binary file not shown.

examples/uploads/1270102.jpg

-16.9 KB
Binary file not shown.

examples/uploads/1485056.jpg

-13.2 KB
Binary file not shown.

examples/uploads/1642674.png

-1.52 KB
Binary file not shown.

0 commit comments

Comments
 (0)