Jump to content

CKEditor - Justify Preinstalled on Textarea Fields


prestoav
 Share

Recommended Posts

Hi all and thanks for the great work on PW!

One thing I find I have to do on any new site is add the Justify plugin to textarea fields as it is such a widely required feature for text headings in content.

ANy chance this could be added to the core an automatically be installed on new textarea fields using CKEditor?

Thank you!

Link to comment
Share on other sites

  • 4 weeks later...
On 4/3/2020 at 5:56 PM, elabx said:

You can use AdminOnSteroids to enable this on the text fields you need them, it's super handy, no need to install justify plugin or configure each field!

Sorry for the late reply, that works a treat!!!

Do you know if there is a similar way to set the tools as default as I couldn't see that in AOS?

For example I'd like these tools as default in the editor bar:

Format, Styles, -, Bold, Italic, -, Superscript, Subscript, RemoveFormat
JustifyLeft, JustifyCenter, JustifyRight, JustifyBlock

  • Like 1
Link to comment
Share on other sites

On 4/29/2020 at 5:01 PM, tpr said:

I think it's doable with AOS, check the FieldOverrides feature:

https://github.com/rolandtoth/AdminOnSteroids/wiki/FieldOverrides

Hi @tpr the FieldOverrides look neat ? I've never used them but I have a similar module that can override field settings based on template etc.

There's one problem though: Setting options for ajax fields does not work with my approach that hooks in buildForm ? So for example I can't set Image field settings like maxSize or allowed extensions because they have no effect when someone uploads a file.

Do you have the same limitation in your approach?

Link to comment
Share on other sites

On 5/1/2020 at 12:00 AM, bernhard said:

Do you have the same limitation in your approach?

Sorry for the delay - apparently no, I set the allowed extensions to "svg" and a "png" file wasn't accepted (even when setting field "Closed + Load only when opened (AJAX) †"):

[Allow SVG only for field 'images']
?field = "images"
extensions = "svg"

 

Link to comment
Share on other sites

1 minute ago, tpr said:

Sorry for the delay - apparently no, I set the allowed extensions to "svg" and a "png" file wasn't accepted:

The client side check does also work for me, but someone could trick that check by posting custom data and on the backend the field uses its original settings (from the database).

Did you check on the backend or only client-side?

Link to comment
Share on other sites

Only tried by dragging an invalid filetype to the fields. I now tried a trickyPNG.svg file and the backend responded with 500, perhaps it's a success? ?

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
 Share

×
×
  • Create New...