grandnode2
grandnode2 copied to clipboard
Product spec attribute custom html
Resolves #200
Type: bugfix
Issue
Product specification attributes, If we select attribute type as Custom HTML Text, the Value field should be HTML Editor
Solution
Added show/hide for custom value text and custom HTML text
Breaking changes
NONE
Testing
- Navigate to a product - specification attribute
- .choose custom HTML Text from dropdown
- A HTML editor should visible .
@jithendrajp Thanks for contributing! But is it a good way to prepare a form with two the same name field?
@jithendrajp Thanks for contributing! But is it a good way to prepare a form with two the same name field?
Hi @KrzysztofPajak, Ideally Input textbox or HTML Editor only one will be visible at a time.
To make it more generic we can fix it in two ways.
- Extending the model and adding a new property in the model and assigning it back to the same DB column in the controller.
- Adding a new column in DB and extending the model as well
Which one do you prefer from the above two ways? So that I will modify accordingly and update the PR again.
Maybe, the best will be to prepare a simple script that will be toggle assign editor or remove it from the CustomValue field
Maybe, the best will be to prepare a simple script that will be toggle assign editor or remove it from the CustomValue field
Sure @KrzysztofPajak , that's a great idea, will correct it and update the PR
Maybe, the best will be to prepare a simple script that will be toggle assign editor or remove it from the CustomValue field
Hi @KrzysztofPajak, I tried the above way that you suggested. But as editor controls and input fields are rendered from Backend, I am not able to control them at the DOM level. Any other suggestions?
@KrzysztofPajak, can you please suggest?