Skip to content
Snippets Groups Projects
Commit e2181699 authored by chris's avatar chris
Browse files

rename plugin

parent e999d55d
No related branches found
No related tags found
1 merge request!466Chatgpt demo
......@@ -27,6 +27,7 @@ import {
import { DefaultSchema } from 'wax-prosemirror-core';
import invisibles, { hardBreak } from '@guardian/prosemirror-invisibles';
const API_KEY = '';
async function ExternalAPIContentTransformation(prompt) {
const response = await fetch('https://api.openai.com/v1/chat/completions', {
......
......@@ -33,7 +33,7 @@ class AnyStyleTool extends Tools {
view,
this.config.get('config.ExternalAPIContentService')
.ExternalAPIContentTransformation,
this.pmplugins.get('anyStylePlaceHolder'),
this.pmplugins.get('ExternalAPIContentPlaceHolder'),
context,
);
return this.isDisplayed() ? (
......
import { Service } from 'wax-prosemirror-core';
import AnyStyleTool from './AnyStyleTool';
import AnyStyleToolGroupService from './AnyStyleToolGroupService/AnyStyleToolGroupService';
import AnyStylePlaceHolderPlugin from './plugins/AnyStylePlaceHolderPlugin';
import ExternalAPIContentPlaceHolderPlugin from './plugins/ExternalAPIContentPlaceHolderPlugin';
import './anyStyle.css';
class ExternalAPIContentService extends Service {
......@@ -9,8 +9,8 @@ class ExternalAPIContentService extends Service {
boot() {
this.app.PmPlugins.add(
'anyStylePlaceHolder',
AnyStylePlaceHolderPlugin('anyStylePlaceHolder'),
'ExternalAPIContentPlaceHolder',
ExternalAPIContentPlaceHolderPlugin('ExternalAPIContentPlaceHolder'),
);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment