Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#8199 closed Bug (invalid)

ASP.NET & CKeditor failed!

Reported by: zoomgrange Owned by:
Priority: Normal Milestone:
Component: Server : ASP.Net Version: 3.6.1
Keywords: Cc:

Description

I'm trying to build a website with ASP.NET (C#). I integrated the CKeditor correctly(by the help of the installation guide). My site is connected to the Access Database file. I'm trying to get the writed text into the CKeditor and send it to my database. But it seems like '<p>' in my database file. I can't solve this problem about a week.

P.S. I did not make any changes on webconfig file.

Attachments (1)

P.JPG (26.0 KB) - added by zoomgrange 13 years ago.
Error type

Download all attachments as: .zip

Change History (13)

comment:1 Changed 13 years ago by Jakub Ś

Cc: CKeditor Database Error removed
Component: GeneralServer : ASP.Net
Status: newpending

What do you mean by:

But it seems like '<p>' in my database file

Do you mean that you can see only <p> tag and nothing else?

It looks more like you have used wrong field to store a value in your DB or perhaps wrong method/function to write this data into this filed.

What sort of field have you used to store this text taken from ckeditor? Have you tried perhaps writing fixed strings to your DB to see if writing works at all?

Changed 13 years ago by zoomgrange

Attachment: P.JPG added

Error type

comment:2 Changed 13 years ago by zoomgrange

I have added a screenshot for you. When i am trying to do it with textbox it's working. But if i try to use CKeditor, it fails.

comment:3 Changed 13 years ago by Jakub Ś

I see that you are using getHtml() method of CKEditor. If you look at CKEditor source view you will see that HTML code is formatted like this:

<p>
	This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>

It simply means that it is in more than one line.

The last time I was dealing with access was in high school so I may be mistaken but could you check if you are able to save multi-line text (not one-line like you did) from ordinary text-box.

If you won't be able that ckeditor is not to blame and you should google for the solution on how to save multi-line text in access.

Waiting for comments about results of your tests.

comment:4 Changed 13 years ago by zoomgrange

I checked it and yes i can save. I turned my CKeditor's type to single line text but it's still seems like <p>. To make a control i printed out to my screen CKEditor's text. It works perfectly.

Should i make any changes at the config file after adding CKeditor into my project? I did not change anything.

  • I'm new at the ASP.NET, so i'm trying to learn sth new:)

comment:5 Changed 13 years ago by Jakub Ś

It's hard to believe that CKEditor has something to do with it.

Could I ask you for one more thing? Could you debug the whole writing process?

If possible see what getHtml() is returning, look at variable that is holding HTML form CKEditor and at the end look what is passed to your "write in DB method".

Do these values have only <p> or something more? If something more than the problem is not on CKEditor side.

Last edited 13 years ago by Jakub Ś (previous) (diff)

comment:6 Changed 13 years ago by zoomgrange

Sorry but i do not understand what you mean, and couldn't do it:s

comment:7 Changed 13 years ago by Jakub Ś

You run you application in debug mode, put a break point in certain part od code, the execution of your application stops at this point and you can see what values variables are holding.

If you don't know how to use debug mode, You can also print values of variables to console - you should use something like Console.WriteLine()

comment:8 Changed 13 years ago by zoomgrange

It was hard but i find it:) i guess it's what you wanted to know. And there is not only <p> :S so you think my problem is not causing by CKeditor.. So what?

comment:9 Changed 13 years ago by Jakub Ś

Resolution: invalid
Status: pendingclosed

You should google for the solution on how to save multi-line text in access DB.

Another option is (right before saving) to go through text and remove all the line breaks/newline characters. That way you will save your text as one line.

Any way saving text to DB in not something CKEditor staff is responsible for, so I have to close this ticket as invalid.

comment:10 Changed 13 years ago by zoomgrange

I can save multiline texts to DB. Only problem is CKeditor..

Whatever thank you for your patient, all answers...

comment:11 Changed 13 years ago by Jakub Ś

I think I shouldn't have asked if you can save multiline text taken from textarea or other similar feature. Instead I should have ask you to see if you can save multiline and perhaps formatted text from MS WORD or other rich-text editor.

What I mean is that text taken from CKEditor and text-area may look the same but the characters used to break lines may be different and MS ACCESS may not respect those from CKEditor (as well as other rich-text editors).

If text passed to your writing methods is complete that there is something wrong in your code or there is a problem in DB. To exclude the second possibility you can try to use different DB and see if problem occurs there.

comment:12 Changed 13 years ago by Alfonso Martínez de Lizarrondo

In Access you can expand the height of the rows resizing the grabber between rows at the "1, 2, 3, ..." column, that way you can really verify if the text has been saved correctly or not.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy