WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 12.08.2015 20:52:07

nibz
Mitglied

[Erledigt] CKeditor templates

Hi there,

By default WBCE uses CKeditor this is really great but i have a question;
How do i activate the "templates" button, since in my template i use a folder called editor with in it a editor.css and editor.templates.js and wb_ckconfig.js.

Why i am asking this is that i am creating a template for WBCE and i want the user to be able to use pre-formatted templates.

Hope to hear from someone smile.

Kind regards,

Robin

Offline

#2 13.08.2015 10:19:35

webbird
Administrator

Re: [Erledigt] CKeditor templates

See here: http://ckeditor.com/addon/templates


Ich habe eine Amazon-Wishlist. wink Oder spende an das Projekt.
Ich kann, wenn ich will, aber wer will, dass ich muss, kann mich mal

Offline

#3 13.08.2015 10:39:59

norhei
Developer

Re: [Erledigt] CKeditor templates

That reminds me that i made a collection of templates for CKE... lets see if i can find em in the archives.

Offline

#4 13.08.2015 12:57:16

florian
Administrator

Re: [Erledigt] CKeditor templates

In the wb_ckconfig.js of your template add 'Templates' to the active set and a corresponding toolbar.
I figured out that in the wb_ckconfig.js of the default WBCE template it's the toolbar "WB_ECH" (whatever this means), e.g:

[== JavaScript ==]
config.toolbar_WB_ECH =
	[
		
		{ name: 'document', items : [ 'Save','wbSave','Templates' ] },
// ------------------------------------------there--------------^
		{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','backup' ] },
		{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-' ] },
		{ name: 'mode', items : [ 'Source','autoFormat','CommentSelectedRange','UncommentSelectedRange' ] },
		{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','SpecialChar','Iframe','youtube','oembed' ] },
		{ name: 'links', items : [ 'Wbdroplets','Wblink','Unlink','Anchor' ] },
		'/',
		{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','Shy','-','RemoveFormat' ] },
		{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] },		
		{ name: 'styles', items : ['Format','FontSize' ] },
		{ name: 'colors', items : [ 'TextColor','BGColor' ] },
		{ name: 'tools', items : [ 'Maximize','About' ] }
		
	];

That should do the trick.


Code allein macht nicht glücklich. Jetzt spenden!

Offline

#5 13.08.2015 19:35:20

nibz
Mitglied

Re: [Erledigt] CKeditor templates

Hi Florian,

I tried what you said but it didn't work.
When i try to load other items in the toolbar it works but i can't seem to get the ,'templates' working.
I took a look and the (ckeditor) plugin templates is installed.

Did you try your code ? if it works i would like to hear!

Kind regards,

Robin

Offline

#6 02.09.2015 20:22:32

nibz
Mitglied

Re: [Erledigt] CKeditor templates

Did somebody manage to get the templates button showing in the CKeditor toolbar ? since i didn't get it working.

Offline

#7 02.09.2015 20:54:34

norhei
Developer

Re: [Erledigt] CKeditor templates

hmmm... i give it a try

Offline

#8 02.09.2015 21:09:00

norhei
Developer

Re: [Erledigt] CKeditor templates

hmmm ... templates are there by default ... not many templates  but the button is there . Testing on a recent dev version of WBCE.

Offline

#9 02.09.2015 21:15:47

norhei
Developer

Re: [Erledigt] CKeditor templates

I zipped the version i am using here (from recent Dev) and posted it here.
Remove your CKE and install this one. 


If this won't do it , i need acces to your installation and ftp to check whats wrong.
Or maybe send a PW to marmot , as he is actually working on the CKE.

Too big for forum upload.

http://wbce.norbert-heimsath.de/cke_from_recent_dev.zip

Beitrag geändert von norhei (02.09.2015 21:42:07)

Offline

#10 02.09.2015 22:59:28

marmot
Mitglied

Re: [Erledigt] CKeditor templates

nibz schrieb:

Did somebody manage to get the templates button showing in the CKeditor toolbar ? since i didn't get it working.

please read \modules\ckeditor\DOCS\readme-faq.txt or \modules\ckeditor\wb_config\readme-faq.txt. This tells you the order where cke looks for config files. First try is _yourwbinstallation_/templates/_yourdefaulttemplate_/wb_ckconfig.js.
For a standard installation that means:
- wbce is standard frontend template
- in this template dir a wb_ckconfig.js file is present
- this is the config file to edit
- in toobar config.toolbar_WB_ECH add ,'Templates' at the toolbar section of your choice
- maybe you have to clear browser cache

All this is not my idea and one surely can argue if useful or not.

Offline

#11 02.09.2015 23:25:29

nibz
Mitglied

Re: [Erledigt] CKeditor templates

@norbert and @marmot

Both thanks for your comment. Will test in the comming days and report back.

Kind regards,

Robin

Offline

#12 03.09.2015 09:48:16

norhei
Developer

Re: [Erledigt] CKeditor templates

One more thing to mention , for new templates/setting to appear in CKE i often need to clear the browser cache!   
Especially for changes to the template file .

EDIT:
I found the old templates i once made for a client that made extensive use of the CKEditor.
I attach em here maybe they are usefull for someone else. 

All additional Template Images i made are under WTFPL.

Beitrag geändert von norhei (03.09.2015 10:01:11)

Offline

#13 03.09.2015 10:16:18

webbird
Administrator

Re: [Erledigt] CKeditor templates

An addition, make sure that "Templates" does not occur in the removeButtons config entry.

config.removeButtons = 'Underline,Subscript,Superscript';


Ich habe eine Amazon-Wishlist. wink Oder spende an das Projekt.
Ich kann, wenn ich will, aber wer will, dass ich muss, kann mich mal

Offline

#14 03.09.2015 22:42:50

nibz
Mitglied

Re: [Erledigt] CKeditor templates

Thanks for all contributions, tested it and got it working with the newer version of CKeditor in the beta3 version of WBCE.

Thanks again!! smile

Beitrag geändert von nibz (03.09.2015 22:45:06)

Offline

Fußzeile des Forums

up