Jump to content

Recommended Posts

Posted

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:

big
*[class]

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

CKEditor-mystyles.png

Posted
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.

text_editor_overrides.png

Posted

@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:

mystyles.thumb.gif.fb2f2f70ecfb239d0c9bcfb6605728bc.gif

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.

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...