2016-12-09 1 views
1

다음은 플러그인의 구성입니다.TinyMCE는 div 블록을 태그에 넣을 수 없습니다.

theme: "modern", 
    toolbar: "link, image, styleselect, formatselect forecolor backcolor | bold,italic,underline | bullist,numlist,outdent,indent | undo,redo | pastetext,pasteword,selectall | code fullscreen", 
    pagebreak_separator: "<p class='page-separator'>&nbsp;</p>", 
    plugins: 'link image code fullscreen wordcount textcolor', 
    relative_urls: false, 
    remove_script_host: false, 
    image_caption: true, 
    cleanup_on_startup: false, 
    trim_span_elements: false, 
    verify_html: false, 
    cleanup: false, 
    convert_urls: false, 
    valid_elements: '*[*]', 
    valid_children: '*[*]', 
    allow_html_in_named_anchor: true, 
    allow_unsafe_link_target: true, 
    force_br_newlines: false, 
    force_p_newlines: false, 
    forced_root_block: '', 
    document_base_url: (!window.location.origin ? window.location.protocol + "//" + window.location.host : window.location.origin) + "/" 

그래서 내가하려는 것은 배경 이미지가있는 div 블록을 태그에 넣는 것입니다. 알다시피, 나는 소스 코드의 유효성을 무효화하기위한 몇 가지 옵션을 구현했으나 여전히 코드 편집 중이다. 내가 무엇을 필요 예 : 나는 소스 코드 패널을 닫은 후 무엇을 얻을

<a href="http://mosplitka.ru/uploads/Cersaie/cersaie_17.jpg" data-gallery="cersaie"> 
 
    <div class="page-gallery-item-bg" style="background-image:url('http://mosplitka.ru/uploads/Cersaie/medium_cersaie_17.jpg'); ">   
 
    &nbsp;</div>&nbsp; 
 
</a>
종료 :

<div class="page-gallery-item-bg" style="background-image: url('http://mosplitka.ru/uploads/Cersaie/medium_cersaie_17.jpg');">&nbsp;</div> 
 
<a href="http://mosplitka.ru/uploads/Cersaie/cersaie_17.jpg" data-gallery="cersaie">&nbsp; </a>

답변

1

는 내가 그것을 발견 것 같아요. 유효한 매개 변수 valid_children : '[]'에 태그의 모든 변형이 포함되어 있지만 분명히 그렇지 않습니다. 그래서 valid_children으로 변경했습니다 : 'a [div]'그리고 해결했습니다. 여전히 첫 번째 버전이 효과가 없었던 이유를 아직 알 수 없습니다. 희망은 누군가를 도울 것입니다.