Get the App
SLTechnology News&Howtos  ›  Servers  › 

The way to solve the problem that the phpcms editor does not display.

Shulou Source: shulou.com Published: 2022-06-02 05:51:44 10月06日 Update

This article mainly introduces the solution to the phpcms editor does not display the method, has a certain reference value, friends in need can refer to. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

What if the phpcms editor does not display? Phpcms site editor can not come out, previously added articles can not be edited?

1. First go to the official website to download the resource package (customize the editor navigation tool, customize and add the required features before downloading)

Baidu editor

2. Upload to the default js file path of phpcms. The uploaded file path is as follows.

\ statics\ js\ ueditor\

3. Open / phpcms/libs/classes/form.class.php and find the following code:

If (! defined ('EDITOR_INIT')) {$str =''; define ('EDITOR_INIT', 1);}

To be replaced by:

If (! defined ('EDITOR_INIT')) {$str =''; $str. ='; $str. ='; define ('EDITOR_INIT', 1);} $str. = "''

Code

Modified effect

4. Open / statics/js/ueditor/editor_config.js and find the following code:

Var URL; / * the configuration method here is suitable for the development and use of UEditor team members. External deployment users can configure it as described above. It is recommended to keep the following two lines to be compatible with the features that can be configured on each page. * / var tmp = location.protocol.indexOf ("file") =-1? Location.pathname: location.href; URL = window.UEDITOR_HOME_URL | | tmp.substr (0 tmp.lastIndexOf ("\ /") + 1). Replace ("_ examples/", ") .replace (" website/ ","); / / here you can configure the ueditor directory as either the relative path or the absolute path of your website (the absolute path that begins with http).

To be replaced by:

Var URL; var tmp = _ window.location.pathname, URL= "/ statics/js/ueditor/" / * the configuration here is suitable for the development and use of UEditor team members. External deployment users can configure it as described above. It is recommended to keep the following two lines to be compatible with the features that can be configured on each page. * / / ar tmp = location.protocol.indexOf ("file") =-1? Location.pathname: location.href; / / URL = window.UEDITOR_HOME_URL | | tmp.substr (0 tmp.lastIndexOf ("\ /") + 1). Replace ("_ examples/", ") .replace (" website/ ","); / / here you can configure the ueditor directory as either the relative path or the absolute path of your website (the absolute path that begins with http).

Is to comment out the default "var tmp" and "URL" and replace them with the address of the Baidu editor.

5. Modify the default editor width and height, because the phpcms default editor is not that large:

Find lines 112,113 at / statics/js/ueditor/editor_config.js

/ /, initialFrameWidth:1000 / / initialize editor width, default 1000 / /, initialFrameHeight:320 / / initialize editor height

To be replaced by:

, initialFrameWidth:655 / / initialization editor width, default 1000, initialFrameHeight:400 / / initialization editor height, default 320th

In this way, when you add an article, the editor will not deform.

Thank you for reading this article carefully. I hope it is helpful for everyone to share the solution to the content that the phpcms editor does not display. At the same time, I also hope that you will support us, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Tags: Editor path configuration method code function width article website height writing available in group suggestion beginning member file article method user Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Microsoft Shulou Tech Info Docker Linux