Recently Browsing
0 members

Similar Content

Not sure where I originally saw it while lurking around the forums, but someone, somewhere at some time was asking about styling Uikit checkboxes as toggle-style switches, much like the ones at the bottom of this post asking me if I want to be notified of replies.
So here is my humble offering, rough and ready, which can be thrown in at the bottom of your Uikit css as a starting point.
Everything is based on ems and rems, so you can increase size as you desire by altering the single instance of font-size.
It only targets single instances of labels within a specific field to a) try to limit unintended consequences and b) because in those cases it often seems more user-friendly to have an on/off binary switch rather than a checkbox. It's still totally a checkbox, just styled differently.

Hello,
is it possible to configure CKEditor to have syntax highlighting enabled in Source and/or Sourcedialog? Coming from MODX i had this feature enabled and now I'm trying to find a solution for PW too.
I'd like to have both the WysiWyg Editor and the Source editor with syntax highlighting enabled in on field.
Andy plugins to achieve this?
Greetings,
Martin

Hello,
I have a user page template with many fields that are organised in tabs. Tabs do not work on the profile edit screen. So I had to find a way how to let users edit their page with tabs in place.
The way I solved this is having users edit their user page in the backend instead of their profile page. So basically they are on a page edit screen and not on their profile edit screen which is a different process. The drawback of this method is that the users edit their profile on a URL like .../youradminurl/access/users/edit/?id=1377. So I needed to make sure that users cannot edit other users' profiles by just switching out the id. I did this through hooks that redirect them to their own profile.
This is far from a perfect solution. Ideally I would like to mask the page edit url to something like /myprofile but haven't found a way on how to do this, yet.
How would you go about this?
redirect rules in .htaccess
hooking into the profile edit process?
Either way I couldn't figure out how to accomplish it. Any pointers towards a solution would be very much appreciated.

I've got some odd problem adding additional styles to mystyles.js. After reading some and following the article here: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/modules/Inputfield/InputfieldCKEditor/README.md#custom-editor-js-styles-set
I was able to add a custom style. So far so good 😉
It is displayed in the Styles menu and can be selected there. Now the odd thing starts, if I add a custom style like this:

...
{ name: 'Box Top', element: 'span',attributes: { 'class': 'box_top' } },
{ name: 'Box Bottom', element: 'span', attributes: { 'class': 'box_bottom' } }
it works and can be selected just fine.
However, if I add this:
{ name: 'Box Top', element: 'div',attributes: { 'class': 'box_top' } },
{ name: 'Box Bottom', element: 'div', attributes: { 'class': 'box_bottom' } }
It is also displayed, can be selected - BUT - once the edit is saved, it is gone, won't be displayed in the page and won't be shown anymore in the editor as selected style, it goes back to "normal".

I added some custom styles to the CKeditor menu bar using the example mystyles.js and the PW tutorial. This worked fine for fields when editing on the frontend. But none of our custom styles showed in the backend editor dropdown unless we edited the core copy of mystyles.js in wire/modules.
Is this correct behaviour, a bug or a mistake on my part? Tried clearing cache, logging in/out etc but the backend ignores our custom styles in the site/modules path.