M
M
Medvedoc2018-03-18 00:25:59
PHP
Medvedoc, 2018-03-18 00:25:59

How in php you can click on a word in the text to replace it?

Goodnight! The essence of the question is as follows: there is text in the block <div>or <textarea>. How, for example, by clicking on any word in the text, transfer it to a variable, through which then in the base of the text file find its synonym and substitute it back in the same place?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Osadchy, 2018-03-18
@Medvedoc

https://jsfiddle.net/brdnL69b/13/
Your word falls into the requestWord variable, you substitute it in ajax
Perhaps extra punctuation characters will need to be removed, I think you can do it yourself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question