Merge branch 'zadam:master' into master

This commit is contained in:
ngala 2024-04-15 09:44:58 +05:30 committed by GitHub
commit 8f2b92cdbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 18 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
"name": "trilium", "name": "trilium",
"productName": "Trilium Notes", "productName": "Trilium Notes",
"description": "Trilium Notes", "description": "Trilium Notes",
"version": "0.63.3", "version": "0.63.5",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"main": "electron.js", "main": "electron.js",
"bin": { "bin": {

View File

@ -8,7 +8,8 @@ const protectedSessionService = require('../../services/protected_session.js');
const log = require('../../services/log.js'); const log = require('../../services/log.js');
const attachmentRoleToNoteTypeMapping = { const attachmentRoleToNoteTypeMapping = {
'image': 'image' 'image': 'image',
'file': 'file'
}; };
/** /**

View File

@ -487,12 +487,14 @@ function areObjectsEqual () {
} }
function copyHtmlToClipboard(content) { function copyHtmlToClipboard(content) {
const clipboardItem = new ClipboardItem({ function listener(e) {
'text/html': new Blob([content], {type: 'text/html'}), e.clipboardData.setData("text/html", content);
'text/plain': new Blob([content], {type: 'text/plain'}) e.clipboardData.setData("text/plain", content);
}); e.preventDefault();
}
navigator.clipboard.write([clipboardItem]); document.addEventListener("copy", listener);
document.execCommand("copy");
document.removeEventListener("copy", listener);
} }
/** /**

View File

@ -1 +1 @@
module.exports = { buildDate:"2024-03-03T06:58:18+01:00", buildRevision: "0ad337c8e806ba84d48d7b97aa46df52d9f236a8" }; module.exports = { buildDate:"2024-03-28T07:11:39+01:00", buildRevision: "399458b52f250b22be22d980a78de0b3390d7521" };

View File

@ -105,10 +105,10 @@ function renderText(result, note) {
if (result.content.includes(`<span class="math-tex">`)) { if (result.content.includes(`<span class="math-tex">`)) {
result.header += ` result.header += `
<script src="../../${assetPath}/node_modules/katex/dist/katex.min.js"></script> <script src="../${assetPath}/node_modules/katex/dist/katex.min.js"></script>
<link rel="stylesheet" href="../../${assetPath}/node_modules/katex/dist/katex.min.css"> <link rel="stylesheet" href="../${assetPath}/node_modules/katex/dist/katex.min.css">
<script src="../../${assetPath}/node_modules/katex/dist/contrib/auto-render.min.js"></script> <script src="../${assetPath}/node_modules/katex/dist/contrib/auto-render.min.js"></script>
<script src="../../${assetPath}/node_modules/katex/dist/contrib/mhchem.min.js"></script> <script src="../${assetPath}/node_modules/katex/dist/contrib/mhchem.min.js"></script>
<script> <script>
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.getElementById('content')); renderMathInElement(document.getElementById('content'));