- Posts: 51
- Thank you received: 3
Backend custom WYSIWYG field width
- jfischer_hika
-
Topic Author
- Offline
Less
More
3 years 7 months ago #349287
by jfischer_hika
Backend custom WYSIWYG field width was created by jfischer_hika
-- 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?
-- 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.
3 years 7 months ago #349291
by nicolas
Replied by nicolas on topic Backend custom WYSIWYG field width
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.
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.
- jfischer_hika
-
Topic Author
- Offline
Less
More
- Posts: 51
- Thank you received: 3
3 years 7 months ago #349300
by jfischer_hika
Replied by jfischer_hika on topic Backend custom WYSIWYG field width
Hello Nicolas
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.
This works for my custom fields block. I hope you could implement the cleaner solution in future updates.
Many Thanks
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.
Code:
<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.145 seconds