question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

having static content inside a custom block

See original GitHub issue

I discovered slate after weeks of playing around with draft.

One of the use cases I have is having editing capabilities inside the custom blocks themselves. Similar to this: https://github.com/facebook/draft-js/issues/132

As you can see from the thread, it requires substantial effort in draft.

How would you accomplish something like that in slate? Is it possible to have a slate </Editor > component itself inside a custom block component?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jatinscommented, Mar 29, 2017

@ianstormtaylor Thanks for the response and that example!

While that example seems to work fine for most part, it seems the selection gets messed up at times due to embedded content like a checkbox.

Here’s a gif showing the behaviour: http://recordit.co/PiqFWRscA6 (I select the entire text of a check list item, and press delete, but only one char gets deleted)

Also, you can’t delete the checkbox if there is no content before that: http://recordit.co/BWF0LvmmbZ

In general the selection/deletion behaviour gets a little off with embedded content.

Any ideas what might be causing this, or workarounds to get a consistent behaviour?

0reactions
jatinscommented, Aug 5, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Static Content Block - Coastal Bend College
A static content block displays one identified content block on a Web page. The following table explains how to complete the server control...
Read more >
magento 1.7 - Custom template for static blocks in CMS page?
I tried to extend class Mage_Block_Cms_Block and add setTemplate($this->getTemplate()); to _toHtml() -function. The effect is the same as above - cms/content.
Read more >
Configure a static HTML block - ServiceNow Docs
Navigate to All > Content Management > Blocks > Static HTML. · Click New. · Complete the Static Content form. Table 1. Static...
Read more >
Fixed Block Content | Drupal.org
Provides a way of having permanent custom content blocks without broken instances if the block does not exist. A new fixed block type...
Read more >
Create Static and Dynamic Blocks | Adobe Commerce
Content blocks are sometimes referred to as static blocks, or CMS blocks. They can be used to display fixed information such as text,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found