[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

how to select images from a dialog and embed in the textarea

Mohammed Suleman khan

2/22/2016 10:46:00 AM

I am using markdown editor to add or edit the content I have added a button to the panel when I click the button it is prompted the bootbox dialog with the list of images in it, from this dialog I want to select the images and embed the link in the editor. can anyone tell me how to make the images selectable on the bootbox dialog and embed the links in the editor ?

here is my code bootbox dialog that shows list of images on it.


additionalButtons:[
[{
name: "groupCustom",
data: [{
name: "cmdMyImage",
toggle: true,
title: "Image",
icon: "glyphicon glyphicon-upload",
className: "modal2",
callback: function(e){
$.ajax({
url : '/admin/image/gallery',
type : 'GET',
dataType : 'json',
contentType : "application/json",
data : JSON.stringify(),
success : function(data) {
var imgTag = '';
$.each(data, function(idx, value) {
imgTag+='<img src='+ value.replace('src/main/resources/static', '') +'></img> '
});
bootbox.dialog({
title: "This is a form in a modal.",
size: "large",
message: imgTag,

buttons: {
success: {
label: "Insert",
className: "btn-success",
type: "submit",
callback: function () {
var uploadedImages = $('#images').val();
// $.each(uploadedImages, function(idx, value) {
$('#content').append(uploadedImages);
// });
}
}
}
}
);
},
error : function(data) {
console.log("There are some errors")
}
});
}
}]
}]
],
3 Answers

Stefan Weiss

2/22/2016 11:46:00 AM

0

On 02/22/2016 11:46, Mohammed Suleman khan wrote:
> I am using markdown editor to add or edit the content I have added a
> button to the panel when I click the button it is prompted the bootbox
> dialog with the list of images in it, from this dialog I want to select
> the images and embed the link in the editor. can anyone tell me how to
> make the images selectable on the bootbox dialog and embed the links in
> the editor ?
[...]

That's copypasta from here: http://stackoverflow.com/question...
(0 votes, 0 comments, 0 answers)

You'll find that you're more likely to get answers if you actually
mention the name of the software you're having trouble with (hint: it's
not "markdown editor").

In general, this group is not a good place to ask for user support with
specific scripts. While you didn't tell us its name, my magic 8-ball
says signs point to yes that there is an issue tracker for your editor
on GitHub.

- stefan

Mohammed Suleman khan

2/22/2016 11:56:00 AM

0

On Monday, February 22, 2016 at 5:15:54 PM UTC+5:30, Stefan Weiss wrote:
> On 02/22/2016 11:46, Mohammed Suleman khan wrote:
> > I am using markdown editor to add or edit the content I have added a
> > button to the panel when I click the button it is prompted the bootbox
> > dialog with the list of images in it, from this dialog I want to select
> > the images and embed the link in the editor. can anyone tell me how to
> > make the images selectable on the bootbox dialog and embed the links in
> > the editor ?
> [...]
>
> That's copypasta from here: http://stackoverflow.com/question...
> (0 votes, 0 comments, 0 answers)
>
> You'll find that you're more likely to get answers if you actually
> mention the name of the software you're having trouble with (hint: it's
> not "markdown editor").
>
> In general, this group is not a good place to ask for user support with
> specific scripts. While you didn't tell us its name, my magic 8-ball
> says signs point to yes that there is an issue tracker for your editor
> on GitHub.
>
> - stefan

Stefan thanks for your response, I have added the button on Markdown editor panel when I click this button I get the dialog with a list of images on it what I want to do is from those list of images I want to select the images and embed their links in the editor.

Mohammed Suleman khan

2/22/2016 12:59:00 PM

0

On Monday, February 22, 2016 at 5:15:54 PM UTC+5:30, Stefan Weiss wrote:
> On 02/22/2016 11:46, Mohammed Suleman khan wrote:
> > I am using markdown editor to add or edit the content I have added a
> > button to the panel when I click the button it is prompted the bootbox
> > dialog with the list of images in it, from this dialog I want to select
> > the images and embed the link in the editor. can anyone tell me how to
> > make the images selectable on the bootbox dialog and embed the links in
> > the editor ?
> [...]
>
> That's copypasta from here: http://stackoverflow.com/question...
> (0 votes, 0 comments, 0 answers)
>
> You'll find that you're more likely to get answers if you actually
> mention the name of the software you're having trouble with (hint: it's
> not "markdown editor").
>
> In general, this group is not a good place to ask for user support with
> specific scripts. While you didn't tell us its name, my magic 8-ball
> says signs point to yes that there is an issue tracker for your editor
> on GitHub.
>
> - stefan

I am using bootstrap markdown editor from codingdrama.com here is the link http://www.codingdrama.com/bootstrap...