Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
20f758bd
Commit
20f758bd
authored
Feb 24, 2014
by
Akikonata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
encode
parent
283ee6b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
saveto.js
src/adapter/saveto.js
+1
-5
No files found.
src/adapter/saveto.js
View file @
20f758bd
...
...
@@ -91,13 +91,9 @@ KM.registerToolbarUI( 'saveto', function ( name ) {
return
"png"
;
}
else
if
(
res
.
value
===
"svg"
)
{
var
svghtml
=
$
(
"#kityminder .kmui-editor-body"
).
html
();
// var svg = new Blob( [ svghtml ], {
// type: "image/svg+xml;charset=utf-8"
// } );
var
saveFile
=
function
(
data
,
filename
)
{
var
save_link
=
document
.
createElementNS
(
'http://www.w3.org/1999/xhtml'
,
'a'
);
//save_link.href = data;
save_link
.
href
=
'data:image/svg+xml; utf-8,'
+
svghtml
;
save_link
.
href
=
'data:image/svg+xml; utf-8,'
+
encodeURI
(
svghtml
);
save_link
.
download
=
filename
;
var
event
=
document
.
createEvent
(
'MouseEvents'
);
...
...
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