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 8091559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:05:33+00:00 2026-06-05T20:05:33+00:00

I am using Dmxzones Advanced HTML Editor 3 which inserts the following code: <textarea

  • 0

I am using Dmxzones Advanced HTML Editor 3 which inserts the following code:

<textarea id="advHTMLEdit1" name="advHTMLEdit1" class="dmxEditor" style="width:700px;height:300px"></textarea>

 jQuery(document).ready(
   function()
     {
       jQuery("#advHTMLEdit1").dmxEditor(
         {"width": 700, "lineBreak": "p", "allowUpload": true, "uploadPath": "tmp", "subFolder": "1", "uploadProcessor": "php", "allowResize": true, "includeCss": "tutorial.css", "skin": "blue"
       );
     }
 );

It inserts elements using the javascript execCommand() and also applies class styles to those elements.

With: jQuery("#advHTMLEdit1")[0]

I seem to be able to access it but nothing I have tried gives me access to the childNodes. I would like to be able to loop through each childNode as created by the editor, query the class and if it is a particular className then replace the HTML on that element.

I don’t use jQuery and although I have tried many things myself I cannot seem to access any of those elements as created by 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-06-05T20:05:34+00:00Added an answer on June 5, 2026 at 8:05 pm

    Borrowing a bit from this answer and based on the link you’ve provided, you should do something like this:

    If you want to apply a consistent css for all matching classes:

    var ifrm = $("#advHTMLEdit1").prev(".dmx-editor-frame-wrapper").find("iframe")[0];
    ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
    ifrm = $(ifrm.document);
    ifrm.find(".yourClass").css("cssProperty", "cssValue");
    

    If you want to apply different css for all elements:

    var ifrm = $("#advHTMLEdit1").prev(".dmx-editor-frame-wrapper").find("iframe")[0];
    ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;
    ifrm = $(ifrm.document);
    var elem;
    ifrm.find("body *").each(function(){
        elem = $(this);        
        if(elem.hasClass("yourClass") && elem.is("span")) {
            //elem.css("cssProperty", "cssValue");                
            elem.text("new text");
        }
    });
    

    If you want to change the text of all span having a certain class, you can do the following with a much shorter code, no need to loop:

    ifrm.find("span.myClass").text("new text");
    

    Use the second example only if the new text of the span depends on the class name.

    Edit:
    Based on the example you’ve provided in your page, you could just write:

    ifrm.find("p.codeblock").text("new text");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Rails 3.2.0.rc2 and ruby 1.9.3p0 In app/views/requests/_form.html.erb I have the following code for
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
Using the style below (css file is linked to Default.aspx, which is then plugged
Using timeit , I have a setup code block which sets up a data
Using DMD 2.057, I cannot get the following code to compile: import std.stdio; import
Using php's explode with the following code $data=test_1, test_2, test_3; $temp= explode(,,$data); I get
Using android 2.3.3, I have a background Service which has a socket connection. There's
Using MVC2 I have an AJAX form which is posting to a bound model.
Using Delphi 2010. I am looking for (possibly) a function or procedure which can
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and

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.