Text(V2) edit in full screen | Community
Skip to main content
sreenu539
Level 7
May 2, 2018

Text(V2) edit in full screen

  • May 2, 2018
  • 4 replies
  • 8643 views

Hi,

I am trying to use aem-core-wcm-components/content/src/content/jcr_root/apps/core/wcm/components/text/v2/text at master · Adobe-Marketing-C…

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

smacdonald2008
Level 10
May 2, 2018

You have to configure the RTE plug-ins as discussed here -- Configuring Experience Manager Rich Text Editor Plugins in a Touch UI Component Dialog

Hope this helps...

sreenu539
sreenu539Author
Level 7
May 3, 2018

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 · Adobe-Marketing-C 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 · Adobe-Marketing-C 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 :

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

smacdonald2008
Level 10
May 3, 2018

"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)

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

sreenu539
sreenu539Author
Level 7
May 3, 2018

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.

smacdonald2008
Level 10
May 3, 2018

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

sreenu539
sreenu539Author
Level 7
May 3, 2018

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.

Adobe Employee
May 3, 2018

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.

sreenu539
sreenu539Author
Level 7
May 3, 2018

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.

smacdonald2008
Level 10
May 4, 2018

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

sreenu539
sreenu539Author
Level 7
May 3, 2018

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.