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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:40:37+00:00 2026-06-10T17:40:37+00:00

ExecCommand offers a way to bold text inside iFrame, make it italic, underline it

  • 0

ExecCommand offers a way to bold text inside iFrame, make it italic, underline it etc.

But it’s missing an option to create <cite> or <strong> or <em> (there is formatBlock but only for block elements and not inline ones).

I’d like to use ExecCommand function for creating <cite> – is there any way to achieve this? And obviously I want to maintain flawless parsing like in case of bold and not something like surroundContents which will fail when you use it twice on the same selection.

I’m looking for a definition of ExecCommand bold command or a way to use existing commants to flawlessly add <cite>. Any suggestions? I couldn’t extract it from browser’s functions. It says “native code” when I try to do that.

  • 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-10T17:40:38+00:00Added an answer on June 10, 2026 at 5:40 pm

    I see that CKEditor was mentioned in one of previous comments 🙂 So this is how we handle executing commands:

    • We do everything manually. As you can see DOM API isn’t sufficient and implementations differ between browsers, so I guess (but I haven’t checked this) that HTML containing some text with applied styles in one browser won’t work in other (because one browser applied strong and second b or span with inline style).
    • First of all we need custom Range and Selection implementations. You can’t use them, but there’s a cool Rangy lib.
    • Next component that you need is set of methods for applying, removing and checking styles. Here’s our impl.
    • And the last component is trivial – custom commands, because it’s convenient to mimic W3C’s APIs and ideas.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making my own WYSIWYG editor. But i can't make any text bold
i know how to execute execCommand on some selected text, but is there a
Can anyone tell me what execCommand commands are available in CKEditor? Like editor.execCommand('bold')
I am using execCommand with javascript to insert text into editable iframes like this:
I'm building a wysiwyg-editor with an editable iframe using document.execCommand() . Now i need
How can I create my own document.execCommand? So for example I want to create
Is there a way to re-enable the document.execCommand(cut) Javascript method call in Google Chrome?
I have the standard content editor that uses an iFrame as the text area
i have this code, execcommand for BOLD, and it is not working under opera.
The copy/cut/paste for iframe execCommand functions are not enabled by default in Firefox. How

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.