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

v2.x Upgrading from v0.3

Pavel Linkesch edited this page Oct 27, 2015 · 1 revision

Upgrading from v0.3 to v2.x should be quick and easy and consists of these steps:

1. Dependencies

Version 2.x has a little more dependencies than the previous one (jQuery and MediumEditor stay the same obviously). If you downloaded the plugin via Bower, all dependencies were downloaded automatically for you. If you prefer manual download, please, remember to download the dependencies, too.

List of new dependencies:

<!-- New JS dependencies -->
<script src="bower_components/handlebars/handlebars.runtime.min.js"></script>
<script src="bower_components/jquery-sortable/source/js/jquery-sortable-min.js"></script>
<!-- Unfortunately, jQuery File Upload Plugin has a few more dependencies itself -->
<script src="bower_components/blueimp-file-upload/js/vendor/jquery.ui.widget.js"></script>
<script src="bower_components/blueimp-file-upload/js/jquery.iframe-transport.js"></script>
<script src="bower_components/blueimp-file-upload/js/jquery.fileupload.js"></script>

2. Main JS file name

Main JS file has changed from medium-editor-insert-plugin**.all.min.js** to medium-editor-insert-plugin**.min.js**.

Also separate addon files were deleted from dist/ folder. If you want, you can still find them in src/ folder.

3. Configuration

Minimal configuration needed now is:

$(function () {
    $('.editable').mediumInsert({
        editor: editor
    });
});

Configuration of addons was changed - please go to v2.x Configuration to see the new options.

Beginning options, table addon and registerAddon and getAddon methods were dropped altogether.


That's all.

Content created with v0.3 should be formatted correctly with v2.x and version 2.x can seamlessly continue editing the old content.