sdasd
This commit is contained in:
@@ -532,12 +532,15 @@
|
||||
saveBtn.style.cursor = 'pointer';
|
||||
saveBtn.addEventListener('click', () => {
|
||||
const html = content.innerHTML;
|
||||
const isTextLike = component && component.is && (component.is('text') || component.is('button') || component.is('link'));
|
||||
const hasTags = /<[^>]+>/.test(html);
|
||||
try {
|
||||
if (component.components) {
|
||||
if (!isTextLike && component.components) {
|
||||
component.components(html);
|
||||
}
|
||||
if (component.set) {
|
||||
component.set('content', html);
|
||||
const nextContent = (!hasTags && isTextLike) ? html : html;
|
||||
component.set('content', nextContent);
|
||||
component.trigger && component.trigger('change:content');
|
||||
component.trigger && component.trigger('change:components');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user