Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
270 views
in Technique[技术] by (71.8m points)

javascript - TinyMCE adds two dots to the beginning of the source of the image

I have a react blog web app where i use TinyMCE as text editor. When i try to add an image with the editor, the source of image returns correctly. but when i try to open the source-plugin i see that it changes the image source and adds two dots ("..") at the beginning of it. I also have a custom image upload handler, which sends the location (source) for the image and it sends te location correctly. Is there a solution for it?

Here are screenshots of the problem:

Add Image Dialog

How the editor seems after adding

when i try to see the source, double dots are added to the beginning of the src

question from:https://stackoverflow.com/questions/65835362/tinymce-adds-two-dots-to-the-beginning-of-the-source-of-the-image

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

What you are seeing is tied to what TinyMCE refers to as URL Handling. There are a variety of options you can use to control what TinyMCE will do URLs when you add them to the editor:

https://www.tiny.cloud/docs/configure/url-handling/

If you don't want a relative URL like you currently see you can use the settings referenced in that section to have TinyMCE do something different with the URL.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...