kopia lustrzana https://github.com/c9/core
Open SVG files in image previewer by default
SVG images were opened in the XML text editor by default. This change opens them in the image previewer instead. Assuming that most SVG images will be created and exported from graphics software like Adobe Illustrator or Inkscape, previewing the file content is the better default. Also changes the behaviour of `editors#register()` in that the latest registered editor is used with the highest instead of lowest priority.pull/125/head
rodzic
9d6554197d
commit
a5a221b74e
|
@ -106,6 +106,7 @@
|
|||
"c9.ide.run.build": "#ad45874c88",
|
||||
"c9.ide.run.debug.xdebug": "#3b1520f83d",
|
||||
"c9.ide.save": "#58b8616a88",
|
||||
"c9.ide.scm": "#undefined",
|
||||
"c9.ide.terminal.monitor": "#b0b4d03280",
|
||||
"c9.ide.theme.flat": "#2de8414db7",
|
||||
"c9.ide.threewaymerge": "#229382aa0b",
|
||||
|
|
|
@ -91,7 +91,7 @@ define(function(require, module, exports) {
|
|||
extensions.forEach(function(ext) {
|
||||
// force lower-case, to account for other LowerCase checks below
|
||||
ext = ext.toLowerCase();
|
||||
(fileExtensions[ext] || (fileExtensions[ext] = [])).push(editor);
|
||||
(fileExtensions[ext] || (fileExtensions[ext] = [])).unshift(editor);
|
||||
});
|
||||
|
||||
if (editor.type == options.defaultEditor)
|
||||
|
@ -257,4 +257,4 @@ define(function(require, module, exports) {
|
|||
editors: plugin
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -12,7 +12,7 @@ define(function(require, exports, module) {
|
|||
|
||||
/***** Initialization *****/
|
||||
|
||||
var extensions = ["gif", "ico"];
|
||||
var extensions = ["gif", "ico", "svg"];
|
||||
|
||||
function ImageEditor(){
|
||||
var plugin = new Editor("Ajax.org", main.consumes, extensions);
|
||||
|
@ -135,4 +135,4 @@ define(function(require, exports, module) {
|
|||
ImageEditor, extensions)
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Ładowanie…
Reference in New Issue