Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3343928
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:00:40+00:00 2026-05-18T01:00:40+00:00

I have an issue with my WYSIWYG editor. If users copy in outside text,

  • 0

I have an issue with my WYSIWYG editor. If users copy in outside text, this is seen as something like the following:

” p.p1 {margin: 0.0px 0.0px 0.0px
0.0px; font: 11.0px ‘Lucida Grande’; min-height: 13.0px} p.p2 {margin:
0.0px 0.0px 0.0px 0.0px; font: 11.0px ‘Lucida Grande’} Only the variables
assigned in the last loop are
accessible from outside the scope of a
foreach loop.”

This is obviously problematic.

On top of that, there also seems to be an issue with line breaks, i.e. <br /> tags. Sometimes they’re picked up, sometimes not.

I’ve been running the content through strip_tags() like so:

<?php
$body = strip_tags($body, '<a><br><b><i><img><ul><ol><li>');

Any thoughts on what’s going on here?

If it helps, I’m using jWYSIWYG for the editor.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:00:41+00:00Added an answer on May 18, 2026 at 1:00 am

    The following code finally got it working for me:

    $('iframe').ready(function() {
        $(this).contents().find('.wysiwyg').find('iframe').contents()
        .find('.wysiwyg').bind('paste', function() {
            // Completely strips tags.  Taken from Prototype library.
            var el = $(this);
                var strClean = el.text().replace(/<\/?[^>]+>/gi, '');
                el.text(strClean);
            }, 0);
        });
    });
    

    You can see this in action at http://jsfiddle.net/v4LhV/3/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good morning! I Have an issue with a wysiwyg editor that saves html to
I have issue wuth Firefox not displaying style text-decoration: line-through. I am using jqGrid
I'm using Abeille Forms Designer as my Swing app's WYSIWYG editor. I've used this
My specific use case is that I have a WYSIWYG editor which is basically
I have a display: none div with a child wysiwyg editor. I have had
I have issue where I need store info about users in DB and authorize
I am developing a simple WYSIWYG RTF editor in Java and have a small
I have issue with Win2003 that Java Applet Closes IE for Users not Admins.
I have issue with showing some content in div. I have some text consider
I've added the Dojo wysiwyg editor to my django admin panel. I have an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.