Text(V2) edit in full screen

Avatar

Avatar

sreenu539

Avatar

sreenu539

sreenu539

02-05-2018

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

Replies

Avatar

Avatar

sreenu539

Avatar

sreenu539

sreenu539

03-05-2018

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

Avatar

Avatar

sreenu539

Avatar

sreenu539

sreenu539

03-05-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.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

03-05-2018

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

Avatar

Avatar

sreenu539

Avatar

sreenu539

sreenu539

03-05-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.

Avatar

Avatar

Kunwar

Employee

Avatar

Kunwar

Employee

Kunwar
Employee

03-05-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.

Avatar

Avatar

sreenu539

Avatar

sreenu539

sreenu539

03-05-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.

Avatar

Avatar

sreenu539

Avatar

sreenu539

sreenu539

03-05-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.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

03-05-2018

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

Avatar

Avatar

chirran414

Avatar

chirran414

chirran414

10-08-2018

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.