nib-edit / nib

Wysiwyg / Text editor components built using React and Prosemirror
https://nib-edit.github.io/nib/
GNU General Public License v3.0
228 stars 26 forks source link

add br to schema, reorder exports #43

Closed riglar closed 5 years ago

riglar commented 5 years ago

Hi @jpuri,

I have a use case where I have existing HTML from a previous WYSIWYG editor containing a plain HTML table:

<table class="">
  <tbody>
    <tr>
      <td>header 1</td>
      <td>header 2</td>
      <td>header 3</td>
      <td>header 4</td>
    </tr>
    <tr>
      <td>a</td>
      <td>d</td>
      <td><br /></td>
      <td>g</td>
    </tr>
    <tr>
      <td>b</td>
      <td>e</td>
      <td><br /></td>
      <td>h</td>
    </tr>
    <tr>
      <td>c</td>
      <td>f</td>
      <td><br /></td>
      <td>i</td>
    </tr>
  </tbody>
</table>

When I parse this HTML via prosemirror-model/DOMParser using Nib's schema I was encountering two issues:

This PR addresses both those issues by:

Please let me know if you have any questions or to request amendments.

Tom

riglar commented 5 years ago

hey @jpuri - any movement on this?

jpuri commented 5 years ago

Hey @riglar : PR requires some cleanup and also a shortcut for users to add
, also more documentation around it.

For the project I aspire to maintain high code standards. Will it be possible for you to cleanup the PR, else I will prioritise it as task for myself and check it as I get time.

riglar commented 5 years ago

Hi, apologies for inactively. We're not pursing this option at the moment.