Improved workaround for #40
This commit is contained in:
parent
40aa889e07
commit
c38727e77e
2 changed files with 5 additions and 2 deletions
|
@ -73,13 +73,13 @@ Dialog {
|
|||
return '<li class="tasklist"><a class="checkbox" href="tasklist:uncheckbox_' + occurence + '">' + (p1 ? p1 : "") + '☑ ' + p2 + '</a>' + p3
|
||||
} )
|
||||
convertedText = convertedText.replace(/<table>/gmi, "<table border='1' cellpadding='" + Theme.paddingMedium + "'>")
|
||||
convertedText = convertedText.replace(/<hr \/>/gmi, "---")
|
||||
convertedText = convertedText.replace(/<del>(.*)<\/del>/gmi, function(match, p1) { return "<s>" + p1 + "</s>" })
|
||||
convertedText = convertedText.replace(/<hr \/>/gmi, "<p><img width=\"" + contentLabel.width + "\" height=\"1\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAABGdBTUEAANbY1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAPSURBVHjaYvr//z9AgAEABgYDACuJdK0AAAAASUVORK5CYII=\" /></p>")
|
||||
contentLabel.text = "<style>\n" +
|
||||
"ul,ol,table,img { margin: " + Theme.paddingLarge + "px 0px; }\n" +
|
||||
"a:link { color: " + Theme.primaryColor + "; }\n" +
|
||||
"a.checkbox { text-decoration: none; padding: " + Theme.paddingSmall + "px; display: inline-block; }\n" +
|
||||
"li.tasklist { font-size:large; margin: " + Theme.paddingMedium + "px 0px; }\n" +
|
||||
"del { text-decoration: line-through; }\n" +
|
||||
"table { border-color: " + Theme.secondaryColor + "; }\n" +
|
||||
"</style>\n" + convertedText
|
||||
if (debug) console.log(contentLabel.text)
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
# * date Author's Name <author's email> version-release
|
||||
# - Summary of changes
|
||||
|
||||
* Wed Dec 26 2018 Scharel Clemens <harbour-nextcloudnotes@scharel.name> 0.2-9
|
||||
- Improved workaround for #40
|
||||
|
||||
* Mon Dec 17 2018 Scharel Clemens <harbour-nextcloudnotes@scharel.name> 0.2-8
|
||||
- Some changes in the backgend
|
||||
- Fixed #39
|
||||
|
|
Loading…
Reference in a new issue