You can use | to define a vertical line between two buttons, and you can use br to define a hard break after a button.
Headings and headingLevels
When just passing the string 'heading' you will have H1, H2 and H3 to choose from. You can set the level of headings by using for example headingLevels([2, 3, 4]) which will give you H2 through H4.
Links and linkSettings and fileSettings
When just passing the string 'link' you will be able to link text with an URL and define if the link should open in a new window. You will also be able to link text with a file you uploaded to the server. You can optionally use linkSettings to define if this file upload should be possible/visible like so:
If no disk is defined here, it assumes public if a public disk is defined in your config/filesystems.php, otherwise it assumes config('filesystems.default').
And if no path is defined here, it assumes the root folder of that disk.
Images and imageSettings
With the button 'image' you can let the user add images either from a file upload or from adding a URL. And you can optionally use imageSettings to define the disk and the path:
If no disk is defined here, it assumes public if a public disk is defined in your config/filesystems.php, otherwise it assumes config('filesystems.default').
And if no path is defined here, it assumes the root folder of that disk.
Disallowing file upload for images
For images you can also disallow the file upload completely with the withFileUpload attribute:
When using 'editHtml' you can set the theme by using using htmlTheme(). The default theme used is "material". You can find all the codemirror themes used here .
Save JSON
You can optionally use saveAsJson to enable the ability to save the tiptap editor content as JSON in the field
请发表评论