Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
dashboard
Commits
3482f849
Commit
3482f849
authored
1 year ago
by
Konrad Mohrfeldt
Browse files
Options
Downloads
Patches
Plain Diff
feat: implement disabled support for AHTMLEditor component
parent
9c2ea3f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/generic/AHTMLEditor.vue
+9
-2
9 additions, 2 deletions
src/components/generic/AHTMLEditor.vue
with
9 additions
and
2 deletions
src/components/generic/AHTMLEditor.vue
+
9
−
2
View file @
3482f849
<
template
>
<div
class=
"aura-quill tw-rounded tw-border tw-border-solid tw-border-gray-300 tw-bg-white"
>
<div
class=
"aura-quill tw-rounded tw-border tw-border-solid tw-border-gray-300 tw-bg-white"
:class=
"
{ 'tw-bg-[#e9ecef]': disabled }"
>
<div
v-once
ref=
"contentEl"
v-html=
"content"
/>
</div>
</
template
>
...
...
@@ -37,7 +40,7 @@ import { useEventListener } from '@vueuse/core'
defineOptions
({
compatConfig
:
{
MODE
:
3
}
})
const
content
=
defineModel
<
string
>
({
required
:
true
})
const
props
=
defineProps
<
{
placeholder
?:
string
}
>
()
const
props
=
defineProps
<
{
placeholder
?:
string
;
disabled
?:
boolean
}
>
()
const
emit
=
defineEmits
<
{
blur
:
[
FocusEvent
]
}
>
()
const
contentEl
=
ref
<
HTMLElement
>
()
const
quill
=
ref
<
Quill
>
()
...
...
@@ -47,6 +50,7 @@ function initializeQuill(contentEl: HTMLElement) {
const
quillInstance
=
new
Quill
(
contentEl
,
{
placeholder
:
props
.
placeholder
,
theme
:
'
bubble
'
,
readOnly
:
props
.
disabled
,
modules
:
{
magicUrl
:
true
,
toolbar
:
[
...
...
@@ -91,6 +95,9 @@ onBeforeUnmount(() => {
font-size: inherit;
color: #495057;
}
.ql-disabled .ql-editor > * {
cursor: default;
}
.ql-tooltip {
z-index: 100;
background-color: var(--_aura-quill-bg) !important;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment