<\/div>$/)) {
+ that.html(
+ that.html().replace(/
<\/div>$/, '
')
+ )
+ }
//Ox.print('TEXT', that.text())
- //Ox.print('HTML', that.html())
+ Ox.print('HTML', that.html());
});
}
}
@@ -94,7 +104,10 @@ Ox.EditableContent = function(options, self) {
if (value) {
that.text(value);
} else {
- that.css({padding: '0 2px'}).text('');
+ that.text('');
+ if (self.options.type == 'span') {
+ that.css({padding: '0 2px'});
+ }
}
self.options.editing = true;
that.gainFocus();
@@ -151,6 +164,9 @@ Ox.EditableContent = function(options, self) {
that.removeClass('OxEditableContentInput')
.attr({contenteditable: false})
.html(formatValue());
+ if (self.options.type == 'span') {
+ that.css({padding: 0});
+ }
that.triggerEvent('submit', {value: self.options.value});
}
}