Php FOSCKEditorBundle样式不适用

Php FOSCKEditorBundle样式不适用,php,symfony,uikit,ckeditor4.x,Php,Symfony,Uikit,Ckeditor4.x,我正在为我的Symfony4项目使用FOSCKEditorBundle。安装过程进行得很顺利。此外,工具栏等基本配置也很好。 但我正在尝试将自定义样式应用于一些html元素。这似乎不起作用。也许我做错了什么 这是我的配置: fos_ck_editor: input_sync: true default_config: base_config auto_inline: false # Defines the different configs to apply t

我正在为我的Symfony4项目使用FOSCKEditorBundle。安装过程进行得很顺利。此外,工具栏等基本配置也很好。 但我正在尝试将自定义样式应用于一些html元素。这似乎不起作用。也许我做错了什么

这是我的配置:

fos_ck_editor:
    input_sync: true
    default_config: base_config
    auto_inline: false

    # Defines the different configs to apply them to the form fields
    configs:
        minimal_config:
            toolbar: 'minimal_toolbar'
            stylesSet: 'uikit'
        base_config:
            toolbar: 'base_toolbar'
            stylesSet: 'uikit'
        advanced_config:
            toolbar: 'advanced_toolbar'
            stylesSet: 'uikit'

     # Defines the different toolbars to reuse them for the different configs
    toolbars:
        configs:
            minimal_toolbar: ['@styles']
            base_toolbar: ['@styles', '@link', '@lists']
            advanced_toolbar: ['@styles', '@link', '@lists', '@indention', '@specials']
        items:
            styles: ['Bold', 'Italic']
            link: ['Link', 'Unlink']
            lists: ['BulletedList']
            indention: ['Indent', 'Outdent']
            specials: ['Table', 'Source', 'Format']

    # Defines the custom styles for uikit
    styles:
        uikit:
            - { name: "CSS Style", element: "table", attributes: { class: "uk-table" }}
            - { name: "CSS Style", element: "table", attributes: { border: "0" }}

也许有人也有同样的问题,可以帮助我。

你写道:

这似乎行不通

你确定它不起作用吗?发件人:

如果为对象(如表或图像)添加了一些自定义样式定义,需要先选择这些对象,然后才能应用样式。对象样式仅显示在“样式”下拉列表中,并且在选择表格时,可以在编辑器中选择元素后应用,如下图所示

请注意,您的配置中有两个
CSS样式
名称。如果您想在
CSS样式
条目上应用两个属性,我建议您编写

- { name: "CSS Style", element: "table", attributes: { class: "uk-table", border: "0" }}
你写道:

这似乎行不通

你确定它不起作用吗?发件人:

如果为对象(如表或图像)添加了一些自定义样式定义,需要先选择这些对象,然后才能应用样式。对象样式仅显示在“样式”下拉列表中,并且在选择表格时,可以在编辑器中选择元素后应用,如下图所示

请注意,您的配置中有两个
CSS样式
名称。如果您想在
CSS样式
条目上应用两个属性,我建议您编写

- { name: "CSS Style", element: "table", attributes: { class: "uk-table", border: "0" }}