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

Commit

Permalink
Removes all resolved uses of convertFromHTMLToContentBlocks_DEPRECATED
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Claudio Procida authored and facebook-github-bot committed Jul 5, 2019
1 parent 0f5427a commit ec43403
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 514 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ const SomeButton = require('SomeButton.react');
const SomeSelector = require('SomeSelector.react');
const SomeSelectorOption = require('SomeSelectorOption.react');
const convertFromRaw = require('convertFromRawToDraftState');
const gkx = require('gkx');

const convertFromHTML = gkx('draft_refactored_html_importer')
? require('convertFromHTMLToContentBlocks2')
: require('convertFromHTMLToContentBlocks_DEPRECATED');
const convertFromHTML = require('convertFromHTMLToContentBlocks2');

type Props = any;
type State = any;
Expand Down
5 changes: 1 addition & 4 deletions src/Draft.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ const convertFromRawToDraftState = require('convertFromRawToDraftState');
const generateRandomKey = require('generateRandomKey');
const getDefaultKeyBinding = require('getDefaultKeyBinding');
const getVisibleSelectionRect = require('getVisibleSelectionRect');
const gkx = require('gkx');

const convertFromHTML = gkx('draft_refactored_html_importer')
? require('convertFromHTMLToContentBlocks2')
: require('convertFromHTMLToContentBlocks_DEPRECATED');
const convertFromHTML = require('convertFromHTMLToContentBlocks2');

const DraftPublic = {
Editor: DraftEditor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const ContentState = require('ContentState');
const EditorState = require('EditorState');
const SelectionState = require('SelectionState');

const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks_DEPRECATED');
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks2');
const editOnCompositionStart = require('editOnCompositionStart');
const {Map} = require('immutable');

Expand Down
8 changes: 1 addition & 7 deletions src/model/paste/DraftPasteProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import type {EntityMap} from 'EntityMap';
const ContentBlock = require('ContentBlock');
const ContentBlockNode = require('ContentBlockNode');

const convertFromHTMLToContentBlocksClassic = require('convertFromHTMLToContentBlocks_DEPRECATED');
const convertFromHTMLToContentBlocksNew = require('convertFromHTMLToContentBlocks2');
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks2');
const generateRandomKey = require('generateRandomKey');
const getSafeBodyFromHTML = require('getSafeBodyFromHTML');
const gkx = require('gkx');
Expand All @@ -35,11 +34,6 @@ const ContentBlockRecord = experimentalTreeDataSupport
? ContentBlockNode
: ContentBlock;

const refactoredHTMLImporter = gkx('draft_refactored_html_importer');
const convertFromHTMLToContentBlocks = refactoredHTMLImporter
? convertFromHTMLToContentBlocksNew
: convertFromHTMLToContentBlocksClassic;

const DraftPasteProcessor = {
processHTML(
html: string,
Expand Down
Loading

0 comments on commit ec43403

Please sign in to comment.