work around copy and paste background color

This commit is contained in:
j 2019-02-01 13:38:30 +05:30
commit 6eabeda7a1
2 changed files with 31 additions and 13 deletions

View file

@ -1,18 +1,24 @@
'use strict';
oml.ui.annotation = function(annotation, $iframe) {
var $quotetext = Ox.Element()
.addClass('OxSelectable OMLQuote')
.html(Ox.encodeHTMLEntities(annotation.text).replace(/\n/g, '<br/>'))
.on({
click: function(event) {
that.select()
$iframe.postMessage('selectAnnotation', {
id: annotation.id
})
}
})
var $quote = Ox.Element()
.addClass('OxSelectable OMLQuote')
.append(
Ox.Element().html(Ox.encodeHTMLEntities(annotation.text).replace(/\n/g, '<br/>'))
).on({
click: function(event) {
that.select()
$iframe.postMessage('selectAnnotation', {
id: annotation.id
})
}
})
.addClass('OMLQuoteBox')
.append(
Ox.Element().addClass('OMLQuoteBackground')
).append(
$quotetext
)
var notes = annotation.notes.length ? annotation.notes.map(function(note) {
note.editable = !note.user
return note