Skip to content
This repository was archived by the owner on Feb 6, 2023. It is now read-only.

Commit ec43403

Browse files
Claudio Procidafacebook-github-bot
Claudio Procida
authored andcommitted
Removes all resolved uses of convertFromHTMLToContentBlocks_DEPRECATED
Summary: Removes all uses of `convertFromHTMLToContentBlocks_DEPRECATED` except those that haven't been safely transitioned to `convertFromHTMLToContentBlocks2`, i.e. Recruiting Tools confirmation email template editor and the test case for `convertFromHTMLToContentBlocks_DEPRECATED` itself. **Note:** this diff will not be landed until a few days after D15844900 is pushed, to ensure all internal customers of Draft.js are on board. Reviewed By: mitermayer Differential Revision: D15844926 fbshipit-source-id: c8b28513b27bba214669f1a7af82afcb79b1dc9c
1 parent 0f5427a commit ec43403

File tree

5 files changed

+60
-514
lines changed

5 files changed

+60
-514
lines changed

examples/draft-0-10-0/playground/src/DraftJsPlaygroundContainer.react.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@ const SomeButton = require('SomeButton.react');
2929
const SomeSelector = require('SomeSelector.react');
3030
const SomeSelectorOption = require('SomeSelectorOption.react');
3131
const convertFromRaw = require('convertFromRawToDraftState');
32-
const gkx = require('gkx');
33-
34-
const convertFromHTML = gkx('draft_refactored_html_importer')
35-
? require('convertFromHTMLToContentBlocks2')
36-
: require('convertFromHTMLToContentBlocks_DEPRECATED');
32+
const convertFromHTML = require('convertFromHTMLToContentBlocks2');
3733

3834
type Props = any;
3935
type State = any;

src/Draft.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,8 @@ const convertFromRawToDraftState = require('convertFromRawToDraftState');
3434
const generateRandomKey = require('generateRandomKey');
3535
const getDefaultKeyBinding = require('getDefaultKeyBinding');
3636
const getVisibleSelectionRect = require('getVisibleSelectionRect');
37-
const gkx = require('gkx');
3837

39-
const convertFromHTML = gkx('draft_refactored_html_importer')
40-
? require('convertFromHTMLToContentBlocks2')
41-
: require('convertFromHTMLToContentBlocks_DEPRECATED');
38+
const convertFromHTML = require('convertFromHTMLToContentBlocks2');
4239

4340
const DraftPublic = {
4441
Editor: DraftEditor,

src/component/handlers/composition/__tests__/DraftEditorCompostionHandler-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ContentState = require('ContentState');
2222
const EditorState = require('EditorState');
2323
const SelectionState = require('SelectionState');
2424

25-
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks_DEPRECATED');
25+
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks2');
2626
const editOnCompositionStart = require('editOnCompositionStart');
2727
const {Map} = require('immutable');
2828

src/model/paste/DraftPasteProcessor.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import type {EntityMap} from 'EntityMap';
2020
const ContentBlock = require('ContentBlock');
2121
const ContentBlockNode = require('ContentBlockNode');
2222

23-
const convertFromHTMLToContentBlocksClassic = require('convertFromHTMLToContentBlocks_DEPRECATED');
24-
const convertFromHTMLToContentBlocksNew = require('convertFromHTMLToContentBlocks2');
23+
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks2');
2524
const generateRandomKey = require('generateRandomKey');
2625
const getSafeBodyFromHTML = require('getSafeBodyFromHTML');
2726
const gkx = require('gkx');
@@ -35,11 +34,6 @@ const ContentBlockRecord = experimentalTreeDataSupport
3534
? ContentBlockNode
3635
: ContentBlock;
3736

38-
const refactoredHTMLImporter = gkx('draft_refactored_html_importer');
39-
const convertFromHTMLToContentBlocks = refactoredHTMLImporter
40-
? convertFromHTMLToContentBlocksNew
41-
: convertFromHTMLToContentBlocksClassic;
42-
4337
const DraftPasteProcessor = {
4438
processHTML(
4539
html: string,

0 commit comments

Comments
 (0)