11import type { TagKey } from './utils/bbcode'
22
33export type LanguageId = 'es' | 'en'
4- export type ChipConfig = { key : TagKey ; label : string }
4+ export type ButtonConfig = { key : TagKey ; label : string ; title ? : string }
55
66export const sample = `[b]BBCode Preview[/b]
77Escribe BBCode y mira el HTML renderizado al instante.
@@ -13,14 +13,21 @@ Escribe BBCode y mira el HTML renderizado al instante.
1313
1414[code]const greet = () => console.log("hola");[/code]`
1515
16- export const chips : ChipConfig [ ] = [
17- { key : 'bold' , label : '[b]' } ,
18- { key : 'italic' , label : '[i]' } ,
19- { key : 'link' , label : '[url]' } ,
20- { key : 'image' , label : '[img]' } ,
21- { key : 'quote' , label : '[quote]' } ,
22- { key : 'code' , label : '[code]' } ,
23- { key : 'list' , label : '[list]' } ,
16+ export const toolbarButtons : ButtonConfig [ ] = [
17+ { key : 'bold' , label : 'B' , title : 'Negrita' } ,
18+ { key : 'italic' , label : 'I' , title : 'Cursiva' } ,
19+ { key : 'underline' , label : 'U' , title : 'Subrayado' } ,
20+ { key : 'strike' , label : 'S' , title : 'Tachado' } ,
21+ { key : 'list' , label : '• List' , title : 'Lista' } ,
22+ { key : 'left' , label : 'L' , title : 'Alinear izquierda' } ,
23+ { key : 'center' , label : 'C' , title : 'Centrar' } ,
24+ { key : 'right' , label : 'R' , title : 'Alinear derecha' } ,
25+ { key : 'quote' , label : '❝' , title : 'Cita' } ,
26+ { key : 'code' , label : '</>' , title : 'Código' } ,
27+ { key : 'link' , label : 'Link' , title : 'Enlace' } ,
28+ { key : 'image' , label : 'Img' , title : 'Imagen' } ,
29+ { key : 'color' , label : 'Color' , title : 'Color' } ,
30+ { key : 'size' , label : 'Size' , title : 'Tamaño' } ,
2431]
2532
2633export const languages : Array < { id : LanguageId ; label : string } > = [
0 commit comments