We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14d57e7 commit 79912a1Copy full SHA for 79912a1
README.md
@@ -506,9 +506,10 @@ Replace each node in the current set with the contents provided.
506
507
``` php
508
$doc = (new Document())->html('<p><b>Hello</b> <b>World!</b></p>');
509
-echo $doc->find('b')->substituteWith(function($node) {
+$doc->find('b')->substituteWith(function($node) {
510
return '<em>' . $node->text() . '</em>';
511
});
512
+echo $doc->html();
513
```
514
515
*Result:*
@@ -535,7 +536,7 @@ echo $doc->find('.text')->text();
535
536
537
538
``` html
-<div class="second"></div>
539
+Hello World!
540
541
542
Set the text contents for current set.
0 commit comments