Backend custom WYSIWYG field width

  • Posts: 49
  • Thank you received: 3
  • Hikashop Business
1 year 2 months ago #349287

-- HikaShop version -- : 4.7.7
-- Joomla version -- : 4.2.7
-- PHP version -- : 8.0.27
-- Browser(s) name and version -- : firefox

Hello,

I have added several custom fields in my product category of the WYSIWYG type. I noticed that the field widths are based on a percentage of screen size. On some screens this makes the WYSIWYG editor too narrow to use effectively. I see that the description field by default has the chevron button to change the width of the editor . Is there a way to add this feature to the WYSIWYG field type? Ideally this would be an option on all backend fields. If this is not possible, is there some css code to change these WYSIWYG field widths without changing all the field widths?

Please Log in or Create an account to join the conversation.

  • Posts: 81504
  • Thank you received: 13064
  • MODERATOR
1 year 2 months ago #349291

Hi,

Adding the feature to the field itself doesn't make much sense, structurally speaking. A custom field is displayed in a block on the product edit form page. And in that block, there can be other fields. Changing the width of the whole block based on the setting of one of the fields inside it would be dirty. A cleaner solution would be to allow changing the size of any block with a similar button than the one on the description block. That's something we could look into in the future.
However, as a short term solution for your needs, you could add a bit of CSS to force the block and the HTML editor to be displayed with a bigger width.

Please Log in or Create an account to join the conversation.

  • Posts: 49
  • Thank you received: 3
  • Hikashop Business
1 year 2 months ago #349300

Hello Nicolas

A cleaner solution would be to allow changing the size of any block with a similar button than the one on the description block.


That is what I was meaning to say. The ability to change the width of the block that contains the WYSIWYG field.

For the short term, I modified the product->form view to change the width of my custom fields as follows.
<div class="hkc-xl-4 hkc-lg-6 hikashop_product_block hikashop_product_edit_fields" data-id="fields" style="width:auto;"><div>

This works for my custom fields block. I hope you could implement the cleaner solution in future updates.

Many Thanks

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum