gpt4 book ai didi

javascript - Summernote - 有序列表和无序列表不起作用

转载 作者:行者123 更新时间:2023-12-05 01:33:41 26 4
gpt4 key购买 nike

我在 laravel 上使用 summernote 包,但问题是 Orderlist 和 unorder list 在那里不起作用。这是我正在尝试使用的代码。请帮我解决这个问题。

Html :

<textarea data-feature="all"  class="summernote" data-height="250" name="editor"></textarea>

Version :

"summernote": "^0.8.18",

Summernote.js :

import summernote from '../../node_modules/summernote/dist/summernote-lite.js'
import summernoteCss from '../../node_modules/summernote/dist/summernote-lite.css'

(function($) {
"use strict";

// Summernote
$('.summernote').each(function() {
let options = {
placeholder: 'Hello stand alone ui',
tabsize: 2,
height: 120,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'italic']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video']],
['view', ['fullscreen', 'codeview', 'help']]
]
}

if ($(this).data('feature') == 'basic') {
options.toolbar = [
['font', ['bold', 'underline', 'italic']]
]
}

if ($(this).data('feature') == 'all') {
options.toolbar = [
['style', ['style', 'bold', 'italic', 'underline', 'clear']],
['font', ['strikethrough', 'superscript', 'subscript']],
['fontname', ['fontname']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture', 'video']],
['view', ['fullscreen', 'codeview', 'help']]
]
}

if ($(this).data('height') !== undefined) {
options.height = $(this).data('height')
}

$(this).summernote(options)
})
})($)

最佳答案

我认为您需要覆盖列表的 css

/* For summernote override unordered and order list */
.note-editable ul{
list-style: disc !important;
list-style-position: inside !important;
}

.note-editable ol {
list-style: decimal !important;
list-style-position: inside !important;
}

关于javascript - Summernote - 有序列表和无序列表不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64518588/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com