mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-28 23:59:25 +08:00
Merge branch 'main' of https://github.com/ueberdosis/tiptap-next into main
This commit is contained in:
commit
1dfd289a23
@ -110,49 +110,49 @@ jobs:
|
|||||||
channel: '#tiptap-notifications'
|
channel: '#tiptap-notifications'
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|
||||||
# build:
|
build:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
# needs: lint
|
needs: lint
|
||||||
|
|
||||||
# env:
|
env:
|
||||||
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
|
|
||||||
# strategy:
|
strategy:
|
||||||
# matrix:
|
matrix:
|
||||||
# node-version: [14]
|
node-version: [14]
|
||||||
|
|
||||||
# steps:
|
steps:
|
||||||
|
|
||||||
# - uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
|
|
||||||
# - name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
# uses: actions/setup-node@v2.1.2
|
uses: actions/setup-node@v2.1.2
|
||||||
# with:
|
with:
|
||||||
# node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
# - name: Load cached dependencies
|
- name: Load cached dependencies
|
||||||
# uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
# id: cache
|
id: cache
|
||||||
# with:
|
with:
|
||||||
# path: |
|
path: |
|
||||||
# **/node_modules
|
**/node_modules
|
||||||
# /home/runner/.cache/Cypress
|
/home/runner/.cache/Cypress
|
||||||
# key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
|
||||||
# - name: Install dependencies
|
- name: Install dependencies
|
||||||
# id: install-dependencies
|
id: install-dependencies
|
||||||
# if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
# run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
# - name: Build packages dependencies
|
- name: Try to build the packages
|
||||||
# id: build-packages
|
id: build-packages
|
||||||
# run: yarn build:packages
|
run: yarn build:ci
|
||||||
|
|
||||||
# - name: Send Slack notifications
|
- name: Send Slack notifications
|
||||||
# uses: act10ns/slack@v1
|
uses: act10ns/slack@v1
|
||||||
# with:
|
with:
|
||||||
# status: ${{ job.status }}
|
status: ${{ job.status }}
|
||||||
# steps: ${{ toJson(steps) }}
|
steps: ${{ toJson(steps) }}
|
||||||
# channel: '#tiptap-notifications'
|
channel: '#tiptap-notifications'
|
||||||
# if: failure()
|
if: failure()
|
20
.github/workflows/clean-up.yml
vendored
20
.github/workflows/clean-up.yml
vendored
@ -1,20 +0,0 @@
|
|||||||
# GitHub Action to remove old artifacts
|
|
||||||
# Documentation: https://github.com/c-hive/gha-remove-artifacts
|
|
||||||
|
|
||||||
name: clean-up
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
# Every day at 1am
|
|
||||||
- cron: '0 1 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
remove-old-artifacts:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 10
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Remove old artifacts
|
|
||||||
uses: c-hive/gha-remove-artifacts@v1
|
|
||||||
with:
|
|
||||||
age: '1 hour'
|
|
@ -130,7 +130,7 @@ const CustomParagraph = Paragraph.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Result:
|
// Result:
|
||||||
// <p color="pink" style="color: pink">Example Text</p>
|
// <p style="color: pink">Example Text</p>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also control how the attribute is parsed from the HTML. Let’s say you want to store the color in an attribute called `data-color`, here’s how you would do that:
|
You can also control how the attribute is parsed from the HTML. Let’s say you want to store the color in an attribute called `data-color`, here’s how you would do that:
|
||||||
|
@ -49,6 +49,32 @@ Note that tiptap needs to run in the client, not on the server. It’s required
|
|||||||
|
|
||||||
[Read more](https://nuxtjs.org/api/components-client-only)
|
[Read more](https://nuxtjs.org/api/components-client-only)
|
||||||
|
|
||||||
|
## Option 3: CDN
|
||||||
|
|
||||||
|
To pull in tiptap for quick demos or just giving it a spin, grab the latest build via CDN:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<!doctype html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<script src="https://cdn.example.com/tiptap-core.bundle.umd.min.js"></script>
|
||||||
|
<script src="https://cdn.example.com/tiptap-starter-kit.bundle.umd.min.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="element"></div>
|
||||||
|
<script>
|
||||||
|
const { Editor } = window['@tiptap/core']
|
||||||
|
const { defaultExtensions } = window['@tiptap/starter-kit']
|
||||||
|
const editor = new Editor({
|
||||||
|
element: document.querySelector('.element'),
|
||||||
|
extensions: defaultExtensions(),
|
||||||
|
content: '<p>Your content.</p>',
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
```
|
||||||
|
|
||||||
<!-- ## Option 3: CodeSandbox
|
<!-- ## Option 3: CodeSandbox
|
||||||
|
|
||||||
CodeSandbox is an online coding environment. It’s great to fiddle around without setting up a local project and to share your code with others.
|
CodeSandbox is an online coding environment. It’s great to fiddle around without setting up a local project and to share your code with others.
|
||||||
|
Loading…
Reference in New Issue
Block a user