Multifield richtext editor | Community
Skip to main content
Level 2
October 16, 2015
Solved

Multifield richtext editor

  • October 16, 2015
  • 4 replies
  • 1354 views

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. 

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

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;}

4 replies

smacdonald2008
Level 10
October 16, 2015

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. 

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

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;}

smacdonald2008
Level 10
October 16, 2015

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

burnrayAuthor
Level 2
October 16, 2015

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.