
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
@samhammer/yarte
Advanced tools
YeATT is a customizable, web component-based toolbox for TipTap. It provides a set of ready-to-use Svelte web components and extensions for building modern, flexible, and framework-agnostic rich text editing experiences.
npm install @samhammer/yarte
Import the web components bundle in your application:
import '@samhammer/yarte/web-components.js';
You can now use the provided custom elements in your HTML:
<yarte-bold-button></yarte-bold-button>
<yarte-italic-button></yarte-italic-button>
<yarte-underline-button></yarte-underline-button>
<!-- ...and more -->
Import the extensions bundle to use with your TipTap editor instance:
import { ImageExtension, KnowledgeExtension, SelectionDecoration, TableBubbleMenuExtension } from '@samhammer/yarte/extensions.js';
YeATT provides the following web components:
<yarte-bold-button><yarte-italic-button><yarte-underline-button><yarte-bullet-list-button><yarte-ordered-list-button><yarte-font-color-button><yarte-font-highlight-button><yarte-image-button><yarte-knowledge-button><yarte-redo-button><yarte-undo-button><yarte-remove-format-button><yarte-strike-button><yarte-hyperlink-button><yarte-table-button><yarte-table-bubble-menu><yarte-text-align-button>File and returns a Promise<string>. Example:
uploadInlineImage(file: File): Promise<string>;
Below is a minimal example of initializing a TipTap editor. For more advanced usage and configuration, see the TipTap documentation:
import { Editor } from '@tiptap/core';
import StarterKit from '@tiptap/starter-kit';
import {
ImageExtension,
KnowledgeExtension,
SelectionDecoration,
TableBubbleMenuExtension
} from '@samhammer/yarte/dist/extensions.js';
const editor = new Editor({
element: document.querySelector('#editor'),
extensions: [
StarterKit,
ImageExtension,
KnowledgeExtension,
SelectionDecoration,
TableBubbleMenuExtension
],
content: '<p>Hello World!</p>',
});
<div id="editor"></div>
For more details and advanced configuration, visit the TipTap documentation.
YeATT web components require a TipTap editor instance to function. Some components, like the image upload button, also require a callback function for uploading images that returns a string (the image URL). Here is how you can do this in plain JavaScript (example for bold, italic, and image upload buttons):
import { Editor } from '@tiptap/core';
import StarterKit from '@tiptap/starter-kit';
import Bold from '@tiptap/extension-bold';
import Italic from '@tiptap/extension-italic';
import { ImageExtension } from '@samhammer/yarte/extensions.js';
// Example image upload function (should return a Promise<string> with the image URL)
function uploadInlineImage(file) {
// Replace this with your actual upload logic
return new Promise((resolve) => {
setTimeout(() => {
// Simulate upload and return a dummy URL
resolve('https://your.cdn.com/' + file.name);
}, 1000);
});
}
const editor = new Editor({
element: document.querySelector('#editor'),
extensions: [
StarterKit,
Bold,
Italic,
ImageExtension(uploadInlineImage)
],
content: '<p>Hello World!</p>',
});
// Assign the editor instance to each YeATT custom element
const boldButton = document.querySelector('yarte-bold-button');
boldButton.editor = editor;
const italicButton = document.querySelector('yarte-italic-button');
italicButton.editor = editor;
const imageButton = document.querySelector('yarte-image-button');
imageButton.editor = editor;
imageButton.imageUpload = uploadInlineImage;
<script type="module" src="@samhammer/yarte/web-components.js"></script>
<div id="editor"></div>
<yarte-bold-button></yarte-bold-button>
<yarte-italic-button></yarte-italic-button>
<yarte-image-button></yarte-image-button>
Note: For components like
<yarte-image-button>, you must provide animageUploadfunction that returns a Promise resolving to the image URL.
YeATT components use CSS custom properties for easy theming. The following variables can be overwritten:
:root {
--yarte-bg-button: white;
--yarte-bg-button-hover: #e2e2e2;
--yarte-bg-button-highlighted: #a6ccf7;
--yarte-bg-icon: rgba(37, 39, 45, 0.37);
}
MIT © Samhammer AG
FAQs
Yet another rich text editor based on TipTap
The npm package @samhammer/yarte receives a total of 0 weekly downloads. As such, @samhammer/yarte popularity was classified as not popular.
We found that @samhammer/yarte demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.