CKeditor shows no custom styles

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
1/3/2010 9:38:15 AM
Gravatar
Total Posts 18439

Re: CKeditor shows no custom styles

Wow, the CKeditor guys already responded and told me how to solve it. Apparently the issue is that the word class is a keyword in javascript so when setting class attribute in json, it must be quoted. Other browsers must have more forgiving javascript engine. In any case, I got it weorking now with IE 8 on my machine, I will make another build package later today and let you know when it is ready.

Best,

Joe

1/3/2010 10:33:16 AM
Gravatar
Total Posts 220

Re: CKeditor shows no custom styles

by then: cheers
Matthias

1/3/2010 10:45:38 AM
Gravatar
Total Posts 18439

Re: CKeditor shows no custom styles

When I test using TinyMCE I can add the euro symbol to the content using the special character toolbar in IE 8, Firefox and Chrome. I even tried it with my culture setting forced to German and it still worked for me.

I just tried it also on demo.mojoportal.com and it also works there.

Are you using a custom config file for TinyMCE or are you using mojoTinyMCE.config?

Best,

Joe

1/3/2010 10:47:42 AM
Gravatar
Total Posts 18439

Re: CKeditor shows no custom styles

Oh, and many thanks for the beer!

Cheers,

Joe

1/3/2010 11:37:43 AM
Gravatar
Total Posts 220

Re: CKeditor shows no custom styles

Hi Joe,

I have no custom config file for TinyMCE and I haven't touched the mojoTinyMCE.config (I didn't even see it before :-)

Matthias

1/3/2010 12:00:27 PM
Gravatar
Total Posts 18439

Re: CKeditor shows no custom styles

I've uploaded a new build to the Novell Forge download page, mojoportal-mssql-deploymentfiles-20100103.zip

If you already got yesterday's build, I think the only files you need to get the fixes are mojoPortal.Web.dll and mojoPortal.Features.UI.dll

Best,

Joe

1/4/2010 5:55:49 AM
Gravatar
Total Posts 220

Re: CKeditor shows no custom styles

Hi Joe,

nice to see my favorite Website back online again :)

Now the style combo list in CKEditor is filled.
Thank you very much.

Is there a external styles definition file for the CKEditor to customize the presetting of the style combo list, or will this file be generated again, if I add a new style?



Maybe you are interested in a little test I made with TinyMCE.
These are the first 14 characters from the special character toolbar:
& " ¢ ? £ ¥ © ® T ? µ · . .
During the input all are displayed well, but after I saved it the 4th, 9th, 10th, 13th and 14th are wrong displayed.

Furthermore, when I take the symbol for "minutes/feet" from the special character toolbar and save, I get the "We're sorry but a server error has occurred ..." and in the System-Log you can read:
... MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax; check the manual that corresponds to

your MySQL server version for the right syntax to use near '/p>' ...
The html of the last line was <p>&amp; " ¢ ? £ ¥ © ® T ? µ · . . '</p>

Unintended SQL injection ???

Best
Matthias

1/4/2010 6:37:17 AM
Gravatar
Total Posts 18439

Re: CKeditor shows no custom styles

Hi Matthias,

It does not generate a file, it uses a service url, the styles you define are stored in the db. As soon as you add a new one and go back into the editor it will appear.

That is strange that you would get a syntax error based on content because it is passed in as a parameter of type text, there is no string concatenation. Are you sure the table column you are saving to is configured for unicode?

If the table is not configured for unicode it will change unrecognized chars into ? in the db.

Best,

Joe

1/4/2010 9:09:20 AM
Gravatar
Total Posts 220

Re: CKeditor shows no custom styles

Hi Joe,

it uses a service url, the styles you define are stored in the db

that means, the custom styles are in the db and the default styles are "outsourced" as described in the developers guide on http://docs.cksource.com/?

Are you sure the table column you are saving to is configured for unicode?

I do not know, because I never touched the database myself and do also not know where mojo is saving the html content.
I go into a empty TinyMCE, choose the symbol for "minutes/feet" from the special character toolbar, push the save button beneath it and get back a MySql.Data.MySqlClient.MySqlException.

Best
Matthias
 


 

1/5/2010 1:58:15 PM
Gravatar
Total Posts 18439

Re: CKeditor shows no custom styles

Hi Matthias,

The mojoPortal service for populating the CKeditor styles dropdown is implemented to return a json result containing the styles defined in the mojoPortal style system formatted according to the ckeditor documentation about custom styles.

When you created your MySql database, you had to choose an encoding and collation (or else a server default was used) and this is used when creating all tables and columns. If you chose something other than unicode/utf-8 then it may have a problem storing certain characters and possibly could cause the error you describe. I will test it on a local copy of my own site soon and see if I can produce the error. Depending on what MySql management tools you use, you can also inspect the tables and columns and see what encoding/collations are specified and change them to utf-8/unicode unicode_general_ci if needed.

Best,

Joe

1/7/2010 8:56:01 AM
Gravatar
Total Posts 220

Re: CKeditor shows no custom styles

Hi Joe,

and I was digging around for a file (like ~\ClientScript\ckeditor302\plugins\stylescombo\styles\default.js) in which I can reduce the default list to a minimum ... :)

I created the database in Plesk with default settings. phpMyAdmin shows me the encoding UTF-8 Unicode (utf8) and the collation utf8_unicode_ci.

Best
Matthias

You must sign in to post in the forums. This thread is closed to new posts.