Solved

CKEditor EMBED protected source - javascript, PHP, etc

Posted on 2010-08-14
2
1,036 Views
Last Modified: 2012-05-10
Is there a way to do this.  I want to embed some scripts in the editor (admin only).
0
Comment
Question by:sscotti
[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
2 Comments
 

Expert Comment

by:_Twinkie_
ID: 33439427
I am sorry ,but  I don't completely understand what you mean by embed code into CKEditor? Please explain. I have used CKEditor before in my web sites and I should be able to help you.
0
 
LVL 5

Accepted Solution

by:
sscotti earned 0 total points
ID: 33439451
I want to put some javascript into the CKEDITOR object, the active editor, using the view source option and putting some script tags in the editor,

i.e.

some HTML

. . .
<script type="text/javascript">
. . .
. . .
</script>

more HTML

I want the javascript to be unaltered when the editor contents is saved so that the script will execute when I read the data again.

On the site that I am using CKeditor is used to edit some contents for HTML code that is then store in a MySQL database.  This is later read out and displayed on the page.  I was playing around with it for putting javascript in the editor and it doesn't work.  I think it is converting the < and > tag elements to $gt;, etc. or otherwise deactivating the script.  I am pretty sure that CKEditor does this by default for security reasons but I think that there is a way to embed javascript in the source in the editor and have it saved unaltered.  I read something are protected content, CDATA tags and others in the API for CKEditor.

I have a work around but I would prefer to be able to put scripts in the editor.
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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)

631 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