Null dynamic previews on plain editor
This commit is contained in:
@@ -346,6 +346,11 @@ angular.module('app')
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.contentChanged = function() {
|
this.contentChanged = function() {
|
||||||
|
|
||||||
|
// Clear dynamic previews if using plain editor
|
||||||
|
this.note.content.preview_html = null;
|
||||||
|
this.note.content.preview_plain = null;
|
||||||
|
|
||||||
// content changes should bypass manual debouncer as we use the built in ng-model-options debouncer
|
// content changes should bypass manual debouncer as we use the built in ng-model-options debouncer
|
||||||
this.changesMade({bypassDebouncer: true});
|
this.changesMade({bypassDebouncer: true});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,7 @@
|
|||||||
|
|
||||||
.html-preview {
|
.html-preview {
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ function $SanitizeProvider() {
|
|||||||
// Safe Block Elements - HTML5
|
// Safe Block Elements - HTML5
|
||||||
var blockElements = extend({}, optionalEndTagBlockElements, toMap('address,article,' +
|
var blockElements = extend({}, optionalEndTagBlockElements, toMap('address,article,' +
|
||||||
'aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +
|
'aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,' +
|
||||||
'h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul'));
|
'h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul,progress'));
|
||||||
|
|
||||||
// Inline Elements - HTML5
|
// Inline Elements - HTML5
|
||||||
var inlineElements = extend({}, optionalEndTagInlineElements, toMap('a,abbr,acronym,b,' +
|
var inlineElements = extend({}, optionalEndTagInlineElements, toMap('a,abbr,acronym,b,' +
|
||||||
@@ -268,7 +268,7 @@ function $SanitizeProvider() {
|
|||||||
'radialGradient,rect,stop,svg,switch,text,title,tspan');
|
'radialGradient,rect,stop,svg,switch,text,title,tspan');
|
||||||
|
|
||||||
// Blocked Elements (will be stripped)
|
// Blocked Elements (will be stripped)
|
||||||
var blockedElements = toMap('script,style');
|
var blockedElements = toMap('script');
|
||||||
|
|
||||||
var validElements = extend({},
|
var validElements = extend({},
|
||||||
voidElements,
|
voidElements,
|
||||||
|
|||||||
Reference in New Issue
Block a user