在下面的phpmyadmin截图中,您可以看到phpmyadmin的有限编辑器大小。
高度非常小,我们有问题从这个编辑器编码。
如何调整编辑器的大小?
标准编辑器:

内联编辑器:

发布于 2015-12-16 18:32:25
我所做的就是下载了TamperMonkey for Chrome (GreaseMonkey for Firefox),并创建了自己的脚本来覆盖样式。
您也可以这样做,只需打开接口,添加一个新脚本并将其粘贴到:
// ==UserScript==
// @name phpMyAdmin SQL editor height fix
// @namespace http://josephwebber.ca/
// @version 1.1
// @description Changes the SQL editors' height
// @author Joseph Webber
// @match phpMyAdmin
// @include */phpMyAdmin/*
// @grant GM_addStyle
// ==/UserScript==
/* jshint -W097 */
'use strict';
// 1.0
//GM_addStyle(".CodeMirror { min-height: 49px !important } .CodeMirror, #inline_editor_outer .CodeMirror, .CodeMirror-wrap .CodeMirror-scroll { height: auto !important; }");
// 1.1
GM_addStyle(".CodeMirror { min-height: 49px !important } .CodeMirror, #inline_editor_outer .CodeMirror, .CodeMirror-wrap .CodeMirror-scroll { height: auto !important; } .sql { max-height: initial !important; }");这样,即使phpMyAdmin的文件被更新,您的更改也不会被覆盖。
发布于 2014-07-22 05:42:18
有两种方法可以做到这一点,一种是为该会话工作,但一旦您刷新页面或重新打开您的浏览器,您将不得不重做步骤。
临时解决办法:
在Google /您最喜欢的网页浏览器中,右键单击内联编辑器,然后选择Inline。
查找<div class="CodeMirror cm-s-default CodeMirror-wrap">并在“样式更改”下:
#inline_editor_outer .CodeMirror {
height: 6em;
}一些更大的东西,比如60em;。
永久的解决方案是编辑phpmyadmin.css并更改该行。我正在运行的版本是~第3885行。
这使得方框更大,但它允许在该区域放置滚动条之前的文本行是相同的5-10。所以我们需要再换一次。
<div class="CodeMirror-scroll" tabindex="-1" style="height: 75px;">是下一个冒犯的路线。在Chrome检查器中,将height: 75px;改为height: 750px;。
由于这是通过样式属性而不是CSS来完成的,所以我认为,除非您编辑sql.php文件并找到它在哪里生成该属性并重写它,否则您将无法将其永久修复。
不知道为什么他们不只是在右下角添加一个东西,这样你就可以增加盒子的大小,这也让我发疯了。
编辑:如果你曾经为我写过一个GreaseMonkey脚本或Google扩展或者其他的东西--让我知道!
发布于 2017-02-02 05:02:24
为了增加的高度,内联编辑盒,,请在下面的步骤。
对于phpmyadmin版本:4.5.1。主题:pmahomme
我的phpmyadmin主题文件夹的路径:C:\xampp\phpMyAdmin\themes\pmahomme\css
编辑:codemirror.css.php
来自:#inline_editor_outer .CodeMirror { height: <?php echo ceil($GLOBALS['cfg']['TextareaRows'] * 0.4); ?>em; }
致:#inline_editor_outer .CodeMirror { height: <?php echo ceil($GLOBALS['cfg']['TextareaRows'] * **2**); ?>em **!important**; }
然后执行Ctrl+f5 -刷新phpmyadmin选项卡。
https://stackoverflow.com/questions/24879512
复制相似问题