public function editor_css_url($encoded=true) {
        global $CFG;
        $rev = theme_get_revision();
        if ($rev > -1) {
            $themesubrevision = theme_get_sub_revision_for_theme($this->name);

            // Provide the sub revision to allow us to invalidate cached theme CSS
            // on a per theme basis, rather than globally.
            if ($themesubrevision && $themesubrevision > 0) {
                $rev .= "_{$themesubrevision}";
            }

            $url = new moodle_url("/theme/styles.php");
            if (!empty($CFG->slasharguments)) {
                $url->set_slashargument('/'.$this->name.'/'.$rev.'/editor', 'noparam', true);
            } else {
                $url->params(array('theme'=>$this->name,'rev'=>$rev, 'type'=>'editor'));
            }
        } else {
            $params = array('theme'=>$this->name, 'type'=>'editor');
            $url = new moodle_url('/theme/styles_debug.php', $params);
        }
        return $url;
    }