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

Commit

Permalink
Browse files Browse the repository at this point in the history
…sert-plugin into olleicua-master

Conflicts:
	dist/css/medium-editor-insert-plugin.min.css
	dist/js/medium-editor-insert-plugin.all.min.js
  • Loading branch information
linkesch committed Jul 29, 2014
2 parents ab45d21 + 6462dde commit 2232be7
Show file tree
Hide file tree
Showing 13 changed files with 646 additions and 6 deletions.
11 changes: 9 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = function(grunt) {
options: {
banner: '/*! \n * <%= pkg.name %> v<%= pkg.version %> - <%= pkg.description %>\n *\n * <%= pkg.homepage %>\n * \n * Copyright (c) 2014 <%= pkg.author.name %> (<%= pkg.author.url %>)\n * Released under the <%= pkg.license %> license\n */\n\n'
},
src: ['src/js/medium-editor-insert-plugin.js', 'src/js/medium-editor-insert-images.js', 'src/js/medium-editor-insert-maps.js', 'src/js/medium-editor-insert-embeds.js'],
src: ['src/js/medium-editor-insert-plugin.js', 'src/js/medium-editor-insert-images.js', 'src/js/medium-editor-insert-maps.js', 'src/js/medium-editor-insert-embeds.js', 'src/js/medium-editor-insert-tables.js'],
dest: 'dist/js/<%= pkg.name %>.all.min.js'
},
f1: {
Expand Down Expand Up @@ -38,6 +38,13 @@ module.exports = function(grunt) {
},
src: 'src/js/medium-editor-insert-embeds.js',
dest: 'dist/js/addons/medium-editor-insert-embeds.min.js'
},
f5: {
options: {
preserveComments: 'some'
},
src: 'src/js/medium-editor-insert-tables.js',
dest: 'dist/js/addons/medium-editor-insert-tables.min.js'
}
},

Expand All @@ -56,7 +63,7 @@ module.exports = function(grunt) {

concat: {
dist: {
src: ['src/js/medium-editor-insert-plugin.js', 'src/js/medium-editor-insert-images.js', 'src/js/medium-editor-insert-maps.js', 'src/js/medium-editor-insert-embeds.js'],
src: ['src/js/medium-editor-insert-plugin.js', 'src/js/medium-editor-insert-images.js', 'src/js/medium-editor-insert-maps.js', 'src/js/medium-editor-insert-tables.js', 'src/js/medium-editor-insert-embeds.js'],
dest: 'dist/js/<%= pkg.name %>.all.js'
}
},
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Current available addons:

- images
- embeds (it can embed various social services - Youtube, Twitter, Facebook, Instagram, Vimeo)
- tables (basic table creating)

More are coming soon...

Expand Down Expand Up @@ -64,6 +65,7 @@ Or if you for some reason want, you can load only addons that you want separatel
<script src="bower_components/medium-editor-insert-plugin/dist/js/addons/medium-editor-insert-plugin.min.js"></script>
<script src="bower_components/medium-editor-insert-plugin/dist/js/addons/medium-editor-insert-images.min.js"></script>
<script src="bower_components/medium-editor-insert-plugin/dist/js/addons/medium-editor-insert-embeds.min.js"></script>
<script src="bower_components/medium-editor-insert-plugin/dist/js/addons/medium-editor-insert-tables.min.js"></script>
```

Initialize MediumEditor as you normally would:
Expand All @@ -80,7 +82,8 @@ $(function () {
editor: editor,
addons: {
images: {},
embeds: {}
embeds: {},
tables: {}
}
});
});
Expand All @@ -107,6 +110,9 @@ var elContent = allContents["element-0"].value;
- **deleteFile**: (function (file, that)) function deleting an image from a server
- **embeds**:
- **urlPlaceholder**: (string) placeholder displayed when entering URL to embed. Default: *type or paste url here*
- **tables**:
- **defaultRows**: (integer) default number of rows. Default: *2*
- **defaultCols**: (integer) default number of columns. Default: *2*
- **enabled**: (boolean) plugin's state: Default *true*.


Expand Down
44 changes: 44 additions & 0 deletions dist/css/medium-editor-insert-plugin.css
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,47 @@
border: 1px dashed #ddd;
margin-top: -1px;
margin-bottom: -1px; }

.medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox {
background-color: #fff;
border: 2px solid #333;
display: inline-block;
z-index: 50;
position: relative; }
.medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox label, .medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox button {
color: #333;
text-transform: capitalize; }
.medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox button.mediumInsert-tableReadyButton {
background-color: #fff;
border: 1px solid #333; }
.medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox input.mediumInsert-tableCols, .medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox input.mediumInsert-tableRows {
width: 50px;
display: block;
height: initial;
background-color: inherit;
border: 1px solid #333;
color: #333;
margin: 0 auto;
text-align: center; }
.medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox table {
margin: 10px; }
.medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox table td {
text-align: center; }
.medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox table.mediumInsert-demoTable {
border-top: 2px solid #333;
border-left: 2px solid #333;
height: 100px;
width: 100px; }
.medium-editor-toolbar-form-anchor.mediumInsert-tableDemoBox table.mediumInsert-demoTable td {
border-bottom: 2px solid #333;
border-right: 2px solid #333; }

table.mediumInsert-table {
border-top: 2px solid #333;
border-left: 2px solid #333;
width: 90%;
margin: 30px auto; }
table.mediumInsert-table td {
border-right: 2px solid #333;
border-bottom: 2px solid #333;
padding: 12px; }
2 changes: 1 addition & 1 deletion dist/css/medium-editor-insert-plugin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2232be7

Please sign in to comment.