Closed MatariAbdulwahid closed 1 year ago
Try single quotes for the attribute, as json contains double quotes.
with single quotes it works, but when I set the attributes, then the default is "double quotes", the attributes are set with double quotes and here is the problem
I‘ll check
Where is it the default? If I set a json object via attributes property editor, it works and the attribte starts with a single dash. You could also use double quotes, but then you have to encode the json double quotes with "
Tell me exactly what you do, but I don't think there is an error.
Also the Json would be parsed in the "htmlWriterService"and beatyified, this is the default behavior.
@MatariAbdulwahid any more questions?
I have checked the "htmlWriterService" and there is no error, json attributes are written with single quataions and the error was in my code when I set the content (outerHTML) in DocumentContainer-content then the single qutations are converted to double. So there is no error and I thank you for the tips
hi, when we wanted to set a JSON object as Html attributes then it does not parse correctly. I debugged and found that the problem lies in this place and there
item.attributes
does not come the attribute just like the others.let attr = item.attributes; https://github.com/node-projects/web-component-designer/blob/9f13474d32990bfccff9ce1d5e556086be457e8b/src/elements/services/htmlParserService/NodeHtmlParserService.ts#L59
Example:
<div instansFilter="{"id" : "name" :"abdul"}"></div>
at Debug also looks like thiswhat you see the error the package
node-html-parser