CodeMirror Themes

Are there any plan to support CodeMirror themes besides eclipse in the future for the AE editor?

Any advice on where to start looking if I wanted to implement one?

I’m not aware of any such plans now (I assume by support, you mean an ability to switch between themes in the UI?).

However, in manageiq-ui-classic

1320:    theme: 'eclipse',

17: *= require codemirror/theme/eclipse

If the theme you’d like to use already lives in vendor/assets/bower_components/codemirror/theme/, switching the theme should really be as easy as changing those 2 strings :slight_smile: .

Hope it helps!

1 Like

Yes selectable themes is what I meant.
Thanks for pointing me in the right direction!

Sometimes it’s daunting to sift through all those includes.

Aah, any time :slight_smile:

To add to that, if you’re working on a UI to switch the default theme, it should be available from My Settingsapp/views/configuration/_ui_1.html.haml would be the haml to add the select to. (And you should be able to find a way to save that to the user’s settings in that code…)

Not having edited any of the application files before, I’m wondering if I would have to rebuild or recompile anything after making changes to any of these files.

If you’re running in development mode, no need to do anything :).

If you’re running on an appliance however, you would need to do rake evm:compile:assets and rake evm:restart after every change…

Great, thanks for the info. I’m working with a CloudForms Appliance.

Worked like a charm :grinning:

The command is actually rake evm:assets:compile if I recall correctly.
Had a slight issue when there wasn’t enough space on the logical volume to compile, but rake assets:clean[1] took care of that.

1 Like