- 🇯🇴Jordan Rajab Natshah Jordan
Needs an updated issue fork and MR for the
2.0.x
branch.
As seen in the AceFormatter, rendering an ACE widget is cumbersome:
$elements[$delta] = array(
'#type' => 'textarea',
'#value' => $item->value,
// Attach libraries as per the setting.
'#attached' => array(
'library' => array(
'ace_editor/formatter',
'ace_editor/theme.' . $settings['theme'],
'ace_editor/mode.' . $settings['syntax'],
),
'drupalSettings' => array(
// Pass settings variable ace_formatter to javascript.
'ace_formatter' => $settings,
),
),
'#attributes' => array(
"class" => array("content"),
"readonly" => "readonly",
),
'#prefix' => "<div class='ace_formatter'>",
'#suffix' => "<div>",
);
Let's provide a render element that makes it like this:
$elements[$delta] = array(
'#type' => 'ace_textarea',
'#syntax' => 'css',
// Optionally some other ace options...
'#default_value' => $item->value,
);
Needs work
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Needs an updated issue fork and MR for the 2.0.x
branch.