Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product spec attribute custom html #223

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jithendrajp
Copy link

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

  1. Navigate to a product - specification attribute
  2. .choose custom HTML Text from dropdown
  3. A HTML editor should visible .

@KrzysztofPajak
Copy link
Member

@jithendrajp Thanks for contributing!
But is it a good way to prepare a form with two the same name field?

@jithendrajp
Copy link
Author

jithendrajp commented Jan 4, 2022

@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.

@KrzysztofPajak
Copy link
Member

Maybe, the best will be to prepare a simple script that will be toggle assign editor or remove it from the CustomValue field

@jithendrajp
Copy link
Author

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

@jithendrajp
Copy link
Author

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?

@Nikhil13x
Copy link
Contributor

@KrzysztofPajak, can you please suggest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants