We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 229f86c commit 891e82bCopy full SHA for 891e82b
client/modules/IDE/components/Editor/index.jsx
@@ -235,6 +235,16 @@ class Editor extends React.Component {
235
236
componentDidUpdate(prevProps) {
237
if (this.props.file.id !== prevProps.file.id) {
238
+ const fileMode = this.getFileMode(this.props.file.name);
239
+ if (fileMode === 'javascript') {
240
+ // Define the new Emmet configuration based on the file mode
241
+ const emmetConfig = {
242
+ preview: ['html'],
243
+ markTagPairs: false,
244
+ autoRenameTags: true
245
+ };
246
+ this._cm.setOption('emmet', emmetConfig);
247
+ }
248
const oldDoc = this._cm.swapDoc(this._docs[this.props.file.id]);
249
this._docs[prevProps.file.id] = oldDoc;
250
this._cm.focus();
0 commit comments