UNPKG

@wordpress/block-editor

Version:
8 lines (7 loc) 1.02 kB
{ "version": 3, "sources": ["../../../src/components/editable-text/index.js"], "sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RichText from '../rich-text';\n\nconst EditableText = forwardRef( ( props, ref ) => {\n\treturn <RichText ref={ ref } { ...props } __unstableDisableFormats />;\n} );\n\nEditableText.Content = ( { value = '', tagName: Tag = 'div', ...props } ) => {\n\treturn <Tag { ...props }>{ value }</Tag>;\n};\n\n/**\n * Renders an editable text input in which text formatting is not allowed.\n */\nexport default EditableText;\n"], "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,uBAAqB;AAGb;AADR,IAAM,mBAAe,2BAAY,CAAE,OAAO,QAAS;AAClD,SAAO,4CAAC,iBAAAA,SAAA,EAAS,KAAc,GAAG,OAAQ,0BAAwB,MAAC;AACpE,CAAE;AAEF,aAAa,UAAU,CAAE,EAAE,QAAQ,IAAI,SAAS,MAAM,OAAO,GAAG,MAAM,MAAO;AAC5E,SAAO,4CAAC,OAAM,GAAG,OAAU,iBAAO;AACnC;AAKA,IAAO,wBAAQ;", "names": ["RichText"] }