dimitrov-adrian / directus-extension-editorjs-interface

Block editor (Editor.js) interface for Directus 9
https://www.npmjs.com/package/directus-extension-editorjs
GNU General Public License v3.0
182 stars 40 forks source link

Textalign not persisted. #24

Closed madc closed 2 years ago

madc commented 2 years ago

When aligning a text with the inline tool (i.e. center), it seems the information is not persisted.

image

After saving the record, it forgot about the alignment again,

image

The API returns this:

{
  "id": "DS9xhnKSHr",
  "type": "paragraph",
  "data": {
    "text": "This should be centered."
  }
},

I'm using directus-extension-editorjs-interface v 1.1.0. Let me know, if I can provide any more information to debug this.

dimitrov-adrian commented 2 years ago

Yes, indeed there is an issue. But thinking a bit, it's bit confusion if this is kept as an inline tool.

@madc I already did replace with https://github.com/kaaaaaaaaaaai/paragraph-with-alignment as it seems more logical alternative, what do you think?

madc commented 2 years ago

Wow, that was quick.. thanks! I'll test it as soon as the new version is published.

The paragraph alignment tool module looks great. There is also one called editorjs-alignment-blocktune by the same author, ut i could not spot the difference between the too.

dimitrov-adrian commented 2 years ago

First is for the paragraphs only, second for other. Anyway, I had added it for headers and quotes as well.

It should be available already in v1.2.0

madc commented 2 years ago

I just updated and it works perfectly. Thank you for responding so quickly and putting in the work!

{
  "id": "DS9xhnKSHr",
  "type": "paragraph",
  "data": {
      "text": "This should be centered."
  },
  "tunes": {
      "alignmentTune": {
          "alignment": "center"
      }
  }
},