Tag: hook

Pagedown markdown脚本一次插入图片url

我有一个修改的pagedown markdown标记脚本,用于将图像url插入编辑器,但它只在第一次工作。 我用评论解释了我的代码 (function () { var converter = new Markdown.Converter(); var help = function () { window.open(‘http://mywebsite.com/editing-help’); } var editor = new Markdown.Editor(converter); editor.hooks.set(‘insertImageDialog’, function(callback) { setTimeout(function () { //i use bootstrap dialog to enter the url $(‘#fileModal’).modal(‘show’); /*i have a button for clearing the textbox when i open it the second time since […]

在SugarCRM editview中添加自定义jQueryvalidation

我试图在帐户编辑视图的页眉或页脚中添加自定义jQuery脚本,在谷歌的任何地方搜索但无法找到在页眉或页脚中打印脚本的钩子。 我的目标是为我的自定义字段添加自定义validation,但是只要我添加jQuery代码,页面就会停止。 我在custom/modules/Accounts/metadata/editviewdefs.php插入以下代码 $viewdefs [‘Accounts’] = array( ‘EditView’ => array( ‘templateMeta’ => array( ‘javascript’ => ‘ $(document).ready(function(){ alert(“This is my custom javascript code”); }); ‘, 以上代码生成以下屏幕。 我删除了这样的jQuery部分 $viewdefs [‘Accounts’] = array( ‘EditView’ => array( ‘templateMeta’ => array( ‘javascript’ => ‘ alert(“This is my custom javascript code”); ‘, 我看到以下警报 我看到简单的JavaScript代码工作正常,但只有当我添加jQuery代码时才会出现问题,我尝试在上面的代码之前添加jQuery库,但这并没有解决问题。 有人能说出我在这里失踪了吗?