Hello! I use CKEditor in the project, insert the code from the layout into the source window:

<a href="#" class="repair_right"> <div class="relative"> <img src="img/6-1.jpg" width="614" height="537" alt=""/> <div class="repair_right_inner"> <b class="f17b">Видео в тему</b><br /> Если прямо сейчас Вы оплакиваете любимую сгоревшую мясорубку, посмотрите этот ролик, надеемся, он поднимет Вам настроение и заставит улыбнуться. </div> </div> </a> 

The editor formats it in this way:

  <div class="relative"><a class="repair_right" href="#"><img alt="" height="537" src="img/6-1.jpg" width="614" /> </a> <div class="repair_right_inner"><a class="repair_right" href="#"><b class="f17b">Видео в тему</b><br /> Если прямо сейчас Вы оплакиваете любимую сгоревшую мясорубку, посмотрите этот ролик, надеемся, он поднимет Вам настроение и заставит улыбнуться. </a></div> <a class="repair_right" href="#"> </a></div> 

What should be done so that the editor does not format the blocks inside the tag a?

  • 6
    Separate the question and answer. - Mikhail Vaysman

1 answer 1

Decide this:

 config.protectedSource.push( /<a[\s\S]*?\>/g ); config.protectedSource.push( /<\/a[\s\S]*?\>/g ); 

That is, all tags are allowed inside