Git Product home page Git Product logo

Comments (6)

manogi avatar manogi commented on July 17, 2024 1

Hi there, could you please paste your Resource Class, or just the Tiptap fields inside that class? I'm not sure which button you mean. There is no "paragraph" button. Just pressing enter inside Tiptap adds a new paragraph, no button is needed. All other block elements can be turned back into a paragraph by by toggling the button again (like H1, H2, Unordered List etc.).

from nova-tiptap.

manogi avatar manogi commented on July 17, 2024 1

Hmm. I'm not sure I would like the Paragraph button to be a "first class citizen", because people might think they actually need to use it. But I might consider adding the button, but not adding it to the Readme. I will think about it.

from nova-tiptap.

manogi avatar manogi commented on July 17, 2024 1

I decided to add the button (is added in version v2.7.2), but I don't mention it in the Readme. Using feels a little strange to me, as there is no way to "untoggle" a paragraph, as the paragraph is the default block node. I hope it fits your use case!

from nova-tiptap.

mikkellindblom avatar mikkellindblom commented on July 17, 2024

Hi @manogi ,

I often use the "paragraph" button to reset text pasted from elsewhere, maybe that is just me?

Tiptap::make('Content', 'content')
                ->buttons([
                    'heading',
                    'paragraph',
                    '|',
                    'italic',
                    'bold',
                    '|',
                    'link',
                    'strike',
                    'underline',
                    'highlight',
                    '|',
                    'bulletList',
                    'orderedList',
                    '|',
                    'table',
                ])
                ->headingLevels([1, 2, 3, 4])
                ->onlyOnForms(),

Maybe the following would work:

File: NormalButton.vue:

Line 58:

else if (this.button == 'paragraph') {
    return ['fas', 'paragraph'];
}

Line 109:

else if (this.button == 'paragraph') {
    command.setParagraph();
}

Ref: https://tiptap.dev/api/nodes/paragraph

from nova-tiptap.

mikkellindblom avatar mikkellindblom commented on July 17, 2024

Sure thing, let me know what you decide :) Thanks!

from nova-tiptap.

mikkellindblom avatar mikkellindblom commented on July 17, 2024

Thank you @manogi!

from nova-tiptap.

Related Issues (20)

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.