8000 Optimizing Markdown Editing by seanly · Pull Request #873 · mindoc-org/mindoc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Optimizing Markdown Editing #873

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

Merged
merged 3 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions conf/app.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ sessiongcmaxlifetime="${MINDOC_SESSION_MAX_LIFETIME||3600}"
#时区设置
timezone = Asia/Shanghai



####################MySQL 数据库配置###########################
#支持MySQL,sqlite3,postgres三种数据库,如果是sqlite3 则 db_database 标识数据库的物理目录
db_adapter="${MINDOC_DB_ADAPTER||sqlite3}"
Expand Down Expand Up @@ -127,27 +125,27 @@ baidumapkey=

################Active Directory/LDAP################
#是否启用ldap
ldap_enable=false
ldap_enable=${MINDOC_LDAP_ENABLE||false}
#ldap协议(ldap/ldaps)
ldap_scheme=ldap
ldap_scheme="${MINDOC_LDAP_SCHEME||ldap}"
#ldap主机名
ldap_host=ad.example.com
ldap_host="${MINDOC_LDAP_HOST||127.0.0.1}"
#ldap端口
ldap_port=3268
ldap_port=${MINDOC_LDAP_PORT||389}
#ldap内哪个属性作为用户名
ldap_account=sAMAccountName
ldap_attribute="${MINDOC_LDAP_ATTRIBUTE||sAMAccountName}"
#ldap内哪个属性作为邮箱
ldap_mail=mail
ldap_mail="${MINDOC_LDAP_MAIL||mail}"
#搜索范围
ldap_base=DC=example,DC=com
ldap_base="${MINDOC_LDAP_BASE||dc=example,dc=com}"
#第一次绑定ldap用户dn
ldap_user=CN=ldap helper,OU=example.com,DC=example,DC=com
ldap_user="${MINDOC_LDAP_USER||cn=ldap helper,ou=example.com,dc=example,dc=com}"
#第一次绑定ldap用户密码
ldap_password=superSecret
ldap_password="${MINDOC_LDAP_PASSWORD||xxx}"
#自动注册用户角色:0 超级管理员 /1 管理员/ 2 普通用户
ldap_user_role=2
ldap_user_role=${MINDOC_LDAP_USER_ROLE||2}
#ldap搜索filter规则,AD服务器: objectClass=User, openldap服务器: objectClass=posixAccount ,也可以定义为其他属性,如: title=mindoc
ldap_filter=objectClass=posixAccount
ldap_filter="${MINDOC_LDAP_FILTER||objectClass=posixAccount}"

############# HTTP自定义接口登录 ################
http_login_url=
Expand Down
1 change: 1 addition & 0 deletions conf/lang/en-us.ini
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ gfm_task = GFM task
attachment = attachment
json_to_table = Json converted to table
template = template
draw = draw
close_preview = disable preview
modify_history = modify history
sidebar = sidebar
Expand Down
1 change: 1 addition & 0 deletions conf/lang/zh-cn.ini
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ gfm_task = GFM 任务列表
attachment = 附件
json_to_table = Json转换为表格
template = 模板
draw = 画图
close_preview = 关闭实时预览
modify_history = 修改历史
sidebar = 边栏
Expand Down
6 changes: 4 additions & 2 deletions static/editor.md/editormd.js
Original file line number Diff line number Diff line change
Expand Up @@ -3950,9 +3950,12 @@
}
return "<svg class='mindmap' style='width:100%;min-height=150px;height:"+custom_height+"px;' id='mindmap-"+ map_id +"'>"+code+"</svg>";
}
if (lang === "drawio") {
var svgCode = decodeURIComponent(escape(window.atob(code)))
return "<div class=\"svg\" style=\"overflow: auto; padding: 10px;\">" + svgCode + "</div>"
}
else
{

return marked.Renderer.prototype.code.apply(this, arguments);
}
};
Expand Down Expand Up @@ -4029,7 +4032,6 @@
html += "<li class=\"directory-item\"><a class=\"directory-item-link directory-item-link-" + level + "\" href=\"#" + id + "\" level=\"" + level + "\">" + text + "</a></li>";
lastLevel = level;
}
console.log(html);

var tocContainer = container.find(".markdown-toc");

Expand Down
Loading
0