Questions tagged [trix]

Trix is a WYSIWYG editor for writing messages, comments, articles, and lists—the simple documents most web apps are made of. It features a sophisticated document model, support for embedded attachments, and outputs terse and consistent HTML.

Most WYSIWYG editors are wrappers around HTML’s contenteditable and execCommand APIs, designed by Microsoft to support live editing of web pages in Internet Explorer 5.5, and eventually reverse-engineered and copied by other browsers.

Because these APIs were never fully specified or documented, and because WYSIWYG HTML editors are enormous in scope, each browser’s implementation has its own set of bugs and quirks, and JavaScript developers are left to resolve the inconsistencies.

Trix sidesteps these inconsistencies by treating contenteditable as an I/O device: when input makes its way to the editor, Trix converts that input into an editing operation on its internal document model, then re-renders that document back into the editor. This gives Trix complete control over what happens after every keystroke, and avoids the need to use execCommand at all.

Resources

https://trix-editor.org/

https://github.com/basecamp/trix

175 questions
0
votes
0 answers

Error compiling template unexpected identifier when rendering a value from a wysiwyg editor

I have few questions for you, and it's all about in the @forelse ($users as $user) Since I get this when I navigate to the second page of the paginated website. Maybe it's because of these…
TheBAST
  • 2,680
  • 10
  • 40
  • 68
0
votes
0 answers

How to use search with "rich_text"? (Trix editor)

I'm using simple search in my blog: post.rb has_rich_text :content def self.search(search) where('title ILIKE ? OR content ILIKE ?', "%#{search}%", "%#{search}%") end post_controller.rb @posts = if params[:search] …
SsPay
  • 161
  • 9
0
votes
0 answers

Access Trix config in Angular 7

I would like to access the Trix object in my Angular app to make some modifications to the config object. I tried import { Trix } from '../../../../node_modules/trix/'; import * as Trix from '../../../../node_modules/trix/'; import { Trix } from…
Ron
  • 1,047
  • 13
  • 18
0
votes
0 answers

Do I have to write backend code for a trix editor handling file uploads

Do I have to write a code in the backend/controller for a trix-editor so that I can attach and upload files w/ it? Or it's just purely frontend stuff like in the script part of the application ?
TheBAST
  • 2,680
  • 10
  • 40
  • 68
0
votes
1 answer

How do I manipulate trix-editor to stop resizing after pressing after enter 4 times in a row

How to adjust the css in a trix-editor so that I can change its style wherein it would stop resizing after pressing enter few times.