Disable Settings (caption, withBorder, withBackground, stretched)
I am new to Editor.js and not sure if this is plugin-specific or not. Is it possible to disable specific settings (caption, withBorder, withBackground, stretched) or disable settings at all? I don't need a background variant, so the user shouldn't be able to choose it in the first place.
Thank you very much, I appreciate your work!
Accroding to No ability to provide available levels #14, I tried to extend ImageTool and just render default zone.
const ImageTool = require('@editorjs/image');
class MyImageTool extends ImageTool {
renderSettings() {
const div = document.createElement('div');
div.style.marginTop = '-6px';
return div;
}
}
const editor = new EditorJS({
holder: 'codex-editor',
autofocus: true,
tools: {
image: {
class: MyImageTool,
}
}
});
But in Caption case, I am not sure about the best solution. Currently I just make .image-tool__caption { display: none; }.
.cdx-settings-button[data-tune='withBorder'],
.cdx-settings-button[data-tune='withBackground'],
.cdx-settings-button[data-tune='stretched'] {
display: none;
}
easy method
I've created a pull request with the option to configure which default elements you want to disable. Check it out here.