Skip to content
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
17 changes: 14 additions & 3 deletions LearningHub.Nhs.WebUI/Scripts/vuesrc/ckeditorwithhint.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
<template>
<div>
<ckeditor v-model="description" :config="editorConfig" @ready="onEditorReady" @blur="onBlur"></ckeditor>
<div :class="[`pt-2 footer-text${this.valid ? '' : ' text-danger'}`]">{{ hint }}</div>
<ckeditor v-model="description"
:config="editorConfig"
@ready="onEditorReady"
@blur="onBlur"
tabindex="0"
:aria-describedby="'editor-hint'"
role="textbox"></ckeditor>
<div :id="'editor-hint'"
:class="[`pt-2 footer-text${this.valid ? '' : ' text-danger'}`]"
aria-live="polite">
{{ hint }}
</div>
</div>
</template>


<script lang="ts">
import Vue, { PropOptions } from 'vue';
import CKEditorToolbar from './models/ckeditorToolbar';
import CKEditor from 'ckeditor4-vue/dist/legacy.js';
import {getRemainingCharacters, getRemainingCharactersFromHtml} from "./helpers/ckeditorValidationHelper";
import { getRemainingCharacters, getRemainingCharactersFromHtml } from "./helpers/ckeditorValidationHelper";
const getCharactersText = (n: number) => n === 1 ? `${n} character` : `${n} characters`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
Write a description that explains the resource and its benefits to learners.
</div>
<div class="col-12 my-3">
<ckeditorwithhint :initialValue="this.resourceDescription" :maxLength="1800" @blur="saveDescription" @change="changeDescription" />
<ckeditorwithhint :initialValue="this.resourceDescription" :maxLength="1800" @blur="saveDescription" @change="changeDescription"/>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
</div>
<div id="character-count-component-status-message"
class="character-count-component-status-message"
aria-live="polite">
>
<span>
You have {{ charactersDiff }} character{{ charactersDiffPlural ? 's' : '' }} remaining
</span>
Expand Down
Loading