Expand my Community achievements bar.

SOLVED

Multifield richtext editor

Avatar

Level 2

I want to create a multifield richtext editor. I find a article about it (http://blogs.adobe.com/contentmanagement/2013/08/22/customized-multifield-richtext-editor/). 

I follow step 1 Creating a multi richText field and get my component. The component works fine for the first time edit. But if you modify the text value (i mean for the second time edit), a js error occurs: Uncaught TypeError: Cannot set property 'value' of undefined

I'm sure I follow the instruction exactly cause it's quite simple (using xtype multifield, add fieldConfig and add xtype richtext). Can anyone try out the instruction and help? Is it an extjs bug? Other workaround suggestion is also welcomed. 

Thanks in advance. 

1 Accepted Solution

Avatar

Correct answer by
Level 10

As a workaround Overlay [1] for the method syncValue & replace [2] with [3].

[1] /libs/cq/ui/widgets/source/widgets/form/RichText.js

[2] this.el.dom.value = html;

[3] if(this.el.dom){this.el.dom.value = html;}

View solution in original post

4 Replies

Avatar

Level 10

Here is a complete end to end that will walk you though how to build a component like this:

http://scottsdigitalcommunity.blogspot.ca/2014/01/creating-aem-multifield-components.html

all of the details required to build this component are listed in the article. 

Avatar

Correct answer by
Level 10

As a workaround Overlay [1] for the method syncValue & replace [2] with [3].

[1] /libs/cq/ui/widgets/source/widgets/form/RichText.js

[2] this.el.dom.value = html;

[3] if(this.el.dom){this.el.dom.value = html;}

Avatar

Level 10

I will contact the author of this article to determine if there is a known issue. I will post back the response.

Avatar

Level 2

smacdonald2008 wrote...

I will contact the author of this article to determine if there is a known issue. I will post back the response.

 

Thanks. I can solve the problem by Sham's overlay suggestion or refresh page after edit. 

But I really want the article be updated cause it will be great benefit to other cq developers who is referring this article.