ICEfaces
  1. ICEfaces
  2. ICE-10247

ace:richTextEntry - Add the ability to use the ace:contextMenu for the input field

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: EE-3.3.0.GA_P02, 4.0
    • Fix Version/s: EE-4.1.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Feature Request: A customer would like to be able to right click the input field of the ace:richTextEntry component and have it show an ace:contextMenu.

      This works fine for other input components such as the ace:textEntry component but not for the richTextEntry. Upon right clicking the input field, the CKEditor paste menu is seen instead. This can be removed through a modified editor config but still prevents the contextMenu from being shown.

      It is possible to use a panelGroup and assign the contextMenu to this but it only works when right clicking over the richTextEntry menu buttons and not the input field.

      The use case for this is that the when right clicking the input area, it gives some menu options to add some common used text to the input field instead of typing it all out.

        Activity

        Hide
        Arturo Zambrano added a comment - - edited

        Closing as Won't Fix.

        I tried all possible approaches, but nothing worked well enough to support this feature. The main issue is that the editing area is inside an iframe element and this leads to several difficulties and complexities when trying to register client events and determine positions.

        First of all, no matter what approach is used, Firefox will simply not let us invoke a function outside of the iframe when a client event is triggered inside the iframe. On the other browsers this was possible, but things don't work as expected/desired.

        I tried various approaches to register a right click event on the iframe and then invoke the context menu event listeners, and while I managed to accomplish this, the positioning was never adequate: the context menu could never appear at the same coordinates of the mouse pointer when the click occurred. The menu appeared outside of the iframe at first. Then, I tried modifying the Wijmo code to force the menu to appear right by the mouse pointer, but the menu appeared at specific coordinates relative to the outer frame and not the iframe. Further tweaks improved the positioning but caused the menu to also take the space where its markup appears on the page, moving other elements on the page and leading to odd behaviour and still not accurate positioning. Also, there were issues with making the context menu disappear after being used or after clicking somewhere else.

        If the original use case of this feature was to provide some commonly used text fragments, it might be more appropriate to create a custom button in the toolbar, providing such text fragments. Here's a tutorial of how to accomplish that:

        http://docs.ckeditor.com/#!/guide/plugin_sdk_sample_1

        Show
        Arturo Zambrano added a comment - - edited Closing as Won't Fix. I tried all possible approaches, but nothing worked well enough to support this feature. The main issue is that the editing area is inside an iframe element and this leads to several difficulties and complexities when trying to register client events and determine positions. First of all, no matter what approach is used, Firefox will simply not let us invoke a function outside of the iframe when a client event is triggered inside the iframe. On the other browsers this was possible, but things don't work as expected/desired. I tried various approaches to register a right click event on the iframe and then invoke the context menu event listeners, and while I managed to accomplish this, the positioning was never adequate: the context menu could never appear at the same coordinates of the mouse pointer when the click occurred. The menu appeared outside of the iframe at first. Then, I tried modifying the Wijmo code to force the menu to appear right by the mouse pointer, but the menu appeared at specific coordinates relative to the outer frame and not the iframe. Further tweaks improved the positioning but caused the menu to also take the space where its markup appears on the page, moving other elements on the page and leading to odd behaviour and still not accurate positioning. Also, there were issues with making the context menu disappear after being used or after clicking somewhere else. If the original use case of this feature was to provide some commonly used text fragments, it might be more appropriate to create a custom button in the toolbar, providing such text fragments. Here's a tutorial of how to accomplish that: http://docs.ckeditor.com/#!/guide/plugin_sdk_sample_1

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: