gutenberg | Block Editor project for WordPress | Content Management System library

 by   WordPress JavaScript Version: v16.0.0 License: Non-SPDX

kandi X-RAY | gutenberg Summary

kandi X-RAY | gutenberg Summary

gutenberg is a JavaScript library typically used in Telecommunications, Media, Media, Entertainment, Web Site, Content Management System, Wordpress applications. gutenberg has no bugs, it has no vulnerabilities and it has medium support. However gutenberg has a Non-SPDX License. You can install using 'npm i wp-site' or download it from GitHub, npm.

Welcome to the development hub for the WordPress Gutenberg project!. "Gutenberg" is a codename for a whole new paradigm in WordPress site building and publishing, that aims to revolutionize the entire publishing experience as much as Gutenberg did the printed word. Right now, the project is in the second phase of a four-phase process that will touch every piece of WordPress -- Editing, Customization (which includes Full Site Editing, Block Patterns, Block Directory and Block based themes), Collaboration, and Multilingual -- and is focused on a new editing experience, the block editor. The block editor introduces a modular approach to pages and posts: each piece of content in the editor, from a paragraph to an image gallery to a headline, is its own block. And just like physical blocks, WordPress blocks can be added, arranged, and rearranged, allowing WordPress users to create media-rich pages in a visually intuitive way -- and without work-arounds like shortcodes or custom HTML. The block editor first became available in December 2018, and we're still hard at work refining the experience, creating more and better blocks, and laying the groundwork for the next three phases of work. The Gutenberg plugin gives you the latest version of the block editor so you can join us in testing bleeding-edge features, start playing with blocks, and maybe get inspired to build your own. Check out the Ways to keep up with Gutenberg & Full Site Editing (FSE).
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              gutenberg has a medium active ecosystem.
              It has 8801 star(s) with 3533 fork(s). There are 351 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 4904 open issues and 18358 have been closed. On average issues are closed in 120 days. There are 1004 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of gutenberg is v16.0.0

            kandi-Quality Quality

              gutenberg has 0 bugs and 0 code smells.

            kandi-Security Security

              gutenberg has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              gutenberg code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              gutenberg has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              gutenberg releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are available. Examples and code snippets are not available.
              It has 50410 lines of code, 1302 functions and 5613 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed gutenberg and discovered the below as its top functions. This is intended to give you an instant insight into gutenberg implemented functionality, and help decide if they suit your requirements.
            • Initializes navigation .
            • Button Editor Constructor .
            • Instructs a table .
            • Creates a new gallery edit editor .
            • The View wrapping wrapper .
            • Selector for the graph .
            • Edit the cover editor
            • Returns a new registry for the store .
            • Creates a new Colorette .
            • Replace input with the editor .
            Get all kandi verified functions for this library.

            gutenberg Key Features

            No Key Features are available at this moment for gutenberg.

            gutenberg Examples and Code Snippets

            Laravel Mix WP Blocks,Usage
            JavaScriptdot img1Lines of Code : 10dot img1no licencesLicense : No License
            copy iconCopy
            require("@tinypixelco/laravel-mix-wp-blocks")
            
            mix.block('resources/assets/scripts/blocks.js', 'scripts')
            
            import { RichText } from '@wordpress/block-editor'
            
            mix.block('resources/assets/scripts/blocks.js', 'scripts', {
              outputFormat: 'json',
            })
            
            mi  
            Are there intelliSense / autocomplete plugins for gutenberg
            JavaScriptdot img2Lines of Code : 13dot img2License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            const { __ } = wp.i18n;
            const { registerBlockType } = wp.blocks;
            
            import { __ } from '@wordpress/i18n';
            import { registerBlockType } from '@wordpress/blocks';
            
            npm install --save-dev @wordpre
            "Cannot read property 'getEditedPostAttribute' of undefined" for InnerBlocks in Gutenberg
            JavaScriptdot img3Lines of Code : 7dot img3License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            var _select2 = select('core/editor'),
                  getEditedPostAttribute = _select2.getEditedPostAttribute;
            
            npm install @wordpress/editor
            
            import {InnerBlocks} from "@wordpress/editor";
            

            Community Discussions

            QUESTION

            How to remove strings that contain at least an uppercase letter in them from an ArrayList?
            Asked 2022-Mar-23 at 07:26

            So, I have an ArrayList called totalListOfWords. It contains a mixed of words from which has both lower and upper case letters in it. I want to remove all the words that contain upper case letter in them. Below is what I have.

            I have a helper method called containsUpperCaseLetter. It basically checks whether a string contain an upper case letter in it.

            Then I loop through my totalListOfWords using for loop and check each word in the list whether it contains an upper case letter. If so, I try to remove it. But it only remove some words. May be I am choosing the wrong type? Help please.

            ...

            ANSWER

            Answered 2022-Mar-23 at 04:33

            When you remove the element at index i, the next element is now at i instead of i+1. You would have to decrement i so it checks the same index again:

            Source https://stackoverflow.com/questions/71581852

            QUESTION

            Typescript React compiler issue with children props
            Asked 2022-Mar-19 at 17:29

            The Typescript compiler seems to be having an issue recognizing JSX child elements as the children prop. I am trying to use Typescript for Wordpress Gutenberg block development but am running into this odd issue.

            Error

            TS2769: No overload matches this call. The last overload gave the following error. Argument of type '{ title: string; }' is not assignable to parameter of type 'Attributes & Props'. Property 'children' is missing in type '{ title: string; }' but required in type 'Props'.

            The error occurs on the edit.tsx file at . For whatever reason the child element does not satisfy the children props for the PanelBody element. I can trick the compiler by adding children as a prop to get it to compile without errors:

            ...

            ANSWER

            Answered 2022-Mar-19 at 17:29

            Well, it appears I followed some either bad or old advice on how to add Typescript support to Gutenberg block development.

            Its really as simple as just using @wordpress/scripts without any configuration.

            I removed all the custom stuff I did in the webpack config file as I was probably overriding and over doing some rules.

            webpack.config.js

            Source https://stackoverflow.com/questions/71414660

            QUESTION

            Gutenberg NPM doesn't do any changes
            Asked 2022-Feb-09 at 12:20

            The NPM when i created some changes in blocks or something else .. the changes not working , and this my gutenberg.php

            ...

            ANSWER

            Answered 2022-Feb-09 at 12:20

            it's all In browser cache .. you can use a private browser or cleaning the browser cache every time you try to make any change .. and you will see your updates seems good

            Source https://stackoverflow.com/questions/71016454

            QUESTION

            Expose default gutenberg block styles in WordPress rest API
            Asked 2022-Feb-05 at 08:04

            We're using the WordPress REST API to power a static site. The site is "headless" in the sense that we don't use a WordPress theme; we rely on the content being exposed via the REST API.

            Some of the default Gutenberg blocks - the Buttons block for instance - have styles with hashed class names associated with them that don't seem to be exposed in the API. This would be kind of ok if the class names were predictable but, since they aren't, we have no way of providing the styles on our end.

            If we do render the blocks in a theme, the styles are rendered in the footer

            Here's an example of the style block for the default Buttons block looks like in a WordPress theme

            The Rest API endpoint exposes the markup in content.rendered (including the classnames) but no styles

            Is this expected behavior for using Gutenberg and the WordPress REST API? If so, is the correct solution to expose the styles via a custom field (for lack of a better term) on the API?

            ...

            ANSWER

            Answered 2022-Feb-05 at 08:04

            The unique id (hash) in the classnames are randomly generated each time the blocks are parsed, even when directly calling the REST API. Unfortunately, the inline style attributes like .alignleft are absent from the content markup in the REST API. Being a REST API, it makes sense that style specific information isn't included; this keeps data and presentation of the data separate. It also prevents bloating the API by including style-specific information that would be rarely used outside of WordPress theme.

            In your scenario, if you wish to style the resulting HTML content without worrying about the unique id, I'd suggest using css partial selectors, eg:

            Source https://stackoverflow.com/questions/70934961

            QUESTION

            PHP inserting string issue
            Asked 2022-Jan-16 at 14:10

            I want to add CSS class 'is-icon-pdf' to PHP string.

            • I'm tring to modify WordPress gutenberg block dynamically.
            ...

            ANSWER

            Answered 2022-Jan-16 at 14:10

            This likely is just a starting point for you as the regex may be fine tuned for your data. This uses preg_replace:

            Source https://stackoverflow.com/questions/70727035

            QUESTION

            Pyspark, create RDD with line number and list of words in line
            Asked 2022-Jan-13 at 11:56

            I'm working with a plain text file and am trying to create an RDD that consists of the line number and a list of the words contained in the line.

            I create the RDD as:

            ...

            ANSWER

            Answered 2022-Jan-13 at 06:56

            You can try with split

            Source https://stackoverflow.com/questions/70692355

            QUESTION

            Calculate relative frequency of bigrams in PySpark
            Asked 2021-Dec-29 at 17:58

            I'm trying to count word pairs in a text file. First, I've done some pre-processing on the text, and then I counted word pairs as shown below:

            ((Aspire, to), 1) ; ((to, inspire), 4) ; ((inspire, before), 38)...

            Now, I want to report the 1000 most frequent pairs, sorted by :

            1. Word (second word of the pair)
            2. Relative frequency (pair occurences / 2nd word total occurences)

            Here's what I've done so far

            ...

            ANSWER

            Answered 2021-Dec-29 at 17:58

            The relative frequency can be computed by using window function, that partitions by the second word in the pair and applies a sum operation.

            Then, we limit the entries in the df to the top x, based on count and finally order by the second word in pair and the relative frequency.

            Source https://stackoverflow.com/questions/70522152

            QUESTION

            How to get the image links from Gutenberg block gallery and add them as html data attributes to a button in wordpress
            Asked 2021-Dec-22 at 04:36

            I'm using gutenberg gallery block inside a post and I'm trying to create a button which contains all of the image ids in the gallery block as html data attributes such that later when I output the content to the page I can have access to those ids using javascript. Basically I'm trying to create a lightbox feature for a custom post type.

            The problem is that I can't get access to the gutenberg gallery block data.

            Here's my code

            ...

            ANSWER

            Answered 2021-Dec-22 at 04:34

            "it does not work, $ids is empty."

            That block is one of the default wordpress blocks, aka "core blocks". In order to have access to its data you would need to use parse_blocks function not get_post_gallery. That's why your variable is empty.

            So the overall workflow to get what you're looking for would be:

            1. Check whether your post has any blocks or not, using has_block function. has_blockDocs
            2. If it does, then get all of the blocks (including gallery block) using parse_blocks function. parse_blocksDocs
            3. parse_blocks will return an array of all blocks used in your post, so loop through them and see which one is called "core/gallery".
            4. "core/gallery" block has "attributes" and "ids" for each image you've added in the admin panel.
            5. Once you get the "ids", you should be able to create your custom button and image links using wp_get_attachment_image_url function. wp_get_attachment_image_urlDocs

            As a POC:

            Please see the following code:

            Source https://stackoverflow.com/questions/70416848

            QUESTION

            problem with extension intercepting downloads
            Asked 2021-Dec-16 at 18:39

            i am trying to program an extension to intercept downloads and rename them

            manifest.json:

            ...

            ANSWER

            Answered 2021-Dec-16 at 18:39

            Moving my observation to an answer, since it worked:

            I just noticed that you have 2 "permissions" sections in your manifest.json. It's possible the 2nd one is overriding the first one. Try combining them and see if that works.

            Source https://stackoverflow.com/questions/70381807

            QUESTION

            Finding a list of words in a corpus using NLTK? Cannot find the frequency of words
            Asked 2021-Dec-01 at 15:26

            I have downloaded a corpus and tokenised the words. I have a list of the main characters and I want to find out how many times each name appears in the corpus. I have tried using a frequency function with a dictionary but I don't know how to get the name count..

            ...

            ANSWER

            Answered 2021-Dec-01 at 15:26

            How would you like to see the frequency? You can get a count of # times each word was seen or a ratio of how often within the total text or even a fancy formatted table. Relevant functions copied from here:

            Source https://stackoverflow.com/questions/70159512

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install gutenberg

            Get hands on: check out the block editor live demo to play with a test instance of the editor.

            Support

            Gutenberg is an open-source project and welcomes all contributors from code to design, from documentation to triage. The project is built by many contributors and volunteers and we'd love your help building it. See the Contributors Handbook for all the details on how you can contribute. See CONTRIBUTING.md for the contributing guidelines. As with all WordPress projects, we want to ensure a welcoming environment for everyone. With that in mind, all contributors are expected to follow our Code of Conduct.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/WordPress/gutenberg.git

          • CLI

            gh repo clone WordPress/gutenberg

          • sshUrl

            git@github.com:WordPress/gutenberg.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link