primeng editor source code not working in angular 5 - angular5

When tried to edit source code in primeng tag, It is only editing one line at a time and without an html showing html tag also.
For example if I write "Text is bold", and when I clicked it on p-editor's ql-code-block
The expected values are to be shown in textarea is < p>< strong>Text is bold< /strong>< /p>.
Actual value shown in textarea is as follows:
Before :
Before selection of ql-code block
After :
After selection of ql-code block
Also after unselecting the ql-code-block button it removes the actual bold font of the text as follows :
After unselection of ql-code block
Please help me out in this.
Thank you in advance :)

If I understand correctly what you are saying, the answer is that you can't have bold in a code-block section (ql-bold or ql-code-block, not both).

Related

Kendo-Vue Hide button in column?

i'm struggling with this one, i need to hide a button, i mean a command button based on the value of a column.
i grab the following example from kendo pages, i would like to show/hide the button "View Details" based on the "Discontinued" value.
i've already tested with :visible or :hide properties without success.
https://stackblitz.com/edit/e1fre3
does someone know how to get this working?
The command option is expecting string or array so this is an updated stackblitz example that worked at my side - https://stackblitz.com/edit/e1fre3-wnzfer?file=index.html

select the next button- xpath-selenium

I am exactly in the line where there is the text ='Ver Informe'.
I want to go to the button that is next to that line.
Because only work when I make the click there.
Could you help me go there?
I tried: /button1 -- and doesn't work.
I need to see more of the surrounding html but if I understand your question correctly you want the button that contains the element with the text 'Ver informe'.
Try this:
//div[4]//article[1]//descendant::button[#type='button' and ./*[contains(text(),'Ver informe')]]
basically the span is wrapped in the button tag. So you can use the below xpath.
//span[normalize-space(.)='Ver informe']/parent::button

selenium ide : click button with class on specific row in table

I have an html table wich contain multiple lines.
At the end of each line, the last row contain multiple button. I would like to click on the remove button of the first line.
I tried this Xpath code but the element in not located :
There is a mistake somewhere in my xpath query :
//table[#id='tableTest']/tbody/tr[8]/td[8]/a[#class="remove"]
Your query looks pretty OK, but there is no HTML code so we can just guess what happen. What about the number 8?
Try to use XPath axes. For example locator could look like this:
//table[#id='tableTest']/tbody/tr[1]/descendant::a[#class="remove"]
This should find the remove button in the 1st row whenewer it is.
Click the button of the first line... which I think you mean first row?
//table[#id='tableTest']/tbody/tr//a[#class="remove"]
That SHOULD find the first tr (row) of your table and select the href with the class remove. But it's not going to ensure it's the last cell, which if that's vital you'll need to use something like //table[#id='tableTest']/tbody/tr/td[last()]/a[#class="remove"]
Also, if you attach the html snippet this becomes much easier for many of us to answer.

Selenium, using xpath to click a button with a similar content

I want to click a button that contains "Add" as text.
ie:
driver.find_element_by_xpath("(//a[contains(text(),'Add')])").click()
however it's not practical to do this:
driver.find_element_by_xpath("(//a[contains(text(),'Add')])[1]").click()
It would be fine, except the page has a button with text "Add User", and it clicks that instead. Is there a way to only click it if it is EXACTLY "Add" and not just contains "Add"?
You can also try :
driver.find_element_by_link_text("Add").click()
link text will match links who's text equals Add and it doesn't match text which contains Add as part of it.
This should work for you:
driver.find_element_by_xpath("//a[text()='Add']").click()
You should change your xpath to require an exact match instead of a partial match.
driver.find_element_by_xpath("//a[text()='Add']").click()
Using text()= requires the text on the button to be equal to 'Add' and will not find other buttons that happen to contain the text 'Add'

innerHTML doesn't work properly in dynamically taken HTML from another element

There is a table that js creates dynamically.
A button triggers a function that get the tables first rows innerHTML.
And replace its with
While raplacing it takes style informations as is to the divs.
After these i add some extra styling to div with replace() too.
But that function creates and fills with . Is it about percentage width or another thing?
The sample code is spagettied too much. So i couldn't paste here.
I am using HTA (HTML Application) and vbs+javascript.
Thank you in advance
Çağlar