Rich text example8/4/2023 ![]() See the JavaScript tutorial for how to load JavaScript in WordPress. To apply, you would need to enqueue the above script in your plugin or theme. For example to disable inline images, use: wp.richText.unregisterFormatType( 'core/image' ) These days Unicode is the canonical method for exchanging text characters. If you just want to disable a format from the editor, you can use the unregisterFormatType function. For example, if the code page is set to Windows-1256, the sequence c8 will encode the Arabic letter b. The RichText component uses formats to display inline elements, for example images within the paragraph block. Top ↑ Disable Specific Format Types in Editor If you want to limit the formats allowed, you can specify using allowedFormats property in your code, see the example above or the component documentation for details. If you’d still like to use RichText, you can eliminate all of the formatting options by specifying the withoutInteractiveFormatting property. Would it be better to use a basic input or textarea element? If you don’t think any formatting should be possible, these HTML tags may make more sense. Top ↑ Unwanted Formatting Options Still Displayīefore moving forward, consider if using the RichText component makes sense at all.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |