Plugin Directory

Changeset 2138025


Ignore:
Timestamp:
08/12/2019 10:39:21 AM (7 years ago)
Author:
zozuk1
Message:

Gutenberg Compatibility

Location:
wphindi/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wphindi/trunk/assets/js/block.js

    r2137347 r2138025  
    2727        return wp.element.createElement(
    2828            "div",
    29             null,
    30             props.attributes.content
     29            {
     30                dangerouslySetInnerHTML : {
     31                    __html : props.attributes.content
     32                }
     33            },
     34            null
    3135        );
    3236    }
     
    3640    render() {
    3741        return React.createElement(
    38             'p',
     42            'div',
    3943            {
    40                 id: this.props.ID
     44                id: this.props.ID,
     45                dangerouslySetInnerHTML : {
     46                    __html : this.props.attributes.content
     47                }
    4148            },
    42             this.props.attributes.content
     49            null
    4350        )
    4451    }
     
    8693            }
    8794        }).then(function () {
    88             tinymce.get(`${props.ID}`).setContent(
    89                 $('<textarea />').html(props.attributes.content).text()
    90             );
    9195            translate.load();
    92         });
     96            // Remove Older blocks after HTML edit.
     97            var block = jQuery(`[data-block=${props.clientId}]`);
     98            if(block.children().length == 3){
     99               block.children()[0].remove();
     100            }
     101        });   
    93102    }
    94103}
  • wphindi/trunk/class/zozuk-transliterator.php

    r2137347 r2138025  
    55       
    66        if ( $hook == 'post-new.php' || $hook == 'post.php' ) {
    7            
    87            $this->enqueue_style();
    98            $this->enqueue_API_scripts();
  • wphindi/trunk/readme.txt

    r2137347 r2138025  
    11=== WPHindi ===
     2Author URI: https://www.zozuk.com/
     3Plugin URI: https://www.zozuk.com/
    24Contributors: zozuk1,sudhanshur
    3 Creator's website link: https://www.zozuk.com/
    4 Tags: wphindi,hindi typing,transliteration,hinglish,english to hindi typing
     5Donate link: https://www.zozuk.com/donate/
     6Tags: Hindi, Typing, Transliteration, Hinglish, Writing 
    57Requires at least: 5.0
    68Tested up to: 5.2
    79Requires PHP: 5.6
    8 Stable tag: 1.0.0
     10Stable tag: 1.0.1
    911License: GPLv2 or later
    1012License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1416== Description ==
    1517 
    16  WP Hindi is a beautiful solution to write in Hindi inside WordPress. IT uses Google's Transliterate API to change the script of text. Converting hello -> हेलो. We at Zozuk faced this problem ourselves and had to spend a lot of time using thrid party tools outside WordPress dashboard to type in Hindi. We worked hard to create this solution which not only saves time but also makes typing fun.
    17  
     18WPHindi is a beautiful solution to write in Hindi inside WordPress editor. It works using Google's Transliterate API to change the script of text. Converting hello -> हेलो . Learn more at [Zozuk.com](https://www.zozuk.com/wphindi/)
     19
     20= Type effortlessly =
     21Tired of using third party tools outside WordPress and then copy pasting content? WPHindi solves this problem by giving you the ability to type in Hindi inside your WordPress editor.
     22
     23= Flexbile to use =
     24WPHindi supports both Classic as well as Gutenberg editors.
     25* Classic Editor : Just install the plugin and you can start using it.
     26* Gutenberg Editor : WPHindi provides you its own block in the new Gutenberg editor. Select the block and start using it.
     27
    1828== Installation ==
    1929 
    20 Installing the plugin is extremely simple. Just upload the '.zip' file using WordPress's plugin uploader and activate it to start using.
     30Installing the plugin is extremely simple.
     31* Download the plugin from the WordPress repository
     32* Upload the '.zip' file using WordPress's plugin uploader and activate it to start using it.
     33* Use Enable/Disable button inside WordPress editor to enable or disable Hindi typing inside WordPress.
    2134
    2235== Frequently Asked Questions ==
    2336
    24 = How do I disable Transliteration =
    25 Use the 'Disable Transliteration' to Disable and 'Enable Transliteration' button to enable the plugin functionality. This button is found on the post editor screen.
     37= How do I switch between languages? =
     38Use the 'Disable WPHindi' to Disable and 'Enable WPHindi' button to enable the plugin functionality. This button is found on the post & page editor screen.
     39
     40= Can I use this plugin in Classic editor? =
     41Yes. WPHindi fully supports Classic editor. You can type in Hindi inside the Classic WordPress Editor.
     42
     43= Can I use this plugin in Block editor? =
     44Yes. WPHindi fully supports the new Block/Gutenberg editor. You can type in Hindi inside the Gutenberg Editor.
    2645
    2746== Screenshots ==
     
    31503. Editing in Classic editor
    3251 
     52== Upgrade Notice ==
     53
     54= 1.0.1 =
     55This version has increased compatibility with Gutenberg.
     56
    3357== Changelog ==
     58= 1.0.1 =
     59* Tweak: Changed the plugin icon
     60* New: Increased Gutenberg
     61
    3462= 1.0.0 =
    3563* Official plugin release.
  • wphindi/trunk/zozuk-translator.php

    r2137347 r2138025  
    33   
    44    Plugin Name: WPHindi
    5     Description: Transliterates English text into into Hindi.
     5    Description: WPHindi let's you type in Hindi inside WordPress. WPHindi helps you save time by letting you type inside the Classic Editor or Gutenberg in Hindi.
    66    Author: Zozuk
    77    Author URI: https://www.zozuk.com
    88    Version: 1.0.0
    9     Requires at least: 5.0
     9    Requires at least: 5.2.2
    1010   
    1111    */
     
    1616        new Zozuk_Transliterator($hook);
    1717    });
    18     register_block_type( 'zozuk/wphindi', array(
    19         'editor_script' => 'transliterateZozukBlock',
    20         'render_callback' => function($attr,$content){
    21             return html_entity_decode($content);
    22         }
    23     ) );
Note: See TracChangeset for help on using the changeset viewer.