Expand my Community achievements bar.

Text(V2) edit in full screen

Avatar

Level 7

Hi,

I am trying to use aem-core-wcm-components/content/src/content/jcr_root/apps/core/wcm/components/text/v2/text at master...

with AEM 6.3 with SP2

If I use inplace editing full screen mode - I am able to see all rte plugins.

When I use Wrench Icon and go full screen mode - I am not able to see all rte plugins.

Is this expected behavior? ( only inplace editing full screen mode display all rte plugins but not wrench icon full screen mode)

If this is not expected behavior for wrench icon full screen mode, is there any configuration or cq-dialog configuration that I need to put in ?

Thanks,

Sri

18 Replies

Avatar

Level 7

I went through this article Configuring the Rich Text Editor  and aem-core-wcm-components/content/src/content/jcr_root/apps/core/wcm/components/text/v2/text at master... and Configuring Experience Manager Rich Text Editor Plugins in a Touch UI Component Dialog

In these, there is "fullscreen" in adobe help site,  "dialogFullscreen" in github code for uiSettings node. In Ratna Kumar article, there is nothing about fullscreen or dialogfullscreen.

Please guide me.

I copied exactly this aem-core-wcm-components/content/src/content/jcr_root/apps/core/wcm/components/text/v2/text at master... component into my project component folder and seeing following errors when clicked on wrench icon, fullscreen, coming out of fullscreen.

here are the screen shots :

Screen Shot 2018-05-03 at 8.02.12 AM.pngScreen Shot 2018-05-03 at 8.02.33 AM.pngScreen Shot 2018-05-03 at 8.02.51 AM.png

  NOTE: I am talking about wrench icon dialog mode - NOT inplace editing mode.

Avatar

Level 10

"When I use Wrench Icon and go full screen mode - I am not able to see all rte plugins."

That is because you did not follow the instructions in Ratna's article. If you install the package from Ratna artilce and open the dialog by clicking the wrench icon - you will see all of the dialog plug-ins appear. (it works here)

ADialog.png

As explained in the article -- to get this results - you need to modify the JCR by adding these nodes.

ADialog2.png

Avatar

Level 7

FYI : I tried the package in Ratna's article. It did not work either. Those nodes are added. Do I need to make any changes to use coral ui 2 vs coral ui3 ? or to use specific richText.js ? why there is dialogFullScreen vs fullscreen nodes in uiSettings ?

Avatar

Level 10

Your AEM instance is not working properly then - try installing on a Fresh AEM 6.2/6.3 instance. This has been tested numerous times. Are you getting those JS Errors when you try and run Rantas package?

Avatar

Level 7

Screen Shot 2018-05-03 at 10.27.44 AM.png

RTE.png

Issues:

1) not all rte plugins displayed in wrench icon full screen mode

2) pencil icon full screen mode - close button try it multiple times , hiding some of the rte plugins

3) I am not able to show here but i was not able to close the popup in full screen - wrench icon full screen.

I tried above this on fresh AEM 6.3 - SP2

Issue here is not only Ratna's RTE, out of the box Text(V2) also having issues. ( if features are not enabled in design dialog - wrench icon full screen mode is not closeable) and you can see all js errors in my previous reply.

Avatar

Level 10

There is an issue with your AEM Instance (if you used the package exactly as is).

This is how its suppose to work - you will get same results on a Fresh instance.

Avatar

Level 10

Having said this -- Ratna package is based on overlaying the /libs/foundation/components/text component - not the core text component. I am doing more testing.

Avatar

Level 10

I tested with a core component that I extended. I put the RTE plugins under the core component dialog and it works...

ADialog33.png

Avatar

Level 7

May I know what AEM version you are using ? what core component you are extending (apps/core/wcm/components/text/v1 or v2 ?)

Avatar

Level 5

Hello smacdonald2008

I have an issue with using core v2 text component, i.e,. RTE plugins are missing, can you share a package with us how you tested the core Text component?

We are using AEM 6.3 + SP2 Core Text V2 component.

Thanks

Narayana.

Avatar

Level 7

RTE - whichever version it is, not consistent. I have had the Ratna-RTE package on fresh instance 6.3 and on 6.3.2

At first it worked, once I open developer tool bar and had couple of debug break points at uisettings.fullscreen.toolbar

it threw js error as fullscreen is undefined.

That is it. It is gone, the behavior is not the same.

Avatar

Level 10

So in my video above it shows it working. WHat action are you doing so it breaks?

Avatar

Level 7

Yes it works for a while.

Put a break point at bold text in developer tools in clientlib / all.js.

//extend toolbar builder to register insert image

    CUI.rte.ui.cui.CuiToolbarBuilder = new Class({

        toString: "EAEMCuiToolbarBuilder",

        extend: CUI.rte.ui.cui.CuiToolbarBuilder,

        _getUISettings: function (options) {

            var uiSettings = this.superClass._getUISettings(options),

                feature = ExperienceAEM.TIM_UI_SETTING;

            //uncomment this to make image insert available for inline toolbar

            /*if (toolbar.indexOf(feature) === -1) {

             var index = toolbar.indexOf("fullscreen#start");

             toolbar.splice(index, 0, feature);

             toolbar.splice(index + 1, 0, "-");

             }*/

            //add image insert to fullscreen toolbar

           toolbar = uiSettings.fullscreen.toolbar;

            if (toolbar.indexOf(feature) === -1) {

                toolbar.splice(3, 0, feature);

            }

            return uiSettings;

        }

    });

Put a breakpoint in richtext.js :

finish: function (isCancelled) {

      if (this.sourceEditMode) {

        this.editorKernel.fireUIEvent('disablesourceedit');

      }

      if (this._dispatchEvent(isCancelled ? 'beforeCancel' : 'beforeFinish')) {

        return undefined;

      }

      var context = this.editorKernel.getEditContext();

     var body = context.doc.body;

      var editedContent = this.editorKernel.getProcessedHtml();

      if (this.isActive) {

        CUI.rte.Selection.resetSelection(context, 'start');

        this.finalizeEventHandling();

        this.deactivateEditorKernel();

        this.$textContainer.removeClass('is-edited');

        this.textContainer.contentEditable = 'inherit';

      }

      this.textContainer.blur();

      body.spellcheck = this.savedSpellcheckAttrib;

      var ua = CUI.rte.Common.ua;

      if ((ua.isGecko || ua.isWebKit) && this.savedOutlineStyle) {

        this.textContainer.style.outlineStyle = this.savedOutlineStyle;

      }

      if (!this.options.preventDOMRewrite) {

        this.textContainer.innerHTML =

          (isCancelled ? this._initialContent : editedContent);

      }

      this.isActive = false;

      this._dispatchEvent(isCancelled ? 'onCancelled' : 'onFinished');

      this.$element.trigger(isCancelled ? 'editing-cancelled' : 'editing-finished',

        [editedContent]);

      return editedContent;

    }

once you pass through break points : look for js errors in console.

component behavior is not works as expected anymore. That is it, no consistent behavior after that.

Avatar

Employee

Machine you are working on, is a touch enabled laptop? If yes, disable the touch events api for chrome/firefox and retry this.

i have seen weird behavior and usually disbaling browser specific touch events api helps.

Avatar

Level 7

Kunwar & Scott:

This is Mac machine. Not touch enabled.

FYI :  6.3.2  only has this code

http://localhost:4502/libs/cq/gui/components/authoring/dialog/clientlibs/all.js

//extend toolbar builder to register insert image

    CUI.rte.ui.cui.CuiToolbarBuilder = new Class({

        toString: "EAEMCuiToolbarBuilder",

        extend: CUI.rte.ui.cui.CuiToolbarBuilder,

        _getUISettings: function (options) {

            var uiSettings = this.superClass._getUISettings(options),

                feature = ExperienceAEM.TIM_UI_SETTING;

            //uncomment this to make image insert available for inline toolbar

            /*if (toolbar.indexOf(feature) === -1) {

             var index = toolbar.indexOf("fullscreen#start");

             toolbar.splice(index, 0, feature);

             toolbar.splice(index + 1, 0, "-");

             }*/

            //add image insert to fullscreen toolbar

           toolbar = uiSettings.fullscreen.toolbar;

            if (toolbar.indexOf(feature) === -1) {

                toolbar.splice(3, 0, feature);

            }

            return uiSettings;

        }

    });

It seems above code is not present in 6.3.

Even in 6.3.2 cq-dialog xml uiSettings node contains "dialogFullscreen" whereas code is looking for fullscreen ??

Please check and let me know.

Avatar

Level 10

You should report this to AEM Eng via a support ticket, I have never seen this behaviour before.

Avatar

Level 7

Kunwar & Scott:

This is Mac machine. Not touch enabled.

FYI :  6.3.2  only has this code

http://localhost:4502/libs/cq/gui/components/authoring/dialog/clientlibs/all.js

//extend toolbar builder to register insert image

    CUI.rte.ui.cui.CuiToolbarBuilder = new Class({

        toString: "EAEMCuiToolbarBuilder",

        extend: CUI.rte.ui.cui.CuiToolbarBuilder,

        _getUISettings: function (options) {

            var uiSettings = this.superClass._getUISettings(options),

                feature = ExperienceAEM.TIM_UI_SETTING;

            //uncomment this to make image insert available for inline toolbar

            /*if (toolbar.indexOf(feature) === -1) {

             var index = toolbar.indexOf("fullscreen#start");

             toolbar.splice(index, 0, feature);

             toolbar.splice(index + 1, 0, "-");

             }*/

            //add image insert to fullscreen toolbar

           toolbar = uiSettings.fullscreen.toolbar;

            if (toolbar.indexOf(feature) === -1) {

                toolbar.splice(3, 0, feature);

            }

            return uiSettings;

        }

    });

It seems above code is not present in 6.3.

Please check and let me know.