Primefaces 확장자 CKeditor를 사용하려고하는데 작동하지 못합니다. 그래서 SO에 관한 비슷한 질문은 모두 자원 - 편집인을 포함시키지 않은 것에 기인 한 것입니다. 브라우저에서 자바 스크립트 오류가 발생했을 가능성이 있습니다. 아래 코드는 크기 조절이 가능한 텍스트 영역 상자 만 렌더링합니다. Primefaces CKeditor가 렌더링되지 않습니다
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:pe="http://primefaces.org/ui/extensions"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
<title>Facelet Title</title>
</h:head>
<f:view>
<h:body>
<h:form>
<pe:ckEditor id="editor" value="Test">
</pe:ckEditor>
</h:form>
</h:body>
</f:view>
</html>
이
이 내가 브라우저test.xhtml:8 Uncaught ReferenceError: $ is not defined
얻을 오류 내 POM
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>6.1</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>resources-ckeditor</artifactId>
<version>6.1.0</version>
</dependency>
입니다 그리고 이것은 브라우저
<h:inputText></h:inputText><textarea id="editor" name="editor">test</textarea><script id="editor_s" type="text/javascript">$(function(){PrimeFaces.cw("ExtCKEditor","widget_editor",{id:"editor",height:"200px",width:"600px",readOnly:false,advancedContentFilter:true});});</script>
에 출력 관련 HTML 코드
나는 왜 th에 완전히 당혹 스럽다. 모든 것이 옳은 것처럼 보입니다.
'$ is not defined '는 적절한 jQuery 라이브러리를 가져 오는 것을 잊어 버린 것을 의미합니다. – Tiny
@Tiny, 고마워요. JSF 나 Primefaces가 어딘가에서 깨 졌음을 의미합니다. 프레임 워크가이를 처리 할 것으로 생각하기 때문입니다. 그것 또는 Maven은 필요한 종속성을 다운로드하지 않을 수도 있습니다. – JHRS