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

Commit ceaeebf

Browse files
Claudio Procidafacebook-github-bot
Claudio Procida
authored andcommitted
Deprecate legacy convertFromHTMLToContentBlocks
Summary: This diff renames `convertFromHTMLToContentBlocks` to `convertFromHTMLToContentBlocks_DEPRECATED` to formally declare it deprecated ahead of its removal, and give consumers a heads up that they ought to upgrade to `convertFromHTMLToContentBlocks2` and report back any issues with parsing HTML templates. Reviewed By: mrkev Differential Revision: D15844900 fbshipit-source-id: c7077f02627e82814f2429ec80f8a70b1e87aadc
1 parent eddcc55 commit ceaeebf

File tree

7 files changed

+5
-5
lines changed

7 files changed

+5
-5
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const gkx = require('gkx');
3333

3434
const convertFromHTML = gkx('draft_refactored_html_importer')
3535
? require('convertFromHTMLToContentBlocks2')
36-
: require('convertFromHTMLToContentBlocks');
36+
: require('convertFromHTMLToContentBlocks_DEPRECATED');
3737

3838
type Props = any;
3939
type State = any;

src/Draft.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const gkx = require('gkx');
3838

3939
const convertFromHTML = gkx('draft_refactored_html_importer')
4040
? require('convertFromHTMLToContentBlocks2')
41-
: require('convertFromHTMLToContentBlocks');
41+
: require('convertFromHTMLToContentBlocks_DEPRECATED');
4242

4343
const DraftPublic = {
4444
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');
25+
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks_DEPRECATED');
2626
const editOnCompositionStart = require('editOnCompositionStart');
2727
const {Map} = require('immutable');
2828

src/model/encoding/__tests__/convertFromHTMLToContentBlocks-test.js renamed to src/model/encoding/__tests__/convertFromHTMLToContentBlocks_DEPRECATED-test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jest.mock('generateRandomKey');
1616

1717
const DefaultDraftBlockRenderMap = require('DefaultDraftBlockRenderMap');
1818

19-
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks');
19+
const convertFromHTMLToContentBlocks = require('convertFromHTMLToContentBlocks_DEPRECATED');
2020
const cx = require('cx');
2121
const getSafeBodyFromHTML = require('getSafeBodyFromHTML');
2222

src/model/paste/DraftPasteProcessor.js

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

23-
const convertFromHTMLToContentBlocksClassic = require('convertFromHTMLToContentBlocks');
23+
const convertFromHTMLToContentBlocksClassic = require('convertFromHTMLToContentBlocks_DEPRECATED');
2424
const convertFromHTMLToContentBlocksNew = require('convertFromHTMLToContentBlocks2');
2525
const generateRandomKey = require('generateRandomKey');
2626
const getSafeBodyFromHTML = require('getSafeBodyFromHTML');

0 commit comments

Comments
 (0)