The only way I have found to use command blocks in realms is to:
close the realm
Download to local machine
edit the command blocks in single player
upload back to realm
The only way I have found to use command blocks in realms is to:
close the realm
Download to local machine
edit the command blocks in single player
upload back to realm