Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/three-flies-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@studiocms/wysiwyg": patch
---

Merge grapesJS OSS plugins due to build error from all external plugins
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,51 @@
"alignjustify",
"alignleft",
"alignright",
"Arseniev",
"Artur",
"astroenv",
"atproto",
"Avenir",
"backcolor",
"bsky",
"bullist",
"classactive",
"cmdm",
"CMSWYSIWYG",
"cnts",
"compkeys",
"Cropzone",
"domc",
"endtext",
"fontn",
"forecolor",
"fslightbox",
"grapesjs",
"grayscale",
"highlightable",
"hilite",
"iconify",
"labelledby",
"layerable",
"Lightbox",
"numlist",
"olist",
"outdent",
"pallete",
"projectdata",
"resizer",
"selectortab",
"socialposter",
"startfrom",
"strikethrough",
"studiocms",
"studiosdk",
"textnode",
"toastr",
"typedsrc",
"ulist",
"undoredo",
"unstylable",
"virtuals",
"withstudiocms",
"WYSIWYGDB"
Expand Down
16 changes: 2 additions & 14 deletions packages/studiocms_wysiwyg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,8 @@
"@studiocms/ui": "^0.4.16",
"astro-integration-kit": "catalog:",
"grapesjs": "^0.22.6",
"grapesjs-blocks-basic": "^1.0.2",
"grapesjs-plugin-forms": "^2.0.6",
"grapesjs-component-countdown": "1.0.2",
"grapesjs-plugin-export": "^1.0.12",
"grapesjs-tabs": "^1.0.6",
"grapesjs-custom-code": "^1.0.2",
"grapesjs-touch": "^0.1.1",
"grapesjs-parser-postcss": "^1.0.3",
"grapesjs-tooltip": "0.1.8",
"grapesjs-tui-image-editor": "^1.0.2",
"grapesjs-typed": "^2.0.1",
"grapesjs-style-bg": "^2.0.2",
"grapesjs-rte-extensions": "^1.0.10",
"ultrahtml": "^1.5.3"
"ultrahtml": "^1.5.3",
"tui-image-editor": "^3.15.3"
},
"devDependencies": {
"@types/node": "catalog:"
Expand Down
60 changes: 22 additions & 38 deletions packages/studiocms_wysiwyg/src/wysiwyg/components/Editor.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
import '@studiocms/ui/css/colors.css';
import 'grapesjs/dist/css/grapes.min.css';
import 'grapesjs-rte-extensions/dist/grapesjs-rte-extensions.min.css';
import '../editorPlugins/rte/styles.css';
import '../styles/main.css';
import { importComponentsKeys } from 'studiocms/lib/renderer/runtime.js';
import type { PluginPageTypeEditorProps } from 'studiocms/types';
Expand Down Expand Up @@ -41,24 +41,17 @@ interface Props extends PluginPageTypeEditorProps {}
<script>
import { toast } from "@studiocms/ui/components/Toast/toast.js";
import grapesjs, { type Editor, usePlugin } from "grapesjs";
import "@studiocms/grapesjs-plugin";
import blocks from "grapesjs-blocks-basic";
import countdown from "grapesjs-component-countdown";
import exporter from "grapesjs-plugin-export";
import customCode from "grapesjs-custom-code";
import postcss from "grapesjs-parser-postcss";
import tooltip from "grapesjs-tooltip";
import tuiImage from "grapesjs-tui-image-editor";
import typed from "grapesjs-typed";
import styleBg from "grapesjs-style-bg";
import forms from "grapesjs-plugin-forms";
// @ts-ignore
import rte from "grapesjs-rte-extensions";
// @ts-ignore
import tabs from "grapesjs-tabs";
// @ts-ignore
import touch from "grapesjs-touch";
import { parse } from "../../utils.js";
import blocks from '../editorPlugins/blocks/index.js';
import tabs from '../editorPlugins/tabs/index.js';
import countdown from '../editorPlugins/countdown.js';
import customCode from '../editorPlugins/code/index.js';
import tooltip from '../editorPlugins/tooltip.js';
import tuiImageEditor from '../editorPlugins/tuiImageEditor.js';
import typed from '../editorPlugins/typed/index.js';
import forms from '../editorPlugins/forms/index.js';
import rte from '../editorPlugins/rte/index.js';
import "@studiocms/grapesjs-plugin";

/**
* Represents an array of Astro component blocks, where each block contains metadata
Expand Down Expand Up @@ -199,21 +192,19 @@ interface Props extends PluginPageTypeEditorProps {}
panels: { defaults: [] },
plugins: [
usePlugin(getPlugin(componentKeys)),
usePlugin(blocks, { flexGrid: true }),
usePlugin(tabs, {
tabsBlock: { category: "Extra" },
usePlugin(inlineStorage),
usePlugin(blocks, {
flexGrid: true
}),
usePlugin(touch, {
block: {
category: "Extra",
content: {
type: "typed",
"type-speed": 40,
strings: ["Text row one", "Text row two", "Text row three"],
},
usePlugin(tabs, {
tabsBlock: {
category: 'Extra'
},
}),
usePlugin(tuiImage, {
usePlugin(countdown),
usePlugin(customCode),
usePlugin(tooltip),
usePlugin(tuiImageEditor, {
script: [
"https://uicdn.toast.com/tui.code-snippet/v1.5.2/tui-code-snippet.min.js",
"https://uicdn.toast.com/tui-color-picker/v2.2.7/tui-color-picker.min.js",
Expand All @@ -224,17 +215,10 @@ interface Props extends PluginPageTypeEditorProps {}
"https://uicdn.toast.com/tui-image-editor/v3.15.2/tui-image-editor.min.css",
],
}),
usePlugin(countdown),
usePlugin(exporter),
usePlugin(customCode),
usePlugin(postcss),
usePlugin(tooltip),
usePlugin(typed),
usePlugin(styleBg),
usePlugin(inlineStorage),
usePlugin(forms),
usePlugin(rte),
"@studiocms/grapesjs-plugin",
'@studiocms/grapesjs-plugin',
],
blockManager: {
blocks: convertComponentBlocks(rawBlocks),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Copyright (c) 2017-current, Artur Arseniev

Modified 2025, withStudioCMS

All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

- Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
- Neither the name "GrapesJS" nor the names of its contributors may be
used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading