views:

44

answers:

1

In FF, Opera, IE the CKEditor is working and looks great. But in Chrome and Safari it is not sizing correctly, and is extending past the container that it is inside. I assume this is because Chrome and Safari are currently the most standards compliant. See the images below.

Chrome

alt text

Opera

alt text

I tried removing all of my CSS files to see if it was my css causing the issue, but that did not fix it either. Here is my call to CKEditor

//Make all textareas use the ckeditor
$('textarea.WYSIWYG').ckeditor({
    toolbar: [
        ['Styles', 'Format'],
        ['Bold', 'Italic', 'NumberedList', 'BulletedList', 'Link']
    ],
    height: 100,
    width: "225px",
    enterMode : CKEDITOR.ENTER_BR,
    resize_enabled: false
});

Any ideas what could cause this?

UPDATE

Here is a VERY dumbed down version of the code still causing the error.

<!DOCTYPE HTML>
<html>
<head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <title>Title</title>
        <script type="text/javascript" src="library/javascript/global/JQuery.core.js"></script>
        <script type="text/javascript" src="resources/local_javascript/ckeditor/ckeditor.js"></script>
        <script type="text/javascript" src="resources/local_javascript/ckeditor/adapters/jquery.js"></script>
        <script type="text/javascript" src="resources/local_javascript/base.js"></script>

</head><body> 
<div id="outerWrapper"> 

    <table id="FAQTable"> 

        <tr id="editingRow">
            <td class="fixedWidth">
                <textarea class="WYSIWYG" id="FAQQuestionInput" rows="5" cols="1"></textarea>                   
            </td>
            <td class="fixedWidth">
                <textarea class="WYSIWYG" id="FAQAnswerInput" rows="5" cols="1"></textarea>
            </td>
        </tr>                    
   </table> 
</div> 

And here is the new image

alt text

+1  A: 

BIG EDIT

My most sincere apologies I some how completely missed the fact that this was a Chrome issue and had been testing in FF thats why I wasn't showing the same problem; I'm a dumb A55.

So open and Chrome and what do you know the problem is there so the problem can be solved in one of two ways either you give it a width of 310px as shown bellow or you find a chorme specific fix for either the textarea or the toolbar CSS that deals with it I would also highly recommend submitting a bug report with ckeditor folks as they may be able to come up with a solution and put it out there.

 $(document).ready(function(){
     $('textarea.WYSIWYG').ckeditor({
         toolbar: [
             ['Styles', 'Format'],
             ['Bold', 'Italic', 'NumberedList', 'BulletedList', 'Link']
         ],
         height: 100,
         width: "310px",
         enterMode : CKEDITOR.ENTER_BR,
         resize_enabled: false
     });
 });
mcgrailm
IMHO there are much better ways to output web page content then to do it with tables
mcgrailm
Because of the way this page is setup, and all of the ajax I am using, it would be tough to change the table to divs. I will try doing a colspan on the last column. Thanks again for your help mc!
Metropolis
@mcgrailm: Oh I completely agree, I use divs whenever possible, and I rarely use tables. But in this instance, it would be a pain in the arse to use divs. Plus I try not to be in divitus mode like some people :p.
Metropolis
Actually, it is not that issue.....I found an empty row in the bottom of my table that had 6 columns. I fixed that and the warning is gone on the validation. So that is not the issue. It is still displaying wrong.
Metropolis
@mcgrailm: Any other ideas?
Metropolis
got a link I can look at ?
mcgrailm
@mcgrailm: Its on a private network.....But I believe that it has to have something to do with CKEditor and not my code. I think there either must be a setting to fix this, or there editor does not work when the width is reduced down to a certain size. I am trying to add some CSS to fix it, but they are using an iframe, so it may be hard to change anything on their end.
Metropolis
well no offense but you think its more likely that it is something in their code than yours ?
mcgrailm
Yes, there are a ton of companies out there that do not care about standards compliance. Just go around the internet and try validating companies sites that you think should be on top of their game. You will start to see that a lot of companies are not keeping up. Also, I said that they may have an option to fix this, but they have a ton of options and I am not an expert with CKEditor, so I can not tell what setting may fix this.
Metropolis
There is no possible way this could be my code. I removed all CSS and this issue was still happening. You can see my code above that inserts the editor, and that is it. It gets added to a textarea, the rest is up to their code. We are talking about presentation, not PHP code. Its pretty cut and dry. Other than CSS, theres nothing my code could be doing to conflict.
Metropolis
You are using XHTML 1.0 STRICT. Think that may matter?
Metropolis
try using my method of targeting the ckeditor by using replace see if that fixes the problem ? I don't know how your ckeditor work with the jquery you provided
mcgrailm
Can you test yours using HTML5 please? I just took practically everything out of the page except those things and its still happening
Metropolis
Did you install CKEditor in the root of your server?
Metropolis
It may also be a problem that I am using ssl?
Metropolis
i have a similar issue in chrome - but it regards to the text area being able to stretch manually (by the person browsing to the site) beyond his parent div? is there a way to limit it? you know that 2 diagonal lines in the right bottom corner of the text area? that you can select with the mouse, and resize the text area - how can i limit it to stay in the bounds of it's parent? (it cause it's parent table to resize itself bheind the size of the table's parent DIV. although it is specified to be 100% in width.
Itay Levin
Well I am glad I am not going crazy now. I thought you were testing in Safari, which also has the bug. I will try setting the width to 310.
Metropolis
The 310 width will not work since my space is not big enough for that. I will post a bug report on CKEditor. Thanks again mcgrailm!
Metropolis