By editor, 12 January, 2016 Question How to show contents using Drupal8 Render API ? Render arrays Minimum: return array( '#markup' => 'Hello. This is my First Page', ); Add / Manage allowed tags: $output = array(); $output[] = array( '#markup' => '<strong>This is allowed</strong> <em>This is filtered</em>', '#allowed_tags' => ['strong'], ; By default allowed tags (Not tested, To verify) <p> <a> <em> <strong> <b> <i> <u> <strike> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <table> <tbody> <tr> <td> <th> <h1> <h2> <h3> <h4> <h5> <h6> <blockquote> <hr> <span> <br> <font> <sup> <sub> <div> Source : https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21theme.api.php/group/theme_render/8 Tags Drupal 8 Code Theming Render a Render array to HTML code. Comments You must have JavaScript enabled to use this form. Your name Subject Comment About text formats Text format Plain textBasic_html Plain text No HTML tags allowed. Lines and paragraphs break automatically. Web page addresses and email addresses turn into links automatically.
Comments