Link to home
Start Free TrialLog in
Avatar of slegy
slegy

asked on

Storing/Retrieving Text & Images Using CKEditor

I'm trying to switch some of our webpages from using TinyMCE to CKEditor. Installation is very simple and straightforward. The problem is that text and images need to be stored in an Access database. Storing works as it should, but when retrieved the content is unformatted and displays all the HTML tags (whereas TinyMCE displayed with all the formatting). Is it there a solution to retrieving the data and retaining formatting when using CKEditor?
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Is it just images?  Did you actually upload images as a blob or links to the images?
How is the data actually saved in the db now?
you need to use Server.HTMLEncode when saving and Server.HTMLDecode when displaying the data.

more info on these 2 functions
http://www.aspnut.com/reference/encoding.asp
Avatar of slegy
slegy

ASKER

I'm using Dreamweaver. The text + optional image(s) are stored in an Access table in a memo field. I've just run a couple of tests. Data entered through CKEditor and stored retrieve in TinyMCE like:
* Venue: The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada.  Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.  The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house.  Click on link to Buffalo Canoe Club Website
Buffalo Canoe Club displays as a blue link

In CKEditor same information displays as:
<p>&nbsp;</p><p><br> <br></p><p>&nbsp;</p><p><br> <br><br></p><ul style="list-style-type: circle;" data-mce-style="list-style-type: circle;"><ul style="list-style-type: circle;" data-mce-style="list-style-type: circle;"><li><strong><em>Venue:</em></strong>&nbsp; The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada.&nbsp; <strong><em>Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.</em></strong>&nbsp; The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball,..

Data was copied from a Word document, but It did not work even if I key the info in directly.
I am confused.

If you are using tiny or ck to enter content, then dreamweaver does not come into play at all except for adding t he code.  

If you are seeing html code where ck is supposed to be, I wonder if the editor is instantiated.   Can you post a link to your page.  If it is a log in, then just make a simple sample page.

Another issue you are going to run into is pasting from msword.  Make sure you use the past from word function and even better, paste as text.   If you don't have either of these buttons added, you really should.  Pasting from ms word can give you some nasty results.

BigMonty, there is not a Server.HTMLDecode in classic asp unless you make your own function.  And there shouldn't be a need for it.
>If you are using tiny or ck to enter content, then dreamweaver does not come into play at all except for adding t he code.

I meant to add the code to use ck or tiny in  your page.   I hope that makes more sense.
my wording was off, I meant to try using the decode function from that link...

ckEditor is finicky, I've read a few examples where encoding and decoding helped display html
I use both CK and Tiny, I don't have a preference. They both work fine.   The biggest thing is pasting from word or any html source like copy / paste from another website.  

In any case, if the wysiwyg is displaying html tags, it is most likely a set up thing having to with js.
Avatar of slegy

ASKER

I created a test event using CKEditor. Here is a link to a test update page, which does display the formatted data: http://www.lightningclass.org/racing/calendar/eventUpdate2.asp?ID=801 (CKEditor seems inclined to add additional carriage returns)

The purpose of the entry/update form is to provide details and images about the event for display on an event detail page. Here is how the page is set up (The comments field should display what is entered thro CK):
User generated image
Here is the link to the output using CK:
http://www.lightningclass.org/racing/calendar/eventDetail.asp?ID=801 (This has worked beautifully for the last 5 years with Tiny).

Guess I'm really missing something.
can you provide the code you use to save the data from the editor?
The first link requires log in.  

What I would like to see is not the asp code you are using to save, but the actual page that you enter data.  I think this is just a matter of CK editor set up to convert html because the output is actually, "&lt;p&gt;&lt;img src="data" if you view the source.    

It could very well be the asp code and I wouldn't rule that out.  But if all you did was change the editor, I suspect it is the js/qjuery code that is initiating the CK set up.
This may be one reason and something I would look for http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-entities
Avatar of slegy

ASKER

classification              = ProtectSQL(trim(Request.Form("classification")))
eventTitle                  = ProtectSQL(trim(Request.Form("eventTitle")))
eventTitle2                 = ProtectSQL(trim(Request.Form("eventTitle2")))
startMonth                  = ProtectSQL(trim(Request.Form("startMonth")))
startDay                    = ProtectSQL(trim(Request.Form("startDay")))
startYear                   = ProtectSQL(trim(Request.Form("startYear")))
endMonth                    = ProtectSQL(trim(Request.Form("endMonth")))
endDay                      = ProtectSQL(trim(Request.Form("endDay")))
endYear                     = ProtectSQL(trim(Request.Form("endYear")))
host                        = ProtectSQL(trim(Request.Form("host")))
district                    = ProtectSQL(trim(Request.Form("district")))
fleet                       = ProtectSQL(trim(Request.Form("fleet")))
city                        = ProtectSQL(trim(Request.Form("city")))
stateProvince               = ProtectSQL(trim(Request.Form("stateProvince")))
country                     = ProtectSQL(trim(Request.Form("country")))
contact                     = ProtectSQL(trim(Request.Form("contact")))
eddress                     = ProtectSQL(trim(Request.Form("eddress")))
phone                       = ProtectSQL(trim(Request.Form("phone")))
eddress2                    = ProtectSQL(trim(Request.Form("eddress2")))
website                     = ProtectSQL(trim(Request.Form("website")))
nor                         = ProtectSQL(trim(Request("nor")))
sailingInstructions         = ProtectSQL(trim(Request("sailingInstructions")))
entryForm                   = ProtectSQL(trim(Request("entryForm")))
eventFlyer                  = ProtectSQL(trim(Request("eventFlyer")))
regattamap                  = ProtectSQL(trim(Request("regattaMap")))
results                     = ProtectSQL(trim(Request("results")))
whosComing                  = ProtectSQL(trim(Request("whosComing")))
needAvail                   = ProtectSQL(trim(Request("needAvail")))
comments                    = ProtectSQL(trim(Request.Form("comments")))
ID                          = ProtectSQL(trim(Request.Form("MM_recordId")))

Open in new window


Add code:
		' execute the insert
			Dim MM_editCmd
		
			Set MM_editCmd = Server.CreateObject ("ADODB.Command")
			MM_editCmd.ActiveConnection = MM_eventCalendar_STRING
			MM_editCmd.CommandText = "INSERT INTO eventCalendar (classification, eventTitle, [eventTitle2], startMonth, startDay, startYear, endMonth, endDay, endYear, [host], district, fleet, city, stateProvince, country, contact, eddress, phone, eddress2, website, comments) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" 
			MM_editCmd.Prepared = true
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 30, classification) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 42, eventTitle) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 100, eventTitle2) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 2, startMonth) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 2, startDay) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 4, startYear) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 2, endMonth) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 202, 1, 2, endDay) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 202, 1, 4, endYear) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 202, 1, 100, host) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 202, 1, 50, saveDistrict) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param12", 5, 1, -1, saveFleet) ' adDouble
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 202, 1, 28, saveCity) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param14", 202, 1, 30, saveState) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param15", 202, 1, 36, country) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param16", 202, 1, 50, contact) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param17", 202, 1, 100, eddress) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param18", 202, 1, 25, phone) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param19", 202, 1, 100, eddress2) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param20", 202, 1, 100, website) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param21", 203, 1, 1073741823, comments) ' adLongVarWChar
			MM_editCmd.Execute
			MM_editCmd.ActiveConnection.Close

Open in new window


Update code:
		' execute the update
			Dim MM_editCmd
			Dim MM_editAction
			MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
			If (ID <> "") Then
			  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(ID)
			End If
		
			Set MM_editCmd = Server.CreateObject ("ADODB.Command")
			MM_editCmd.ActiveConnection = MM_eventCalendar_STRING
			MM_editCmd.CommandText = "UPDATE eventCalendar SET classification = ?, eventTitle = ?, [eventTitle2] = ?, startMonth = ?, startDay = ?, startYear = ?, endMonth = ?, endDay = ?, endYear = ?, [host] = ?, district = ?, fleet = ?, city = ?, stateProvince = ?, country = ?, contact = ?, eddress = ?, phone = ?, eddress2 = ?, website = ?, nor = ?, sailingInstructions = ?, entryForm = ?, eventFlyer = ?, map = ?, results = ?, whosComing = ?, needAvail = ?, comments = ? WHERE ID = ?" 
			MM_editCmd.Prepared = true
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1",  202, 1, 30, classification) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2",  202, 1, 42, eventTitle) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3",  202, 1, 100, eventTitle2) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4",  202, 1, 2, startMonth) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5",  202, 1, 2, startDay) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6",  202, 1, 4, startYear) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7",  202, 1, 2, endMonth) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8",  202, 1, 2, endDay) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9",  202, 1, 4, endYear) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 202, 1, 100, host) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 202, 1, 50, saveDistrict) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param12", 5, 1, -1, saveFleet) ' adDouble
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 202, 1, 28, saveCity) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param14", 202, 1, 30, saveState) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param15", 202, 1, 36, country) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param16", 202, 1, 50, contact) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param17", 202, 1, 100, eddress) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param18", 202, 1, 25, phone) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param19", 202, 1, 100, eddress2) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param20", 202, 1, 100, website) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param21", 202, 1, 200, nor) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param22", 202, 1, 200, sailingInstructions) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param23", 202, 1, 200, entryForm) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param24", 202, 1, 200, eventFlyer) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param25", 202, 1, 200, regattaMap) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param26", 202, 1, 200, results) ' adVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param27", 5, 1, -1, whosComing) ' adDouble
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param28", 5, 1, -1, needAvail) ' adDouble
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param29", 203, 1, 1073741823, comments) ' adLongVarWChar
			MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param30", 5, 1, -1, ID) ' adDouble
			MM_editCmd.Execute
			MM_editCmd.ActiveConnection.Close

Open in new window

It does not look like your asp code is doing anything as I expected.  

What about the the page where the wysiwyg is set up.  Can you make a quick sample page by saving as sample.asp.  Then just take out any log in for the page or of the data that is sent via asp and let's look at the the wysiwyg.  

Change the form to output to another page that simply has

<%
response.write request.form
%>
Avatar of slegy

ASKER

Sorry - I removed the login requirement.
I did a test post of your form and this is what I saw

The data
<p> this is a test </p><img src="http://someimage.com/img.jpg"><div class="nothing">hello</div>

Open in new window

The response.write request.form
classification=Open+Regatta&eventTitle=Test+Event&eventTitle2=&startMonth=01&startDay=2&startYear=2014&endMonth=01&endDay=3&endYear=2014&host=BCC&district=Lake+Erie&fleet=12&city=&stateProvince=Select+a+State&country=United+States&contact=David+Starck&eddress=d%40aol.com&phone=222-333-4444&eddress2=&website=&comments=%3Cp%3Ethis+is+a+test%3C%2Fp%3E%0D%0A%0D%0A%3Cp%3E%3Cimg+src%3D%22http%3A%2F%2Fsomeimage.com%2Fimg.jpg%22+%2F%3E%3C%2Fp%3E%0D%0A%0D%0A%3Cdiv+class%3D%22nothing%22%3Ehello%3C%2Fdiv%3E%0D%0A&submit=Submit&MM_recordId=801

Open in new window


This shows that the js is converting the html.
Avatar of slegy

ASKER

Thank you so much. I have to give up for the day and will have limited time over the next couple days.

For my last test, I entered the first paragraph of the posting I have been testing with, pasting from Word:

¿      Venue:  The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada.  Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.  The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house.  Click on link to Buffalo Canoe Club Website

The response.write request form:

comments=%3Cul+style%3D%22list-style-type%3Acircle%22%3E%0D%0A%09%3Cli%3E%3Cstrong%3E%3Cem%3EVenue%3A%3C%2Fem%3E%3C%2Fstrong%3E%26nbsp%3B+The+Buffalo+Canoe+Club+%28BCC%29+is+located+in+Crystal+Beach%2C+Ontario%2C+Canada%26mdash%3B25+kilometers+west+of+Buffalo%2C+New+York%2C+USA+and+150+kilometers+south+of+Toronto%2C+Ontario%2C+Canada.%26nbsp%3B+%3Cstrong%3E%3Cem%3ENot+only+is+the+Buffalo+Canoe+Club+a+fantastic+place+to+sail%2C+it+is+also+a+great+place+to+take+a+family+vacation.%3C%2Fem%3E%3C%2Fstrong%3E%26nbsp%3B+The+clubhouse+is+located+on+the+sandy+shores+of+Lake+Erie+with+facilities+that+include%3A+2+mile+white+sand+beach%2C+warm+and+shallow+waters+off+the+beach%2C+swimming+docks%2C+soccer+and+baseball+fields%2C+tennis+courts%2C+beach+volleyball%2C+playground%2C+snack+bar%2C+dining+room%2C+bar%2C+showers%2Fchanging+rooms+and+spectacular+boat+house.%3Cstrong%3E+%26nbsp%3B%3C%2Fstrong%3EClick+on+link+to+%3Ca+href%3D%22http%3A%2F%2Fwww.buffalocanoeclub.com%2F%22%3E%3Cstrong%3EBuffalo+Canoe+Club+Website%3C%2Fstrong%3E%3C%2Fa%3E%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A&test=Submit

Is this what it's supposed to look like. Not sure what that last part is: &test=Submit

If so, is something happening when it gets stored to the database?
Sledgy, I had to take a break.

The response.write is good and that is what it is supposed to do.  BigMonty mentioned urldecode, but CK does that for you.

As example, the code below will post to itself and you can see it works fine.  I just realized you are using xhtml.  I think the default way you have it set up will use your page settings and I can see your saved content is in xhmtl.  If not, then we have to use one of the ckeditor plugins.

What I think may be the issue is your base64 image.  Try taking that out and see what happens.  I have never tested the editors with as much content as you have. But your current sample has 225,000 lines of code.  99% of which are paragraphs with non breaking spaces.   There may be an issue in  processing.  

Please test out the simple code below to see what I am talking about.  On your own page, try taking out the 220,000 lines of html you don't need and see if that works and then try taking out the base64 image.   I seem to remember using base64 in this without an issue.  But I was also not using xhtml and I don't know if that has something to do with it.  

We will wait to hear back from you!

<%



x="<br />&lt;p&gt;&nbsp;stuff&lt;/p&gt;<br />"
%>

<!DOCTYPE html>
<html>
    <head>

        <meta charset="utf-8">
        <title>CKEditor</title>
        
         <script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
        <script src="//cdn.ckeditor.com/4.4.1/standard/ckeditor.js"></script>
    </head>
    <body>
    	<form method="post" action="ck.asp">
        <textarea name="editor1"><%=x&"<hr>"&request.form("editor1")%></textarea>
        <script>
            CKEDITOR.replace( 'editor1' );
            CKEDITOR.on( 'instanceReady', function( ev ) {
    ev.editor.dataProcessor.writer.selfClosingEnd = '>';
});
        </script>
        <button type="submit">go</button>
    </form>
    </body>
</html>

Open in new window

Avatar of slegy

ASKER

Thank you again. I had a minute to look at this today, and there has been some progress. I first ran my test module with your above code. I hate doing this, but here is what gets written out (I believe this is what we were seeing yesterday):

editor1=%3Cul+style%3D%22list-style-type%3Acircle%22%3E%0D%0A%09%3Cli%3E%3Cstrong%3E%3Cem%3EVenue%3A%3C%2Fem%3E%3C%2Fstrong%3E%26nbsp%3B+The+Buffalo+Canoe+Club+%28BCC%29+is+located+in+Crystal+Beach%2C+Ontario%2C+Canada%26mdash%3B25+kilometers+west+of+Buffalo%2C+New+York%2C+USA+and+150+kilometers+south+of+Toronto%2C+Ontario%2C+Canada.%26nbsp%3B+%3Cstrong%3E%3Cem%3ENot+only+is+the+Buffalo+Canoe+Club+a+fantastic+place+to+sail%2C+it+is+also+a+great+place+to+take+a+family+vacation.%3C%2Fem%3E%3C%2Fstrong%3E%26nbsp%3B+The+clubhouse+is+located+on+the+sandy+shores+of+Lake+Erie+with+facilities+that+include%3A+2+mile+white+sand+beach%2C+warm+and+shallow+waters+off+the+beach%2C+swimming+docks%2C+soccer+and+baseball+fields%2C+tennis+courts%2C+beach+volleyball%2C+playground%2C+snack+bar%2C+dining+room%2C+bar%2C+showers%2Fchanging+rooms+and+spectacular+boat+house.%3Cstrong%3E+%26nbsp%3B%3C%2Fstrong%3EClick+on+link+to+%3Ca+href%3D%22http%3A%2F%2Fwww.buffalocanoeclub.com%2F%22%3E%3Cstrong%3EBuffalo+Canoe+Club+Website%3C%2Fstrong%3E%3C%2Fa%3E%3C%2Fli%3E%0D%0A%09%3Cli%3E%3Cstrong%3E%3Cem%3EWorld+class+sight-seeing+destinations+close+to+the+BCC%3A%3C%2Fem%3E%3C%2Fstrong%3E%26nbsp%3B+Niagara+Falls+%2825+minutes%29%2C+Niagara+Gorge+%2835+minutes%29%2C+Buffalo+New+York+%2820+minutes%29%2C+Niagara-on-the+Lake+%26amp%3B+Niagara+Wine+Region+%2835+minutes%29%2C+Toronto+%281+hour+30+minutes%29+Port+Colborne+%26amp%3B+Welland+Canal+%2820+minutes%29+Fort+Erie+%2815+minutes%29%2C+Fort+George+%2845+minutes%29.%26nbsp%3B+Click+here+for+more+detail+on+many+more+tourist+destinations+within+30+minutes+of+the+BCC%3A+%3Ca+href%3D%22http%3A%2F%2Fwww.ontariotravel.net%2FTCISSegmentsWeb%2Finfo%2Font2%2FCityExcite%2FCENiagara%2F%3Flanguage%3Den%22%3E%3Cstrong%3ENiagara+Region+Tourism%3C%2Fstrong%3E%3C%2Fa%3E%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A%0D%0A%3Cp%3E%26nbsp%3B%3C%2Fp%3E%0D%0A%0D%0A%3Cp%3E%3Cstrong%3EToronto%2C+Ontario+%2890+minutes+from+the+Buffalo+Canoe+Club%29%3C%2Fstrong%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2Fp%3E%0D%0A%0D%0A%3Cp%3E%26nbsp%3B%3C%2Fp%3E%0D%0A%0D%0A%3Cul+style%3D%22list-style-type%3Acircle%22%3E%0D%0A%09%3Cli%3E%3Cstrong%3E%3Cem%3ERace+course%3A%3C%2Fem%3E%3C%2Fstrong%3E+The+race+course+will+be+approximately+2+kilometers+south+of+the+BCC+on+the+open+and+fresh+waters+of+Lake+Erie%26mdash%3Bone+of+the+best+places+to+sail+Lightnings+in+the+World%21%26nbsp%3B+Click+on+the+following+link+for+an+aerial+view+of+the+BCC+and+the+racing+area%3A+%3Ca+href%3D%22https%3A%2F%2Fmaps.google.ca%2Fmaps%3Fhl%3Den%26amp%3Bie%3DUTF-8%26amp%3Bq%3Dbuffalo%2Bcanoe%2Bclub%26amp%3Bfb%3D1%26amp%3Bgl%3Dca%26amp%3Bhq%3Dbuffalo%2Bcanoe%2Bclub%26amp%3Bcid%3D0%2C0%2C12277759267829115454%26amp%3Bei%3DSi0jUtn2ObGy4AOkuIFI%26amp%3Bsqi%3D2%26amp%3Bved%3D0CIwBEPwSMA0%22%3E%3Cstrong%3EBuffalo+Canoe+Club+on+Google+Maps%3C%2Fstrong%3E%3C%2Fa%3E%3C%2Fli%3E%0D%0A%09%3Cli%3E%3Cstrong%3E%3Cem%3EBoats%3A%3C%2Fem%3E%3C%2Fstrong%3E%26nbsp%3B+Boats+will+be+provided+by+members+and+friends+of+the+BCC.%26nbsp%3B+Competitors+only+need+to+bring+their+sails+and+life+jackets.+24+boats+will+compete+in+the+2014+Championship+%26mdash%3B+4+more+boats+than+the+typical+Youth+Worlds+due+to+the+availability+of+great+boats+at+the+BCC.%3C%2Fli%3E%0D%0A%09%3Cli%3E%3Cstrong%3E%3Cem%3EEverything+is+included+in+the+entry+fee+%28%24375+U.S.%29%3A+%3C%2Fem%3E%3C%2Fstrong%3E%26nbsp%3BAll+competitors+will+be+billeted+with+host+families+within+2+kilometers+of+the+BCC.%26nbsp%3B+All+meals+and+social+activities+are+also+included.%3C%2Fli%3E%0D%0A%09%3Cli%3E%3Cstrong%3E%3Cem%3ETransportation%3C%2Fem%3E%3C%2Fstrong%3E%3Cstrong%3E%3Cem%3E+to+the+BCC%3A+%3C%2Fem%3E%3C%2Fstrong%3EThe+BCC+is+located+in+close+proximity+to+two+international+airports%3A+Toronto+Pearson+International+Airport+%28YYZ%29+is+a+90+minute+drive+from+the+BCC.%26nbsp%3B+Toronto+offers+many+daily%2C+direct+flights+from+most+South+American+and+European+cities.%26nbsp%3B+Buffalo%2FNiagara+International+Airport+%28BUF%29+is+a+45+minute+drive+from+the+BCC+and+is+serviced+by+all+of+the+major+U.S.+airlines.%26nbsp%3B+International+competitors+not+wishing+to+have+both+a+US+and+Canadian+visa+should+consider+flying+into+Toronto.%26nbsp%3B+Rental+cars+and+shuttle+services+can+be+hired+from+either+airport.%3C%2Fli%3E%0D%0A%09%3Cli%3E%3Cstrong%3E%3Cem%3ENotice+of+Race%3A%3C%2Fem%3E%3C%2Fstrong%3E%26nbsp%3B+Please+click+here+for+the+%3Ca+href%3D%22http%3A%2F%2Fwww.lightningclass.org%2Fracing%2Fcalendar%2Fnors%2F2014%2Fyouthworldchampionship.pdf%22%3E%3Cstrong%3ENotice+of+Race%3C%2Fstrong%3E%3C%2Fa%3E+which+provides+more+detail+on+the+Championship.%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A%0D%0A%3Cp%3EIf+you+have+any+questions+on+the+Championship%2C+please+email+the+following+regatta+contacts%3A%3C%2Fp%3E%0D%0A%0D%0A%3Cul%3E%0D%0A%09%3Cli%3EDavid+Starck+%3Ca+href%3D%22mailto%3Adavestarck%40icloud.com%22%3Edavestarck%40icloud.com%3C%2Fa%3E+ILCA+V.P.+in+charge+of+World+Championships%3C%2Fli%3E%0D%0A%09%3Cli%3EIan+Jones+%3Ca+href%3D%22mailto%3Aiwjones42%40gmail.com%22%3Eiwjones42%40gmail.com%3C%2Fa%3E+ILCA+Youth+World+Regatta+Chairman%26nbsp%3B%3C%2Fli%3E%0D%0A%09%3Cli%3ELaura+Jeffers%2C+Executive+Secretary%2C+ILCA+Class+Office+%3Ca+href%3D%22mailto%3Aoffice%40lightningclass.org%22%3Eoffice%40lightningclass.org%3C%2Fa%3E%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A%0D%0A%3Chr%3E

 I then changed the code in the eventAdd.asp and eventUpdate.asp to your code. I'm not sure where you are seeing the two hundred thousand lines of content. There isn't nearly that much.

Here is the full text:

¿      Venue:  The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada.  Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.  The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house.  Click on link to Buffalo Canoe Club Website
¿      World class sight-seeing destinations close to the BCC:  Niagara Falls (25 minutes), Niagara Gorge (35 minutes), Buffalo New York (20 minutes), Niagara-on-the Lake & Niagara Wine Region (35 minutes), Toronto (1 hour 30 minutes) Port Colborne & Welland Canal (20 minutes) Fort Erie (15 minutes), Fort George (45 minutes).  Click here for more detail on many more tourist destinations within 30 minutes of the BCC: Niagara Region Tourism

Toronto, Ontario (90 minutes from the Buffalo Canoe Club)    

¿      Race course: The race course will be approximately 2 kilometers south of the BCC on the open and fresh waters of Lake Erie—one of the best places to sail Lightnings in the World!  Click on the following link for an aerial view of the BCC and the racing area: Buffalo Canoe Club on Google Maps
¿      Boats:  Boats will be provided by members and friends of the BCC.  Competitors only need to bring their sails and life jackets. 24 boats will compete in the 2014 Championship — 4 more boats than the typical Youth Worlds due to the availability of great boats at the BCC.
¿      Everything is included in the entry fee ($375 U.S.):  All competitors will be billeted with host families within 2 kilometers of the BCC.  All meals and social activities are also included.
¿      Transportation to the BCC: The BCC is located in close proximity to two international airports: Toronto Pearson International Airport (YYZ) is a 90 minute drive from the BCC.  Toronto offers many daily, direct flights from most South American and European cities.  Buffalo/Niagara International Airport (BUF) is a 45 minute drive from the BCC and is serviced by all of the major U.S. airlines.  International competitors not wishing to have both a US and Canadian visa should consider flying into Toronto.  Rental cars and shuttle services can be hired from either airport.
¿      Notice of Race:  Please click here for the Notice of Race which provides more detail on the Championship.
If you have any questions on the Championship, please email the following regatta contacts:
•      David Starck davestarck@icloud.com ILCA V.P. in charge of World Championships
•      Ian Jones iwjones42@gmail.com ILCA Youth World Regatta Chairman  
•      Laura Jeffers, Executive Secretary, ILCA Class Office office@lightningclass.org

After the form is submitted, I went to eventDetail.asp. Here is what displays:
<ul style="list-style-type:circle">
<li><strong><em>Venue:</em></strong>  The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada.  <strong><em>Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.</em></strong>  The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house.<strong>  </strong>Click on link to <a href="http://www.buffalocanoeclub.com/"><strong>Buffalo Canoe Club Website</strong></a></li>
<li><strong><em>World class sight-seeing destinations close to the BCC:</em></strong>  Niagara Falls (25 minutes), Niagara Gorge (35 minutes), Buffalo New York (20 minutes), Niagara-on-the Lake & Niagara Wine Region (35 minutes), Toronto (1 hour 30 minutes) Port Colborne & Welland Canal (20 minutes) Fort Erie (15 minutes), Fort George (45 minutes).  Click here for more detail on many more tourist destinations within 30 minutes of the BCC: <a href="http://www.ontariotravel.net/TCISSegmentsWeb/info/ont2/CityExcite/CENiagara/?language=en"><strong>Niagara Region Tourism</strong></a></li>
</ul>

<p> </p>

<p><strong>Toronto, Ontario (90 minutes from the Buffalo Canoe Club)</strong>    </p>

<p> </p>

<ul style="list-style-type:circle">
<li><strong><em>Race course:</em></strong> The race course will be approximately 2 kilometers south of the BCC on the open and fresh waters of Lake Erie—one of the best places to sail Lightnings in the World!  Click on the following link for an aerial view of the BCC and the racing area: <a href="https://maps.google.ca/maps?hl=en&ie=UTF-8&q=buffalo+canoe+club&fb=1&gl=ca&hq=buffalo+canoe+club&cid=0,0,12277759267829115454&ei=Si0jUtn2ObGy4AOkuIFI&sqi=2&ved=0CIwBEPwSMA0"><strong>Buffalo Canoe Club on Google Maps</strong></a></li>
<li><strong><em>Boats:</em></strong>  Boats will be provided by members and friends of the BCC.  Competitors only need to bring their sails and life jackets. 24 boats will compete in the 2014 Championship — 4 more boats than the typical Youth Worlds due to the availability of great boats at the BCC.</li>
<li><strong><em>Everything is included in the entry fee ($375 U.S.): </em></strong> All competitors will be billeted with host families within 2 kilometers of the BCC.  All meals and social activities are also included.</li>
<li><strong><em>Transportation</em></strong><strong><em> to the BCC: </em></strong>The BCC is located in close proximity to two international airports: Toronto Pearson International Airport (YYZ) is a 90 minute drive from the BCC.  Toronto offers many daily, direct flights from most South American and European cities.  Buffalo/Niagara International Airport (BUF) is a 45 minute drive from the BCC and is serviced by all of the major U.S. airlines.  International competitors not wishing to have both a US and Canadian visa should consider flying into Toronto.  Rental cars and shuttle services can be hired from either airport.</li>
<li><strong><em>Notice of Race:</em></strong>  Please click here for the <a href="http://www.lightningclass.org/racing/calendar/nors/2014/youthworldchampionship.pdf"><strong>Notice of Race</strong></a> which provides more detail on the Championship.</li>
</ul>

<p>If you have any questions on the Championship, please email the following regatta contacts:</p>

<ul>
<li>David Starck <a href="mailto:davestarck@icloud.com">davestarck@icloud.com</a> ILCA V.P. in charge of World Championships</li>
<li>Ian Jones <a href="mailto:iwjones42@gmail.com">iwjones42@gmail.com</a> ILCA Youth World Regatta Chairman </li>
<li>Laura Jeffers, Executive Secretary, ILCA Class Office <a href="mailto:office@lightningclass.org">office@lightningclass.org</a></li>
</ul>

I then opened the event in eventUpdate.asp where it displays formatted in the CK window. It's apparent that multiple <p> </p> have been added:
<ul style="list-style-type:circle"><br>
<li><strong><em>Venue:</em></strong>  The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada.  <strong><em>Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.</em></strong>  The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house.<strong>  </strong>Click on link to <a href="http://www.buffalocanoeclub.com/"><strong>Buffalo Canoe Club Website</strong></a></li>
<br>
<li><strong><em>World class sight-seeing destinations close to the BCC:</em></strong>  Niagara Falls (25 minutes), Niagara Gorge (35 minutes), Buffalo New York (20 minutes), Niagara-on-the Lake & Niagara Wine Region (35 minutes), Toronto (1 hour 30 minutes) Port Colborne & Welland Canal (20 minutes) Fort Erie (15 minutes), Fort George (45 minutes).  Click here for more detail on many more tourist destinations within 30 minutes of the BCC: <a href="http://www.ontariotravel.net/TCISSegmentsWeb/info/ont2/CityExcite/CENiagara/?language=en"><strong>Niagara Region Tourism</strong></a></li>
<br>
<br>
 
</ul>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p><strong>Toronto, Ontario (90 minutes from the Buffalo Canoe Club)</strong>    </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<ul style="list-style-type:circle"><br>
<li><strong><em>Race course:</em></strong> The race course will be approximately 2 kilometers south of the BCC on the open and fresh waters of Lake Erie—one of the best places to sail Lightnings in the World!  Click on the following link for an aerial view of the BCC and the racing area: <a href="https://maps.google.ca/maps?hl=en&ie=UTF-8&q=buffalo+canoe+club&fb=1&gl=ca&hq=buffalo+canoe+club&cid=0,0,12277759267829115454&ei=Si0jUtn2ObGy4AOkuIFI&sqi=2&ved=0CIwBEPwSMA0"><strong>Buffalo Canoe Club on Google Maps</strong></a></li>
<br>
<li><strong><em>Boats:</em></strong>  Boats will be provided by members and friends of the BCC.  Competitors only need to bring their sails and life jackets. 24 boats will compete in the 2014 Championship — 4 more boats than the typical Youth Worlds due to the availability of great boats at the BCC.</li>
<br>
<li><strong><em>Everything is included in the entry fee ($375 U.S.): </em></strong> All competitors will be billeted with host families within 2 kilometers of the BCC.  All meals and social activities are also included.</li>
<br>
<li><strong><em>Transportation</em></strong><strong><em> to the BCC: </em></strong>The BCC is located in close proximity to two international airports: Toronto Pearson International Airport (YYZ) is a 90 minute drive from the BCC.  Toronto offers many daily, direct flights from most South American and European cities.  Buffalo/Niagara International Airport (BUF) is a 45 minute drive from the BCC and is serviced by all of the major U.S. airlines.  International competitors not wishing to have both a US and Canadian visa should consider flying into Toronto.  Rental cars and shuttle services can be hired from either airport.</li>
<br>
<li><strong><em>Notice of Race:</em></strong>  Please click here for the <a href="http://www.lightningclass.org/racing/calendar/nors/2014/youthworldchampionship.pdf"><strong>Notice of Race</strong></a> which provides more detail on the Championship.</li>
<br>
<br>
 
</ul>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p>If you have any questions on the Championship, please email the following regatta contacts:</p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<ul><br>
<li>David Starck <a href="mailto:davestarck@icloud.com">davestarck@icloud.com</a> ILCA V.P. in charge of World Championships</li>
<br>
<li>Ian Jones <a href="mailto:iwjones42@gmail.com">iwjones42@gmail.com</a> ILCA Youth World Regatta Chairman </li>
<br>
<li>Laura Jeffers, Executive Secretary, ILCA Class Office <a href="mailto:office@lightningclass.org">office@lightningclass.org</a></li>
<br>
<br>
 
</ul>

<p> </p>

<p> </p>

I'm quite sure that I got these same results yesterday using the full version I downloaded. Could the propogated  paragraph tags be a problem with Access? And the real question is, how to display the contents of the data entered thru CK on another webpage. Regrettably, I'm tied up the rest of today and most of tomorrow, but I will continue researching this.
Essentially you have

html = "<p>stuff here</p>One%20Space%20Between%20Each%20word"

Except it is in a recordset instead of a variable.

You should be able to response.write(html) or response.write (rs("field")).

The code you have works when tried it without the image. I will try it again with. but what I am suggesting is the base64 image may be the culprit.

I am fine with the output because as I said it is doing what it is supposed to be doing.

In your form, if you have below with the default set up it should work. If you are just seeing the html code, try taking out the image.
< textarea id="editor1"><%=rs("field_of_data")%></textarea>

Open in new window

It looks like your old post is gone. But I copied the html from what was there and put it in my text editor and there was something like 200,000+ lines of code pasted.  When I viewed the source on page the code was all on one line but same amount.  

I will try a base64 sample too.
Avatar of slegy

ASKER

I hadn't even thot of base64. Is that because I'm using Photoshop 64-bit? All the testing I did today was without the image. Near the top of this post is the page layout for displaying information about events. It is currently set up as a table. Could that also be part of the problem?
SOLUTION
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is how I posted to my own server
User generated image
Avatar of slegy

ASKER

The images and text appear to be working fine in CK. In your work do you store and retrieve the information from a database? It appears Access does not like what it is getting, and the webpage doesn't like what it is receiving.The method I have been using to display the data from the database must not work with CK-entered data.
I have not used Access in a long time.  But I typically do not store images in a database unless I need them to be encrypted.  I will take base64 code, then encrypt it and store the encrypted code.

For something like you are doing, I will use an images folder with subfolders.    Lets say the wysiwyg is for members.  Then I may have /images/members/ and images/members/small.  Then on upload, take the original image, if it is over a predetermined size shrink it down to something around 400px wide to save in the members folder and 150px wide in the small folder.   I will set up a special folder where all original images get uploaded to and save as is.  That way if the client asks for some special manipulation of the image, I can go to the server on my own and grab the original.  But I wouldn't trust my clients to both optimizing images which is why I shrink them on the server.
>your work do you store and retrieve the information from a database?

Yes, that is primarily what I do.  CMS, CRM, POS, Lead tracking, scheduling, events, ecommerce ... all that.    90% of what I do is with sql server 2012.  A few things on MySql.

I think something else is going on for you.  Did you try a sample page using my code as is except with your db?  Did you try it without the image?   Your sample page is broken now because you must have deleted that post.  But when I copied and pasted the code, there was a lot of code there and it took the wysiwyg a while to load.   That could be an issue.  

I think the only difference may be I was using the CK editor CDN with the default skin.  I looked at your js code and you are on version 4.
Just another fyi, I wouldn't suggest allowing all the plug ins and buttons.  http://ckeditor.com/demo#toolbar and you can individually configure buttons http://docs.ckeditor.com/#!/guide/dev_toolbar
config.toolbarGroups = [
    { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },
    { name: 'editing',     groups: [ 'find', 'selection', 'spellchecker' ] },
    { name: 'links' },
    { name: 'insert' },
    { name: 'forms' },
    { name: 'tools' },
    { name: 'document',    groups: [ 'mode', 'document', 'doctools' ] },
    { name: 'others' },
    '/',
    { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
    { name: 'paragraph',   groups: [ 'list', 'indent', 'blocks', 'align' ] },
    { name: 'styles' },
    { name: 'colors' },
    { name: 'about' }
];

Open in new window


I typically take out things like the format, font, style, size, font color, font background color, anything that allows uploading of media, for sure no flash, take out underline (that should be a function of a link).  Just the basics and only what they need for that page.    If you leave all that junk in, they use it and it makes the page look bad.
Avatar of slegy

ASKER

Back at it this morning. The way this was originally set up was to allow the Class Office to enter additional information to be added to a scheduled event, i.e., picture of the yacht club, burgee. I never do any of that work, so I'm sure none of the images are base64.. Over time, I'm sure some members have added text.

I was wrong about the info not going to the db correctly. I can enter it in the add screen and retrieve it in the update screen. The only problem appears to be the added paragraph tags. All other formatting is good. The second and biggest problem is not being able to display the CK entered data/image on the detail page (eventDetail.ASP). I'd go back to tinyMCE, but it would be so much easier for the Office to be able to use the embed image feature (which I purchased). It doesn't appear that the Moxie File Manager runs under ASP.

I agree about the buttons. Several days ago I tried to remove about half of them. But I also have three extra plugins, and I hadn't sorted out how to modify the base configuration and also add the extra plugins. Will do that today.
Avatar of slegy

ASKER

I know this has been more than stung out (guess that's how we learn). This comes down to two issues:
1.CKEditor inserting unwanted paragraph tags in entered/pasted text.
2. Inability to display formatted data from the Access database field stored from Text/images entered through CKEditor.

Text and images entered and stored from CKEditor is correctly stored in the DB and is retrieved from the DB with formatting in tact except for the numerous paragraph tags added to the content. I spent hours today reading through blogs and documentation about this problem - and it is a huge problem. In some cases people said they'd solved it. I've tried every suggested change to the config file but nothing has worked. How can this be a usable application when it, by design, corrupts the intended format. But since CKEditor has such a broad user base, the solution must have been found . I just can't find it.

As to the display, that can be addressed when/if this problem is solved.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of slegy

ASKER

Your temporary fix works, tho I remain mystified as to why CKEditor works this way. However, after hours of research, I can find no way to display the data from the database. I've only been testing with text, and when retrieved from the database it displays as text with html tags. I'm going to follow up on your suggestion and go back and take a look at TinyMCE. KCFinder looks promising. That you for the suggestions.
Avatar of slegy

ASKER

Well, it's a new world. I implemented TinyMCE 4.1. I entered the Word document I've been testing with. It formatted perfectly. But when I display it in the event detail page, all I get is the text with the html tags. The way it is formatted is different from that output by CKEditor, but I suspect it would format properly in both cases. Appears too that TinyMCE is adding paragraph tags. That is a manageable problem. Now I guess the crux of the problem is how to produce a formatted display of what is stored in the database on a separate webpage. Aren't there thousands of people doing this very same thing?
When you enter the word document, what does that mean?  did you paste text from ms word without "paste from word"?

Can you grab what is in the db or maybe response.write it and view source and copy and paste  source.
Avatar of slegy

ASKER

When testing with this Word doc with Tiny, I was pasting directly (no from Word button). I've tried grabbing the data in the memo field in Access but have not found a way to do it. I could do what you suggest, but I believe I'm seeing the same thing when displaying the contents of the field on the detail page (data retrieved into a table cell).  With old TingMCE it retrieved perfectly formatted.
> But when I display it in the event detail page, all I get is the text with the html tags

Can I view where this page is?

I have a feeling pasting from word is a potential culprit.  The code you send without cleaning it up really messes things up.  I had a client that kept doing this and not using the paste from word and I spent a long time coming up with code to clean up what I could.  But every week it always seemed like something new popped up.   Also back then the paste from word did not work as well as it does today.
Avatar of slegy

ASKER

The text was copied from a Word file and pasted into CKEditor using the "Past from Word" button. Here is what the data looks like just prior to being stored in the database:

<ul style="list-style-type:circle;">
<li><strong><em>Venue:</em></strong>  The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada.  <strong><em>Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.</em></strong>  The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house.<strong>  </strong>Click on link to <a href="http://www.buffalocanoeclub.com/"><strong>Buffalo Canoe Club Website</strong></a></li>
<li><strong><em>World class sight-seeing destinations close to the BCC:</em></strong>  Niagara Falls (25 minutes), Niagara Gorge (35 minutes), Buffalo New York (20 minutes), Niagara-on-the Lake & Niagara Wine Region (35 minutes), Toronto (1 hour 30 minutes) Port Colborne & Welland Canal (20 minutes) Fort Erie (15 minutes), Fort George (45 minutes).  Click here for more detail on many more tourist destinations within 30 minutes of the BCC: <a href="http://www.ontariotravel.net/TCISSegmentsWeb/info/ont2/CityExcite/CENiagara/?language=en"><strong>Niagara Region Tourism</strong></a></li>
</ul>
 <strong>Toronto, Ontario (90 minutes from the Buffalo Canoe Club)</strong>    

<ul style="list-style-type:circle;">
<li><strong><em>Race course:</em></strong> The race course will be approximately 2 kilometers south of the BCC on the open and fresh waters of Lake Erie—one of the best places to sail Lightnings in the World!  Click on the following link for an aerial view of the BCC and the racing area: <a href="https://maps.google.ca/maps?hl=en&ie=UTF-8&q=buffalo+canoe+club&fb=1&gl=ca&hq=buffalo+canoe+club&cid=0,0,12277759267829115454&ei=Si0jUtn2ObGy4AOkuIFI&sqi=2&ved=0CIwBEPwSMA0"><strong>Buffalo Canoe Club on Google Maps</strong></a></li>
<li><strong><em>Boats:</em></strong>  Boats will be provided by members and friends of the BCC.  Competitors only need to bring their sails and life jackets. 24 boats will compete in the 2014 Championship — 4 more boats than the typical Youth Worlds due to the availability of great boats at the BCC.</li>
<li><strong><em>Everything is included in the entry fee ($375 U.S.): </em></strong> All competitors will be billeted with host families within 2 kilometers of the BCC.  All meals and social activities are also included.</li>
<li><strong><em>Transportation</em></strong><strong><em> to the BCC: </em></strong>The BCC is located in close proximity to two international airports: Toronto Pearson International Airport (YYZ) is a 90 minute drive from the BCC.  Toronto offers many daily, direct flights from most South American and European cities.  Buffalo/Niagara International Airport (BUF) is a 45 minute drive from the BCC and is serviced by all of the major U.S. airlines.  International competitors not wishing to have both a US and Canadian visa should consider flying into Toronto.  Rental cars and shuttle services can be hired from either airport.</li>
<li><strong><em>Notice of Race:</em></strong>  Please click here for the <a href="http://www.lightningclass.org/racing/calendar/nors/2014/youthworldchampionship.pdf"><strong>Notice of Race</strong></a> which provides more detail on the Championship.</li>
</ul>
If you have any questions on the Championship, please email the following regatta contacts:

<ul>
<li>David Starck <a href="mailto:davestarck@icloud.com">davestarck@icloud.com</a> ILCA V.P. in charge of World Championships</li>
<li>Ian Jones <a href="mailto:iwjones42@gmail.com">iwjones42@gmail.com</a> ILCA Youth World Regatta Chairman</li>
<li>Laura Jeffers, Executive Secretary, ILCA Class Office <a href="mailto:office@lightningclass.org">office@lightningclass.org</a></li>
</ul>

With CKEditor, here is what the data looks like after it is retrieved from the database and just prior to its being stored back:

<ul style="list-style-type:circle;"><br />
<li><strong><em>Venue:</em></strong>  The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada.  <strong><em>Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.</em></strong>  The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house.<strong>  </strong>Click on link to <a href="http://www.buffalocanoeclub.com/"><strong>Buffalo Canoe Club Website</strong></a></li>
<br />
<li><strong><em>World class sight-seeing destinations close to the BCC:</em></strong>  Niagara Falls (25 minutes), Niagara Gorge (35 minutes), Buffalo New York (20 minutes), Niagara-on-the Lake & Niagara Wine Region (35 minutes), Toronto (1 hour 30 minutes) Port Colborne & Welland Canal (20 minutes) Fort Erie (15 minutes), Fort George (45 minutes).  Click here for more detail on many more tourist destinations within 30 minutes of the BCC: <a href="http://www.ontariotravel.net/TCISSegmentsWeb/info/ont2/CityExcite/CENiagara/?language=en"><strong>Niagara Region Tourism</strong></a></li>
<br />
<br />
 
</ul>
<br />
 <strong>Toronto, Ontario (90 minutes from the Buffalo Canoe Club)</strong>    <br />
 
<ul style="list-style-type:circle;"><br />
<li><strong><em>Race course:</em></strong> The race course will be approximately 2 kilometers south of the BCC on the open and fresh waters of Lake Erie—one of the best places to sail Lightnings in the World!  Click on the following link for an aerial view of the BCC and the racing area: <a href="https://maps.google.ca/maps?hl=en&ie=UTF-8&q=buffalo+canoe+club&fb=1&gl=ca&hq=buffalo+canoe+club&cid=0,0,12277759267829115454&ei=Si0jUtn2ObGy4AOkuIFI&sqi=2&ved=0CIwBEPwSMA0"><strong>Buffalo Canoe Club on Google Maps</strong></a></li>
<br />
<li><strong><em>Boats:</em></strong>  Boats will be provided by members and friends of the BCC.  Competitors only need to bring their sails and life jackets. 24 boats will compete in the 2014 Championship — 4 more boats than the typical Youth Worlds due to the availability of great boats at the BCC.</li>
<br />
<li><strong><em>Everything is included in the entry fee ($375 U.S.): </em></strong> All competitors will be billeted with host families within 2 kilometers of the BCC.  All meals and social activities are also included.</li>
<br />
<li><strong><em>Transportation</em></strong><strong><em> to the BCC: </em></strong>The BCC is located in close proximity to two international airports: Toronto Pearson International Airport (YYZ) is a 90 minute drive from the BCC.  Toronto offers many daily, direct flights from most South American and European cities.  Buffalo/Niagara International Airport (BUF) is a 45 minute drive from the BCC and is serviced by all of the major U.S. airlines.  International competitors not wishing to have both a US and Canadian visa should consider flying into Toronto.  Rental cars and shuttle services can be hired from either airport.</li>
<br />
<li><strong><em>Notice of Race:</em></strong>  Please click here for the <a href="http://www.lightningclass.org/racing/calendar/nors/2014/youthworldchampionship.pdf"><strong>Notice of Race</strong></a> which provides more detail on the Championship.</li>
<br />
<br />
 
</ul>
<br />
If you have any questions on the Championship, please email the following regatta contacts:<br />
 
<ul><br />
<li>David Starck <a href="mailto:davestarck@icloud.com">davestarck@icloud.com</a> ILCA V.P. in charge of World Championships</li>
<br />
<li>Ian Jones <a href="mailto:iwjones42@gmail.com">iwjones42@gmail.com</a> ILCA Youth World Regatta Chairman</li>
<br />
<li>Laura Jeffers, Executive Secretary, ILCA Class Office <a href="mailto:office@lightningclass.org">office@lightningclass.org</a></li>
<br />
<br />
 
Initially, all the <br /> were <p>&nbsp;</p>. After considerable research, I added the following code to the config file:
        
	  config.fillEmptyBlocks = false;	// Prevent filler nodes in all empty blocks.
	  
	  // Prevent filler node only in float cleaners.
	  config.fillEmptyBlocks = function( element )
	  {
		  if ( element.attributes[ 'class' ].indexOf ( 'clear-both' ) != -1 )
			  return false;
	  }
	  
	
	config.autoParagraph = false;
	config.ignoreEmptyParagraph = true;
    config.enterMode = CKEDITOR.ENTER_BR;
    config.allowedContent = true;
    CKEDITOR.dataProcessor = null; 

Open in new window

There is slight improvement, but additional, unwanted <br /> tags are being added throughout the text.

Using TinyMCE, here is what the data looks like just prior to being stored to the database:

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<ul>
<li><strong><em>Venue:</em></strong> The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada. <strong><em>Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.</em></strong> The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house. Click on link to <a href="http://www.buffalocanoeclub.com/"><strong>Buffalo Canoe Club Website</strong></a></li>
<li><strong><em>World class sight-seeing destinations close to the BCC:</em></strong> Niagara Falls (25 minutes), Niagara Gorge (35 minutes), Buffalo New York (20 minutes), Niagara-on-the Lake & Niagara Wine Region (35 minutes), Toronto (1 hour 30 minutes) Port Colborne & Welland Canal (20 minutes) Fort Erie (15 minutes), Fort George (45 minutes). Click here for more detail on many more tourist destinations within 30 minutes of the BCC: <a href="http://www.ontariotravel.net/TCISSegmentsWeb/info/ont2/CityExcite/CENiagara/?language=en"><strong>Niagara Region Tourism</strong></a></li>
</ul>
<p><strong>Toronto, Ontario (90 minutes from the Buffalo Canoe Club)</strong>    </p>
<ul>
<li><strong><em>Race course:</em></strong> The race course will be approximately 2 kilometers south of the BCC on the open and fresh waters of Lake Erie—one of the best places to sail Lightnings in the World! Click on the following link for an aerial view of the BCC and the racing area: <a href="https://maps.google.ca/maps?hl=en&ie=UTF-8&q=buffalo+canoe+club&fb=1&gl=ca&hq=buffalo+canoe+club&cid=0,0,12277759267829115454&ei=Si0jUtn2ObGy4AOkuIFI&sqi=2&ved=0CIwBEPwSMA0"><strong>Buffalo Canoe Club on Google Maps</strong></a></li>
<li><strong><em>Boats:</em></strong> Boats will be provided by members and friends of the BCC. Competitors only need to bring their sails and life jackets. 24 boats will compete in the 2014 Championship — 4 more boats than the typical Youth Worlds due to the availability of great boats at the BCC.</li>
<li><strong><em>Everything is included in the entry fee ($375 U.S.): </em></strong> All competitors will be billeted with host families within 2 kilometers of the BCC. All meals and social activities are also included.</li>
<li><strong><em>Transportation</em></strong><strong><em> to the BCC: </em></strong>The BCC is located in close proximity to two international airports: Toronto Pearson International Airport (YYZ) is a 90 minute drive from the BCC. Toronto offers many daily, direct flights from most South American and European cities. Buffalo/Niagara International Airport (BUF) is a 45 minute drive from the BCC and is serviced by all of the major U.S. airlines. International competitors not wishing to have both a US and Canadian visa should consider flying into Toronto. Rental cars and shuttle services can be hired from either airport.</li>
<li><strong><em>Notice of Race:</em></strong> Please click here for the <a href="http://www.lightningclass.org/racing/calendar/nors/2014/youthworldchampionship.pdf"><strong>Notice of Race</strong></a> which provides more detail on the Championship.</li>
</ul>
<p>If you have any questions on the Championship, please email the following regatta contacts:</p>
<ul>
<li>David Starck <a href="mailto:davestarck@icloud.com">davestarck@icloud.com</a> ILCA V.P. in charge of World Championships</li>
<li>Ian Jones <a href="mailto:iwjones42@gmail.com">iwjones42@gmail.com</a> ILCA Youth World Regatta Chairman</li>
<li>Laura Jeffers, Executive Secretary, ILCA Class Office <a href="mailto:office@lightningclass.org">office@lightningclass.org</a></li>
</ul>
</body>
</html>

Again, here is what the data looks like after retrieval from the database and just prior to being stored back:

<!DOCTYPE html>
<br /><html>
<br /><head>
<br /></head>
<br /><body>
<p><br /><br /></p>
<ul>
<ul>
<li><strong><em>Venue:</em></strong> The Buffalo Canoe Club (BCC) is located in Crystal Beach, Ontario, Canada—25 kilometers west of Buffalo, New York, USA and 150 kilometers south of Toronto, Ontario, Canada. <strong><em>Not only is the Buffalo Canoe Club a fantastic place to sail, it is also a great place to take a family vacation.</em></strong> The clubhouse is located on the sandy shores of Lake Erie with facilities that include: 2 mile white sand beach, warm and shallow waters off the beach, swimming docks, soccer and baseball fields, tennis courts, beach volleyball, playground, snack bar, dining room, bar, showers/changing rooms and spectacular boat house. Click on link to <a href="http://www.buffalocanoeclub.com/"><strong>Buffalo Canoe Club Website</strong></a></li>
</ul>
</ul>
<p> </p>
<ul>
<ul>
<li><strong><em>World class sight-seeing destinations close to the BCC:</em></strong> Niagara Falls (25 minutes), Niagara Gorge (35 minutes), Buffalo New York (20 minutes), Niagara-on-the Lake & Niagara Wine Region (35 minutes), Toronto (1 hour 30 minutes) Port Colborne & Welland Canal (20 minutes) Fort Erie (15 minutes), Fort George (45 minutes). Click here for more detail on many more tourist destinations within 30 minutes of the BCC: <a href="http://www.ontariotravel.net/TCISSegmentsWeb/info/ont2/CityExcite/CENiagara/?language=en"><strong>Niagara Region Tourism</strong></a></li>
</ul>
</ul>
<p><br /><br /></p>
<p><strong>Toronto, Ontario (90 minutes from the Buffalo Canoe Club)</strong>   </p>
<p><br /><br /></p>
<ul>
<ul>
<li><strong><em>Race course:</em></strong> The race course will be approximately 2 kilometers south of the BCC on the open and fresh waters of Lake Erie—one of the best places to sail Lightnings in the World! Click on the following link for an aerial view of the BCC and the racing area: <a href="https://maps.google.ca/maps?hl=en&ie=UTF-8&q=buffalo+canoe+club&fb=1&gl=ca&hq=buffalo+canoe+club&cid=0,0,12277759267829115454&ei=Si0jUtn2ObGy4AOkuIFI&sqi=2&ved=0CIwBEPwSMA0"><strong>Buffalo Canoe Club on Google Maps</strong></a></li>
</ul>
</ul>
<p> </p>
<ul>
<ul>
<li><strong><em>Boats:</em></strong> Boats will be provided by members and friends of the BCC. Competitors only need to bring their sails and life jackets. 24 boats will compete in the 2014 Championship — 4 more boats than the typical Youth Worlds due to the availability of great boats at the BCC.</li>
</ul>
</ul>
<p> </p>
<ul>
<ul>
<li><strong><em>Everything is included in the entry fee ($375 U.S.): </em></strong> All competitors will be billeted with host families within 2 kilometers of the BCC. All meals and social activities are also included.</li>
</ul>
</ul>
<p> </p>
<ul>
<ul>
<li><strong><em>Transportation</em></strong><strong><em> to the BCC: </em></strong>The BCC is located in close proximity to two international airports: Toronto Pearson International Airport (YYZ) is a 90 minute drive from the BCC. Toronto offers many daily, direct flights from most South American and European cities. Buffalo/Niagara International Airport (BUF) is a 45 minute drive from the BCC and is serviced by all of the major U.S. airlines. International competitors not wishing to have both a US and Canadian visa should consider flying into Toronto. Rental cars and shuttle services can be hired from either airport.</li>
</ul>
</ul>
<p> </p>
<ul>
<ul>
<li><strong><em>Notice of Race:</em></strong> Please click here for the <a href="http://www.lightningclass.org/racing/calendar/nors/2014/youthworldchampionship.pdf"><strong>Notice of Race</strong></a> which provides more detail on the Championship.</li>
</ul>
</ul>
<p><br /><br /></p>
<p>If you have any questions on the Championship, please email the following regatta contacts:</p>
<p><br /><br /></p>
<ul>
<ul>
<li>David Starck <a href="mailto:davestarck@icloud.com">davestarck@icloud.com</a> ILCA V.P. in charge of World Championships</li>
</ul>
</ul>
<p> </p>
<ul>
<ul>
<li>Ian Jones <a href="mailto:iwjones42@gmail.com">iwjones42@gmail.com</a> ILCA Youth World Regatta Chairman</li>
</ul>
</ul>
<p> </p>
<ul>
<ul>
<li>Laura Jeffers, Executive Secretary, ILCA Class Office <a href="mailto:office@lightningclass.org">office@lightningclass.org</a></li>
</ul>
</ul>
<p><br /><br /></p>
</body>
<br /></html>

Again, many additional <br />, <p> and <u> tags added to text. For each editor, this results in a corruption of the original, intended formatting. I've yet to find a way to prevent this, and it seems unreasonable to have to clean it up manually, though it would be possible.

Even if so, the remaining issue is how to display this data fully formatted on a separate webpage. With the previous version of TinyMCE, changes to the formatting did not occur, and retrieval from the database and display worked perfectly.

At this point, I've done no further testing with images.
Avatar of slegy

ASKER

After days of endless research and testing, it appears to me that neither TinyMCE (whose previous version well supported our needs) nor CKEditor are designed to support what I am trying to do, which is provide the ability to:
1.  Enter text into a WYSIWYG editor. Data may be entered directly or copied and
     pasted from a text editor or Word.
2.  Insert one or more images throughout the text. To make it easier for the end
     user, a basic file manager is desirable.
3.  Store the entries in a memo field in an Access database.
4.  Retrieve the data for editing and update.
5.  Display the information from the memo field in the database  formatted
     on an informational webpage.

Is this capability no longer available, or, if so, does it involve considerable coding? My client really needs a workable solution.
Avatar of slegy

ASKER

My deepest apologies for taking up so much space and time. As so often happens, we have programmer error...yet again. With much research and some of the organization's assistance, I discovered that some months ago I had encoded the fields being stored to the database in order protect against SQL injections, which had become a serious problem. I didn't recall I'd done it nor would I likely have made the connection. Removing the encoding on that one field solved the problem.

Scott, thank you in particular. You are so thoughtful and thorough and give so much attention to detail. Over all these months I've learned a lot - having been out if mainstream IT for sometime. You are a real pro!
Wow, thank you for that you made my day.  

I'm glad you found the error.  You can do all the things you want.   The key is if you encode or escape special characters, then you need to decode them as you output.

If you convert your updates and inserts to a parameter query you don't have worry about injections although I still scrub my data.
Avatar of slegy

ASKER

Sorry, I thought I had closed this with my last comment. Scott, thanks again.