Update Rich Input with selection/arrows control. Add template and nodes to self:get_druid

This commit is contained in:
Insality
2024-09-07 17:15:40 +03:00
parent f93d0c7d40
commit 986a4695f6
18 changed files with 380 additions and 90 deletions

View File

@@ -234,6 +234,9 @@ function M._split_on_lines(words, settings)
repeat
local word = words[i]
if word == nil then
break
end
if word.image then
word.default_animation = settings.default_animation
end

View File

@@ -117,6 +117,10 @@ function M.parse(text, default_settings, style)
assert(default_settings)
text = text:gsub("&zwsp;", "<zwsp>\226\128\139</zwsp>")
-- Replace all \n with <br/> to make it easier to split the text
text = text:gsub("\n", "<br/>")
local all_words = {}
local open_tags = {}