You can switch to code editing mode by pressing the Source
button.
But you can also make it the default mode:
CopyJodit.make('#editor', { defaultMode: Jodit.MODE_SOURCE });
3 editing modes available
You can switch between them. The split mode is off by default.:
CopyJodit.make('#editor', { useSplitMode: true, defaultMode: Jodit.MODE_SPLIT });
Code editing mode, by default works on the editor Ace, but this behavior can be toggled You can use a regular textarea to edit your code:
CopyJodit.make('#editor', { defaultMode: Jodit.MODE_SOURCE, sourceEditor: 'area' });
But for Ace, editors can apply its own settings. For example change theme:
ace/theme/chrome
ace/theme/clouds
ace/theme/crimson_editor
ace/theme/dawn
ace/theme/dreamweaver
ace/theme/eclipse
ace/theme/github
ace/theme/iplastic
ace/theme/solarized_light
ace/theme/textmate
ace/theme/tomorrow
ace/theme/xcode
ace/theme/kuroir
ace/theme/katzenmilch
ace/theme/sqlserver
ace/theme/ambiance
ace/theme/chaos
ace/theme/clouds_midnight
ace/theme/cobalt
ace/theme/gruvbox
ace/theme/gob
ace/theme/idle_fingers
ace/theme/kr_theme
ace/theme/merbivore
ace/theme/merbivore_soft
ace/theme/mono_industrial
ace/theme/monokai
ace/theme/pastel_on_dark
ace/theme/solarized_dark
ace/theme/terminal
ace/theme/tomorrow_night
ace/theme/tomorrow_night_blue
ace/theme/tomorrow_night_bright
ace/theme/tomorrow_night_eighties
ace/theme/twilight
ace/theme/vibrant_ink
CopyJodit.make('#editor2', { defaultMode: Jodit.MODE_SOURCE, sourceEditorNativeOptions: { theme: 'ace/theme/eclipse' } });
You can find a complete list of options on the editor's site By default they are set like this:
Copy{ "showGutter": true, "theme": "ace/theme/idle_fingers", "mode": "ace/mode/html", "wrap": true, "highlightActiveLine": true }