Commit 520c6316 authored by Jérome Perrin's avatar Jérome Perrin

monaco: set language to html based on content type

We also sometimes display Mail Message or other documents that are
text/html, it's easier to manage this by content type rather than by a
mapping of portal types.
parent eb0950ab
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
key: options.key, key: options.key,
editable: options.editable === undefined ? true : options.editable editable: options.editable === undefined ? true : options.editable
}; };
if (options.portal_type === 'Web Page') { if (options.portal_type === 'Web Page' || options.content_type == 'text/html') {
model_language = 'html'; model_language = 'html';
} else if (options.portal_type === 'Web Script') { } else if (options.portal_type === 'Web Script') {
model_language = 'javascript'; model_language = 'javascript';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment