extract /pixeleditor js initialization into PixelEditor