Coder Social home page Coder Social logo

microvoid / marktion Goto Github PK

View Code? Open in Web Editor NEW
263.0 263.0 27.0 8.83 MB

Marktion is an AI Powered Markdown Editor

Home Page: https://marktion.io

License: MIT License

JavaScript 2.33% TypeScript 72.75% CSS 22.32% Shell 0.05% HTML 0.16% MDX 2.40%
ai editor markdown notion tiptap wysiwyg

marktion's People

Contributors

youking-lib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

marktion's Issues

can not opening the model of AI after clicking space in NextJs

My editor code

import { ReactEditor, useAI } from "marktion";
import { useRef } from "react";

function Editor() {
  const editorRef = useRef(null);

  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call
  const ai = useAI({
    basePath: "/api/chat",
  });
  console.log("ai", ai);
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
  return <ReactEditor ref={editorRef} plugins={[ai.plugin]} />;
}

export default Editor;

My openAI code which places at /api/chat folder in nextJs

  import OpenAI from "openai";
  import { OpenAIStream, StreamingTextResponse } from "ai";

  // Create an OpenAI API client (that's edge friendly!)
  const openai = new OpenAI({
    apiKey: process.env.NEXT_PUBLIC_OPENAI_API_KEY,
  });

  // Set the runtime to edge for best performance
  export const runtime = "edge";

  export async function POST(req: Request) {
    const { messages } = await req.json();

    // Ask OpenAI for a streaming chat completion given the prompt
    const response = await openai.chat.completions.create({
      model: "gpt-3.5-turbo",
      stream: true,
      messages,
    });

    // Convert the response into a friendly text-stream
    const stream = OpenAIStream(response);
    // Respond with the stream
    return new StreamingTextResponse(stream);
  }

Issue

Just no issues!
just a question. How i remove some plugins, for example, the image?
Also, how i get the HTML? ( i see you are using plugin-markdown)
Keep with good work.
I hope you can maintain this code. 👍 🥇

[tiptap warn]: Duplicate extension names found: ['codeBlock']. This can lead to issues.

[tiptap warn]: Duplicate extension names found: ['codeBlock']. This can lead to issues. 
    at Suspense
    at LoadableComponent
    at div
    at div
    at div
    at div
    at div
    at commitPassiveMountOnFiber (webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:23035:9)
    at c (webpack-internal:///(app-client)/./node_modules/@headlessui/react/dist/internal/open-closed.js:8:305)
    at ye (webpack-internal:///(app-client)/./node_modules/@headlessui/react/dist/components/transitions/transition.js:19:3408)
    at commitPassiveMountOnFiber (webpack-internal:///(app-client)/./node_modules/next/dist/compiled/react-dom-experimental/cjs/react-dom.development.js:23035:9)
ExtensionManager @ marktion.js:38622
createExtensionManager @ marktion.js:40801
Editor @ marktion.js:40673
Editor2 @ marktion.js:44277
eval @ marktion.js:44626
...
marktion.js:43021 tippy.jsInteractive tippy element may not be accessible via keyboard navigation because it is not directly after the reference element in the DOM source order. Using a wrapper <div> or <span> tag around the reference element solves this by creating a new parentNode context. Specifying `appendTo: document.body` silences this warning, but it assumes you are using a focus management solution to handle keyboard navigation. 
See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity👷‍ This is a development-only message. It will be removed in production.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.