Skip to content

Visual javascript editor for the bootstrap grid system, written as a jQuery plugin.

License

Notifications You must be signed in to change notification settings

zartata/grid-editor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid Editor

Grid Editor is a visual javascript editor for the bootstrap grid system, written as a jQuery plugin.

Preview

Installation

  • Dependencies: Grid Editor depens on jQuery, jQuery UI, and Bootstap, so make sure you have included those in the page. If you want to use the tincyMCE integration, load tinyMCE en tinyMCE jQuery plugin as well.

  • Download the latest version of Grid Editor include it in your page:

    <script src="grid-editor/dist/jquery.grideditor.min.js"></script>

Usage

$('#myGrid').gridEditor({
    new_row_layouts: [[12], [6,6], [9,3]],
});

Options

new_row_layouts: set the column layouts that appear in the "new row" buttons at the top of the editor.

$('#myGrid').gridEditor({
    new_row_layouts: [[12], [6,6], [9,3]],
});

row_classes: set the css classes that the user can toggle on the rows, under the settings button.

$('#myGrid').gridEditor({
    row_classes: [{'Example class', cssClass: 'example-class'}],
});

col_classes: the same as row_classes, but for columns.

row_tools: add extra tool button to the row toolbar.

$('#myGrid').gridEditor({
    row_tools: [{
        title: 'Set background image',
        iconClass: 'glyphicon-picture',
        on: { 
            click: function() {
                $(this).closest('.row').css('background-image', 'url(http://placekitten.com/g/300/300)');
            }
        }
    }]
});

col_tools: the same as row_tools, but for columns.

Attribution

Grid Editor was heavily inspired by Neokoenig's grid manager

About

Visual javascript editor for the bootstrap grid system, written as a jQuery plugin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.2%
  • CSS 23.9%
  • HTML 7.9%