Jump to content

CKEditor "mystyles" not active in both templates


Recommended Posts

I am using a "text_editor" field in a repeater matrix "rx_component".

Both templates ("home" and "basic-page") are using the "rx_components" field.

I added some custom styles to the "text_editor" field "mystyles:/site/modules/InputfieldCKEditor/mystyles.js" as described here: https://github.com/processwire/processwire/blob/master/site-default/modules/InputfieldCKEditor/mystyles.js

After that I had the expected result on the pages that use the "basic-page" template. Strangely on the "home"-page these styles are not available (see attached screenshot).

I also tried to add some extra allowed content, like:


but has no effect on none of the templates. (Yes, ACF is activated)


Link to comment
Share on other sites

On 4/4/2020 at 1:40 PM, Zeka said:

@2hoch11 Make sure that there are no overrides on the second template on template field context.

@Zeka No, I have no overrides (just Label, madatory field, …)… just the "usual" overrides (see screenshot). The "home" template cannot override the settings because the "text_editor" is in the "rx_components" fields.


Link to comment
Share on other sites

1 hour ago, 2hoch11 said:

@Zeka I am using the last version, 3.0.148

This commit https://github.com/processwire/processwire/commit/7d5cef5717ef3150297f87829f03f9c4df5fa725 brings some improvements to overrides in context of repeaters, so it's not an issue in your case as it was commited in 3.0.144

Worth to ckeck JS errors on home page and also check that you have your settings in page source


Link to comment
Share on other sites

@Zeka I have no JS errors on the homepage and I did not change the settings in the page source. Here is the js-tag souce pointing to mystyles.js:


The first one ist the text_editor field, and it is ponting to the correct folder… here ist the beautyfied section belonging to the text_editor field:

	        "InputfieldCKEditor_text_editor": {
	            "baseHref": "\/",
	            "contentsCss": "\/wire\/modules\/Inputfield\/InputfieldCKEditor\/contents.css",
	            "extraPlugins": "pwimage,pwlink,sourcedialog,uploadimage",
	            "removePlugins": "image,magicline",
	            "toolbar": [
	                ["Format", "Styles", "-", "Bold", "Italic", "JustifyBlock", "JustifyCenter", "JustifyLeft", "JustifyRight", "-", "Subscript", "Superscript", "-", "RemoveFormat"],
	                ["NumberedList", "BulletedList", "-", "Blockquote"],
	                ["PWLink", "Unlink", "Anchor"],
	                ["Table", "HorizontalRule", "SpecialChar"],
	                ["PasteText", "PasteFromWord"],
	                ["Scayt", "-", "Sourcedialog"]
	            "format_tags": "p;h1;h2;h3;h4;h5;h6",
	            "language": "de",
	            "entities": false,
	            "uploadUrl": "\/processwire\/page\/edit\/?id=1&InputfieldFileAjax=1&ckeupload=1",
	            "pwUploadField": "bilder",
	            "pwAssetPageID": 1,
	            "height": "10em",
	            "stylesSet": "mystyles:\/site\/modules\/InputfieldCKEditor\/mystyles.js?nc=1586159230",
	            "customConfig": "\/site\/modules\/InputfieldCKEditor\/config.js?nc=1586159229"

Is seems to be correct.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...