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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:20:45+00:00 2026-05-25T23:20:45+00:00

I recently wrote a CKEditor plugin to add captions to images, it all works

  • 0

I recently wrote a CKEditor plugin to add captions to images, it all works pretty good except for one thing.

The code of the caption looks like this:

<div class="caption_container">
     <img src="image.jpg" />
     <div class="caption_text">
         Caption
     </div>
</div>

When I select the “Caption” text and click the ordered list button, the caption_text div element changes into an ul instead of the ul being added to the div

Result:

<div class="caption_container">
     <img src="image.jpg" />
     <ul class="caption_text">
         <li>First item</li>
     </ul>
</div>

The result I would like to get is:

<div class="caption_container">
     <img src="image.jpg" />
     <div class="caption_text">
         <ul>
             <li>First item</li>
         </ul>
     </div>
</div>

Is there a way to achieve this?

  • 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-25T23:20:46+00:00Added an answer on May 25, 2026 at 11:20 pm

    If you don’t want to touch CKEditor source code I have a simple solution for you. You could add a extra ‘div’ to prevent deletion of ‘div class=”caption_text”‘ so it will look like:

    <div class="caption_container">
         <img src="image.jpg" />
         <div class="caption_text">
              <div>
                  Caption
              </div>
         </div>
    </div>
    

    In the end you will have the desired:

    <div class="caption_container">
         <img src="image.jpg" />
         <div class="caption_text">
             <ul>
                 <li>First item</li>
             </ul>
         </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently wrote some javascript code that filled a drop down list based on
I recently wrote a piece of code which did SomeClass someObject; mysqlpp::StoreQueryResult result =
I recently wrote a theme function to add a class to my primary links
I recently wrote the following C code using sysinfo systemcall to display system statistics,
I recently wrote C programs for image processing of BMP images, I had to
I recently wrote an extremely basic edge detection algorithm that works on an array
I recently wrote some code that uses the same unsigned short to store two
I recently wrote a phonegap plugin for Android and iOS (javascript calls native java
I recently wrote a Java playing card game and have all the game logic
I recently wrote a mailing platform for one of our employees to use. The

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.