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:
parent
7d760ce635
commit
a340115a87
2 changed files with 12 additions and 3 deletions
File diff suppressed because one or more lines are too long
|
@ -1003,12 +1003,21 @@
|
|||
};
|
||||
|
||||
var spanToSemantic = {
|
||||
backgroundColor: {
|
||||
regexp: notWS,
|
||||
replace: function ( colour ) {
|
||||
return createElement( 'SPAN', {
|
||||
'class': 'highlight',
|
||||
style: 'background-color: ' + colour
|
||||
});
|
||||
}
|
||||
},
|
||||
color: {
|
||||
regexp: notWS,
|
||||
replace: function ( color ) {
|
||||
replace: function ( colour ) {
|
||||
return createElement( 'SPAN', {
|
||||
'class': 'colour',
|
||||
style: 'color:' + color
|
||||
style: 'color:' + colour
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue