Documentation
Source
source
Type: Boolean
, Object
Default: true
This setting turn off the source view button.
$R('#content', {
source: false
});
In source mode, the editor has no code highlighting by default. This can be changed by connecting Codemirror on the page and specifying it in the source settings.
$R('#content', {
source: {
codemirror: true
}
});
If you connect the Codemirror as a module, set it like this:
$R('#content', {
source: {
codemirrorSrc: codemirror,
codemirror: true
}
});
You can set Codemirror settings, like this:
$R('#content', {
source: {
codemirror: {
lineNumbers: true
}
}
});
showSource
Type: Boolean
Default: false
Show the source code on load of Redactor.
$R('#content', {
showSource: true
});
dkjgvo65776inru43654