title: How to merge multiple draft-js ContentState's
body: <p>I have a collection of multiple <code>draft-js</code> <code>ContentStates</code> which i want to merge together to display them in one <code>&lt;Editor /&gt;</code></p>
  
  <p><strong>Why?</strong>
  Through my GUI you can edit text snippets individually and then at a later point join them together.
  You are then presented with the resulting text, which you again can still edit.</p>
  
  <p>I persist the individual <code>ContentStates</code> as follows:</p>
  
  <pre><code>const contentState = EditorState.getCurrentContent();
  const raw = convertToRaw(contentState);
  </code></pre>
  
  <p>Which gives me an object like:</p>
  
  <pre><code>{
     blocks: [...],
     entityMap: {...}
  }
  </code></pre>
  
  <p>What i tried, was manually merging the <code>blocks</code> and <code>entityMap</code>, to get a resulting raw contentState, which i could then parse with <code>convertFromRaw</code></p>
  
  <p>However, each block has a supposedly unique key, where on different contentStates these keys overlap and are not unique.</p>
  
  <p>So the result in that case is that some blocks are being overridden by others with the same key.</p>
  
  <p>Does anyone have an idea for an easier way to achieve what im doing?</p>