8000 Fix tests and add example code · sulu/web-twig@619b1a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 619b1a7

Browse files
Fix tests and add example code
1 parent 6218e5b commit 619b1a7

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

docs/editor.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,6 @@ This will output:
8080
<section class="editor"><p>Test</p></section>
8181
```
8282

83-
### Custom Tag
84-
85-
```twig
86-
{% set yourHtml = '<p>Test</p>' %}
87-
{{ yourHtml|editor('section') }}
88-
```
89-
90-
This will output:
91-
92-
```html
93-
<section class="editor"><p>Test</p></section>
94-
```
95-
9683
### Custom Class
9784

9885
```twig
@@ -103,5 +90,5 @@ This will output:
10390
This will output:
10491

10592
```html
106-
<section class="custom"><p>Test</p></section>
93+
<div class="custom"><p>Test</p></div>
10794
```

tests/EditorExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public function testEditorCustomClass(): void
4747
public function testEditorCustomTag(): void
4848
{
4949
$this->assertSame(
50-
'<div class="custom"><p>Test</p></div>',
51-
$this->editorExtension->editor('<p>Test</p>', null, 'custom')
50+
'<section class="editor"><p>Test</p></section>',
51+
$this->editorExtension->editor('<p>Test</p>', 'section')
5252
);
5353
}
5454

0 commit comments

Comments
 (0)
0