首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何改变tiptap-vuetify的风格

如何改变tiptap-vuetify的风格
EN

Stack Overflow用户
提问于 2021-08-30 04:44:52
回答 1查看 370关注 0票数 0

我正在使用tiptap-vuetify(https://github.com/iliyaZelenko/tiptap-vuetify)作为我的所见即所得编辑器。但是我不想要默认的样式。Sing它不以类或风格为道具我如何按照我想要的方式来设计它(如去除阴影,将灰色改为白色等)

EN

回答 1

Stack Overflow用户

发布于 2021-08-30 06:06:30

您需要导入自定义扩展,我在此包tiptap-vuetify中搜索它,您只能使用此包中的有限部分,例如:

代码语言:javascript
复制
   Heading,
   Bold,
   Italic,
   Strike,
   Underline,
   Code,
   CodeBlock,
   Paragraph,
   BulletList,
   OrderedList,
   ListItem,
   Blockquote,
   HardBreak,
   HorizontalRule,
   History,
   Link

此代码可以帮助您:

代码语言:javascript
复制
<template>
  <div>
    <tiptap-vuetify v-model="content" :extensions="extensions" />
  </div>
</template>





<script>
import {
  // component
  TiptapVuetify,
  Underline,
  Bold,
  Italic,
  Link,
  Paragraph,
  BulletList,
  ListItem,
  History,
} from "tiptap-vuetify";

export default {
  components: { TiptapVuetify },
  created() {
    this.$vuetify.rtl = false;
  },
  data: () => ({
    extensions: [
      new Bold(),
      new Italic(),
      new Underline(),
      // new Code(),
      // new CodeBlock(),
      new Paragraph(),
      new BulletList(),
      // new OrderedList(),
      new ListItem(),
      new Link(),
      // new Blockquote(),
      // new HardBreak(), // Shift + Enter
      // new HorizontalRule(),
      new History(),
    ],
    content: `
<h1>Most basic use</h1>
<p>
  You can use the necessary Extensions. 
  The corresponding buttons are 
  <strong>
    added automatically
  </strong>.
</p>
<pre><code>&lt;tiptap-vuetify v-model="content" :extensions="extensions"/&gt;</code></pre>
<p></p>
<h2>Icons</h2>
<p>Avaliable icons groups:</p>
<ol>
  <li>
    <p>Material Design <em>Official</em></p>
  </li>
  <li>
    <p>Font Awesome (FA)</p>
  </li>
  <li>
    <p>Material Design Icons (MDI)</p>
  </li>
</ol>
<p></p>
<blockquote>
  <p>This package is awesome!</p>
</blockquote>
<p></p>
    `,
  }),
};
</script>

link可以帮助您

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68979028

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档