Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js |
— | — | @@ -365,7 +365,7 @@ |
366 | 366 | return context.$content != undefined && context.$content[0].innerHTML != undefined; |
367 | 367 | }, |
368 | 368 | /** |
369 | | - * Gets the complete contents of the iframe |
| 369 | + * Gets the complete contents of the iframe (text, not HTML) |
370 | 370 | */ |
371 | 371 | 'getContents': function() { |
372 | 372 | // FIXME: Evil ua-sniffing action! |
— | — | @@ -376,6 +376,9 @@ |
377 | 377 | // Setting the HTML of the textarea doesn't work on all browsers, use a dummy <div> instead |
378 | 378 | return $( '<div />' ).html( context.$content.html().replace( /\<br\>/g, "\n" ) ).text(); |
379 | 379 | }, |
| 380 | + /** |
| 381 | + * Sets the complete contents of the iframe (text, not HTML; HTML passed will be converted to entities) |
| 382 | + */ |
380 | 383 | 'setContents': function( options ) { |
381 | 384 | context.$content.text( options.contents ); |
382 | 385 | return context.$textarea; |