{"id":20406661,"url":"https://github.com/xwp/wp-shortcode-ui-richtext","last_synced_at":"2025-09-07T21:40:00.265Z","repository":{"id":66346558,"uuid":"66065500","full_name":"xwp/wp-shortcode-ui-richtext","owner":"xwp","description":"Shortcake (Shortcode UI) Richtext","archived":false,"fork":false,"pushed_at":"2018-10-19T14:47:52.000Z","size":448,"stargazers_count":15,"open_issues_count":4,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T15:07:58.559Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xwp.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-08-19T08:15:56.000Z","updated_at":"2024-10-17T10:42:11.000Z","dependencies_parsed_at":"2023-02-21T23:46:33.903Z","dependency_job_id":null,"html_url":"https://github.com/xwp/wp-shortcode-ui-richtext","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xwp/wp-shortcode-ui-richtext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-shortcode-ui-richtext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-shortcode-ui-richtext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-shortcode-ui-richtext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-shortcode-ui-richtext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwp","download_url":"https://codeload.github.com/xwp/wp-shortcode-ui-richtext/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fwp-shortcode-ui-richtext/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274101618,"owners_count":25222446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T05:18:39.430Z","updated_at":"2025-09-07T21:40:00.256Z","avatar_url":"https://github.com/xwp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shortcake (Shortcode UI) Richtext\n**Contributors:** xwp, mihai2u\n**Tags:** shortcodes\n**Requires at least:** 4.5\n**Tested up to:** 4.9.4\n**Stable tag:** 1.2\n**License:** GPLv2 or later\n**License URI:** http://www.gnu.org/licenses/gpl-2.0.html\n\nPlugin for adding rich text editing capabilities to textareas in Shortcake.\n\n\n## Description\n\nDeprecation notice: with the Guttenberg coming into core in a short amount of time, there won't be a need for shortcode UI \u0026 it's richtext extension anymore. Everything transitions into blocks and that should be the way to develop moving forward.\n\nThis plug-in extends on the capabilities of [Shortcake (Shortcode UI)](https://en.wordpress.org/plugins/shortcode-ui/) by adding rich text editing capabilities to textarea inputs in the Shortcake interface, when the specific textarea constructors contain the shortcake-richtext class name.\n\nIt uses [TinyMCE](https://www.tinymce.com).\n\n\n## Installation\n\nYou need the latest version of of [Shortcake (Shortcode UI)] installed and activated.\n\n1. Upload the plugin files to the `/wp-content/plugins/shortcode-ui-richtext` directory.\n2. Activate the plugin through the 'Plugins' screen in WordPress\n3. Add the meta class option to the textarea input type of an existing shortcake register_for_shortcode call.\n4. Due to the possibility of the user entered content to contain special characters like [, ] and \", it is highly recommended to turn on the encode flag as well.\n```php\n'encode' =\u003e true,\n'meta'  =\u003e array(\n\t'class' =\u003e 'shortcake-richtext',\n),\n```\n\n\n## Frequently Asked Questions\n\n\n### How does an example rich textarea input element shortcake register code looks like?\n\nThis is a default shortcode with a single textarea:\n\n```php\nshortcode_ui_register_for_shortcode( 'shortcode_name',\n\tarray(\n\t\t'label'         =\u003e esc_html__( 'Shortcode Name', 'namespace' ),\n\t\t'listItemImage' =\u003e 'dashicons-text',\n\t\t'attrs'         =\u003e array(\n\t\t\tarray(\n\t\t\t\t'label' =\u003e esc_html__( 'Text Element', 'namespace' ),\n\t\t\t\t'attr'  =\u003e 'text_element',\n\t\t\t\t'type'  =\u003e 'textarea',\n\t\t\t),\n\t\t),\n\t)\n);\n```\n\nThis is the same code with the richtext capability added in on the text_element:\n\n```php\nshortcode_ui_register_for_shortcode( 'shortcode_name',\n\tarray(\n\t\t'label'         =\u003e esc_html__( 'Shortcode Name', 'namespace' ),\n\t\t'listItemImage' =\u003e 'dashicons-text',\n\t\t'attrs'         =\u003e array(\n\t\t\tarray(\n\t\t\t\t'label' =\u003e esc_html__( 'Text Element', 'namespace' ),\n\t\t\t\t'attr'  =\u003e 'text_element',\n\t\t\t\t'type'  =\u003e 'textarea',\n\t\t\t\t'encode' =\u003e true,\n\t\t\t\t'meta'  =\u003e array(\n\t\t\t\t\t\t'class' =\u003e 'shortcake-richtext',\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t)\n);\n```\n\nOutputting requires decoding, and since Shortcake uses url encoding, the attribute powered by the rich text editor needs to be urldecoded before rendering its contents, like in the following example using the `urldecode` [function](http://php.net/manual/ro/function.urldecode.php):\n\n```php\nfunction shortcode_name( $atts ) {\n\textract( shortcode_atts(\n\t\tarray(\n\t\t\t'text_element' =\u003e '',\n\t\t),\n\t\t$atts\n\t));\n\treturn '\u003cdiv\u003e' . urldecode( $text_element ) . '\u003c/div\u003e';\n}\n```\n\n\n### This doesn't work although I added the class according to the instructions. Am I missing anything?\n\nBefore submitting a report on the [GitHub Issue tracker](https://github.com/xwp/wp-shortcode-ui-richtext/issues), please ensure the issue you are experiencing does not exist with using the latest Shortcake (Shortcode UI) version downloaded from their own [GitHub repository](https://github.com/wp-shortcake/shortcake).\n\n\n## Screenshots\n\n### 1. This screenshot shows a rich text enabled textarea in the Shortcake interface.\n[missing image]\n\n\n\n## Changelog\n\n\n### 0.1\nAugust 19, 2016 - Initial release.\n\n\n### 0.2\nOctober 3, 2016 - Modified SummerNote default configuration to initialise a toolbar which is more Wordpress-friendly.\nAdded more examples to the readme.\nAds default rich text editing to the shortcode inner_content.\n\n\n### 1.0\nApril 25, 2017 - Replaced SummerNote by highly requested TinyMCE for a familiar Wordpress experience.\n\n\n### 1.1\nSeptember 11, 2017 - \"Add Media\" button is now present next to the TinyMCE editor.\n\n\n### 1.2\nMarch 15, 2018 - Fixes issues with multiple editors on page and timing issues with initialising and unloading TinyMCE.\n\n### 1.3\nMarch 24, 2018 - Fix active editor modal bug occurring when multiple fields had editors.\n\n\n## Upgrade Notice\n\n\n### 0.1\nInitial version. No need to upgrade.\n\n\n### 0.2\nUpgrade to receive the rich text editor on the shortcode inner_content area.\n\n\n### 1.0\nUpgrade to use TinyMCE instead of SummerNote. The HTML code editing is not available anymore for rich text elements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fwp-shortcode-ui-richtext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwp%2Fwp-shortcode-ui-richtext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fwp-shortcode-ui-richtext/lists"}