This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----Then-able Duck Typing------------ | |
Promise dünyasında en önemli şey, bir değişkenin gerçek bir Promise olup,olmadığına | |
karar vermek ya da bir Promise gibi davranış sergileyecek mi onu anlamak. | |
new Promise(...) syntax ı ile verilen Promise lerin, | |
'p instanceof Promise' bu şekilde kontrolünü yapabileceğini düşünebilirsin ama tam | |
oarak bu yaklaşım doğru olmayabilir. | |
Mesela sen başka bir window dan iframe gibi yerlerden Promise alabilirsin. O zaman | |
'p instanceof Promise' kontrolü başarısız olacaktır. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Editor } from 'react-draft-wysiwyg'; | |
import { ContentState,EditorState,convertFromHTML } from 'draft-js'; | |
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; | |
import {stateToHTML} from 'draft-js-export-html'; | |
const toolbar = { | |
options: ['inline', 'fontSize','list', 'colorPicker', 'link', 'emoji', 'history'], | |
} |
NewerOlder