WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 01.11.2017 21:57:32

rjgamer
Developer

[Erledigt] CKEditor Plugins deaktivieren

Hallo,

ist es irgendwie möglich im Frontend Template den CKEditor zu konfigurieren. Ich meine nicht Styles oder das CSS, sondern die Konfiguration um Plugins oder zB. Heading 1 deaktivieren.

Danke und Gruss
rjgamer

Beitrag geändert von rjgamer (01.11.2017 21:57:39)

Offline

#2 01.11.2017 22:46:00

stefanek
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

Ja, sicher.
Das ist alles möglich.
Schaust Du hier ab Zeile 23
https://github.com/WBCE/WBCE_CMS/blob/m … aq.txt#L23

Gruß,
Christian


“Success is the progressive realization of a worthy ideal.” ― Earl Nightingale

Offline

#3 02.11.2017 07:31:31

rjgamer
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

Ja, gesehen und auch angewendet. Aber es hat nur drei Dateien für das CSS, die Styles und Templates vom CKEditor.

Ich will aber die Konfiguration wie zB die Reihenfolge der Buttons ändern oder gleich ganze Plugins deaktivieren können.

Offline

#4 02.11.2017 11:49:14

colinax
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

Hi,

um die Anordnung der Buttons zu muss die Developer Edition vorhanden sein, in der Standard Edition (die im WBCE Paket enthalten) wurde diese Funktion zu Gunsten einer besseren Stabilität und DAU-Sicher(heit) gestrichen.

Offline

#5 02.11.2017 12:27:36

stefanek
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

Hallo Jonathan,
ja, also irgendwas hat sich da verändert in den letzten WBCE Versionen.
Hier gehts noch:
https://github.com/WBCE/WBCE_CMS/tree/1 … /wb_config
(1.1.x Strang)

Eine Sache, die ich persönlich auch öfter verwende.

@Colinax
Übrigesns bzgl. CKE: schon mal das image2 Plugin angeschaut? Habe es mir die letzten Tage einmal in den CKE importiert und ist eine gute Sache:
https://www.drupal.org/project/ckeditor_image2
(Bild Ausrichtung plus native Capitions)
Gruß,
Christian


“Success is the progressive realization of a worthy ideal.” ― Earl Nightingale

Offline

#6 02.11.2017 12:39:23

colinax
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

stefanek schrieb:

ja, also irgendwas hat sich da verändert in den letzten WBCE Versionen.
Hier gehts noch: https://github.com/WBCE/WBCE_CMS/tree/1 … /wb_config
(1.1.x Strang)

Ja, ich habe mit der version 4.6 den CKE in zwei Editionen aufgeteilt.

Der CKE in WBCE 1.1.x entspricht vom Funktionsumfang her der Developer Edition


stefanek schrieb:

Übrigesns bzgl. CKE: schon mal das image2 Plugin angeschaut? Habe es mir die letzten Tage einmal in den CKE importiert und ist eine gute Sache:
https://www.drupal.org/project/ckeditor_image2
(Bild Ausrichtung plus native Capitions)

Ja, angeschaut schon ausprobiert noch nicht.
Das Problem dürfte aber eher sein wie die Themes das figure & figcaption umsetzen, ich will nicht das es zu einer Anfrage-Flut kommt da die Bilder nicht mehr das machen was sie sollten.

Offline

#7 02.11.2017 12:55:57

rjgamer
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

stefanek schrieb:

https://github.com/WBCE/WBCE_CMS/tree/1 … /wb_config
(1.1.x Strang)

Eine Sache, die ich persönlich auch öfter verwende.

Mit der DEV-Edition geht es jetzt. Aber dort fand ich leider die CKEditor-spezifischen Konfigurationen nicht (hätte mich bei CKEditor.com einlesen müssen). Aber im zitierten GitHub-Link findet man in der alten Version noch alles was man braucht.

Ich empfehle beim nächsten CKEditor Release der DEV-Edition folgendes hinzuzufügen (evt. nur auskommentiert) :

[== JavaScript ==]

	config.ModulVersiom  = '';

	config.fullPage = false;

  // Both options are for XHTML 1.0 strict compatibility
  // config.indentClasses = [ 'indent1', 'indent2', 'indent3', 'indent4' ];
  // [ Left, Center, Right, Justified ]
  // config.justifyClasses = [ 'left', 'center', 'right', 'justify' ];

  config.templates_replaceContent =   false;
  // Define all extra CKEditor plugins in _yourwb_/modules/ckeditor/ckeditor/plugins here
  //config.extraPlugins = 'timestamp';

  // Different Toolbars. Remove, add or move 'SomeButton', with the quotes and following comma 
	config.toolbar_Full =
	[
		{ name: 'document', items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
		{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
		{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
		{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
		'/',
		{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
		{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
		{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
		{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
		'/',
		{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
		{ name: 'colors', items : [ 'TextColor','BGColor' ] },
		{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','-','About' ] }
	];
  config.toolbar_WB_Basic = [
			['Source','Preview'],['Cut','Copy','Paste','PasteText','PasteFromWord'],['Image','Flash','Table','HorizontalRule'],['Wbdroplets','Wblink','Unlink','Anchor'],['Undo','Redo','-','SelectAll','RemoveFormat'],['Maximize','ShowBlocks','-','Code','About'],'/',
			['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Bold','Italic','Underline','Strike'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv']];

	// see http://docs.cksource.com/CKEditor_3.x/Developers_Guide/Toolbar
	config.toolbar_WB_Full =
	[
		{ name: 'document', items : [ 'Source','-','Save','Print','-','DocProps','Preview','NewPage','-','Templates' ] },
		{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
		{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
		{ name: 'colors', items : [ 'TextColor','BGColor' ] },
		{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','Code','-','About' ] },
		'/',
		{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','Shy','-','RemoveFormat' ] },
		{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
 		{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton','HiddenField' ] },
		'/',
		{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
		{ name: 'links', items : [ 'Link','Unlink','Anchor','Wbdroplets','Wblink' ] },
		{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] }

	];

	config.toolbar_WB_Default =
	[
		{ name: 'mode', items : [ 'Source','autoFormat','CommentSelectedRange','UncommentSelectedRange' ] },
		{ name: 'document', items : [ 'Save','wbSave','Print','-','Preview','NewPage','-','Templates' ] },
		{ name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo','backup' ] },
		{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
		'/',
		{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','Shy','-','RemoveFormat' ] },
		{ name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
		{ name: 'links', items : [ 'Wbdroplets','Wblink','Unlink','Anchor' ] },
		{ name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','Iframe','Youtube','oembed' ] },
		'/',
		{ name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
		{ name: 'colors', items : [ 'TextColor','BGColor' ] },
		{ name: 'tools', items : [ 'Maximize', 'ShowBlocks','Syntaxhighlight','-','About' ] }

	];

    config.toolbar_Basic = [['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','Code','About']];
    config.toolbar_WB_Simple = [['Bold','Italic','-','NumberedList','BulletedList','-','Wbdroplets','Wblink','Unlink','-','Scayt','-','Code','About']];

	// The default toolbar. Default: WB_Default
  config.toolbar = 'WB_Default';

  // Explanation: _P: new <p> paragraphs are created; _BR: lines are broken with <br> elements;
  //              _DIV: new <div> blocks are created.
  // Sets the behavior for the ENTER key. Default is _P allowed tags: _P | _BR | _DIV
  config.enterMode = CKEDITOR.ENTER_P;

  // Sets the behavior for the Shift + ENTER keys. allowed tags: _P | _BR | _DIV
  config.shiftEnterMode = CKEDITOR.ENTER_BR;
  
  /* Allows to force CKEditor not to localize the editor to the user language. 
  * Default: Empty (''); Example: ('fr') for French. 
  * Note: Language configuration is based on the backend language of WebsiteBaker. 
  * It's defined in include.php
  * config.language         = ''; */
  // The language to be used if config.language is empty and it's not possible to localize the editor to the user language.
  config.defaultLanguage  = 'en';

  config.docType          = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">';

	config.image_previewText = 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.';

    /* The skin to load. It may be the name of the skin folder inside the editor installation path,
    * or the name and the path separated by a comma. 
    * Available skins: moono*/
    config.skin             = 'moono';

    // The standard height and width of CKEditor in pixels.
    config.height           = '250';
    config.width            = '900';
    config.toolbarLocation  = 'top';

    // Define possibilities of automatic resizing in pixels. Set config.resize_enabled to false to 
    // deactivate resizing.
    config.resize_enabled   = true;
    config.resize_minWidth  = 500;
    config.resize_maxWidth  = 1500;
    config.resize_minHeight = 200;
    config.resize_maxHeight = 1200;
		config.resize_dir = 'vertical';

Danke für den Support!

Gruss

Beitrag geändert von rjgamer (02.11.2017 12:56:59)

Offline

Liked by:

stefanek

#8 02.11.2017 13:09:39

rjgamer
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

Komischerweise kann ich immer noch nicht die Toolbar selber definieren. Hintergrundfarbe als Beispiel geht aber.

Warum geht dies nicht?

[== JavaScript ==]
    config.toolbar_Basic = [
        ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink', '-', 'Code', 'About']
    ];

    // The default toolbar. Default: WB_Default
    //config.toolbar = 'toolbar_Basic'; <== FALSCH
    config.toolbar = 'Basic';

Ich Idiot smile Thema erledigt. Ohne "toolbar_" bei der Deklaration ist die Lösung smile

Beitrag geändert von rjgamer (02.11.2017 13:22:17)

Offline

#9 02.11.2017 14:09:40

stefanek
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

colinax schrieb:
stefanek schrieb:

Übrigesns bzgl. CKE: schon mal das image2 Plugin angeschaut? Habe es mir die letzten Tage einmal in den CKE importiert und ist eine gute Sache:
https://www.drupal.org/project/ckeditor_image2
(Bild Ausrichtung plus native Capitions)

Ja, angeschaut schon ausprobiert noch nicht.
Das Problem dürfte aber eher sein wie die Themes das figure & figcaption umsetzen, ich will nicht das es zu einer Anfrage-Flut kommt da die Bilder nicht mehr das machen was sie sollten.

Verstehe,
könntest Du trotzdem mit eintüten, ohne es scharf zu schalten.
Probier es mal aus.
Wirklich sinnvoll.

Christian


“Success is the progressive realization of a worthy ideal.” ― Earl Nightingale

Offline

#10 02.11.2017 14:17:44

stefanek
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

rjgamer schrieb:

Danke für den Support!

Wer so viel Einsatz gibt wie Du darf auch gerne etwas Unterstützung zurück erwarten.  wink

Beitrag geändert von stefanek (02.11.2017 14:17:58)


“Success is the progressive realization of a worthy ideal.” ― Earl Nightingale

Offline

#11 03.11.2017 08:33:16

rjgamer
Developer

Re: [Erledigt] CKEditor Plugins deaktivieren

Schade ist dies in der include.php:

[== PHP ==]
/**	Define all extra CKEditor plugins here */
$ckeditor->config['extraPlugins'] = 'wbdroplets,wblink,wbsave,wbshybutton,autolink,ckawesome,codemirror,lineutils,oembed,textselection,widget,widgetselection,syntaxhighlight';
$ckeditor->config['removePlugins'] = 'wsc,link,save';
$ckeditor->config['removeButtons'] = 'Font';
$ckeditor->config['fontawesomePath'] = WB_URL.'/include/font-awesome/css/font-awesome.min.css';

Diese Konfiguration lässt sich mittels wb_ckconfig.js nicht überschreiben und man muss direkt die include.php manipulieren.

Gruss

Beitrag geändert von rjgamer (03.11.2017 08:33:30)

Offline

Fußzeile des Forums

up