1

I am using Redactor which came along with YiiBooster. I want to apply class in table as 'table table-striped'.

Is there any way to do it?

rosinghal
  • 161
  • 4
  • 11

2 Answers2

0

You can switch to code view. First button in toolbar. Then add class to table tag:

<table class="table table-striped">
gSorry
  • 1,254
  • 2
  • 21
  • 29
  • well, i don't want to give html view for normal users. So, I was wondering whether redactor has any option to apply default class to tags. – rosinghal Feb 07 '14 at 10:15
0

No ready to go answer, but i got this from the Redactor website:

Launch an event that listens to inserted tables and allows to edit them.

If you use the official Yii Redactor Extension you have to set the ID manual in the widget:

$this->widget('ImperaviRedactorWidget', array(
    'id'=>'redactor-widget',
    ...
));

The you can invoke the code like this:

$('#redactor-widget').redactor('observeTables');
Michiel
  • 2,143
  • 1
  • 21
  • 21