Заменить тег из ответа Ckeditor - PullRequest
0 голосов
/ 20 апреля 2020

Я получаю данные от API, который возвращает данные Ckeditor. в данных есть тег изображения, и все работает хорошо. Но теперь мне нужно поменять этот IMG-тег sr c на какую-то ссылку c image image Так как мне этого добиться.

образец данных ::

  <p>This is the <strong>default </strong>CKEditor installation. Source editing is provided by the <a href="https://ckeditor.com/cke4/addon/sourcearea">Source Editing Area</a>&nbsp;plugin.</p>

<p>Follow the steps below to try it out:</p>

<ul>
    <li>Click the <strong>Source </strong>button to display the HTML source of this text in the source editing area.</li>
    <li>Click the <strong>Source </strong>button again to return to the WYSIWYG view.</li>
</ul>

<p><img alt="" src="/assets/images/bg/spoons-3e11659237.jpg" style="height:100px; width:238px" /></p>

Я попробовал str .relace но не работал

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...