File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import 'codemirror/mode/xml/xml'
7
7
import 'codemirror/mode/http/http'
8
8
import * as html2canvas from "html2canvas"
9
9
import { CodemirrorComponent } from 'ng2-codemirror' ;
10
- import 'rxjs/Rx' ;
11
10
12
11
@Component ( {
13
12
selector : 'app-home' ,
@@ -38,18 +37,13 @@ function hello() {
38
37
saveSnippet ( ) {
39
38
html2canvas ( document . getElementsByClassName ( 'console' ) , {
40
39
onrendered : function ( canvas ) {
41
- var url = canvas . toDataURL ( )
40
+ var url = canvas . toDataURL ( ) ;
42
41
// var iframe = '<iframe src="' + img + '" frameborder="0" style="border:0; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%;" allowfullscreen></iframe>'
43
42
var img = '<img src="' + url + '" style="border:0;"></img>'
44
43
var x = window . open ( ) ;
45
44
x . document . open ( ) ;
46
45
x . document . write ( img ) ;
47
46
x . document . close ( ) ;
48
-
49
- // TODO: Maybe try to download the file instead
50
- // var blob = new Blob([url], { type: 'application/img' });
51
- // var url2 = window.URL.createObjectURL(blob);
52
- // window.open(url2);
53
47
}
54
48
} ) ;
55
49
}
@@ -63,7 +57,6 @@ function hello() {
63
57
this . selectedLanguage = language ;
64
58
this . languageFilter = false ;
65
59
66
- console . log ( this . codemirrorComponent . instance . options . mode ) ;
67
60
switch ( language ) {
68
61
case 'Javascript' :
69
62
this . codemirrorComponent . instance . setOption ( 'mode' , 'text/javascript' ) ;
You can’t perform that action at this time.
0 commit comments