tinyMCE를 사용하여 한 페이지에 html 콘텐츠를 추가하고 있습니다. 나는 다음과 같은 코드를 추가 할 때 : 설명서에 따라,TinyMCE add [제거] // 자바 스크립트 코드를 제출할 때 문자열
tinymce.init({
selector: 'textarea:not(.mceNoEditor)',
allow_script_urls: true,
extended_valid_elements : "script[type|src]"
});
과 : 여기
<p>\n[removed]// <![CDATA[\nalert("test")\n// ]]>[removed]\n</p>
는 TinyMCE에 구성입니다 :
<script type="text/javascript">alert("test")</script>
을하고 양식을 제출, 원본이로 변경 스크립트 코드를 제거해서는 안됩니다.
아이디어가 있으십니까?
스크립트가 제거되었습니다. – giorgio
이 링크를 사용할 수 있습니다. https://whmcs.community/topic/81029-tinymce-editor-allow-script-tags/ – Jinesh
이것은 코드입니다 : tinymce .init ({ 선택자 : 'textarea : not (.mceNoEditor)', allow_script_urls : true, extended_valid_elements : "extended_valid_elements :"[클래스 | 이름 | href | 대상 | 제목 | onclick | rel], 스크립트 [유형 | src], iframe [src | style | width | height | 스크롤링 | marginwidth | marginheight | frameborder], img [class] src | border = 0 | alt | title | hspace | vspace | width | height | align | onmouseover | onmouseout | name], $ elements \ "," }); – giorgio