MERGEERROR FIX : AADHAVAN

This commit is contained in:
aadhavan 2023-11-30 12:49:09 +05:30
parent 3b9f4ccc7f
commit 45966d5ea2

View File

@ -845,6 +845,16 @@ h1.title{
</div>
<!-- sidebar end -->
<script>
var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'],
[{ 'script': 'sub'}, { 'script': 'super' }],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
['image'],
[{ 'align': ['justify', 'center', 'right', ] }],
];
document.addEventListener('DOMContentLoaded', function () {
// Initialize Quill with your specific configuration
var quill = new Quill('#workarea', {
@ -1277,9 +1287,6 @@ $('#workarea_math').click(function(){
});
const { v4: uuidv4 } = require('uuid');
const Quill = require('quill');
const ImageResize = require('quill-image-resize').default;
var ids = document.getElementById('workarea_math')
console.log(ids)
@ -1338,8 +1345,8 @@ var xmlPath ="" //get the xml filepath in .env file local variable
$(document).ready(function() {
const targetId = 'Question_title';
scrollToElementWithoutLink(targetId);
// const targetId = 'Question_title';
// scrollToElementWithoutLink(targetId);
require('dotenv').config();
@ -1607,14 +1614,13 @@ function saveFile(flag=0) {
<script>
const { v4: uuidv4 } = require('uuid');
const Quill = require('quill');
const table = require('quill1-table');
Quill.register('modules/table', table);
const tab = require('quill-table');
var Quill = require('quill');
const ImageResize = require('quill-image-resize').default;
var table = require('quill1-table');
var tab = require('quill-table');
Quill.register('modules/imageResize', ImageResize);
Quill.register('modules/table', table);
const Question_Paper_UUID = uuidv4();
var QuestionPaper_UUID = document.getElementById('QuestionPaper_UUID_ID')
QuestionPaper_UUID.value = Question_Paper_UUID;
@ -1691,6 +1697,10 @@ var toolbarOptions2 = [
var quill = new Quill('#Question_title', {
theme: 'snow',
modules: {
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
@ -1752,39 +1762,52 @@ var quill = new Quill('#QuestionsGroupIdset ', {
var quill = new Quill('#Question_description', {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});
var quill = new Quill('#workarea', {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
}
}
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
});
@ -2118,48 +2141,52 @@ inputFields.forEach(inputField => {
var quill = new Quill('#'+sectionText, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});
var sectionDescription = (random_no == false) ? 'section_description_text_' + text_field_created_time : 'section_description_text_' + random_no;
var quill = new Quill('#'+sectionDescription, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});
var section_title_Div = (random_no == false) ? 'section_title_text_' + text_field_created_time : 'section_title_text_' + random_no;
@ -2454,48 +2481,52 @@ function addQuestionGroup(idObj)
var quill = new Quill('#'+subSectionText, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});
var subSectionDescription = 'subSection_description_text_' + QuestionGroup_ID;
var quill = new Quill('#'+subSectionDescription, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});
@ -3075,72 +3106,78 @@ var typetwoQuestionName = 'textQuestionName_' + addChoiceAreaId;
var quill = new Quill('#'+typetwoQuestionName, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});
var typetwoQuestionSubtitle = 'textQuestionSubtitle_' + addChoiceAreaId;
var quill = new Quill('#'+typetwoQuestionSubtitle, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});
var choiceTextField = 'choiceTextField_' + addChoiceAreaId;
var quill = new Quill('#'+choiceTextField, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
placeholder: 'Enter Choice',
});
@ -3374,24 +3411,26 @@ $(newChoiceDeleteButtonId).on('click', function() {
var quill = new Quill(newChoiceTextField, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
placeholder: 'Enter Choice',
});
@ -3776,49 +3815,52 @@ else
var quill = new Quill('#'+typeOneQuestionName, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});
var typeOneQuestionSubtitle = 'textQuestionSubtitle_' + addTextQuestionId;
var quill = new Quill('#'+typeOneQuestionSubtitle, {
theme: 'snow',
modules: {
toolbar: toolbarOptions,
clipboard: {
matchVisual: true,
},
imageResize:{
displaySize:true,
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ]
modules: [ 'Resize', 'DisplaySize', 'Toolbar' ],
},
toolbar: {
container: toolbarOptions,
handlers: {
table: function () {
// this.quill.getModule('table').insert();
this.quill.getModule('table').insert();
},
},
},
table: {
cellSelectionOnClick: true // true: cell selection on click, false: cell selection with CTRL key
cellSelectionOnClick: true,
// Other options for quill1-table module...
},
keyboard: keyboardOptions,
},
keyboard: keyboardOptions
});