Files
fizzy/app/helpers/rich_text_helper.rb
T
2025-11-05 13:31:54 +01:00

26 lines
802 B
Ruby

module RichTextHelper
def mentions_prompt(board)
content_tag "lexxy-prompt", "", trigger: "@", src: prompts_board_users_path(board), name: "mention"
end
def global_mentions_prompt
content_tag "lexxy-prompt", "", trigger: "@", src: prompts_users_path, name: "mention"
end
def tags_prompt
content_tag "lexxy-prompt", "", trigger: "#", src: prompts_tags_path, name: "tag"
end
def cards_prompt
content_tag "lexxy-prompt", "", trigger: "#", src: prompts_cards_path, name: "card", "insert-editable-text": true, "remote-filtering": true, "supports-space-in-searches": true
end
def code_language_picker
content_tag "lexxy-code-language-picker"
end
def general_prompts(board)
safe_join([ mentions_prompt(board), cards_prompt, code_language_picker ])
end
end