CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

[HowTo] JQHTMLEditor in JQDialog

by Alexander Bulei » 12 Apr 2013 10:24

JQHTMLEditor canonly be initialized when is visible!
If you try to initiate with hidden element in FireFox you will get this javascript error:

Code: Select all
Error: uncaught exception: [Exception...
"Component returned failure code: 0x80004005
(NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" 
nsresult: "0x80004005
(NS_ERROR_FAILURE)" 


and in other browsers will work incorrectly, some times with javascript error's, that error's come from javascript plugin.

So if you need to use the JQHTMLEditor in JQDialog, you must do:

  • Set
    Code: Select all
    JQHTMLEditorOptions.AutoPluginInit:= False;
  • Make initialization when JQHTMLEditor is visible, you can use JQDialogOptions.OnOpen

    • Code: Select all
      procedure TIWForm3.IWCGJQDialog1JQDialogOptionsOpen(Sender: TObject; AParams: TStringList);
      begin
        IWCGJQHTMLEditor1.PluginInitialization;
      end;


      or onCreate of form(frame)


    • Code: Select all
      IWCGJQDialog1.JQDialogOptions.OnOpen.Script:= 'function (event, ui){' + IWCGJQHTMLEditor1.PluginInitJS + '}';
  • Turn off JQDialogOptions animations (Show and Hide properties)

Note:
  • AutoPluginInit
  • PluginInitialization
  • PluginInitJS

Available from version V1.5.4.2010

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

Return to JQHTMLEditor

cron

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.