Skip to content

Commit

Permalink
Issue 15 fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
joksnet committed Mar 22, 2008
1 parent 2c48620 commit 2d2b91b
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions jquery.wysiwyg.js
Expand Up @@ -76,8 +76,10 @@
html : '<'+'?xml version="1.0" encoding="UTF-8"?'+'><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body>INITIAL_CONTENT</body></html>',
css : {},

debug : false,
autoSave : true,
debug : false,

autoSave : true, // http://code.google.com/p/jwysiwyg/issues/detail?id=11
rmUnwantedBr : true, // http://code.google.com/p/jwysiwyg/issues/detail?id=15

controls : {},
messages : {}
Expand Down Expand Up @@ -446,7 +448,14 @@
saveContent : function()
{
if ( this.original )
$(this.original).val( this.getContent() );
{
var content = this.getContent();

if ( this.options.rmUnwantedBr )
content = ( content.substr(-4) == '<br>' ) ? content.substr(0, content.length - 4) : content;

$(this.original).val(content);
}
},

appendMenu : function( cmd, args, className, fn )
Expand Down

0 comments on commit 2d2b91b

Please sign in to comment.