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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:19:01+00:00 2026-06-05T13:19:01+00:00

I am developing a plugin for video embedding, I put this code when the

  • 0

I am developing a plugin for video embedding, I put this code when the plugin dialog OK button is clicked.

var embedCode = 
    '<iframe title="YouTube video player" class="youtube-player" type="text/html"' +
        width="' + width + '" height="' + height + '" src="http://www.youtube.com/embed/' + textField + '?rel=0"' +
        frameborder="0" width="620" height="200" style="width:' + width + 'px; height:' + height + 'px">' +
    '</iframe>';

this.getParentEditor().insertHtml(embedCode);

Now when double click on the iframe in the editor open the iframe properties dialog not my plugin dialog.

How I can develop a fake image for my custom plugin.

  • 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-05T13:19:02+00:00Added an answer on June 5, 2026 at 1:19 pm

    I have found a solution for it.
    Ckeditor make fake elements from the code generated by the plugins. When the editor loads it takes the code and convert it to fake elements and the default editing is worked on that fake elements the code for it will be defined in the

    afterInit : function( editor )
        {
    

    function of the the editor and will be called in on OK event of the edior

    onOk : function()
    {
        var embedCode = updatePreview( this,true );
        var newFakeImage = editor.createFakeElement( embedCode, 'cke_audio', 'audio', true  );
    

    The Code for the fake element example is the following, I have created for an audio embed code plugin

    afterInit : function( editor )
        {
            function createFakeElement( editor, realElement )
            {
                return editor.createFakeParserElement( realElement, 'cke_audio', 'audio', true );
            }
    
            var dataProcessor = editor.dataProcessor,
                    dataFilter = dataProcessor && dataProcessor.dataFilter;
                if ( dataFilter )
                {
                    dataFilter.addRules(
                        {
                            elements :
                            {
                                'div' : function( element )
                                {
                                    //alert("here");
                                    var attributes = element.attributes;
    
                                    if( attributes.class == 'audio' ){
                                        //alert("here");
                                        return createFakeElement( editor, element );
                                    }
                                    return null;
    
                                }
                            }
                        },
                        5);
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a plugin for eclipse. In this plugin I need to be
i am developing a eclipse plugin . In this plugin i am using reflection
I'm developing a plugin which is used in several applications. This plugin is a
I am developing a plugin for an application, that application consumes my code (classLibrary),
I'm developing a Wordpress plugin, and I'm having some issues with $_SERVER['HTTP_HOST'] . This
To be succinct: This startup is developing a social networking website specifically for video
I am developing a plugin.In this i take project as input from textbox which
I'm developing a plugin. Take a look at the following code. string request(char post_params[])
I'm evaluating the possibility of developing an Eclipse plugin to modify the source code
Morning guys, So this is my first time developing a plugin for CakePHP. Here's

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.