Opened 9 years ago

Closed 8 years ago

#5908 closed New Feature (invalid)

Docs Enhancement: Plugins with dynamic URLs

Reported by: Rodney Rehm Owned by:
Priority: Normal Milestone:
Component: Project : MediaWiki+FCKeditor Version: FCKeditor 2.6.4
Keywords: Cc:

Description

Hi there,

haven't been able to upgrade to 3.1, yet. So this is in regard to FCKEditor 2.6.x:

The docs don't offer any way to deal with dynamic URLs of dialogs. I had to load some data depending on the value of a <select> outside of FCKEditor.

since FCKDialogCommand( command, title, url, width, height ) won't accept a function(){} as url, I built this little wrapper. The charme's with toValue and toString:

var _theDynamicURL = new (function(){
  function getURL()
  {
    return FCKPlugins.Items['thingie'].Path + 'script.php?external=' +  
top.document.getElementById( 'selectThingie' ).value;
  }
  this.toValue = this.toString = getURL;
});

FCKCommands.RegisterCommand( 'thingie', new FCKDialogCommand( 'thingie', 'My Thingie', _theDynamicURL, 440, 440 ) ) ;

Might be worth mentioning on the plugins help page?

Keep up the really great work!

Change History (1)

comment:1 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

Since FCKeditor is no longer supported and was replaced with CKEditor, active development of the MediaWiki extension and support for it are also finished.

I’m closing this ticket as it is no longer valid.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy