What should I enter in $previewconfig = array('selector'=>

What should I enter in $previewconfig = array('selector'=>

by AL Rachels -
Number of replies: 2
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Using Moodle 3.0.3+

I'm trying to update and refine the look of the MooTyper plugin and add some settings starting with adding a color background for the onscreen keyboard layout so that users can match the colors of their theme. In the style.css for the plugin, just typing in a color for the span works, but I want to change to a setting so the color can be changed without having to manually change any code.

I'm trying to use a color picker, which I have working on my settings page, but no matter what I've tried adding after $previewconfig = array('selector'=>, the color fails to get passed and when I use Firefox Inspect Element, the line for my background-color is always marked out with an explanation of 'Invalid property value' .

So, a couple of questions...is it possible to change the background color of a span this way? How do you figure out what needs to get put in as the selector for the style?





Average of ratings: -
In reply to AL Rachels

Re: What should I enter in $previewconfig = array('selector'=>

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I'm not sure what all that code is and why you are wanting to change it.

As I see this it is obviously a settings page for this plugin. However I am not sure what this plugin is.

Is it a  Moodle theme?.

if it is then you will need to look in the Site administration > Appearancr > Themes and look for the nam of this theme in the list in that block menu.

Clicking on that link should open up a settings page where you will finf a setting to change the color.

hope that helps?

 Mary

Average of ratings: Useful (1)
In reply to Mary Evans

Re: What should I enter in $previewconfig = array('selector'=>

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Mary,

Thanks for taking the time to reply and I'm sorry it took me so long to say that and to get back to this question.

I've spent many days/hours on this and it took me a while to realize I was asking the wrong question and using the wrong color picker while trying to implement a color setting for the plugin I'm working on.

Since the title doesn't come close to matching what I need to know I'll ask in a new entry.