*/
protected static array $allowedAttrsByElements = [
'p' => [],
- 'a' => ['href', 'title'],
+ 'a' => ['href', 'title', 'target'],
'ol' => [],
'ul' => [],
'li' => [],
toolbar: 'bold italic link bullist numlist',
content_style: getContentStyle(options),
file_picker_types: 'file',
- valid_elements: 'p,a[href|title],ol,ul,li,strong,em,br',
+ valid_elements: 'p,a[href|title|target],ol,ul,li,strong,em,br',
file_picker_callback: filePickerCallback,
init_instance_callback(editor) {
addCustomHeadContent(editor.getDoc());
{
$book = $this->entities->book();
- $input = '<h1>Test</h1><p id="abc" href="beans">Content<a href="#cat" data-a="b">a</a><section>Hello</section></p>';
- $expected = '<p>Content<a href="#cat">a</a></p>';
+ $input = '<h1>Test</h1><p id="abc" href="beans">Content<a href="#cat" target="_blank" data-a="b">a</a><section>Hello</section></p>';
+ $expected = '<p>Content<a href="#cat" target="_blank">a</a></p>';
$this->asEditor()->put($book->getUrl(), [
'name' => $book->name,