Yaml::
parseFile('core/modules/ckeditor5/tests/fixtures/ckeditor4_config/filter.format.restricted_html.yml'
) )->
setSyncing(TRUE
)->
save();
$basic_html_format_without_image_uploads =
$basic_html_format;
$basic_html_format_without_image_uploads['name'
] .= ' (without image uploads)';
$basic_html_format_without_image_uploads['format'
] = 'basic_html_without_image_uploads';
FilterFormat::
create($basic_html_format_without_image_uploads)->
save();
Editor::
create( ['format' => 'basic_html_without_image_uploads'
] +
Yaml::
parseFile('core/modules/ckeditor5/tests/fixtures/ckeditor4_config/editor.editor.basic_html.yml'
) )->
setImageUploadSettings(['status' => FALSE
])->
setSyncing(TRUE
)->
save();
$allowed_html_parents =
['filters', 'filter_html', 'settings', 'allowed_html'
];
$current_value = NestedArray::
getValue($basic_html_format,
$allowed_html_parents);
$new_value =
str_replace(['<h4 id> ', '<h6 id> '
], '',
$current_value);
$basic_html_format_without_h4_h6 =
$basic_html_format;
$basic_html_format_without_h4_h6['name'
] .= ' (without H4 and H6)';
$basic_html_format_without_h4_h6['format'
] = 'basic_html_without_h4_h6';
NestedArray::
setValue($basic_html_format_without_h4_h6,
$allowed_html_parents,
$new_value);
FilterFormat::
create($basic_html_format_without_h4_h6)->
setSyncing(TRUE
)->
save();
Editor::
create( ['format' => 'basic_html_without_h4_h6'
] +