I am trying to change the CSS of the autocomplete when I change the themes of the editor. Currently in my CSS section “.CodeMirror-hints” allows me to add the relevant styling to autocomplete and it works. When I add “.cm-s-neo .CodeMirror-hints” autocomplete does not work.
If I need to implement this feature how can I go about making the relevant change? So that the css of the hint dialog changes in comparison to the change of themes. Would I need to create another instance of .CodeMirror-hints and give it another id/ class and what would I need to include in the selectTheme method?
You might be able to use the container option to showHint (also settable through the hintOptions editor option) to select a new parent element for the hint dialog.
So now I am using a container option to “showHint”:
editor.on("keyup", function (editor) {
var containerShowHint = document.body;
if (!editor.state.completionActive) {
CodeMirror.commands.autocomplete(editor, null, {completeSingle: false,container: containerShowHint});
}
});
However when in the CSS, how should I include the container to be the new parent element for the hint dialog ? I tried the following, but autocomplete does not popup when I change the theme to “neo”.