Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Darginec05 committed Jul 16, 2024
1 parent c629030 commit 2376968
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 108 deletions.
36 changes: 18 additions & 18 deletions web/next-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
"@types/js-beautify": "^1.14.3",
"@uiw/codemirror-theme-vscode": "^4.21.24",
"@uiw/react-codemirror": "^4.21.25",
"@yoopta/accordion": "^4.6.4-rc.1",
"@yoopta/action-menu-list": "^4.6.4-rc.1",
"@yoopta/blockquote": "^4.6.4-rc.1",
"@yoopta/callout": "^4.6.4-rc.1",
"@yoopta/code": "^4.6.4-rc.1",
"@yoopta/editor": "^4.6.4-rc.1",
"@yoopta/embed": "^4.6.4-rc.1",
"@yoopta/exports": "^4.6.4-rc.1",
"@yoopta/file": "^4.6.4-rc.1",
"@yoopta/headings": "^4.6.4-rc.1",
"@yoopta/image": "^4.6.4-rc.1",
"@yoopta/link": "^4.6.4-rc.1",
"@yoopta/link-tool": "^4.6.4-rc.1",
"@yoopta/lists": "^4.6.4-rc.1",
"@yoopta/marks": "^4.6.4-rc.1",
"@yoopta/paragraph": "^4.6.4-rc.1",
"@yoopta/toolbar": "^4.6.4-rc.1",
"@yoopta/video": "^4.6.4-rc.1",
"@yoopta/accordion": "^4.6.4-rc.2",
"@yoopta/action-menu-list": "^4.6.4-rc.2",
"@yoopta/blockquote": "^4.6.4-rc.2",
"@yoopta/callout": "^4.6.4-rc.2",
"@yoopta/code": "^4.6.4-rc.2",
"@yoopta/editor": "^4.6.4-rc.2",
"@yoopta/embed": "^4.6.4-rc.2",
"@yoopta/exports": "^4.6.4-rc.2",
"@yoopta/file": "^4.6.4-rc.2",
"@yoopta/headings": "^4.6.4-rc.2",
"@yoopta/image": "^4.6.4-rc.2",
"@yoopta/link": "^4.6.4-rc.2",
"@yoopta/link-tool": "^4.6.4-rc.2",
"@yoopta/lists": "^4.6.4-rc.2",
"@yoopta/marks": "^4.6.4-rc.2",
"@yoopta/paragraph": "^4.6.4-rc.2",
"@yoopta/toolbar": "^4.6.4-rc.2",
"@yoopta/video": "^4.6.4-rc.2",
"class-variance-authority": "^0.7.0",
"classnames": "^2.5.1",
"clsx": "^2.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Toolbar, { DefaultToolbarRender } from '@yoopta/toolbar';
import LinkTool, { DefaultLinkToolRender } from '@yoopta/link-tool';

import { uploadToCloudinary } from '@/utils/cloudinary';
import { useEffect, useMemo, useRef } from 'react';
import { useMemo, useRef } from 'react';
import { WITH_BASIC_INIT_VALUE } from './initValue';

const plugins = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ export const WITH_BASIC_INIT_VALUE = {
type: 'BulletedList',
meta: {
order: 23,
depth: 0,
depth: 1,
},
},
'3d61674a-8d55-4b6f-9ff3-eb1518ec22b0': {
Expand Down Expand Up @@ -792,6 +792,7 @@ export const WITH_BASIC_INIT_VALUE = {
meta: {
order: 3,
depth: 0,
align: 'center',
},
value: [
{
Expand Down Expand Up @@ -1262,6 +1263,7 @@ export const WITH_BASIC_INIT_VALUE = {
meta: {
order: 5,
depth: 0,
align: 'center',
},
},
'62bcd227-f42c-426d-8b3a-9bff70b5308d': {
Expand All @@ -1280,19 +1282,7 @@ export const WITH_BASIC_INIT_VALUE = {
type: 'accordion-list-item-heading',
children: [
{
text: 'Can I relax with Yoopta-Editor?',
},
],
props: {
nodeType: 'block',
},
},
{
id: 'a203259d-f075-44a3-a557-7d89f15a3501',
type: 'accordion-list-item-content',
children: [
{
text: 'Definitely, yes. We are aiming to ensure that you never worry about developing rich-text editors, but just focus on business logic when writing your super applications.',
text: 'Is Yoopta-Editor free?',
},
],
props: {
Expand All @@ -1307,7 +1297,7 @@ export const WITH_BASIC_INIT_VALUE = {
},
children: [
{
text: 'Just install the needed packages, make the necessary configuration and relax',
text: "Yes! Just install and relax, it's under MIT license",
underline: true,
},
],
Expand Down Expand Up @@ -1386,6 +1376,90 @@ export const WITH_BASIC_INIT_VALUE = {
isExpanded: true,
},
},
{
id: '79655082-d9b0-4ade-aecb-cb0599b0643f',
type: 'accordion-list-item',
children: [
{
id: '4ead075d-ed01-4e97-9ead-cd40e9b38f80',
type: 'accordion-list-item-heading',
children: [
{
text: 'We need collaborative! Any news?',
},
],
props: {
nodeType: 'block',
},
},
{
id: '05d9e7d5-b827-4248-80a2-c53f0bbf89b9',
type: 'accordion-list-item-content',
children: [
{
text: 'Already in progress 😎',
},
],
props: {
nodeType: 'block',
},
},
],
props: {
nodeType: 'block',
isExpanded: true,
},
},
{
id: '5114a98e-7a17-44ff-b9b1-f95b8f03efdf',
type: 'accordion-list-item',
children: [
{
id: '9e367393-3c7c-4928-b62f-aa254ece444c',
type: 'accordion-list-item-heading',
children: [
{
text: 'How I can support project?',
},
],
props: {
nodeType: 'block',
},
},
{
id: 'ac810605-4e80-47d0-b70f-6ea7ce630ef9',
type: 'accordion-list-item-content',
children: [
{
text: 'Support us using ',
},
{
type: 'link',
children: [
{
text: 'Github sponsor link',
},
],
props: {
url: 'https://github.com/sponsors/Darginec05',
target: '_self',
rel: 'noopener noreferrer',
},
},
{
text: ' ❤️',
},
],
props: {
nodeType: 'block',
},
},
],
props: {
nodeType: 'block',
isExpanded: true,
},
},
{
id: 'ec4816dd-c646-43c8-90cf-30fe02b2a93f',
type: 'accordion-list-item',
Expand Down Expand Up @@ -1437,6 +1511,7 @@ export const WITH_BASIC_INIT_VALUE = {
meta: {
order: 4,
depth: 0,
align: 'center',
},
},
'39f639c6-219f-4cb7-a817-cb9f4d6ea07c': {
Expand All @@ -1459,6 +1534,7 @@ export const WITH_BASIC_INIT_VALUE = {
meta: {
order: 2,
depth: 0,
align: 'center',
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import NextImage, { ImageProps } from 'next/image';
import NextLink from 'next/link';
import Typography from '@mui/material/Typography';

const plugins = [
const getPlugins = () => [
Paragraph,
HeadingOne,
HeadingTwo.extend({
Expand Down Expand Up @@ -193,7 +193,7 @@ function WithCustomRenders() {
>
<YooptaEditor
editor={editor}
plugins={plugins}
plugins={getPlugins()}
tools={TOOLS}
marks={MARKS}
selectionBoxRoot={selectionRef}
Expand Down
Loading

0 comments on commit 2376968

Please sign in to comment.