Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactorings #57

Merged
merged 54 commits into from
Apr 9, 2021
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
0528a59
rename static to public
mb21 Dec 24, 2020
ad4d908
basic electron typescript setup
mb21 Dec 24, 2020
0962378
basic React GUI running
mb21 Dec 25, 2020
97abf7d
basic preview working
mb21 Dec 26, 2020
cc591f7
MetaEditor and ColorPicker
mb21 Dec 27, 2020
c1f98d8
fixes
mb21 Dec 27, 2020
a44e2cf
basic IPC
mb21 Dec 27, 2020
a89808c
electron-apprenderer
mb21 Dec 27, 2020
0ddf3d8
convert export to ts
mb21 Dec 27, 2020
12a79d5
basic IPC
mb21 Dec 27, 2020
ccce2fa
Merge branch 'ts' of github.com:mb21/panwriter into ts
mb21 Jan 1, 2021
418cad5
remove psc-package
mb21 Jan 1, 2021
bef5514
tsconfig
mb21 Jan 1, 2021
2f1aad5
export
mb21 Jan 1, 2021
28c7aae
import.ts
mb21 Jan 1, 2021
7fab7d1
started converting file to ts
mb21 Jan 3, 2021
a19935a
more
mb21 Jan 6, 2021
b52227c
react-changes
mb21 Jan 9, 2021
c4dce36
more-electron
mb21 Jan 10, 2021
410f60f
electron
mb21 Jan 10, 2021
9767474
react-ipc-part
mb21 Jan 10, 2021
0967af5
update codemirror
mb21 Jan 10, 2021
71c33ab
add print preview
mb21 Jan 10, 2021
e140783
fix some preview issues
mb21 Jan 15, 2021
447b67a
make previewDiv type non-optional
mb21 Jan 17, 2021
ce0b057
consolidate reducers
mb21 Jan 17, 2021
52c8473
ts fixes for scrolling.ts
mb21 Jan 31, 2021
4797dec
convert renderPreviewImpl to TypeScript
mb21 Jan 31, 2021
e37bf0a
fix prod build
mb21 Jan 31, 2021
50234ca
recentFiles.ts
mb21 Jan 31, 2021
abcdbd1
fix isDev
mb21 Jan 31, 2021
1c3509a
move icons to fix yarn build
mb21 Mar 6, 2021
e767aeb
fix prod build
mb21 Mar 6, 2021
85b3930
re-add fix-path
mb21 Mar 6, 2021
fcb5b00
quit app after popup
mb21 Mar 6, 2021
a2ba597
preview: correct comment in interceptClicks
mb21 Mar 7, 2021
dc0ff08
paged.js started
mb21 Mar 7, 2021
b7457e6
update and fix katex
mb21 Mar 27, 2021
d02c999
re-add injecting base tag
mb21 Mar 27, 2021
33b6a65
move renderPreview call into useEffect
mb21 Apr 2, 2021
0804e45
paged: only this works
mb21 Apr 3, 2021
3a1bbe4
fix paged math
mb21 Apr 3, 2021
e410410
add comment
mb21 Apr 3, 2021
ff5b6f8
remove base tag and rewrite image url instead
mb21 Apr 3, 2021
717e9ac
paginated scroll sync
mb21 Apr 3, 2021
2c07d6e
renderPreview: actually buffer instead of rendering old version
mb21 Apr 3, 2021
45a2d27
remove ability to read user-customizable css files
mb21 Apr 3, 2021
107f419
Merge branch 'master' into ts
mb21 Apr 3, 2021
ea3b9f4
electron 12
mb21 Apr 3, 2021
6a17384
export: add Out type
mb21 Apr 5, 2021
0b10e4d
re-add fileExportLikePrevious
mb21 Apr 5, 2021
b854d67
syntactic cleanups
mb21 Apr 5, 2021
c8be27f
fix print from preview
mb21 Apr 5, 2021
e9fd3c6
re-add -webkit-print-color-adjust
mb21 Apr 5, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix print from preview
mb21 committed Apr 5, 2021
commit c8be27f0f6d39cc34706b314ad744bff1a976cef
5 changes: 3 additions & 2 deletions src/renderPreview/renderPreviewImpl.ts
Original file line number Diff line number Diff line change
@@ -42,8 +42,9 @@ async function insertFrame(
const frame = document.createElement('iframe')
if (noScriptsInFrame) {
// adding a sandbox attribute prevents script execution. but we still set the frame to have same-origin as parent,
// in order to write the text to be previewed into the frame directly instead of with window.postMessage
frame.setAttribute('sandbox', 'allow-same-origin')
// in order to write the text to be previewed into the frame directly instead of the slower window.postMessage.
// we need allow-modals for window.print()
frame.setAttribute('sandbox', 'allow-same-origin allow-modals')
}
frame.setAttribute('src', src)
frame.setAttribute('style', 'width: 100%; height: 100%;')