[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Detect if WYWIWYG editor loaded

Posted on 2013-10-25
8
Medium Priority
?
243 Views
Last Modified: 2013-10-29
I am using (Imperavi) Redactor as a WYSIWYG editor.  It is not compatible with some browsers (for example, IE 8).  How do I detect whether or not the editor has loaded when I'm handling the data after the POST?
0
Comment
Question by:jeff_zucker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39601796
Should be able to just do

if($.redactor) {
...
}

OR
if(jQuery().redactor) {
...
}


But I don't know the plugin so it may be wrong, but this is the standard way for plugins.
0
 

Author Comment

by:jeff_zucker
ID: 39607040
I tried that and it triggered regardless of whether the plugin actually loaded.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39607195
Does the plugin add classes to the elements, it may be easier to just do a check for .hasClass("classname").
The plugin may be getting initiated even tho it doesn't do anything. Do you have a live link to the page in question?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 58

Accepted Solution

by:
Gary earned 1500 total points
ID: 39607435
Not to the plugin - to your page.

Forget that just use conditional statements

<!--[if lt IE 9]>

add your js stuff or whatever here

<![endif]-->
0
 

Author Comment

by:jeff_zucker
ID: 39610491
I can't link to my page (privacy and other reasons).  

The conditional statement won't work because old IE browsers aren't the only one's that won't load the plugin.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39610497
Then I think you need to rethink the plugin if there are so many browsers it doesn't work in.
Since its a paid for plugin I cannot really test it.
0
 

Author Closing Comment

by:jeff_zucker
ID: 39610696
Looks like there isn't a perfect solution.  However, 99% of the issues are going to come from IE 8 and older browsers, so this is the solution I will use.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question