Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI Assistant Project #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11.0
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarnPath: .yarn/releases/yarn-classic.cjs
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
## CKEditor for Authorium

### Local
1. Navigate to the CKEditor package folder where modifications were made

### Local Development
1. Install deps
```bash
cd packages/ckeditor-build-multi-root
yarn
```
2. Navigate to the CKEditor package folder where modifications were made

```bash
cd packages/ckeditor5-build-multi-root
```

2. Generates the build folder containing the customized editor
3. Generate the build folder containing the customized editor

```bash
yarn build
```

3. Create symlinks to local project, only the first time
4. Create symlinks to local project (only the first time)

```bash
yarn link
npm link
```

### Authorium repository
1. Link CKEditor custom editor to Authorium, only the first time
1. Update the repository

```bash
yarn link "@ckeditor/ckeditor5-build-multi-root"
yarn install
```

2. Update the repository already linked
2. Link CKEditor custom editor to Authorium. You'll need to do this anytime after running `yarn install`

```bash
yarn install --force
npm link "@eagerworks/ckeditor5-build-multi-root"
```

3. Setup the authorium application `bin/setup`
Expand All @@ -47,13 +51,24 @@
## Publish package
`TODO: Publish package on release`

1. Navigate to the CKEditor package folder where modifications were made, log in to NPM, and adjust package.json to reflect your npm username
1. Navigate to the CKEditor package folder where modifications were made

```bash
cd packages/ckeditor-build-multi-root
```
2. Generate the build folder containing the customized editor

```bash
yarn build
```

3. Navigate to the CKEditor package folder where modifications were made, log in to NPM, and adjust package.json to reflect your npm username

```bash
npm login
```

2. After successful login, publish your custom build
4. After successful login, publish your custom build

```bash
npm publish --access=public
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,5 @@
"."
]
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"packageManager": "yarn@4.4.1"
}
13 changes: 10 additions & 3 deletions packages/ckeditor5-build-multi-root/build/ckeditor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
/**
* This file is the Authorium Entry point for the CKEditor integration
*/
import { MultiRootEditor as MultiRootEditorBase } from '@ckeditor/ckeditor5-editor-multi-root';
import { Alignment } from '@ckeditor/ckeditor5-alignment';
import { Autosave } from '@ckeditor/ckeditor5-autosave';
Expand Down Expand Up @@ -34,15 +37,19 @@ import { Table, TableCaption, TableCellProperties, TableColumnResize, TablePrope
import { TextTransformation } from '@ckeditor/ckeditor5-typing';
import { TrackChanges, TrackChangesData } from '@ckeditor/ckeditor5-track-changes';
import { Undo } from '@ckeditor/ckeditor5-undo';
import type { LanguageConfig } from './helpers.js';
import { MentionCustomization } from './helpers.js';
import { AIAssistant, OpenAITextAdapter } from '@ckeditor/ckeditor5-ai';
import { type LanguageConfig, MentionCustomization } from './helpers.js';
interface MultirootEditorConfig extends EditorConfig {
codeBlock: {
languages: Array<LanguageConfig>;
};
}
declare class CustomOpenAITextAdapter extends OpenAITextAdapter {
prepareMessages(query: any, context: any, actionId: string): Promise<any>;
sendRequest(requestData: any): Promise<any>;
}
declare class Editor extends MultiRootEditorBase {
static builtinPlugins: (typeof Alignment | typeof Autosave | typeof TextTransformation | typeof AnnotationsUIs | typeof Paragraph | typeof Heading | typeof Autoformat | typeof BlockQuote | typeof Superscript | typeof Subscript | typeof Bold | typeof Italic | typeof Strikethrough | typeof Underline | typeof CKFinderUploadAdapter | typeof List | typeof ListProperties | typeof TodoList | typeof CloudServices | typeof Undo | typeof Essentials | typeof EasyImage | typeof FindAndReplace | typeof FontBackgroundColor | typeof FontColor | typeof FontFamily | typeof FontSize | typeof Highlight | typeof HorizontalLine | typeof Image | typeof ImageCaption | typeof ImageResize | typeof ImageStyle | typeof ImageTextAlternative | typeof ImageToolbar | typeof ImageUpload | typeof Indent | typeof IndentBlock | typeof Link | typeof MediaEmbed | typeof Mention | typeof PageBreak | typeof PasteFromOffice | typeof RemoveFormat | typeof Table | typeof TableCaption | typeof TableCellProperties | typeof TableColumnResize | typeof TableProperties | typeof TableToolbar | typeof PictureEditing | typeof Comments | typeof MentionCustomization | typeof PresenceList | typeof RealTimeCollaborativeComments | typeof RealTimeCollaborativeEditing | typeof RealTimeCollaborativeTrackChanges | typeof TrackChanges | typeof TrackChangesData | typeof WideSidebar)[];
static builtinPlugins: (typeof Alignment | typeof Autosave | typeof TextTransformation | typeof AnnotationsUIs | typeof Paragraph | typeof Heading | typeof Autoformat | typeof BlockQuote | typeof Superscript | typeof Subscript | typeof Bold | typeof Italic | typeof Strikethrough | typeof Underline | typeof CKFinderUploadAdapter | typeof List | typeof ListProperties | typeof TodoList | typeof CloudServices | typeof Undo | typeof Essentials | typeof EasyImage | typeof FindAndReplace | typeof FontBackgroundColor | typeof FontColor | typeof FontFamily | typeof FontSize | typeof Highlight | typeof HorizontalLine | typeof Image | typeof ImageCaption | typeof ImageResize | typeof ImageStyle | typeof ImageTextAlternative | typeof ImageToolbar | typeof ImageUpload | typeof Indent | typeof IndentBlock | typeof Link | typeof MediaEmbed | typeof Mention | typeof PageBreak | typeof PasteFromOffice | typeof RemoveFormat | typeof Table | typeof TableCaption | typeof TableCellProperties | typeof TableColumnResize | typeof TableProperties | typeof TableToolbar | typeof AIAssistant | typeof PictureEditing | typeof CustomOpenAITextAdapter | typeof Comments | typeof MentionCustomization | typeof PresenceList | typeof RealTimeCollaborativeComments | typeof RealTimeCollaborativeEditing | typeof RealTimeCollaborativeTrackChanges | typeof TrackChanges | typeof TrackChangesData | typeof WideSidebar)[];
private static toolbarItems;
static defaultConfig: MultirootEditorConfig;
}
Expand Down
79 changes: 77 additions & 2 deletions packages/ckeditor5-build-multi-root/build/ckeditor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/ckeditor5-build-multi-root/build/ckeditor.js.map

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading