Newer
Older
import { emDash, ellipsis } from 'prosemirror-inputrules';
ImageService,
LinkService,
ListsService,
BaseService,
DisplayBlockLevelService,
TrackingAndEditingToolGroupService,
Deleephan K S
committed
HighlightService,
import { TablesService, tableEditing, columnResizing } from 'wax-table-service';
import { EditoriaSchema } from 'wax-prosemirror-core';
paragraph,
} from '@guardian/prosemirror-invisibles';
import CharactersList from './CharactersList';
// const updateTitle = title => {
// console.log(title);
// };
async function DummyPromise(userInput) {
return new Promise((resolve, reject) => {
setTimeout(() => {
console.log('User input:', userInput);
if (userInput === 'reject') {
reject('Your request could not be processed for now');
} else {
resolve(
'He made significant contributions to theoretical physics, including achievements in quantum mechanics',
);
const updateTrackStatus = status => {
// console.log('status', status);
};
more: [
'Superscript',
'Subscript',
'SmallCaps',
'Underline',
'StrikeThrough',
],
Deleephan K S
committed
'HighlightToolGroup',
{
templateArea: 'leftSideBar',
toolGroups: ['DisplayText'],
},
toolGroups: ['TrackCommentOptions'],
{
templateArea: 'BottomRightInfo',
// OrderedListService: { subList: false },
// BulletListService: { subList: false },
// JoinUpService: { subList: false },
EnableTrackChangeService: { enabled: false, toggle: true, updateTrackStatus },
AcceptTrackChangeService: {
own: {
},
others: {
accept: true,
},
},
RejectTrackChangeService: {
own: {
reject: true,
},
others: {
reject: true,
},
},
invisibles([hardBreak()]),
disallowPasteImagesPlugin(() =>
onWarning(
'Images are not allowed. Please upload them through filemanager',
),
),
],
CustomTagService: {
tags: [
{ label: 'custom-tag-label-1', tagType: 'inline' },
{ label: 'custom-tag-label-2', tagType: 'inline' },
// YjsService: {
// // eslint-disable-next-line no-restricted-globals
// connectionUrl: 'ws://localhost:4000',
// docIdentifier: 'prosemirror-demo',
// },
AskAiContentService: {
AskAiContentTransformation: DummyPromise,
},
new DisplayBlockLevelService(),
new TextBlockLevelService(),
new ListsService(),
new LinkService(),
new InlineAnnotationsService(),
new TrackChangeService(),
new CommentsService(),
new ImageService(),
new TablesService(),
new BaseService(),
new NoteService(),
new CodeBlockService(),
new MathService(),
new FindAndReplaceService(),
new TrackingAndEditingToolGroupService(),
Deleephan K S
committed
new HighlightService(),
new EditorInfoToolGroupServices(),
new BottomInfoService(),
new TrackCommentOptionsToolGroupService(),