You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sceditor.formats.bbcode.set('quote',{tags: {'figure': null,'figcaption': null,'blockquote': null},allowedChildren: ['figcaption','blockquote'],format: function(element,content){// TODO Did not work as expected.if(element.tagName.toLowerCase()==='blockquote'){return'[quote name=""]'+content+'[/quote]';}},html: function(token,attrs,content){letname=Joomla.Text._('COMMENT_TEXT_QUOTE');if(Object.keys(attrs).length>0){name=(Joomla.Text._('COMMENT_TEXT_QUOTE_EXTENDED')).replace('%s',attrs.name);}return'<figure>'+'<figcaption class="quote">'+name+'</figcaption>'+'<blockquote class="text-muted"><div>'+content+'</div></blockquote>'+'</figure>';}});sceditor.command.set('quote',{exec: function(){letbefore='<figure><figcaption class="quote">',middle='</figcaption><blockquote class="text-muted">',end='</blockquote></figure>';if(this.getRangeHelper().selectedHtml()===''){before=before+Joomla.Text._('COMMENT_TEXT_QUOTE')+middle;end='<br />'+end;}else{before=before+Joomla.Text._('COMMENT_TEXT_QUOTE')+middle+this.getRangeHelper().selectedHtml()+end;end=null;}this.wysiwygEditorInsertHtml(before,end);}});
In WYSIWYG mode HTML is good. But when I switch to Source mode I see undefined instead of [quote] tags. What's wrong?
The text was updated successfully, but these errors were encountered:
Hi!
As you can see in title the question is simple but I cannot implement it in the code.
HTML I have:
And JS:
In WYSIWYG mode HTML is good. But when I switch to
Source
mode I seeundefined
instead of [quote] tags. What's wrong?The text was updated successfully, but these errors were encountered: