3

Ruby 2.6.3 / Rails version 6.0.0

Hello !

I implemented ActionText (using Trix editor) in my rails 6 application, where I use elements with custom tags and attributes like:

<word start='0'>My </word>
<word start='1'>Word</word>

I found a way to persist my tag "word" like so:

Trix.config.textAttributes.word = {
  tagName: "word",
  inheritable: true 
}

But can't do the same with my custom attribute "start" which is deleted if I edit my element.

You can find a fiddle of this here: https://jsfiddle.net/pqxce2b4/2/

If anyone knows how to fix this problem or need more informations, please let me know.

Thanks for your help :)

Lori
  • 31
  • 1

0 Answers0