extending table inside rich text editor plugin | Community
Skip to main content
Level 4
October 16, 2015
Solved

extending table inside rich text editor plugin

  • October 16, 2015
  • 22 replies
  • 6407 views

Hi,

 

I am currently using the rich text editor table plugin. I would like to extend it to include two more extra properties I was wondering whether this is possible and if there is any examples.

 

Chris 

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 Ojjis

Hmm,
I would overlay the file in "/apps" with the same name/structure so you wont have to worry about that later one since it's quite a lot of scripts and different functions involved. 

Glad it worked out
/Johan

22 replies

chrisu168Author
Level 4
October 16, 2015

hi,

 

sorry one last question. For me to modify table.js I will need to make a new copy of it. I was wondering how the newtableplugin refers to the newtable.js

 

Chris 

Ojjis
OjjisAccepted solution
Level 7
October 16, 2015

Hmm,
I would overlay the file in "/apps" with the same name/structure so you wont have to worry about that later one since it's quite a lot of scripts and different functions involved. 

Glad it worked out
/Johan

chrisu168Author
Level 4
October 16, 2015

Hi,

 

sorry but where is this table.js I am using cq5.5

Thanks

Ojjis
Level 7
October 16, 2015

Under 5.5 it should be located under
/libs/cq/ui/widgets/source/widgets/form/rte/commands 

/Johan

Ojjis
Level 7
October 16, 2015

Hi,
sorry it's not in that file. That method is found in the file called "Table.js"
 

chrisu168Author
Level 4
October 16, 2015

Hi,

 

thanks for everything...

chrisu168Author
Level 4
October 16, 2015

Hi,

 

thanks for your reply much appreciated. I would like to ask where this transferConfigoTable method is, I cannot find it inside my TablePlugin.js

 

Chris

chrisu168Author
Level 4
October 16, 2015

doesnt looked like it worked in a nutshell. I copied the tableplugin.js and tablepropertiesdialog.js 

I added the following code for the propertiesdialog.js and in the new tableplugin.js I just refer to this propertiesdialog. Everything is the same between these files and the ones that come from the foundation lib

 

if (basicDefs) { if (!this.table) { editItems.push({ "itemId": "columns", "name": "columns", "allowBlank": false, "xtype": "textfield", "width": 50, "fieldLabel": CQ.I18n.getMessage("Columns"), "regex": /^[1-9][0-9]*$/ }); editItems.push({ "itemId": "rows", "name": "rows", "allowBlank": false, "xtype": "textfield", "width": 50, "fieldLabel": CQ.I18n.getMessage("Rows"), "regex": /^[1-9][0-9]*$/ }); editItems.push({ "itemId": "header", "name": "header", "xtype": "selection", "type": "select", "options": [ { "value": "none", "text": CQ.I18n.getMessage("No header") }, { "value": "top", "text": CQ.I18n.getMessage("First row") }, { "value": "left", "text": CQ.I18n.getMessage("First column") }, { "value": "topleft", "text": CQ.I18n.getMessage("First row and column") } ], "fieldLabel": CQ.I18n.getMessage("Header") }); } editItems.push({ "itemId": "heading", "name": "heading", "xtype": "textfield", "width": 50, "fieldLabel": CQ.I18n.getMessage("Heading"), "regex": /[a-zA-Z0-9]+\ ?/ }); editItems.push({ "itemId": "category", "name": "category", "xtype": "textfield", "width": 50, "fieldLabel": CQ.I18n.getMessage("Category"), "regex": /[a-zA-Z0-9]+\ ?/ }); editItems.push({ "itemId": "width", "name": "width", "xtype": "textfield", "width": 50, "fieldLabel": CQ.I18n.getMessage("Width"), "regex": /(^[1-9][0-9]*$)|(^1?[0-9][0-9]%$)/ }); editItems.push({ "itemId": "width", "name": "width", "xtype": "textfield", "width": 50, "fieldLabel": CQ.I18n.getMessage("Width"), "regex": /(^[1-9][0-9]*$)|(^1?[0-9][0-9]%$)/ }); editItems.push({ "itemId": "height", "name": "height", "xtype": "textfield", "width": 50, "fieldLabel": CQ.I18n.getMessage("Height"), "regex": /(^[1-9][0-9]*$)|(^1?[0-9][0-9]%$)/ }); }
chrisu168Author
Level 4
October 16, 2015

2nd file

chrisu168Author
Level 4
October 16, 2015
first file