Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
website-middleground
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9db94598
authored
Oct 29, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
禁用富文本参数
1 parent
81ef3648
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
src/views/news/components/AddForm.vue
src/views/news/components/AddForm.vue
View file @
9db9459
...
...
@@ -137,7 +137,7 @@ const back = () => {
// 编辑器实例,必须用 shallowRef,重要!
const
editorRef
=
shallowRef
();
const
toolbarConfig
:
Partial
<
IToolbarConfig
>
=
{
excludeKeys
:
[
"insertImage"
,
"group-video"
]
excludeKeys
:
[
"insertImage"
,
"group-video"
,
"blockquote"
,
"code"
,
"insertTable"
,
"codeBlock"
,
"todo"
]
};
const
mode
=
'default'
const
valueHtml
=
ref
(
''
)
...
...
@@ -160,11 +160,11 @@ const editorConfig: Partial<IEditorConfig> = {
const
handleCreated
=
(
editor
:
IDomEditor
)
=>
{
editorRef
.
value
=
editor
;
// 记录 editor 实例,重要!
// 获取工具栏的key
//
setTimeout(() => {
//
const toolbar = DomEditor.getToolbar(editor);
//
const toolbarKeys = toolbar?.getConfig().toolbarKeys
//
console.log('toolbarKeys', toolbarKeys)
//
})
setTimeout
(()
=>
{
const
toolbar
=
DomEditor
.
getToolbar
(
editor
);
const
toolbarKeys
=
toolbar
?.
getConfig
().
toolbarKeys
console
.
log
(
'toolbarKeys'
,
toolbarKeys
)
})
};
const
handleChange
=
(
editor
:
IDomEditor
)
=>
{
if
(
valueHtml
.
value
==
'<p><br></p>'
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment