1.3.2 • Published 6 years ago

yb-license-editor v1.3.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

Yuanben License Editor

A jQuery plugin to quickly embed the Yuanben license editor in your website.

Install

npm

npm install --save yb-license-editor

bower

bower install yb-license-editor

Basic Usage

<!-- load stylesheet -->
<link rel="stylesheet" href="jquery.yb-license-editor.css" />

<!-- bind to an input element -->
<input type="text" id="yb-license-editor" />

<!-- load script file -->
<script type="text/javascript" src=jquery.yb-license-editor.js"></script>

<!-- initialize -->
<script type="text/javascript">
$(function(){
    $('#yb-license-editor').ybLicenseEditor(
        {
            defaultLicense: {
                type: 'cc',
                content: {
                    'adaptation': 'sa',
                    'commercial': 'n'
                }
                
            }
        }
    );
});
</script>

Configuration

defaultLicense: Default selected license

defaultLicense.type: 'cc' (Creative Commons) or 'cm' (Commercial)

defaultLicense.content.adaptation: 'y' or 'n' for CM license, 'y','n' or 'sa' (Share Alike) for CC license

defaultLicense.content.commercial: 'y' or 'n'. CC license only

defaultLicense.content.price: integer. CM License only

1.3.2

6 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago