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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:39:40+00:00 2026-05-27T23:39:40+00:00

I am trying to create buttons for ckeditor that will add rows and columns

  • 0

I am trying to create buttons for ckeditor that will add rows and columns of contents to the editor using 960.gs grid system.

I need a way to insert the generated code into certain div that already exists in the editor window not just at the cursor.

For example, We have this code in the editor:

<div class="container">
  <div class="grid_12">
    <div class="inner">
    </div>
  </div>
</div>

When I click my button, This code is generated:

<div class="grid_3"></div>

I need the generated code to be inserted into the div with class (grid_12). Whatever the position of the cursor is.

  • 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-27T23:39:41+00:00Added an answer on May 27, 2026 at 11:39 pm

    Since ckeditor seems to have the normal DOM model for the content being edited, you should be able to do something like this:

    var oEditor = CKEDITOR.instances.editor1;
    var element = oEditor.document.getById('myElement');
    var grid_3 = new CKEDITOR.dom.element('div');
    grid_3.setAttributes({'class' : 'grid_3'});
    element.append(grid_3);
    

    Here I did assume you’d use an id for the grid_12 element, if you wouldn’t it’s not possible to do it without fetching the cursors position and extracting the specified div using that then…

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

Sidebar

Related Questions

I'm trying to create css buttons by using the following html markup: <a href=access.php
I'm trying to create a top panel menu that contains 5 buttons. I configured
So here is the problem: I am trying to create dynamic buttons that have
Im trying to create a simple loop that creates 50 buttons, adds them to
I'm trying to create a view that's full of controls (buttons, text views, labels,
I am trying to create a GUI. I try and add 3 radio buttons
I am trying to create buttons that change the color of an object when
I am trying to create a function that displays three buttons per row for
I'm trying to create several buttons that have 4-5 frames of animation in them,
I am trying to create a view with buttons that overlay a scrollview 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.