0

I want to use ckeditor in a web page created in spring mvc 3.1. It is maven project. I downloaded required files from http://ckeditor.com/download. I added taglib

<%@ taglib uri="http://ckeditor.com" prefix="ckeditor" %>

on the head section.

In form, I wrote the code below. path="aciklama" is the property of my class. I want to bind data retrieved from ckeditor.

form method="post" modelAttribute="my class name">
.......
.....
<form:textarea cols="80" id="editor1" name="editor1" rows="10" path="aciklama"></form:textarea>
</form>
<ckeditor:replace replace="editor1" basePath="/ckeditor/" />
</body>

I also added these scripts, but it did not work:

<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/ckeditor/adapters/jquery.js"></script>

When I click the path, it isn't going to the related file. My ckeditor folder is under webpages. When I pass through files tab, It is shown under the webapp folder.

Cœur
  • 37,241
  • 25
  • 195
  • 267
kaan
  • 51
  • 1
  • 9
  • Check this http://stackoverflow.com/questions/14486584/ckeditor-with-spring-mvc-not-working – Shoaib Chikate Nov 04 '13 at 15:33
  • I think there is problem with the path. I gave the path like this. . However, when I click the path, it isnt going to the related file. My ckeditor folder is under webpages. When I pass through files tab, It is shown under the webapp folder. Thanks for advance, – kaan Nov 05 '13 at 07:02
  • Do my link helped you? :) – Shoaib Chikate Nov 05 '13 at 07:11
  • Yes, I understood that there is a problem with the path after examining your link. However, I dont know which path that I should give.? – kaan Nov 05 '13 at 07:14
  • I am using Netbeans Ide also – kaan Nov 05 '13 at 07:15
  • if you dont understand try giving full path i.e C:/....../ckeditor.js and check :) – Shoaib Chikate Nov 05 '13 at 07:20
  • the full path is this: C:\Projects\project_name\src\main\webapp\ckeditor\ckeditor.js How should my path be? thanks, – kaan Nov 05 '13 at 07:56
  • once put whole path and see whether you get ur output or not....put path from src="C:/..." we cant chat more here :( sorry for that.You can accept the answer if you feel ur problem is solved – Shoaib Chikate Nov 05 '13 at 08:11
  • Does your browser actually get the ckeditor.js file? You can check this with the developer tools on your preferred browser (usually opens with F12). Have you checked the console tab for errors? Have you looked at the actual HTML to see if it makes sense? Have you tried entering a the js path directly to the browser to see if it works? Also check all logs. If it's a path issue this is pretty basic stuff. – Joel Peltonen Nov 05 '13 at 12:57
  • Thanks Nenotlep. I have solved problem with your helps. Regards, – kaan Nov 05 '13 at 14:26
  • Possible duplicate of [ckeditor with spring mvc not working](https://stackoverflow.com/questions/14486584/ckeditor-with-spring-mvc-not-working) – Cœur Oct 27 '18 at 07:58

1 Answers1

2

You can use this link for the reference

May be you have path problem i.e it is unable to find your ckeditor.js

Community
  • 1
  • 1
Shoaib Chikate
  • 8,665
  • 12
  • 47
  • 70