react-draft-wysiwyg
Advanced tools
Comparing version 1.10.8 to 1.10.9
@@ -75,2 +75,10 @@ # Changelog | ||
- #380: add support for alt field. | ||
- #325: internalization of titles. | ||
- #325: internalization of titles. | ||
## 18/08/2017 (1.10.8) | ||
- Support for code block. | ||
## 10/09/2017 (1.10.8) | ||
- #429: Copy paste issue in code block. | ||
- #440: Limit pre and blockquote styles to only within the wysiwyg. | ||
- Translations for Italian locale. |
{ | ||
"name": "react-draft-wysiwyg", | ||
"version": "1.10.8", | ||
"version": "1.10.9", | ||
"description": "A wysiwyg on top of DraftJS.", | ||
@@ -25,4 +25,4 @@ "main": "dist/react-draft-wysiwyg.js", | ||
"draft-js": "^0.10.1", | ||
"draftjs-to-html": "^0.7.4", | ||
"draftjs-to-markdown": "^0.4.3", | ||
"draftjs-to-html": "^0.7.5", | ||
"draftjs-to-markdown": "^0.4.4", | ||
"enzyme": "^2.9.1", | ||
@@ -38,3 +38,3 @@ "eslint": "^4.3.0", | ||
"flow-bin": "^0.51.0", | ||
"html-to-draftjs": "^0.1.0-beta7", | ||
"html-to-draftjs": "^0.1.0-beta15", | ||
"immutable": "^4.0.0-rc.1", | ||
@@ -41,0 +41,0 @@ "jsdom": "^9.12.0", |
@@ -47,3 +47,3 @@ /* @flow */ | ||
it('should have 8 child elements when inDropdown is false', () => { | ||
it('should have 9 child elements when inDropdown is false', () => { | ||
const block = mount( | ||
@@ -58,4 +58,4 @@ <Block | ||
); | ||
expect(block.find('Option').length).to.equal(8); | ||
expect(block.find('Option').length).to.equal(9); | ||
}); | ||
}); |
@@ -29,2 +29,3 @@ /* @flow */ | ||
import { hasProperty, filter } from '../utils/common'; | ||
import { handlePastedText } from '../utils/handlePaste'; | ||
import Controls from '../controls'; | ||
@@ -362,2 +363,7 @@ import getLinkDecorator from '../decorators/Link'; | ||
handlePastedText = (text, html) => { | ||
const { editorState } = this.state; | ||
return handlePastedText(text, html, editorState, this.onChange); | ||
} | ||
preventDefault: Function = (event: Object) => { | ||
@@ -449,2 +455,3 @@ if (event.target.tagName === 'INPUT') { | ||
handleReturn={this.handleReturn} | ||
handlePastedText={this.handlePastedText} | ||
blockRendererFn={this.blockRendererFn} | ||
@@ -451,0 +458,0 @@ handleKeyCommand={this.handleKeyCommand} |
module.exports = { | ||
// Generic | ||
@@ -20,3 +19,3 @@ 'generic.add': 'Ok', | ||
// Color Picker | ||
'components.controls.colorpicker.colorpicker': 'Color Picker', | ||
'components.controls.colorpicker.colorpicker': 'Palette de couleur', | ||
'components.controls.colorpicker.text': 'Texte', | ||
@@ -37,8 +36,8 @@ 'components.controls.colorpicker.background': 'Fond', | ||
// FontSize | ||
'components.controls.fontsize.fontsize': 'Font Size', | ||
'components.controls.fontsize.fontsize': 'Taille de police', | ||
// History | ||
'components.controls.history.history': 'History', | ||
'components.controls.history.undo': 'Undo', | ||
'components.controls.history.redo': 'Redo', | ||
'components.controls.history.history': 'Historique', | ||
'components.controls.history.undo': 'Précédent', | ||
'components.controls.history.redo': 'Suivant', | ||
@@ -52,9 +51,9 @@ // Image | ||
// Inline | ||
'components.controls.inline.bold': 'Bold', | ||
'components.controls.inline.italic': 'Italic', | ||
'components.controls.inline.underline': 'Underline', | ||
'components.controls.inline.strikethrough': 'Strikethrough', | ||
'components.controls.inline.bold': 'Gras', | ||
'components.controls.inline.italic': 'Italique', | ||
'components.controls.inline.underline': 'Souligner', | ||
'components.controls.inline.strikethrough': 'Barrer', | ||
'components.controls.inline.monospace': 'Monospace', | ||
'components.controls.inline.superscript': 'Superscript', | ||
'components.controls.inline.subscript': 'Subscript', | ||
'components.controls.inline.superscript': 'Exposant', | ||
'components.controls.inline.subscript': 'Indice', | ||
@@ -65,21 +64,21 @@ // Link | ||
'components.controls.link.linkTargetOption': 'Ouvrir le lien dans une nouvelle fenêtre', | ||
'components.controls.link.link': 'Link', | ||
'components.controls.link.unlink': 'Unlink', | ||
'components.controls.link.link': 'Lier', | ||
'components.controls.link.unlink': 'Délier', | ||
// List | ||
'components.controls.list.list': 'List', | ||
'components.controls.list.unordered': 'Unordered', | ||
'components.controls.list.ordered': 'Ordered', | ||
'components.controls.list.indent': 'Indent', | ||
'components.controls.list.outdent': 'Outdent', | ||
'components.controls.list.list': 'Liste', | ||
'components.controls.list.unordered': 'Désordonnée', | ||
'components.controls.list.ordered': 'Ordonnée', | ||
'components.controls.list.indent': 'Augmenter le retrait', | ||
'components.controls.list.outdent': 'Diminuer le retrat', | ||
// Remove | ||
'components.controls.remove.remove': 'Remove', | ||
'components.controls.remove.remove': 'Supprimer', | ||
// TextAlign | ||
'components.controls.textalign.textalign': 'Text Align', | ||
'components.controls.textalign.left': 'Left', | ||
'components.controls.textalign.center': 'Center', | ||
'components.controls.textalign.right': 'Right', | ||
'components.controls.textalign.justify': 'Justify', | ||
'components.controls.textalign.textalign': 'Alignement du texte', | ||
'components.controls.textalign.left': 'Gauche', | ||
'components.controls.textalign.center': 'Centre', | ||
'components.controls.textalign.right': 'Droite', | ||
'components.controls.textalign.justify': 'Justifier', | ||
}; |
@@ -7,2 +7,3 @@ import en from './en'; | ||
import ko from './ko'; | ||
import it from './it'; | ||
@@ -16,2 +17,3 @@ module.exports = { | ||
ko, | ||
it, | ||
}; |
@@ -15,3 +15,3 @@ module.exports = { | ||
'components.controls.blocktype.blockquote': 'Цитата', | ||
'components.controls.blocktype.code': 'Code', | ||
'components.controls.blocktype.code': 'Код', | ||
'components.controls.blocktype.blocktype': 'Форматирование', | ||
@@ -21,3 +21,3 @@ 'components.controls.blocktype.normal': 'Обычный', | ||
// Color Picker | ||
'components.controls.colorpicker.colorpicker': 'Color Picker', | ||
'components.controls.colorpicker.colorpicker': 'Выбор цвета', | ||
'components.controls.colorpicker.text': 'Текст', | ||
@@ -27,3 +27,3 @@ 'components.controls.colorpicker.background': 'Фон', | ||
// Embedded | ||
'components.controls.embedded.embedded': 'Embedded', | ||
'components.controls.embedded.embedded': 'Встраивание', | ||
'components.controls.embedded.embeddedlink': 'Ссылка в iFrame', | ||
@@ -33,3 +33,3 @@ 'components.controls.embedded.enterlink': 'Вставьте ссылку', | ||
// Emoji | ||
'components.controls.emoji.emoji': 'Emoji', | ||
'components.controls.emoji.emoji': 'Эмодзи', | ||
@@ -40,11 +40,11 @@ // FontFamily | ||
// FontSize | ||
'components.controls.fontsize.fontsize': 'Font Size', | ||
'components.controls.fontsize.fontsize': 'Размер шрифта', | ||
// History | ||
'components.controls.history.history': 'History', | ||
'components.controls.history.undo': 'Undo', | ||
'components.controls.history.redo': 'Redo', | ||
'components.controls.history.history': 'История', | ||
'components.controls.history.undo': 'Отменить', | ||
'components.controls.history.redo': 'Вернуть', | ||
// Image | ||
'components.controls.image.image': 'Image', | ||
'components.controls.image.image': 'Изображение', | ||
'components.controls.image.fileUpload': 'Файлы', | ||
@@ -55,9 +55,9 @@ 'components.controls.image.byURL': 'URL', | ||
// Inline | ||
'components.controls.inline.bold': 'Bold', | ||
'components.controls.inline.italic': 'Italic', | ||
'components.controls.inline.underline': 'Underline', | ||
'components.controls.inline.strikethrough': 'Strikethrough', | ||
'components.controls.inline.bold': 'Жирный', | ||
'components.controls.inline.italic': 'Курсив', | ||
'components.controls.inline.underline': 'Подчеркивание', | ||
'components.controls.inline.strikethrough': 'Зачеркивание', | ||
'components.controls.inline.monospace': 'Monospace', | ||
'components.controls.inline.superscript': 'Superscript', | ||
'components.controls.inline.subscript': 'Subscript', | ||
'components.controls.inline.superscript': 'Верхний индекс', | ||
'components.controls.inline.subscript': 'Нижний индекс', | ||
@@ -68,21 +68,21 @@ // Link | ||
'components.controls.link.linkTargetOption': 'Открывать в новом окне', | ||
'components.controls.link.link': 'Link', | ||
'components.controls.link.unlink': 'Unlink', | ||
'components.controls.link.link': 'Ссылка', | ||
'components.controls.link.unlink': 'Убрать ссылку', | ||
// List | ||
'components.controls.list.list': 'List', | ||
'components.controls.list.unordered': 'Unordered', | ||
'components.controls.list.ordered': 'Ordered', | ||
'components.controls.list.indent': 'Indent', | ||
'components.controls.list.outdent': 'Outdent', | ||
'components.controls.list.list': 'Список', | ||
'components.controls.list.unordered': 'Неупорядоченный', | ||
'components.controls.list.ordered': 'Упорядоченный', | ||
'components.controls.list.indent': 'Отступ', | ||
'components.controls.list.outdent': 'Выступ', | ||
// Remove | ||
'components.controls.remove.remove': 'Remove', | ||
'components.controls.remove.remove': 'Удалить', | ||
// TextAlign | ||
'components.controls.textalign.textalign': 'Text Align', | ||
'components.controls.textalign.left': 'Left', | ||
'components.controls.textalign.center': 'Center', | ||
'components.controls.textalign.right': 'Right', | ||
'components.controls.textalign.justify': 'Justify', | ||
'components.controls.textalign.textalign': 'Выравнивание текста', | ||
'components.controls.textalign.left': 'Слева', | ||
'components.controls.textalign.center': 'По центру', | ||
'components.controls.textalign.right': 'Справа', | ||
'components.controls.textalign.justify': 'Выравнить', | ||
}; |
@@ -33,6 +33,3 @@ /* @flow */ | ||
export function isEmptyString(str: string): boolean { | ||
if (str === undefined || str === null || str.length === 0 || str.trim().length === 0) { | ||
return true; | ||
} | ||
return false; | ||
return !str || !str.trim() | ||
} | ||
@@ -39,0 +36,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
490801
106
7529