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

  • SEARCH
  • Home
  • 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 7086113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:30:34+00:00 2026-05-28T07:30:34+00:00

I have a very simple issue. I am using toggleEdit to allow the user

  • 0

I have a very simple issue. I am using toggleEdit to allow the user to edit/preview some html. For those who are unfamiliar with toggle edit, all it does is when you call toggleEdit() on an <input/> it creates a <div/> with whatever value is in your <input/> element. When you toggleEdit("preview") it shows the <div/>, and when you toggleEdit("edit") it shows your <input/> field.

For my case I am using it to show “embedded html.” The user basically enters some html, clicks preview and it shows. I am trying to find a way to “rerender” the div so that embedded style elements can be used.

For example.

In the text area the user enters:

<style type="text/css">
   ul {  list-style-type: circle;  }
</style>

<ul> <li> This is a test </li>  </ul>

In my case, the style is ignored. But if I were to use inline styles they would work. I tried replacing the div text, but that did not work.

I’m sure this is a simple rerednering issue.. just can’t find an easy way to search for it.


Edit

As requested here is a JSFiddle

  • 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-28T07:30:34+00:00Added an answer on May 28, 2026 at 7:30 am

    It would help greatly if you were to post a live version of your code for proper examination to take place. In any case, it doesn’t seem like style=type declarations through js insertions are supposed to work. Inline however does and that is why you see tools like firebug and so forth relying upon line-styles for on-the-fly css additions to the dom that work on real-time.

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

Sidebar

Related Questions

I have a very simple issue: User model: class User < ActiveRecord::Base devise :database_authenticatable,
I have a very simple WPF application in which I am using data binding
I appear to have a named pipes 101 issue. I have a very simple
Having coded JavaScript since 1996, I have a very simple issue which I could
I am trying to build this very simple (visually speaking) layout using HTML/CSS that
I have the following issue using java 1.4 I try to display a very
I have a very simple PHP file. I had set the charset using PHP's
I have the following very simple application that compiles and runs fine: EDIT: changed
Using MVC Razor I have a very simple test. The logger writes messages to
I am having a strange issue. I have a very simple piece of code

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.