there's no built in way for doing it, but you can override commandManager.exec
editor.commands.exec = function (command, editor, args) {
if (typeof command === "string")
command = this.commands[command];
if (!command)
return false;
if (editor && !command.readOnly && !editor.canModify())
return false;
if (typeof command == "function")
command(editor, args || {});
else
command.exec(editor, args || {});
return true;
}
editor.canModify = function(){
var c = this.getCursorPosition()
// some logic to determine if current position is editable
if (c.row>4||c.row<2)
return true
}
or
editor.__defineGetter__("$readOnly", function(){
return ...
})
you may also need to highlight not editable parts somehow