mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
Add labels
This commit is contained in:
parent
67f678a282
commit
1868be1642
@ -33,7 +33,7 @@ interface FabTextEditorProps {
|
||||
*/
|
||||
export const FabTextEditor: React.FC<FabTextEditorProps> = ({ label, paragraphTools, content, limit = 400, video, image, onChange, placeholder, error }) => {
|
||||
const { t } = useTranslation('shared');
|
||||
const placeholderText = placeholder || t('app.shared.text_editor.placeholder');
|
||||
const placeholderText = placeholder || t('app.shared.text_editor.text_placeholder');
|
||||
// TODO: Add ctrl+click on link to visit
|
||||
|
||||
// Setup the editor
|
||||
|
@ -221,6 +221,7 @@ export const MenuBar: React.FC<MenuBarProps> = ({ editor, paragraphTools, video,
|
||||
<div ref={ref} className={`fab-textEditor-subMenu ${submenu ? 'is-active' : ''}`}>
|
||||
{ submenu === 'link' &&
|
||||
(<>
|
||||
<h6>{t('app.shared.text_editor.add_link')}</h6>
|
||||
<div>
|
||||
<input value={url.href} onChange={linkUrlChange} onKeyDown={handleEnter} type="text" placeholder={t('app.shared.text_editor.link_placeholder')} />
|
||||
<button type='button' onClick={unsetLink}>
|
||||
@ -241,13 +242,14 @@ export const MenuBar: React.FC<MenuBarProps> = ({ editor, paragraphTools, video,
|
||||
}
|
||||
{ submenu === 'video' &&
|
||||
(<>
|
||||
<h6>{t('app.shared.text_editor.add_video')}</h6>
|
||||
<select name="provider" onChange={handleSelect}>
|
||||
<option value="youtube">YouTube</option>
|
||||
<option value="vimeo">Vimeo</option>
|
||||
<option value="dailymotion">Dailymotion</option>
|
||||
</select>
|
||||
<div>
|
||||
<input type="text" onChange={videoUrlChange} placeholder={t('app.shared.text_editor.link_placeholder')} />
|
||||
<input type="text" onChange={videoUrlChange} placeholder={t('app.shared.text_editor.url_placeholder')} />
|
||||
<button type='button' onClick={() => addIframe()}>
|
||||
<CheckCircle size={24} />
|
||||
</button>
|
||||
@ -256,8 +258,9 @@ export const MenuBar: React.FC<MenuBarProps> = ({ editor, paragraphTools, video,
|
||||
}
|
||||
{ submenu === 'image' &&
|
||||
(<>
|
||||
<h6>{t('app.shared.text_editor.add_image')}</h6>
|
||||
<div>
|
||||
<input type="text" onChange={imageUrlChange} placeholder={t('app.shared.text_editor.link_placeholder')} />
|
||||
<input type="text" onChange={imageUrlChange} placeholder={t('app.shared.text_editor.url_placeholder')} />
|
||||
<button type='button' onClick={() => addImage()}>
|
||||
<CheckCircle size={24} />
|
||||
</button>
|
||||
|
@ -90,6 +90,11 @@
|
||||
&:not(:last-of-type) { margin-bottom: 0.8rem; }
|
||||
}
|
||||
|
||||
h6 {
|
||||
@include text-sm();
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
select {
|
||||
width: 100%;
|
||||
|
@ -25,9 +25,13 @@ en:
|
||||
payment_card_declined: "Your card was declined."
|
||||
#text editor
|
||||
text_editor:
|
||||
placeholder: "Type something…"
|
||||
text_placeholder: "Type something…"
|
||||
link_placeholder: "Paste link…"
|
||||
url_placeholder: "Paste url…"
|
||||
new_tab: "Open in a new tab"
|
||||
add_link: "Insert a link"
|
||||
add_video: "Embed a video"
|
||||
add_image: "Insert an image"
|
||||
#user edition form
|
||||
user:
|
||||
man: "Man"
|
||||
|
Loading…
Reference in New Issue
Block a user