1
0

Add alt text to non-wysiwyg img button.

This commit is contained in:
Matthias Mees
2013-07-08 14:13:29 +02:00
parent 96b68f0dba
commit efcb30ed69

View File

@ -151,10 +151,11 @@ window.log = function f(){ log.history = log.history || []; log.history.push(arg
// in <img> element (only); doesn't really "wrap", merely inserts
// an <img> element before selected text
serendipity.wrapInsImage = function(txtarea) {
var loc = prompt('Enter the Image Location: ');
var loc = prompt('Enter the image location: ');
if (loc) {
serendipity.insertText(txtarea,'<img src="'+ loc + '" alt="">');
var alttxt = prompt('Enter alternative text for this image: ');
serendipity.insertText(txtarea,'<img src="'+ loc + '" alt="' + alttxt + '">');
}
}
/* end Better-Editor functions */