Class: RicherText::RichText

Inherits:
ApplicationRecord show all
Defined in:
app/models/richer_text/rich_text.rb

Instance Method Summary collapse

Instance Method Details

#mentioneesObject



22
23
24
25
26
# File 'app/models/richer_text/rich_text.rb', line 22

def mentionees
  global_ids = body&.mentionees_global_ids

  GlobalID::Locator.locate_many(global_ids)
end

#to_editor_formatObject



18
19
20
# File 'app/models/richer_text/rich_text.rb', line 18

def to_editor_format
  body&.to_html&.to_s
end

#to_htmlObject



14
15
16
# File 'app/models/richer_text/rich_text.rb', line 14

def to_html
  body&.to_html&.to_s
end