diff --git a/frontend/document/document.lua b/frontend/document/document.lua index 7001dd32c..261743098 100644 --- a/frontend/document/document.lua +++ b/frontend/document/document.lua @@ -50,18 +50,22 @@ local Document = { -- flag to show that the document needs to be unlocked by a password is_locked = false, - - configurable = Configurable, } function Document:new(o) local o = o or {} setmetatable(o, self) self.__index = self + if o._init then o:_init() end if o.init then o:init() end return o end +-- base document initialization should be called on each document init +function Document:_init() + self.configurable = Configurable:new() +end + -- override this method to open a document function Document:init() end