Ace editor dont't send edited text
Closed this issue · 0 comments
iamsalnikov commented
Hi!
I'm trying to edit html
field of my model by yiiwheels.widgets.ace.WhAceEditor
widget; But in $_POST
data i have empty $_POST['Page']['html']
string;
View code:
$this->widget('yiiwheels.widgets.ace.WhAceEditor', array(
'model' => $page,
'attribute' => 'html',
'mode' => 'php',
'htmlOptions'=> array('class' => 'span8', 'style' => 'height:150px;')
));
Controller action with dump $_POST (Form is sent here):
public function actionSavePage()
{
if (!empty($_POST['Page'])) {
CVarDumper::dump($_POST['Page'], 10, true); die;
}
// ...
}
Output, when form sended:
array
(
'title' => 'test page' //ok
'code' => 'test-code' // ok
'html' => '' // bad. I input '<div>test</div>'
);
Where is wrong?