I am working on a slightly changed question type and I have seen that it is possible to preset a text into the questiontext HTML-editor through the following code in the set_data-function:
if (empty($question->questiontext)) {
$question->questiontext = get_string("randomsamatchintro", "quiz");
}
I think it should be possible to preset a bold text or a table. Do you know how?
In tinyMCE there is a function called "setContent" which looks like what I want:
// Sets the raw contents of the activeEditor editor tinyMCE.activeEditor.setContent('<span>some</span> html', {format : 'raw'});But I don't know how to use this function in Moodle at all. Or does it work totally different?
I hope I can get some help