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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:58:09+00:00 2026-05-26T03:58:09+00:00

I am trying to write a plugin for TinyMCE with a feature to add

  • 0

I am trying to write a plugin for TinyMCE with a feature to add content to the beginning of the content. I know the following command which will insert content at the current location of the cursor. How do I force it to insert it at the beginning of the content?

tinyMCEPopup.editor.execCommand('mceInsertRawHTML', false, "halo world");
tinyMCEPopup.editor.execCommand('mceInsertContent', false, "halo world");
  • 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-26T03:58:10+00:00Added an answer on May 26, 2026 at 3:58 am

    For this you will need to set the cursor location to the beginning of the editor content.
    you may use the function setCursorLocation:

     ed.selection.setCursorLocation(ed.getBody().firstChild, 0); // node to set the cursor to, second param is offset
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a plugin which will update a user field. I
Im trying to write a quick plugin that will load some AJAX content into
I'm trying to write a plugin which edits the content of a published post.
I'm trying to write a plugin that will extend InheritedResources . Specifically I want
I am trying to write a simple Wordpress plugin, which updates a custom field
I'm trying to write a little WordPress plugin to support some migrated content. The
I am trying to write a plugin, following the guidelines from jQuery site. I
I'm trying to write a jQuery plugin that will provide additional functions/methods to the
I'm trying to write a 3D demo for a client which will simply display
I'm trying to write a plugin that calls a function (icalendar-import-file) which has 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.