WhRedactor Open Link in New Tab option was not submitted
Closed this issue · 10 comments
I use WhRedactor in a form. When we want to insert link to WhRedactor field, we have option to make the link open in new tab or not. If I check this option and submit the form, it seems this option was not submitted (target="blank"
option in the link tag was lost). Anyone ever experienced something like this? It looks like a bug.
After doing more experiments, I found that target="blank"
option was added to related HTML tag after we inserted link, but it was lost after the form was submitted.
@re1naldo did you find a solution for this problem?
No, I didn't.
Mind sharing your code so I can test it?
I only use WhRedactor inside TbActiveForm with simple configuration:
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm',array(
'id'=>'option-form',
'enableClientValidation'=>true,
'htmlOptions'=>array('enctype'=>'multipart/form-data'),
));
echo $form->labelEx($model, 'description');
$this->widget('yiiwheels.widgets.redactor.WhRedactor', array(
'model'=>$model,
'attribute'=>'description',
'pluginOptions'=>array(
'buttons'=>array(
'bold', 'italic', 'underline', 'deleted', '|',
'link', 'alignment', '|', 'horizontalrule'
),
'minHeight'=>200,
'placeholder'=>'Enter the description of your option here'
)
));
echo $form->error($model, 'description', array('class'=>'error'));
.... // the other form elements
$this->endWidget();
To see the problem, you can try inserting link to Redactor textbox (using link button) and check Open Link in New Tab option. After submitting the form, you will be able to see that target="blank"
option of the link is lost (not submitted).
@re1naldo this is an issue with the redactor plugin itself not with the widget. I try to update the version.
@re1naldo I have updated the version of redactor. Mind checking on BS3 dev branch, whether it solves the issue or not? Thanks
@tonydspaniard Thanks for updating the redactor. I have tried it, but the buttons of redactor textfield (link, formatting, etc.) did not appear. Should I also use BS3 branch of Yiistrap? I tried the updated Yiiwheels with that branch and still got the same result.
@re1naldo The update is done on the Bootstrap 3 branch (version 2.0). Apologies. Then is an issue with the redactor itself...
@tonydspaniard No problem at all. I will close this issue, then. Thank you so much for your great support!