Form editor
- new/edit in forms listing goes to editor - fixed editor dependencies (via Webpack) - updated forms table schema - saving/loading a form works
This commit is contained in:
23
lib/Form/Block/Html.php
Normal file
23
lib/Form/Block/Html.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace MailPoet\Form\Block;
|
||||
|
||||
class Html {
|
||||
|
||||
static function render($block) {
|
||||
$html = '';
|
||||
|
||||
if(isset($block['params']['text']) && $block['params']['text']) {
|
||||
$text = html_entity_decode($block['params']['text'], ENT_QUOTES);
|
||||
}
|
||||
|
||||
if(isset($block['params']['nl2br']) && $block['params']['nl2br']) {
|
||||
$text = nl2br($text);
|
||||
}
|
||||
|
||||
$html .= '<p class="mailpoet_paragraph">';
|
||||
$html .= $text;
|
||||
$html .= '</p>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user