Image Uploaded But not Inserting
See original GitHub issueI am trying to upload image with php ( codeigniter ). Image upload works but after that model doesn’t close and images doesn’t get inserted in editor. I am getting success response
{"message":"uploadSuccess","file":"\/iwillgetit\/assets\/906873.jpg"}
Here is my code:
$('#text-editor').trumbowyg({
btnsDef: {
// Customizables dropdowns
image: {
dropdown: ['insertImage', 'upload'],
ico: 'insertImage'
}
},
btns: [
['viewHTML'],
['undo', 'redo'],
['formatting'],
['strong', 'em', 'del'],
['superscript', 'subscript'],
['link'],
['image','noembed'],
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
['unorderedList', 'orderedList'],
['horizontalRule'],
['removeformat'],
//['emoji'],
['fullscreen']
],
autogrow: true,
//imageWidthModalEdit: true,
plugins: {
upload: {
// Some upload plugin options, see details below
serverPath: '<?php echo base_url(); ?>imageUpload.php',
fileFieldName: 'storyimage',
urlPropertyName: 'file',
success: function (data, trumbowyg, $modal, values) {
console.log(data);
alert();
}
}
}
});
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
PHP Uploading image but not inserting in DB - Stack Overflow
Current result: Able to upload multiple images to Upload folder but inserts only one image path / name period, even after attempting to...
Read more >7 Reasons Why Images Are Not Loading on Your Website
Website images fail to load for one of these seven common reasons.
Read more >How to Fix Image Upload Issue in WordPress (Step by Step)
Here is a simple tip that you can try if you haven't already tried it. Press the enter key twice after adding a...
Read more >Insert image to a doc error message "unable ... - Google Support
I am editing a docs file, and on inserting an image, I navigate to gallery, choose an image and it then seems to...
Read more >5 Ways to Fix Common WordPress Image Upload Issues
If you've tried all of the above fixes and are still encountering problems, you can use your browser's built-in file uploader. Unlike WordPress' ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The image is not inserted because of this code
remove this and the image should be inserted into the editor
Read the docs: https://alex-d.github.io/Trumbowyg/documentation/plugins/#plugin-upload
You should also have a
success
property with a boolean for the sucess/error status. Not a message (which you can keep if you want, but add a sucess boolean property).