【问题标题】:How to configure width and heigth from EditorJS?如何从 EditorJS 配置宽度和高度?
【发布时间】:2023-02-17 13:34:52
【问题描述】:

我在一个网站上实现了 EditorJS,一切正常。 问题是我不知道如何配置 Editor 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
})

image showing the EditorJS display

【问题讨论】:

    标签: editorjs


    【解决方案1】:

    正如您在 this discussion 上看到的那样,解决方案是覆盖 EditorJS CSS。

    <style>
        .ce-block__content,
        .ce-toolbar__content {
            max-width: unset;
        }
    </style>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-20
      • 2017-12-26
      • 1970-01-01
      • 1970-01-01
      • 2013-08-20
      相关资源
      最近更新 更多