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
d1daa55be1
commit
edc34d9836
@ -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>
|
||||
|
@ -89,6 +89,11 @@
|
||||
align-items: center;
|
||||
&:not(:last-of-type) { margin-bottom: 0.8rem; }
|
||||
}
|
||||
|
||||
h6 {
|
||||
@include text-sm();
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
select {
|
||||
|
@ -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