Skip to content
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

有序列表和无序列表缺失自定义部分的图标 #155

Closed
2265886429 opened this issue Apr 7, 2021 · 2 comments
Closed

有序列表和无序列表缺失自定义部分的图标 #155

2265886429 opened this issue Apr 7, 2021 · 2 comments

Comments

@2265886429
Copy link

ueditor

@haochuan9421
Copy link
Owner

这些特殊的列表序号其实是一些小图片,UEditor 默认的图片地址 http://bs.baidu.com/listicon/ 已经 404 了,所以看不见这些序号。我已经把这些图片另存下来了,可以点这里下载。

  1. 把这图片保存到下列位置:
    image
  2. 设置 config 中的 listiconpath: UEDITOR_HOME_URL + "listicon/"

这样编辑的时候就可以看到序号了。

但要注意的一点的是,在还原编辑器内容时,要使用 ueditor.parse.js,不然还原后的富文本还是看不到序号的。可以参考 UEditor 官方关于 编辑内容展示的文档 和我写的编辑内容展示 的示例。

还有一点就是 ueditor.parse.jsueditor.parse.min.js 本身是有一个小 BUG 的,看下图修改一下就好了
image

如果不使用 ueditor.parse.js 来还原,可以手动设置样式,附上一段 less 代码:

.list(@i) when (@i > -1) {
  .list((@i - 1));
  .list-cn-1-@{i} {
    // 注意这里的路径,根据小图片的位置进行调整
    background-image: url('/UEditor/listicon/list-cn-1-@{i}.gif');
  }
  .list-cn-2-@{i} {
    background-image: url('/UEditor/listicon/list-cn-2-@{i}.gif');
  }
  .list-cn-3-@{i} {
    background-image: url('/UEditor/listicon/list-cn-3-@{i}.gif');
  }

  .list-num-1-@{i} {
    background-image: url('/UEditor/listicon/list-num-1-@{i}.gif');
  }
  .list-num-2-@{i} {
    background-image: url('/UEditor/listicon/list-num-2-@{i}.gif');
  }
  .list-num-3-@{i} {
    background-image: url('/UEditor/listicon/list-num-3-@{i}.gif');
  }
}
.list(99);

@beck126
Copy link

beck126 commented Feb 20, 2023

图片没办法下载啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants