Generalize the function for extra editor processing

Issue edina/fieldtrip-cobweb-project#27
Issue edina/fieldtrip-cobweb-project#26