CKEditor JavaScript error on IE8 - javascript

I am using CKEditor version 3.6.1.
There is an error on IE8 when I put an empty row by "enter."
Here is an example:
writting test
writing test2
As you can see, there is an empty line between two sentences. When I click the empty row by mouse, I could not focus it to write something. To focus the empty row to write, I need to use my keyboard. Someone told me it's a JavaScript error on IE8. When I debugged it, I saw an error message like setSize == undefined. Does anyone know about this?
In addition, it's to hard to upgrade the CKEditor version, because I customized many codes.

It's impossible to help you if you use old version of CKEditor, you have modified it and you haven't provided us any idea what you have changed and what error and where do you have.

Related

How to add script tags to html

Here in the image you see the code is greyed out. Before I put in the <script> tag everything was not greyed out. Once I put in the tag is greys out the rest of the code. I might be missing a file needed to run the script tags?
I have been working with code for a while, but I am still a little stuck on how to get the code set up. I am wanting to use html/css and JavaScript to make a couple websites. I am not sure how to set everything up to make it work. I also am using github, and trying to figure out how to use github-pages.
A simple solution that works:
Just close the file being edited
Click "File->Reopen Last Item" to re-open it
This is an issue with Atom, it does not detect the tag when it auto completes, it works fine in VSCode, so it's not really a problem with your code, it's the IDE
enter image description here
As i recognize, the Atom text editor makes this error.
The best solution i tried:
IN ATOM TEXT EDITOR
Windows:
Ctrl + ,
MAC:
Cmd + ,
In settings:
1. Scroll to the bottom,
2. Uncheck "Use Tree Sitter Parsers",
3. Restart Atom IDE.
That works fine for me!
This is a known bug, but it seems no fix have been done yet, you can report your case here, I guess: HTML Syntax Colour Bug
But you may have solution in that StackOverflow subject, if so, it would be a duplicate: Atom Code Editor. Why is my code not in color?

rails 4.2 tinyMCE gem produces failed to load content css skins/lightgray/content.min.css

I just introduced tinyMCE into my rails 4.2.8 site to let manage formatted text in articles. Everything works fine actually but now and then a warning message produced by tinyMCE comes up such as "failed to load content css: http://myurl/assets/tinymce/skins/lightgray/content.min.css" but if a look at the debug console in firefox I see that url has perfectly found and loaded content.min.css.
When the warning message is there I can't enter anything in the textarea but the situation is fixed by reloading the page, then the rich text can be nicely entered and the relevant data is loaded correctly into the backend DB via relevant input form.
I don't understand the reason why tinyMCE is signalling such a warning despite the fact that the css file was actually found.
Any idea? Thanks and kind regards
Vincenzo
**** update on June 8th 2017 ****
Now I can better explain what's actually going on.
1) the problem shows up in Firefox v.53, if I use Chrome everything works fine
2) I am using tinyMCE in three distinct forms: one for new articles, one for editing, one for comments.
3) If I insert a few new articles no problem appears, the problem shows up just chenging the form in use: i.e. after insertion an article I try editing it or another one or else I try to insert a comment after havine inserted a new article. After the error message has shown I can always recover by reloading the page and no error appears eventually.
I guess there is some caching problem specifically in Firefox since all works fine in Chrome. I will try Windows Edge too..
2017/06/10
Tried Windows Edge on Win10: it works fine too.
2017/06/14
In the meantime I opened bug 1371910 at https://bugzilla.mozilla.org/show_bug.cgi?id=1371910#c5 a few days ago and the result was:
QUOTE
Hi Vincenzo,
Thanks for sending us the link. Unfortunately this seems to be a problem with tinyMCE rather than Firefox.
The initial load of content.min.css works correctly, and no other attempts to reload it seem to be made.
If it works in other browsers it is probably due to the developers doing things differently.
If you still think this is a bug in Firefox, please reopen this bug, and send us a smaller test case.
PS. Others seem to be having the same problem as you: https://community.tinymce.com/communityQuestion?id=90661000000Qct9AAC
I hope you find a way to fix it.
UNQUOTE
What the Firefox support says makes sense since I too whatched the content.min.css file was actually loaded by the browser so in must be tinyMCE to misinterpret something. Anyway I am still in the soup...
Whoever might have some interest at this issue please hava a look at:
http://vinloren-learn-rails.herokuapp.com/articles accessing this endpoint with Firefox v52..v54 the click show any article then going back via the 'back' link at the end of the article's content.

wrong format on line comment webstorm or intellij ultimate

Have anyone experience in intellij ultimate or webstorm adding a comment with the shortcut cmd + / ?
I’m trying to change the following behavior from
//This is a comment
to
// This is a comment
notice the space after the // . I can work on atom and sublime as expected but I don’t know why webstorm or intellij use a different functionality, I’ve played with a flag in the code style tab called Comment at first column but that doesn’t change the behavior as I want it. If anyone have experience this I appreciate any solution / workaround
Already read this answer, but that is not the intended behavior, what I need to add a line comment with the proper space after //
Intellij: add space after double slashes in line comment
At the moment it's not possible.
https://youtrack.jetbrains.com/issue/IDEA-141701 -- watch this ticket (star/vote/comment) to get notified on progress.

onyx.DatePicker breaks in enyo.Repeater

I am not able to get a onyx.DatePicker working inside a enyo.Repeater. I set up this jsfiddle, which shows my problem. When the // in line 6 is removed, it breaks and shows
Failed to load date time format hash
in my console in Opera Dragonfly.
What is that about, and what to do, to get the onyx.DatePicker working?
Congratulations! You discovered a bug in Enyo. It turns out the onSetupItem handler in DatePicker.js isn't returning a truthy value so the event bubbles up to your Repeater. I have filed a bug (ENYO-2059) and will push a fix up afterwards.
If you want to fix it for yourself go into DatePicker.js and add 'return true;' to the end of setupYear().
As to your 'cannot load date time hash' issue, I suspect it's because you haven't included the g11n library. I'm not sure I've seen that message before but it would be a non-fatal error and Enyo will default to English.

How to reproduce: Script Error, "Object does not support this property or method."

Can any one give me a scripts (HTML/CSS/Javascript) that can reproduce this error on IE 7.0? I am trying to fix this bug in my page where I get this warning but could not exactly found the problem. Line number does not match with the source either.
I thought the better approach would be to create a bug and then work on it incrementally rather than making some wild guess!
As Shog said, that error will occur when you try to call a method on an object which doesn't have that method.
This is most often caused by an object being null when you expect it to, well, not be null.
var myEl = document.getElementById('myElement');
myEl.appendChild(...)
The above example will cause that error if the "#myElement" element doesn't exist.
If it's only happening on IE and not Firefox, chances are it's because you're using a method which IE doesn't support.
The solution? You can try the Script Debugger, but I've never found that to be useful myself. The most reliable, yet painfully slow method is alert() debugging. At strategic points through your code, put in an alert with a unique message. At some point IE will throw an error, so you'll know that the error is somewhere between the last alert which you saw, and the next one which didn't.
function myFunc() {
alert('a');
var myEl = document.getElementById('myElement');
myEl.appendChild(something);
alert('b');
// more code
}
if you ran that and you saw 'a' but not 'b' you know it's in between there somewhere. This is just the sad state of javascript in IE, I'm afraid.
If you make your code follow the jslint.com rules, it will go away.
It will also point you at exactly where the issue is in your code.
I thought the better approach would be
to create a bug and then work on it
incrementally rather than making some
wild guess!
You would be wrong. There are countless scenarios that could produce the error you are seeing. All it means is that you're trying to call an undefined method. For instance:
var blah = {};
blah.methodWhichDoesntExist(); // <-- error
This could be the result of a typo, an undetected failure in some other component, or gamma rays consistently flipping bits in your HTML right after you save. Hard to be any more specific without knowing more about what you're doing.
For IE, download the Microsoft Script Debugger
I just fixed a similar bug by using IE8 and switching it into IE7 mode. You then get a more specific error message telling you which line of which file is failing.
After that set a breakpoint so that the code stops just before the offending line (F12 to get to debugger tools, then choose the JS file you want from the 'scripts' dropdown and click to the left of the line number. Click 'start debugging' to make it use the breakpoints).
As others have pointed out, this error could have many causes, but in my case, I had two IDs on the same page with one capitalised and one not. getElementById() was getting the wrong one. Only IE7 complained.

Categories

Resources