modify-actiontext-html-output
By gorails-screencasts
modify-actiontext-html-output | rails-html-sanitizer | |
---|---|---|
1 | 3 | |
2 | 296 | |
- | 0.3% | |
10.0 | 6.1 | |
almost 2 years ago | 18 days ago | |
Ruby | Ruby | |
- | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
modify-actiontext-html-output
Posts with mentions or reviews of modify-actiontext-html-output.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-10-09.
-
ActionText: Safe listing attributes and tags
We can create a file called config/initializers/action_text.rb and fill it with some custom contents for allowable things. Let's say for example we wanted to add table editing. We'd need to add , , , and .In addition, we may also want to add some additional attributes which we could also do here say perhaps target for links. # config/initializers/action_text.rb # Add table tags ActionText::ContentHelper.allowed_tags += ["table", "tr", "td", "th", "thead", "tbody"] # Add link attributes ActionText::ContentHelper.allowed_attributes += ["rel", "target"] Enter fullscreen mode Exit fullscreen mode , , You can also see an example from @excid3 's latest ActionText episode: https://github.com/gorails-screencasts/modify-actiontext-html-output/blob/master/config/initializers/action_text.rb https://gorails.com/episodes/modify-and-customize-actiontext-html-output?autoplay=1 If you're feeling real wild, you could even replace the sanitizer and scrubber with your own custom sanitizer / scrubber!
rails-html-sanitizer
Posts with mentions or reviews of rails-html-sanitizer.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-06-05.
-
Did you know Nokogiri now has opt-in HTML5 parsing?
loofah and rails-html-sanitizer gems follow nokogiri's lead to have opt-in HTML5 parsing (using nokogiri), using HTML5 classes -- if you use the default existing legacy API, you still get HTML4 parsing.
- ActionText: Safe listing attributes and tags
-
How to sanitize XML tags in Rails
Once I noticed that we can sanitize XML-tags using rails-html-sanitizer and loofah gems. And I want to share the knowledge.