-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable Settings (caption, withBorder, withBackground, stretched) #29
Comments
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 |
.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. |
This works for me |
import ImageTool from '@editorjs/image' Object.defineProperty(ImageTool, 'tunes', { |
Closing this as it has been added in #269. |
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!
The text was updated successfully, but these errors were encountered: