yikoyu / vuetify-pro-tiptap

A Rich Text Editor (WYSIWYG) for Vue3 with tiptap & Vuetify.
https://yikoyu.github.io/vuetify-pro-tiptap/
MIT License
169 stars 23 forks source link

Is it possible to set the text alignment to rtl? #321

Closed chgold closed 2 weeks ago

chgold commented 4 months ago

for Semitic languages

yikoyu commented 4 months ago
import { createVuetify } from 'vuetify'

// https://github.com/vuetifyjs/vuetify/blob/master/packages/vuetify/src/composables/locale.ts#L83
// this is rtl default
const vuetify = createVuetify({
  locale: {
    rtl: { zhHans: true },
  }
})
import { useLocale } from 'vuetify'
import { locale } from 'vuetify-pro-tiptap'

const { current } = useLocale()
function setLang(lang: string) {
  locale.setLang(lang)
  current.value = lang
}

setLang('zhHans') // set rtl locale