我已经在一个网站上实现了EditorJS,而且一切都很正常。问题是,我不知道如何配置编辑器JS,以减少他的宽度和高度,以及如何在左边出现联盟。
这是实例化EditorJS的代码:
<!-- html -->
<div id="editorjs" name="detailed_draft"></div>//javascript
const TOOLS = {
list: {
class: List,
inlineToolbar: true
},
header: {
class: Header,
inlineToolbar: true
},
underline: {
class: Underline
}
}
const editor = new EditorJS({
/**
* Id of Element that should contain the Editor
*/
holder: 'editorjs',
tools: TOOLS,
placeholder: 'Write some Details!',
data: obj
})发布于 2022-10-18 10:52:20
正如您在这一讨论上看到的,解决方案是覆盖EditorJS CSS。
<style>
.ce-block__content,
.ce-toolbar__content {
max-width: unset;
}
</style>https://stackoverflow.com/questions/74099703
复制相似问题