Menu

#47 Maximize In Dialog

open
nobody
None
5
2006-05-13
2006-05-13
jamit
No

I needed a button in the FCKeditor toolbar that
opened a maximized editor in a typical FCKeditor
dialog window. I started off by modifying directly
several FCKeditor files to see what was possible.
After a day or two I had a first result: just the
basics, nothing fancy, but could not immediately use
it as it was no plugin.

Before rewritting it as a plugin I took a good look
at the “Full/Close Window”-plugin of Michal Aichinger
and Edwin Vlieg. The main thing I missed in their
plugin was the typical look-and-feel of the
FCKeditor. So my plugin had to be a mix of their fine
solution and my quick-and-dirty work.

The final result can be found here. Installation
instructions as well as the basic behavior are
included in the readme file of the plugin. I hope it
can be put to some good use.

Discussion

  • jamit

    jamit - 2006-05-13

    Maximize In Dialog Plug in

     
  • welshleddy

    welshleddy - 2006-09-12

    Logged In: YES
    user_id=1591450

    I used this plug-in (excellent work), however, the link
    buttons do not work when maximised. They work minimised. I
    have a basic toolbar whilst minimised, which changes to a
    larger toolbar once maximised. If I add the links to the
    basic, they work. Any ideas?

     
  • welshleddy

    welshleddy - 2006-09-12

    Logged In: YES
    user_id=1591450

    I used this plug-in (excellent work), however, the link
    buttons do not work when maximised. They work minimised. I
    have a basic toolbar whilst minimised, which changes to a
    larger toolbar once maximised. If I add the links to the
    basic, they work. Any ideas?

     
  • jamit

    jamit - 2006-09-16

    Logged In: YES
    user_id=1117328

    When posting comments, please provide some background
    information on the used browser version, FCKeditor
    version/build, language(s), skin(s),… as this can speed up
    the response.

     
  • jamit

    jamit - 2006-09-16

    Logged In: YES
    user_id=1117328

    Hi welshleddy,

    To determine what the problem is I had to run a little
    test.
    I took a standard FCKeditor version 2.3.1 build 1062
    (default language, toolbar and skin) and added the
    MaximizeInDialog plug-in. I looked at it in Mozilla
    Firefox 1.5 and had no problems with the links.
    In internet explorer version 6 however I saw this:

    - In normal view: (this shows the default behavior)
    The Insert/Edit Link was enabled and the Remove Link was
    disabled.
    I added a link and both the Insert/Edit Link and the
    Remove Link were enabled.
    Then I removed the link and they both returned to the
    initial state.

    - In Dialog view:
    The Insert/Edit Link was disabled (wrong initial state:
    PROBLEM!) and the Remove Link was also disabled (initial
    state: OK!).
    I had to be able to add a link in the dialog window. How?
    I used the Source-button on the toolbar to switch to the
    HTML-source of the page and added a link in HTML (for
    example: <a href=http://www.test.com>test of a link</a>).
    Then I returned to the rich editor using the Source-button
    again.
    Now that I had added a link, the Insert/Edit Link was
    disabled (state not changed: OK!) and the Remove Link was
    enabled (OK!).
    Then I removed the link and they both returned to the
    initial state. (OK!).

    Conclusion: my little test indicates that there only seems
    to be a problem with the state of the Insert/Edit Link at
    the activation of the FCKeditor in a Dialog window when
    using internet explorer.

    The next thing now is to find out why… but it looks a bit
    like a bug to me in the core of the FCK editor… I let you
    know when I find something…

     
  • jamit

    jamit - 2006-09-16

    Logged In: YES
    user_id=1117328

    Apparently Select All has the same problem as Insert/Edit
    Link (disabled at startup in a dialog window)…

     
  • jamit

    jamit - 2006-09-16

    Logged In: YES
    user_id=1117328

    Hi welshleddy,

    The MaximizeInDialog plug-in uses the FCKDialog.OpenDialog
    () method of the FCKeditor API to open the editor in a
    dialog window.
    In the file fckdialog_ie.js we can see that this FCKeditor
    API method uses the browser specific method showModalDialog
    () of internet explorer.
    If we open a page that contains the FCKeditor with
    showModalDialog() (without using the MaximizeInDialog-
    plugin) we can see that Insert/Edit Link and Select All
    are not enabled.

    Conclusion: the FCKeditor core contains a bug on
    activating these buttons when the page is opened with
    showModalDialog(), whether the plugin was used or not.

    I opened a bug report so it can be resolved in one of the
    next releases. (BUG: 1559754)

    Alternatives: (not much I am afraid)
    - insert links in minimized form
    - insert links as HTML-code in Source-view
    - use another browser

    There all not user-friendly, but they work. Eventually
    you’ll have to wait for the next release of the FCKeditor
    to get it fixed.

    I hope this is of any help to you,

     

Log in to post a comment.

Monday.com Logo