Tinymce |如何从源路径中删除两个点

时间:2017-11-05 10:22:04

标签: callback tinymce imageurl

我使用Tinymce,当我插入图像文件时,我在网址的开头有两个点,如何删除它。因为

项目已无缝集成到目标文件中,

我在数据库中注册HTML结果

我正在撤消记录,但图像源中有一个双点

我需要删除双

如何进行更改 img src =“../ Content / Images / Upload”> img src =“/ Content / Images / Upload”

  tinymce.init({
    selector: '#HTML',
    height: 500,
    menubar: false,
    plugins: [
        'advlist autolink lists link image charmap print preview anchor textcolor',
        'searchreplace visualblocks code fullscreen',
        'insertdatetime media table contextmenu paste code help'
    ],
    toolbar: 'insert | undo redo |  formatselect fontsizeselect | fontselect  bold italic backcolor forecolor  | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | removeformat | help | link image code',
    font_formats: "Andale Mono=andale mono, times;" +
    "Arial=arial,helvetica,sans-serif;" +
    "Arial Black=arial black,avant garde;" +
    "Book Antiqua=book antiqua,palatino;" +
    "Comic Sans MS=comic sans ms,sans-serif;" +
    "Courier New=courier new,courier;" +
    "Georgia=georgia,palatino;" +
    "Helvetica=helvetica;" +
    "Impact=impact,chicago;" +
    "Symbol=symbol;" +
    "Tahoma=tahoma,arial,helvetica,sans-serif;" +
    "Terminal=terminal,monaco;" +
    "Times New Roman=times new roman,times;" +
    "Trebuchet MS=trebuchet ms,geneva;" +
    "Verdana=verdana,geneva;" +
    "Webdings=webdings;" +
    "Wingdings=wingdings,zapf dingbats",

    fontsize_formats: '8pt 10pt 12pt 14pt 18pt 24pt 36pt 72pt',


    content_css: [
        '//fonts.googleapis.com/css?family=Lato:300,300i,400,400i',
        '//www.tinymce.com/css/codepen.min.css'],
    paste_data_images: true,
    images_upload_url: '/UploadImage',
    images_upload_base_path: '/Upload',

    language: 'tr',

});

1 个答案:

答案 0 :(得分:1)

TinyMCE提供了多种配置选项来处理URL及其处理方式。看看以下内容:

https://www.tinymce.com/docs/configure/url-handling/

...特别是该页面上的以下内容:

如果TinyMCE的内置选项无法解决您的问题,那么最后一个(urlconverter_callback)允许您实现自己的逻辑。