返回介绍

Get Support & FAQ

发布于 2019-05-06 06:50:21 字数 4781 浏览 1107 评论 0 收藏 0

If you landed here having worked through the Introduction & getting started section, congratulations, you are on your way to the TinyMCE ninja hood :-). It’s now time to deep-dive into configuring the editor and explore plugin options. We wish you well and welcome you to TinyMCE. If you get stuck, a great place to start is the TinyMCE Forum.

Premium support

Paid premium support is available as part of TinyMCE Enterprise. TinyMCE Enterprise customers can review what information you need to gather to submit a case.

Forums

Open Source Community Edition users can get free access to the TinyMCE Forum. Sign up here.

FAQ & troubleshooting

Q: The icons are missing when installing on my server?

TinyMCE 4 uses Web fonts for its icons. Some web servers do not support the mime types needed for the font file extensions. Below are the mime types required - the first part is the mime type the second part is the file extension that needs to be mapped. It’s in apache mime type format. Other servers might need a different format.

MIME typeFile Extension
application/x-font-ttfttf
application/x-font-otfotf
application/font-woffwoff
application/vnd.ms-fontobjecteot
image/svg+xmlsvg

Q: Why do buttons/select boxes have the incorrect size?

You are probably using an old DOCTYPE as of TinyMCE 4 a proper HTML5 doctype is required. All web developers should use a standard rendering mode on their web pages. Use a HTML5 doctype like <!DOCTYPE html> to properly render the page and the TinyMCE UI.

Q: Is TinyMCE protected against XSS vulnerabilities?

The server should have protection against XSS attacks implemented. Since if you can submit contents in a form using TinyMCE one could as easily disable all JavaScript and therefore bypass TinyMCE filtering and still submit HTML code with insecure content. You need to properly filter the HTML input on the server using things like HTML Purifier.

Q: How do I convert my URLs to relative, absolute, or absolute with the domain?

Relative URLs

The Relative URLs converts all URLs within the same domain to relative URLs. The URLs are relative from the document_base_url.

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  relative_urls : true,
  document_base_url : 'http://www.site.com/path1/'
});
Example

http://www.site.com/path1/path2/file.htm >> path2/file.htm

Absolute URLs

The Absolute URLs converts all relative URLs to absolute URLs. The URLs are absolute based on the document_base_url.

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  relative_urls : false,
  remove_script_host : true,
  document_base_url : 'http://www.site.com/path1/'
});
Example

path2/file.htm >> /path1/path2/file.htm

Domain absolute URLs

The Domain absolute URLs converts all relative URLs to absolute URLs. The URLs are absolute based on the document_base_url with the domain.

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  relative_urls : false,
  remove_script_host : false,
  document_base_url : 'http://www.site.com/path1/'
});
Example

path2/file.htm >> http://www.site.com/path1/path2/file.htm

Q: Where are the advanced image formatting options?

Use the Style Formats option instead, which is much more powerful.

tinymce.init({
  selector: 'textarea',  // change this value according to your HTML
  style_formats: [
    {title: 'Image Left', selector: 'img', styles: {
      'float' : 'left',
      'margin': '0 10px 0 10px'
    }},
    {title: 'Image Right', selector: 'img', styles: {
      'float' : 'right',
      'margin': '0 10px 0 10px'
    }}
]
});

Use the text-align buttons when images are selected to also align the images.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文