From ce1f8982204ba97e3123bb53e3233ed544192277 Mon Sep 17 00:00:00 2001 From: Zdravko Curic Date: Wed, 28 Apr 2021 11:00:35 +0200 Subject: [PATCH 1/4] Include tce-tiptap in tailor --- .../common/tce-core/AddElement/index.vue | 2 +- .../common/tce-core/AssessmentItem.vue | 2 +- .../common/tce-core/EmbeddedContainer.vue | 2 +- .../tce-core/QuestionContainer/Question.vue | 2 +- .../tce-core/QuestionContainer/index.vue | 2 +- .../tcc-exam/edit/GroupIntroduction.vue | 2 +- .../tce-fill-blank/edit/index.vue | 2 +- .../content-elements/tce-fill-blank/index.js | 2 +- .../content-elements/tce-table/edit/index.vue | 2 +- .../content-elements/tce-table/edit/utils.js | 2 +- .../content-elements/tce-tiptap/index.js | 9 + .../repository/Revisions/EntityRevisions.vue | 2 +- config/shared/activities-rc.js | 2 +- config/shared/core-elements.js | 1 + package-lock.json | 250 +++++++++++++++++- package.json | 3 +- 16 files changed, 271 insertions(+), 16 deletions(-) create mode 100644 client/components/content-elements/tce-tiptap/index.js diff --git a/client/components/common/tce-core/AddElement/index.vue b/client/components/common/tce-core/AddElement/index.vue index 6900e22ec..df3c25dbd 100644 --- a/client/components/common/tce-core/AddElement/index.vue +++ b/client/components/common/tce-core/AddElement/index.vue @@ -86,7 +86,7 @@ const ELEMENT_GROUPS = [ const getQuestionData = (element, type) => { const data = { width: LAYOUT.FULL_WIDTH }; - const question = [{ id: uuid(), data, type: 'JODIT_HTML', embedded: true }]; + const question = [{ id: uuid(), data, type: 'TIPTAP_HTML', embedded: true }]; return { question, type, ...element.data }; }; diff --git a/client/components/common/tce-core/AssessmentItem.vue b/client/components/common/tce-core/AssessmentItem.vue index f8c12f124..65d0a908e 100644 --- a/client/components/common/tce-core/AssessmentItem.vue +++ b/client/components/common/tce-core/AssessmentItem.vue @@ -63,7 +63,7 @@ import filter from 'lodash/filter'; import map from 'lodash/map'; import PublishDiffChip from './PublishDiffChip'; -const TEXT_CONTAINERS = ['JODIT_HTML', 'HTML']; +const TEXT_CONTAINERS = ['TIPTAP_HTML', 'HTML']; const blankRegex = /(@blank)/g; const htmlRegex = /(<\/?[^>]+(>|$))| /g; diff --git a/client/components/common/tce-core/EmbeddedContainer.vue b/client/components/common/tce-core/EmbeddedContainer.vue index 8ef2f349e..28c99b241 100644 --- a/client/components/common/tce-core/EmbeddedContainer.vue +++ b/client/components/common/tce-core/EmbeddedContainer.vue @@ -34,7 +34,7 @@ export default { inheritAttrs: false, props: { container: { type: Object, required: true }, - types: { type: Array, default: () => ['JODIT_HTML', 'IMAGE', 'HTML', 'VIDEO'] }, + types: { type: Array, default: () => ['TIPTAP_HTML', 'IMAGE', 'HTML', 'VIDEO'] }, isDisabled: { type: Boolean, default: false }, addElementOptions: { type: Object, default: () => ({}) }, enableAdd: { type: Boolean, default: true } diff --git a/client/components/common/tce-core/QuestionContainer/Question.vue b/client/components/common/tce-core/QuestionContainer/Question.vue index 4fbbe7ee0..bc20cb358 100644 --- a/client/components/common/tce-core/QuestionContainer/Question.vue +++ b/client/components/common/tce-core/QuestionContainer/Question.vue @@ -25,7 +25,7 @@ :layout="false" :position="question.length" :disabled="!isEditing" - :include="['JODIT_HTML', 'IMAGE', 'EMBED', 'HTML']" + :include="['TIPTAP_HTML', 'IMAGE', 'EMBED', 'HTML']" :class="{ invisible: !isEditing }">
diff --git a/client/components/common/tce-core/QuestionContainer/index.vue b/client/components/common/tce-core/QuestionContainer/index.vue index 08eec0242..4ce01c310 100644 --- a/client/components/common/tce-core/QuestionContainer/index.vue +++ b/client/components/common/tce-core/QuestionContainer/index.vue @@ -71,7 +71,7 @@ import Question from './Question'; const resolveComponentName = type => getComponentName(processAnswerType(type)); const WITH_FEEDBACK = ['MC', 'SC', 'TF']; -const TEXT_CONTAINERS = ['JODIT_HTML', 'HTML']; +const TEXT_CONTAINERS = ['TIPTAP_HTML', 'HTML']; const validationOptions = { recursive: true, abortEarly: false }; export default { diff --git a/client/components/content-containers/tcc-exam/edit/GroupIntroduction.vue b/client/components/content-containers/tcc-exam/edit/GroupIntroduction.vue index c33822185..fc5b985e8 100644 --- a/client/components/content-containers/tcc-exam/edit/GroupIntroduction.vue +++ b/client/components/content-containers/tcc-exam/edit/GroupIntroduction.vue @@ -5,7 +5,7 @@ @update="$emit('reorder:element', $event)" :elements="introductionElements" :activity="group" - :supported-types="['JODIT_HTML', 'IMAGE', 'VIDEO', 'EMBED', 'HTML']" + :supported-types="['TIPTAP_HTML', 'IMAGE', 'VIDEO', 'EMBED', 'HTML']" :layout="true">