2016-08-11 15 views
1

私はCKeditorバージョン4を使用しています。そして、問題に関連するHTML 5タグに直面しました。 入力HTMLコード:CKEditorバージョンCKeditor Html 5 <figure>タグの問題

から

<div class="col-md-4 col-sm-4"> 
    <div class="item-cont"> 
     <a href="contents/view/home"> 
      <figure> 
      <img src="img/1468996695_img-1.jpg" /> 
      </figure> 
      <div class="item-content"> 
      <div class="align-content"> 
       <div class="text-cont"> 
       <h1>Text</h1> 
       <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry.</p> 
       </div> 
      </div> 
      </div> 
     </a> 
    </div> 
</div> 

出力リターン

<div class="col-md-4 col-sm-4"> 
    <div class="item-cont"> 
    <p><a href="contents/view/home"><img src="img/gallery/subGallery_1/1468996695_img-1.jpg" /> </a></p> 

    <div class="item-content"> 
    <div class="align-content"> 
     <div class="text-cont"> 
     <h1><a href="contents/view/home">Aarhus</a></h1> 

      <p><a href="contents/view/home">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry.</a></p> 
    </div> 
     </div> 
    </div> 
</div> 
</div> 

問題: -

  1. それは "P" タグと "数字" タグに置き換えられます

  2. 外側アンカータグを内側アンカータグに置き換えます

答えて

1

私は、これはあなたがconfig.extraAllowedContentに数字とfigcaptionを追加することができますアンカータグとFigureタグの問題

+0

を解決することができます

$(function(){ CKEDITOR.replace('tinyeditor'); CKEDITOR.dtd.a.div = 1; CKEDITOR.dtd.a.figure = 1; CKEDITOR.config.allowedContent = true; }); 

設定CKEditorバージョンで適切な解決策

変更を見つけましたコンテンツフィルタを完全に無効にする必要はありません。さもなければ、dtdについてのビットは私に同じ問題を助けました。だから、ありがとう。 – jbangerter