Quantcast
Channel: Adobe Community : Popular Discussions - Adobe FrameMaker
Viewing all articles
Browse latest Browse all 23442

How to include richtext in a custom xtype as multifield

$
0
0

Hi,

I have a requirement of adding a richtext in a custom multifield.

There is a richtext component created under '/apps/website/components/richtext/items/items/richtext'

This richtext would have 3 plugins as well.

 

Now my custom multifield xtype should have the below

1) Text Field

2) Pathfield

3) Richtext(with the additional plugins. Same as /apps/website/components/richtext/items/items/richtext).

 

I tried the below option

1)

this.text = new CQ.form.RichText({

                anchor: '100%',

                fieldLabel : "Enter Text",

                width : '400',

                "rtePlugins" :{

                    "edit" : {

                        "features" : ['cut', 'copy', 'paste-plaintext']

                    },

                    "subsuperscript" : {

                        "features" : "*"

                    },

                    "spellcheck" : {

                        "features" : "*"

                    },

                    "undo" : {

                        "features" : "*"

                    },

                    "findreplace" : {

                        "features" : "*"

                    },

                    "misctools" : {

                        "features" : "*"

                    }

                },

                listeners : {

                    change :{

                        scope : this,

                        fn : this.updateHidden

                    },

                    dialogclose: {

                        scope : this,

                        fn : this.updateHidden

                    },

                    destroy: function(){

                        this.el.dom={};

                    }

                }

            });

            this.add(this.text);

 

However in the dialog I'm able to add the xtype only once.

On click of add item I see the below error in console


TypeError: features is undefined
var featCnt = features.length;

Please let me know how I can get rid of this error.

2) Is there an option to include xtype as cqinclude

  path : '/apps/website/components/richtext/items/items/richtext.infinity.json',

  xtype : 'cqinclude',  

 

Thanks

Narendra.


Viewing all articles
Browse latest Browse all 23442

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>