Upload plugin for Trumbowyg
You can insert an image by upload.
Note: this demo does not works without a PHP server, but you can take a look at the files to understand how to use this plugin and how to implement the back-end to match with the plugin.
Insert your uploaded image!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident optio nam reiciendis eius beatae quibusdam!
The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or alternatively [About] The Purposes of Good and Evil ). The original passage began: Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: "Neither is there anyone who loves grief itself since it is grief and thus wants to obtain it").
The code
$('#editor')
.trumbowyg({
btnsAdd: ['upload']
});
Insert your uploaded image through image dropdown!
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident optio nam reiciendis eius beatae quibusdam!
The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or alternatively [About] The Purposes of Good and Evil ). The original passage began: Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: "Neither is there anyone who loves grief itself since it is grief and thus wants to obtain it").
The code
$('#editor-dropdown')
.trumbowyg({
btnsDef: {
// Create a new dropdown
image: {
dropdown: ['insertImage', 'upload'],
ico: 'insertImage'
}
},
// Redefine the button pane
btns: ['viewHTML',
'|', 'formatting',
'|', 'btnGrp-semantic',
'|', 'link',
'|', 'image',
'|', 'btnGrp-justify',
'|', 'btnGrp-lists',
'|', 'horizontalRule']
});