This repository was archived by the owner on Feb 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import {SlideService} from '../../services/slide/slide.service';
99import { DeckService } from '../../services/deck/deck.service' ;
1010import { ErrorService } from '../../services/error/error.service' ;
1111import { DeckBusyService } from '../../services/deck/deck-busy.service' ;
12+ import { SlideAttributes } from '../../models/slide-attributes' ;
1213
1314export class EditorHelper {
1415
@@ -176,11 +177,35 @@ export class EditorHelper {
176177 return ;
177178 }
178179
179- await this . slideService . put ( {
180+ let attributes : SlideAttributes ;
181+
182+ if ( slide . getAttribute ( 'style' ) ) {
183+ attributes = {
184+ style : slide . getAttribute ( 'style' )
185+ } ;
186+ }
187+
188+ if ( slide . getAttribute ( 'src' ) ) {
189+ if ( ! attributes ) {
190+ attributes = {
191+ src : slide . getAttribute ( 'style' )
192+ } ;
193+ } else {
194+ attributes . src = slide . getAttribute ( 'src' ) ;
195+ }
196+ }
197+
198+ const slideUpdate : Slide = {
180199 slide_id : slide . getAttribute ( 'slide_id' ) ,
181200 slide_template : SlideTemplate . TITLE ,
182201 slide_content : slide . innerHTML
183- } ) ;
202+ } ;
203+
204+ if ( attributes ) {
205+ slideUpdate . slide_attributes = attributes ;
206+ }
207+
208+ await this . slideService . put ( slideUpdate ) ;
184209
185210 this . deckBusyService . busy ( false ) ;
186211
Original file line number Diff line number Diff line change 11export interface SlideAttributes {
22 style ?: string ;
3+ src ?: string ;
34}
You can’t perform that action at this time.
0 commit comments