Simple text editor based on tiptap. HTML format.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

32 wiersze
612 B

  1. import { Mark } from 'tiptap'
  2. import { toggleMark } from 'tiptap-commands'
  3. export default class SubscriptStyle extends Mark {
  4. get name() {
  5. return 'subscriptstyle'
  6. }
  7. get schema() {
  8. return {
  9. parseDOM: [
  10. {
  11. tag: 'sub',
  12. },
  13. //{
  14. // style: 'text-decoration',
  15. // getAttrs: value => value === 'underline',
  16. // },
  17. ],
  18. toDOM: () => ['sub', 0],
  19. }
  20. }
  21. commands({ type }) {
  22. return () => toggleMark(type)
  23. }
  24. }