@schneiderelli/cms-runtime 0.0.10 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,9 @@
14
14
  breaks: false
15
15
  });
16
16
 
17
- const html = $derived(marked.parse(block.content) as string);
17
+ // Check if content is already HTML (from Quill) or Markdown
18
+ const isHTML = $derived(block.content.includes('<p>') || block.content.includes('<h') || block.content.includes('<ul') || block.content.includes('<ol'));
19
+ const html = $derived(isHTML ? block.content : (marked.parse(block.content) as string));
18
20
  </script>
19
21
 
20
22
  <div class="csm-markdown">
@@ -48,12 +50,29 @@
48
50
  .csm-markdown :global(ol) {
49
51
  margin: 0 0 1rem;
50
52
  padding-left: 1.5rem;
53
+ list-style-position: outside;
54
+ }
55
+
56
+ .csm-markdown :global(ul) {
57
+ list-style-type: disc;
58
+ }
59
+
60
+ .csm-markdown :global(ol) {
61
+ list-style-type: decimal;
51
62
  }
52
63
 
53
64
  .csm-markdown :global(li) {
54
65
  margin-bottom: 0.5rem;
55
66
  }
56
67
 
68
+ .csm-markdown :global(ul ul) {
69
+ list-style-type: circle;
70
+ }
71
+
72
+ .csm-markdown :global(ul ul ul) {
73
+ list-style-type: square;
74
+ }
75
+
57
76
  .csm-markdown :global(strong) {
58
77
  font-weight: 600;
59
78
  }
package/dist/registry.js CHANGED
@@ -13,9 +13,9 @@ export const blockRegistry = [
13
13
  // =========================================================================
14
14
  {
15
15
  type: 'markdown',
16
- label: 'Markdown',
16
+ label: 'Text',
17
17
  icon: '📝',
18
- description: 'Freier Text mit Markdown-Formatierung',
18
+ description: 'Freier Text mit Rich-Text-Formatierung',
19
19
  category: 'content',
20
20
  defaults: { content: '' },
21
21
  fields: [
@@ -58,130 +58,6 @@ export const blockRegistry = [
58
58
  }
59
59
  ]
60
60
  },
61
- {
62
- type: 'quote',
63
- label: 'Zitat',
64
- icon: '💬',
65
- description: 'Zitat mit optionaler Quellenangabe',
66
- category: 'content',
67
- defaults: { content: '', source: '' },
68
- fields: [
69
- {
70
- name: 'content',
71
- label: 'Zitat',
72
- type: 'textarea',
73
- required: true,
74
- placeholder: 'Zitat eingeben...'
75
- },
76
- {
77
- name: 'source',
78
- label: 'Quelle',
79
- type: 'text',
80
- placeholder: 'Autor oder Quelle...'
81
- }
82
- ]
83
- },
84
- {
85
- type: 'note',
86
- label: 'Hinweis',
87
- icon: '💡',
88
- description: 'Info-Box, Warnung, Tipp oder Fehler',
89
- category: 'content',
90
- defaults: { content: '', variant: 'info' },
91
- fields: [
92
- {
93
- name: 'content',
94
- label: 'Inhalt',
95
- type: 'markdown',
96
- required: true,
97
- placeholder: 'Hinweis-Text...'
98
- },
99
- {
100
- name: 'variant',
101
- label: 'Typ',
102
- type: 'select',
103
- options: [
104
- { value: 'info', label: '💙 Info' },
105
- { value: 'tip', label: '💚 Tipp' },
106
- { value: 'warning', label: '💛 Warnung' },
107
- { value: 'danger', label: '❤️ Achtung' }
108
- ]
109
- }
110
- ]
111
- },
112
- {
113
- type: 'faq',
114
- label: 'FAQ',
115
- icon: '❓',
116
- description: 'Häufig gestellte Fragen',
117
- category: 'content',
118
- defaults: { title: '', items: [] },
119
- fields: [
120
- {
121
- name: 'title',
122
- label: 'Titel (optional)',
123
- type: 'text',
124
- placeholder: 'Häufige Fragen'
125
- },
126
- {
127
- name: 'items',
128
- label: 'Fragen',
129
- type: 'list',
130
- listFields: [
131
- { name: 'q', label: 'Frage', type: 'text', required: true },
132
- { name: 'a', label: 'Antwort', type: 'markdown', required: true }
133
- ]
134
- }
135
- ]
136
- },
137
- {
138
- type: 'howto',
139
- label: 'Anleitung',
140
- icon: '📋',
141
- description: 'Schritt-für-Schritt-Anleitung',
142
- category: 'content',
143
- defaults: { title: '', steps: [] },
144
- fields: [
145
- {
146
- name: 'title',
147
- label: 'Titel (optional)',
148
- type: 'text',
149
- placeholder: 'So gehts...'
150
- },
151
- {
152
- name: 'steps',
153
- label: 'Schritte',
154
- type: 'list',
155
- listFields: [
156
- { name: 'title', label: 'Schritt-Titel', type: 'text', required: true },
157
- { name: 'description', label: 'Beschreibung', type: 'markdown', required: true }
158
- ]
159
- }
160
- ]
161
- },
162
- {
163
- type: 'hero',
164
- label: 'Hero',
165
- icon: '🦸',
166
- description: 'Großer Titel-Bereich',
167
- category: 'content',
168
- defaults: { title: '', subtitle: '' },
169
- fields: [
170
- {
171
- name: 'title',
172
- label: 'Titel',
173
- type: 'text',
174
- required: true,
175
- placeholder: 'Haupttitel'
176
- },
177
- {
178
- name: 'subtitle',
179
- label: 'Untertitel',
180
- type: 'textarea',
181
- placeholder: 'Kurze Beschreibung...'
182
- }
183
- ]
184
- },
185
61
  {
186
62
  type: 'divider',
187
63
  label: 'Trennlinie',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schneiderelli/cms-runtime",
3
- "version": "0.0.10",
3
+ "version": "0.1.0",
4
4
  "description": "Content System Manager Runtime - Shared types and components for CMS editor and website framework",
5
5
  "scripts": {
6
6
  "dev": "vite dev",