Support » Plugin: Block Lab » Changing the type of the field

  • Resolved sirius123


    There is site made with many blocks, but when tried to change the block field type from text to Rich Text , there been issues with showing the old text content in the Gutemberg page editor. Could this be resolved without recreating the whole block from scratch?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Ryan Kienstra


    Hi @sirius123,
    Ah, I can see how that’d be frustrating.

    What does the text look like when the field is changed from Text to Rich Text?

    In Gutemberg it shows empty Rich Text block, while in raw code editor the text is there.

    <!– wp:block-lab/test123 {“blocklabel”:”Title -simple text field”,”richtxt”:”\u003cp\u003e\u003cstrong\u003eRich \u003c/strong\u003e\u003cem\u003etext \u003c/em\u003efield with \u003cem\u003e\u003cstrong\u003eformating\u003c/strong\u003e\u003c/em\u003e\u003c/p\u003e”} /–>

    blocklabel been Text type, and when changed to Rich text, it content is not shown anymore in the editor.

    If I write something in the empty field and save it – the old content is overwritten.

    Plugin Author Ryan Kienstra


    Hi @sirius123,
    Thanks for sharing the text. If it’s alright, I’ll look at this much later today, it’s a pretty busy day 🙂

    Plugin Author Ryan Kienstra


    Hi @sirius123,
    Thanks for your great details, and for your patience.

    I also saw this issue. It looks like the Rich Text editor expects formatted text, like what you shared in the snippet above.

    For example, on entering this text in the Rich Text editor:

    This is rich text entered from the beginning.

    The <RichText> component saves it with characters like \u003cp\u003e:

    <!-- wp:block-lab/testing-text {"text":"\u003cp\u003eThis is rich text entered from the beginning.\u003c/p\u003e"} /-->

    So on changing from the Text field to the Rich Text field, maybe it doesn’t recognize it, because it doesn’t have that formatting.

    Have you found a workaround to this?

    I’m not sure if there’s a fix to this in Block Lab. I’m not sure the <RichText> component was written to have compatibility with other fields, like the <input> from the Text field.

    We’re doing some work on the Rich Text field, so maybe we’ll figure out something there:

    Plugin Author Ryan Kienstra


    Also, there’s a new control in development that doesn’t have this issue:

    Thank you, Ryan!
    Is it stabile already? We are using Pro version of the plugin, is it merged?
    Is there some special conditions to install TinyMCE with Pro version of the plugin?

    Hi! After trying to replace pro version of the plugin with the code from

    existing blocks are not already recognized.

    Is it possible to be made upgrade with preserving existing blocks?

    I found one more issue- Rich Text field automatically add <p></p> tags around the text of the field, which sometime can seriously interfere with the layout/design.
    Could be considered some function overload with optional parameter/flag to avoid that?

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.