2013-06-08 2 views
1

블록 본문에 내용을 추가하고 을 전체 HTML로 사용할 때 이상한 동작을 발견했습니다. <b> 태그가 <strong> 태그로 변환되고 있습니다. 내 스타일링을 올바르게 할 수 없습니다. TinyMCE 3.5.8 모듈을 전체 html로 사용하고 있습니다. 누군가이 작업의 원인이 될 수있는 도움을 줄 수 있습니까?전체 HTML을 입력 형식으로 사용할 때 태그가 변환됩니다.

입력 :

<div class='content>' 
<b>Lorem Ipsum</b> 
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum   has been the industry's standard dummy text ever since the 1500s</p> 
</div> 

출력 :

<div class='content>' 
    <strong>Lorem Ipsum</strong> 
    <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum   has been the industry's standard dummy text ever since the 1500s</p> 
    </div> 

답변

4

이 TinyMCE에가 HTML 태그를 처리하는 방법과 관련된 문제입니다. 자동으로 여러 태그를 최신 버전으로 바꿉니다 (예 : bstrong으로 바뀝니다).

최종 결과가 동일하기 때문에 이것은 나쁜 행동 자체는 아니지만 혼란 스러울 수 있음에 유의하십시오. HTML5에서는 최신 strong 태그가 이전 b 태그보다 선호됩니다. Here's a page that explains why.

Here's a relevant SO question이 답변은 TinyMCE 스크립트 자체의 동작을 변경하는 방법에 대한 답변입니다. 드루팔 (Drupal에 TinyMCE를 어떻게 포함시키는 지 잘 모르겠습니다. WYSIWYG module을 사용하는 경우 hook_wysiwyg_editor_settings_alter 후크를 사용하여 TinyMCE 설정을 무시할 수 있습니다.

+0

tanx @Filippos :) – Outlooker