fix display of text notes in note revisions

This commit is contained in:
zadam 2020-04-21 22:59:37 +02:00
parent 657ff16267
commit dc89f72e75
2 changed files with 3 additions and 5 deletions

View File

@ -18,13 +18,11 @@ async function getNoteRevision(req) {
if (noteRevision.type === 'file') {
if (noteRevision.isStringNote()) {
await noteRevision.getContent();
noteRevision.content = noteRevision.content.substr(0, 10000);
noteRevision.content = (await noteRevision.getContent()).substr(0, 10000);
}
}
else {
await noteRevision.getContent();
noteRevision.content = await noteRevision.getContent();
if (noteRevision.content && noteRevision.type === 'image') {
noteRevision.content = noteRevision.content.toString('base64');

View File

@ -29,7 +29,7 @@
<div id="note-revision-title-buttons"></div>
</div>
<div id="note-revision-content" style="overflow: auto;"></div>
<div id="note-revision-content" style="overflow: auto; word-break: break-word;"></div>
</div>
</div>
</div>