London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
In your TinyMCE configuration, just clear table_default_attributes
, like this:
[ModuleDependency(typeof(TinyMceInitialization))]
public class TinyMceSettingsInitialization : IConfigurableModule
{
public void ConfigureContainer(ServiceConfigurationContext context)
{
context.Services.Configure<TinyMceConfiguration>(config =>
{
var tableSettings = new Dictionary<string, object>
{
{ "table_default_attributes", new {}}
};
config.Default().RawSettings(tableSettings);
});
}
}
Or, maybe better:
[ModuleDependency(typeof(TinyMceInitialization))]
public class TinyMceSettingsInitialization : IConfigurableModule
{
public void ConfigureContainer(ServiceConfigurationContext context)
{
context.Services.Configure<TinyMceConfiguration>(config =>
{
config.Default().AddSetting("table_default_attributes", new {});
});
}
}
Yes, I added it using this syntax to to remove all default attributes and inline styles :)
.AddSetting("table_default_attributes", new { })
.AddSetting("table_default_styles", new { });
When adding a table using the editor, border="1" automatically is added to the table. I am able to configure the border to be "0", but I would rather have the attribute removed since it is obsolete, and therefore also not WCAG 2.1 compilant. It that possible?