-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(plugintabs): enabling multiple file formats #1163
- Loading branch information
Maximilian Franzke
committed
Apr 28, 2020
1 parent
0eacc13
commit bb5e817
Showing
2 changed files
with
23 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
function addPanels() { | ||
window.patternlab.panels.add({ | ||
id: 'sg-panel-scss', | ||
name: 'SCSS', | ||
default: false, | ||
templateID: 'pl-panel-template-code', | ||
httpRequest: true, | ||
httpRequestReplace: '.scss', | ||
httpRequestCompleted: false, | ||
prismHighlight: true, | ||
language: 'scss', | ||
keyCombo: 'ctrl+shift+z', | ||
}); | ||
} | ||
|
||
// workaround to try recovering from load order race conditions | ||
if (window.patternlab && window.patternlab.panels) { | ||
addPanels(); | ||
} else { | ||
document.addEventListener('patternLab.pageLoad', addPanels); | ||
} | ||
window.patternlab.panels.add({ | ||
id: 'sg-panel-<<type>>', | ||
name: '<<typeUC>>', | ||
default: window.config.defaultPatternInfoPanelCode && window.config.defaultPatternInfoPanelCode === "<<type>>", | ||
templateID: 'pl-panel-template-code', | ||
httpRequest: true, | ||
httpRequestReplace: '.<<type>>', | ||
httpRequestCompleted: false, | ||
prismHighlight: true, | ||
language: '<<type>>'//, | ||
/* TODO: We would need to find a way to enable keyCombo for multiple fields | ||
keyCombo: 'ctrl+shift+z',*/ | ||
}); |