neokoenig / jQuery-gridmanager

A way of building rows and grids with built in editable regions; requires jQuery, jQueryUI, Bootstrap 3.x, & optional TinyMCE or CKEditor
http://neokoenig.github.io/jQuery-gridmanager/
461 stars 129 forks source link

How to set image_list? #74

Closed harin closed 9 years ago

harin commented 9 years ago

I would like to set the source of the image_list in the image plugin options like below. tinymce.init({ plugins: "image", image_list: "/mylist.php" });

neokoenig commented 9 years ago

The following is the default TinyMCE configuration:

tinymce: {
            config: {
              inline: true,
              plugins: [
              "advlist autolink lists link image charmap print preview anchor",
              "searchreplace visualblocks code fullscreen",
              "insertdatetime media table contextmenu paste"
              ],
              toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
            }
        },

So you should be able to pass in

$(document).ready(function(){  

   $("#mycanvas").gridmanager({
         debug: 1,
        tinymce: {
            config: {
              inline: true,
              plugins: [
              "advlist autolink lists link image charmap print preview anchor",
              "searchreplace visualblocks code fullscreen",
              "insertdatetime media table contextmenu paste"
              ],
              image_list: "/mylist.php",
              toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
            }
        }
});

});
harin commented 9 years ago

Works perfectly, thank you for you plugin and help!