mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-76229 core_form: Show frozen text editor in a more accessible way.
This commit is contained in:
parent
5877ae306e
commit
82d491cafa
1 changed files with 13 additions and 5 deletions
|
@ -248,6 +248,15 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element implements templatab
|
||||||
$this->_options['subdirs'] = (int)($allow == 1);
|
$this->_options['subdirs'] = (int)($allow == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns editor text content
|
||||||
|
*
|
||||||
|
* @return string Text content
|
||||||
|
*/
|
||||||
|
public function get_text(): string {
|
||||||
|
return $this->_values['text'];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns editor format
|
* Returns editor format
|
||||||
*
|
*
|
||||||
|
@ -491,13 +500,12 @@ class MoodleQuickForm_editor extends HTML_QuickForm_element implements templatab
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* What to display when element is frozen.
|
* Returns the formatted value. The return from parent class is not acceptable.
|
||||||
*
|
*
|
||||||
* @return empty string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getFrozenHtml() {
|
public function getFrozenHtml(): string {
|
||||||
|
return format_text($this->get_text(), $this->getFormat()) . $this->_getPersistantData();
|
||||||
return '';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue