【问题标题】:tinymce convert bbcode to html codetinymce 将 bbcode 转换为 html 代码
【发布时间】:2017-05-11 09:42:31
【问题描述】:

我希望我的 tinymce 将 bbcode 转换为 html 代码。我在 Extjs 6 中添加 tinymce。当我想制作粗体时,它会在 html 代码 [b] 中写入我,并且它是相同的:斜体、下划线、大小。 我关注这个链接,但它也不起作用:Convert BBcode to HTML using JavaScript/jQuery 请如何改变它,因为它在我的网站上显示如下: [b]Test[/b] 而不是 Test 这是我的代码:

tinyMCEConfig: {
                                content_style: "iframe { width:100%}",

                                plugins : [
                                  'advlist anchor autolink autoresize autosave bbcode charmap link code image imagetools codesample contextmenu colorpicker code lists charmap print  hr anchor pagebreak spellchecker',
                                  'searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking example fullscreen importcss media ',
                                  'save paste preview table template textcolor textpattern  visualblocks visualchars wordcount searchreplace spellchecker tabfocus contextmenu directionality emoticons template textcolor  textpattern insertdatetime layer lists'
                                ], 
                                menubar: 'insert edit view',

                                image_advtab: true ,

                                external_filemanager_path:"/ext/ux/newtinymce/js/responsive_filemanager/filemanager/",
                                filemanager_title:"Responsive Filemanager" ,
                                external_plugins: { "filemanager" : "/ext/ux/newtinymce/js/responsive_filemanager/filemanager/plugin.min.js"},
                                toolbar1: 'responsivefilemanager bold italic underline strikethrough alignleft aligncenter alignright alignjustify numlist bullist anchor ',
                                toolbar2: 'code codesample preview hr  textcolor fullpage textpattern  layer lists emoticons media image imagetools fontsizeselect fontselect',
                                toolbar3: 'ltr rtl visualblocks  searchreplace insertdatetime nonbreaking fullscreen indent pagebreak template ',
                                toolbar4: 'save cancel pastetext paste  print table  importcss  textcolor  backcolor  textpattern wordcount   lists  contextmenu restoredraft bbcode  charmap link instagram',
                                bbcode_dialect: "punbb",
                                autoresize_max_height: 50,
                                fontsize_formats : "8pt 8.25pt 8.5pt 8.75pt 9pt 9.25pt 9.5pt 10pt 11pt 12pt 14pt 18pt 24pt 36pt",
                                font_formats: 'Schriftart=Schriftart;Microsoft Sans Serif=Microsoft Sans Serif;Sans-serif = sans-serif;Andale Mono=andale mono,times;Arial=arial, helvetica, sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua; Palatino = palatino;'+
                                'Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;'+
                                'Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif; Serif = serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;'+
                                'Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats',
                            }

【问题讨论】:

    标签: extjs tinymce tinymce-4 extjs6 bbcode


    【解决方案1】:

    您启用 PunBB.INFO → 管理 → 设置 → 功能 选项

    消息选项允许在帖子中使用 BBCode(推荐)。

    【讨论】:

    • 感谢您的帖子,但我只是删除了 bbcode 插件并获得了我的内容的 html 代码。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-08-08
    • 1970-01-01
    • 2013-10-24
    • 2018-07-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多