Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
html2pdf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Lukas Niegsch
html2pdf
Commits
593d78f0
Commit
593d78f0
authored
Jul 25, 2022
by
lukas.niegsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made ui more responsive
parent
d97d8849
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
include/index.css
include/index.css
+1
-0
index.js
index.js
+9
-2
No files found.
include/index.css
View file @
593d78f0
...
@@ -44,4 +44,5 @@ html, body {
...
@@ -44,4 +44,5 @@ html, body {
box-shadow
:
2px
2px
3px
#999
;
box-shadow
:
2px
2px
3px
#999
;
font-size
:
16px
;
font-size
:
16px
;
z-index
:
9999
;
z-index
:
9999
;
border
:
2px
solid
blue
;
}
}
\ No newline at end of file
index.js
View file @
593d78f0
...
@@ -21,6 +21,10 @@
...
@@ -21,6 +21,10 @@
indentUnit
:
4
,
indentUnit
:
4
,
tabsize
:
4
tabsize
:
4
});
});
var
editor
=
document
.
querySelector
(
"
.CodeMirror
"
).
CodeMirror
editor
.
on
(
"
change
"
,
function
(
event
)
{
document
.
getElementById
(
'
convert
'
).
style
.
border
=
""
;
})
})
})
.
onEvent
(
"
click
"
,
function
(
event
)
{
.
onEvent
(
"
click
"
,
function
(
event
)
{
var
gadget
=
this
;
var
gadget
=
this
;
...
@@ -29,20 +33,23 @@
...
@@ -29,20 +33,23 @@
case
"
convert
"
:
case
"
convert
"
:
return
gadget
.
changeState
({
update
:
true
});
return
gadget
.
changeState
({
update
:
true
});
}
}
})
})
.
onStateChange
(
function
(
ignored
)
{
.
onStateChange
(
function
(
ignored
)
{
var
gadget
=
this
;
var
gadget
=
this
;
var
editor
=
document
.
querySelector
(
"
.CodeMirror
"
).
CodeMirror
;
var
editor
=
document
.
querySelector
(
"
.CodeMirror
"
).
CodeMirror
;
var
viewer
=
document
.
getElementById
(
"
viewer
"
)
var
viewer
=
document
.
getElementById
(
"
viewer
"
);
var
button
=
document
.
getElementById
(
'
convert
'
);
var
converter
;
var
converter
;
return
gadget
.
getDeclaredGadget
(
"
converter
"
)
return
gadget
.
getDeclaredGadget
(
"
converter
"
)
.
push
(
function
(
subgadget
)
{
.
push
(
function
(
subgadget
)
{
converter
=
subgadget
;
converter
=
subgadget
;
button
.
style
.
border
=
"
2px solid orange
"
;
let
html
=
editor
.
getValue
();
let
html
=
editor
.
getValue
();
return
converter
.
convert
(
html
);
return
converter
.
convert
(
html
);
})
})
.
push
(
function
(
base64data
)
{
.
push
(
function
(
base64data
)
{
button
.
style
.
border
=
"
2px solid green
"
;
viewer
.
src
=
"
data:application/pdf;base64,
"
+
base64data
;
viewer
.
src
=
"
data:application/pdf;base64,
"
+
base64data
;
})
})
.
push
(
function
()
{
.
push
(
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment