Giter Club home page Giter Club logo

nextlint's Issues

adding tiptap extensions

Hello!

I wonder how I can add tiptap extensions.
My guess is adding them as a props in SvelteEditor component or somewhere
onCreated={createdEditor => { editor = createdEditor }}

Thank you!

Broken example?

I can't get the example from the setup instructions in the README to work.
It says to do

  import {type Editor, EditorTheme, SvelteEditor} from '@nextlint/svelte';

but Editor doesn't seem to be exported by this library. Its content is

export { default as SvelteEditor } from './Editor.svelte';
export { default as EditorTheme } from './EditorTheme.svelte';

so no Editor.

EditorTheme being imported and overriding styles despite tree-shake

For some reason the EditorTheme is still being imported even though I'm tree shaking, thus overriding my own shadcn settings.

I think EditorTheme shouldn't be included in the index, but maybe on it's own, like so?

import EditorTheme from '@nextlint/svelte/components/EditorTheme.svelte';

When I hover over a route, the route is being prefetched thus also the component listed below. And you can dynamically see my theme change πŸ˜‚

CleanShot.2024-03-27.at.23.57.17.mp4

This is what my code looks like:

<script lang="ts">
	import type { Editor } from '@nextlint/svelte';
	import { SvelteEditor } from '@nextlint/svelte';
	import type { Content, Extensions, JSONContent } from '@tiptap/core';
	import { cn } from '$lib/utils/ui';

	export let name: string;
	export let placeholder = 'Start typing...';

	export let value: Content;

	function handleOnChange(editor: Editor) {
		value = JSON.stringify(editor.getJSON(), null);
	}
</script>

<div
	class={cn(
		'dark:border-border min-h-[200px] rounded-md border bg-white !p-4 px-3 py-2 shadow-sm ring-offset-white dark:bg-gray-950 dark:ring-gray-950'
	)}
>
	<SvelteEditor content={value} {placeholder} onChange={handleOnChange} />

	<input type="hidden" {name} bind:value />
</div>

Adding to the Bubble menu, Slash Menu, and Shikiji languages

Is there any way to update the bubble/slash menu or to Shikiji's code block languages? I tried adding the tiptap Heading extension with the four 1, 2, 3, and 4, but it doesn't update, and I couldn't figure out if there was a way to add modify the Shikiji languages list.

<SvelteEditor> is not a valid SSR component

Hey there πŸ‘‹

Firstly, nice job on this project. It's exactly what I've needed for a long timeπŸ«‚.

I keep getting this error and I'm confused. Usually, I'd switch dependencies, but nextlint is too good to pass on😊.

Error: <SvelteEditor> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <SvelteEditor>.

I'm kind of confused πŸ₯² and I haven't gotten any real closure on this. I've gotten this with some dependencies in the past using svelte(kit) + vite, and I haven't been able to go forward without switching dependencies.

I hope I can get some help here, and perhaps some background (down-to-earth) info on what exactly causes this error using svelte(kit) + vite. Thanks in advance!

Text type menu takes the entire screen width

Great work first of all,

how to regulate visuals like this and correct them?

Screenshot 2024-04-02 at 20 08 20

Also, why the readme mentions the EditorTheme component but when trying to import it it says it doesn't exist?

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.