pimcore对象中的Wysiwyg

pimcore对象中的Wysiwyg

本文介绍了pimcore对象中的Wysiwyg?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在pimcore对象中使用所见即所得编辑器有问题.当我标记文本时,请转到样式",然后选择什么都不会产生结果"的标记".在看起来像<的源代码中span class ="marker"> Lorem ipsum</span>,但在编辑器中相同.它只能获取文本,尽管文本应为黄色.

I have problem with wysiwyg editor in pimcore object. When I mark text, go to Styles and choose for example "Marker" that results nothing. In source code that looks like < span class="marker" > Lorem ipsum < /span >, but in editor it's same. It only gets text, althought text should be yellow.

有什么想法吗?

推荐答案

样式"下拉列表实际上只是在更改HTML标记.所以这个

The Styles dropdown actually just changes the HTML markup.So this

<p>Lorem ipsum</p>

更改为

<p><span class="marker">Lorem ipsum</span></p>

如果您确实希望使用黄色文本,则需要在前端CSS中添加类似的内容:

If you really want to have yellow text, then you need to add something like this to your frontend css:

.marker {
     background-color: yellow;
}

有一个源"按钮(所见即所得"字段工具栏中的最后一个),可让您检查实际生成的标记,从而可以构建所需的CSS类.

There is a Source button (last one in the WYSIWYG field toolbar) that let's you examine what markup is actually being produced, so you can build the needed CSS classes.

另一方面,所见即所得对象对您的前端CSS一无所知. contentCSS CKEditor选项似乎无效,因此最快的解决方法是创建一个新的Pimcore扩展并将其放入CSS文件中,如下所示:

On the other hand the objects WYSIWYG doesn't know anything about your frontend CSS. The contentsCSS CKEditor option doesn't seem to work, so the fastest workaround would be to create a new Pimcore extension and put into its CSS file something like this:

.pimcore_tag_wysiwyg .marker {
    background-color: yellow;
}

这篇关于pimcore对象中的Wysiwyg?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-27 04:14