trix

Rails 6 ActionText rich_text_area works normally, does not appear when rendered in a layout

独自空忆成欢 提交于 2020-01-16 16:58:14
问题 I'm rendering a form that utilizes the ActionText input rich_text_area, which is the Rails implementation of the Trix WYSIWYG rich text editor. It's been working fine until I started refactoring my views to use a layout, where the form content can yield different forms. The form renders fine except for the rich_text_areas, which both disappear. Removing the code required to make this a layout returns it back to normal. My code is below. I'm rendering a form as a partial with the following

Trix editor code and quote tools not working?

不羁岁月 提交于 2019-12-11 05:07:52
问题 I wanted to use Trix editor so I linked to its cdn. <script src="https://cdnjs.cloudflare.com/ajax/libs/trix/0.12.0/trix.js"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/trix/0.12.0/trix.css"> <div class="col-lg-6"> <input id="x" type="hidden" name="body"> <trix-editor input="x"></trix-editor> </div> Everything is working properly except for code and quote tools. When I click on them, text font changes a bit but no styling is applied while editing or even