0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2025-01-03 05:00:13 -05:00

Preserve background colour on paste.

This commit is contained in:
Neil Jenkins 2013-03-07 16:25:20 +11:00
parent 7d760ce635
commit a340115a87
2 changed files with 12 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -1003,12 +1003,21 @@
}; };
var spanToSemantic = { var spanToSemantic = {
backgroundColor: {
regexp: notWS,
replace: function ( colour ) {
return createElement( 'SPAN', {
'class': 'highlight',
style: 'background-color: ' + colour
});
}
},
color: { color: {
regexp: notWS, regexp: notWS,
replace: function ( color ) { replace: function ( colour ) {
return createElement( 'SPAN', { return createElement( 'SPAN', {
'class': 'colour', 'class': 'colour',
style: 'color:' + color style: 'color:' + colour
}); });
} }
}, },