Add a Content template for tasks

24 views
Skip to first unread message

Guido van Leeuwen

unread,
May 26, 2016, 2:22:48 PM5/26/16
to DevTargetProcess
I'm trying to add a content template to the menu as shown in the attachment. I should do this in the default.js file located in the wwwroot\Ckeditor\new…or\plugins\templates\templates directory. But my addition won't show up in the menu.

Content of the js file:

/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.addTemplates('default',{imagesPath:CKEDITOR.getUrl(CKEDITOR.plugins.getPath('templates')+'templates/images/'),templates:[{ title: "I en O taak", image: "template3.gif", description: "I en O taak template.", html: '<div><table style="width:850px;" cellspacing="1" cellpadding="1" border="1px thin solid black;"><tr><td width="150px;">Klant</td><td width="700px;">&nbsp;</td></tr><tr><td>Omgeving</td><td>Productie / Test</td></tr><tr><td>Beschikbare tijd</td><td>&nbsp;</td></tr><tr><td>Declarabel</td><td>Ja/ Nee</td></tr><tr><td>Uitvoeren voor</td><td>&nbsp;</td></tr><tr><td>Info bij</td><td>&nbsp;</td></tr><tr><td>Contactpersoon klant</td><td>&nbsp;</td></tr><tr><td>Terugkoppeling</td><td>Geen / Intern / Klant</td></tr></table><p>Werkzaamheden<br/><br/></p></div>' },{title:'Image and Title2',image:'template1.gif',description:'One main image with a title and text that surround the image.',html:'<h3><img style="margin-right: 10px" height="100" width="100" align="left"/>Type the title here</h3><p>Type the text here</p>'},{title:'Strange Template',image:'template2.gif',description:'A template that defines two colums, each one with a title, and some text.',html:'<table cellspacing="0" cellpadding="0" style="width:100%" border="0"><tr><td style="width:50%"><h3>Title 1</h3></td><td></td><td style="width:50%"><h3>Title 2</h3></td></tr><tr><td>Text 1</td><td></td><td>Text 2</td></tr></table><p>More text goes here.</p>'},{title:'Text and Table',image:'template3.gif',description:'A title with some text and a table.',html:'<div style="width: 80%"><h3>Title goes here</h3><table style="width:150px;float: right" cellspacing="0" cellpadding="0" border="1"><caption style="border:solid 1px black"><strong>Table title</strong></caption></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr></table><p>Type the text here</p></div>'}]});
26-5-2016 20-09-52.png

julia.k...@targetprocess.com

unread,
May 30, 2016, 8:03:03 AM5/30/16
to DevTargetProcess
Hi Guido,

Here are the steps to add a new CKEditor template:
1. Change default.js file at \wwwroot\TargetProcess2\wwwroot\JavaScript\tau\node_modules\tp-ckeditor\ckeditor\plugins\templates\templates
2. Clear your browser's cache. You can see the currently used template in a browser by accessing a direct link [your TP URL]/JavaScript/tau/node_modules/tp-ckeditor/ckeditor/plugins/templates/templates/default.js

Hope this helps,
Julia.

Guido van Leeuwen

unread,
May 30, 2016, 2:52:35 PM5/30/16
to DevTargetProcess
Hi Julia.

Thanks for your answer, that did it!

Regards,
Guido

Guido van Leeuwen

unread,
Oct 26, 2016, 7:47:39 AM10/26/16
to devtarge...@googlegroups.com
Hi Julia,

We've installed several updates lately, but every time the default.js file is overwritten. Is there a way to prevent this from happening?
Kind regards,
Guido van Leeuwen
IDB Groep B.V.

--
You received this message because you are subscribed to a topic in the Google Groups "DevTargetProcess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/devtargetprocess/a_ZUpVkqB58/unsubscribe.
To unsubscribe from this group and all its topics, send an email to devtargetprocess+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Mzzls - Guido

julia.k...@targetprocess.com

unread,
Oct 26, 2016, 10:51:20 AM10/26/16
to DevTargetProcess
Hi Guido,

Unfortunately not, it's not possible to prevent the default file from being overwritten.

Best wishes,
Julia.
To unsubscribe from this group and all its topics, send an email to devtargetproce...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Mzzls - Guido

Reply all
Reply to author
Forward
0 new messages