[jbosstools-issues] [JBoss JIRA] (JBIDE-17450) Drag&Drop of image to VPE source part doesn't insert proper link

Alexey Kazakov (JIRA) issues at jboss.org
Fri Jun 20 12:47:24 EDT 2014


    [ https://issues.jboss.org/browse/JBIDE-17450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978227#comment-12978227 ] 

Alexey Kazakov edited comment on JBIDE-17450 at 6/20/14 12:46 PM:
------------------------------------------------------------------

{quote}
^ the URL is correct because we use project relative path by convention (We need to know where we supposed to find a file in the workspace).
{quote}
This is exactly why the URL is not correct. Project relative path should be used only if the project is not a dynamic web project and you can't know where the webroot is. Otherwise (as in the example below) webroot relative paths should be used.
My idea was to encode the path to the webroot in one of the parameters in the URL instead of the project name.
{quote}Do you know is there any API for getting the web root of the project?{quote}
We have some useful util methods for this stuff. But they are in common component. So we have to add this dependency to the VPV plugins.


was (Author: akazakov):
{quote}
^ the URL is correct because we use project relative path by convention (We need to know where we supposed to find a file in the workspace).
{quote}
This is exactly why the URL is not correct. Project relative path should be used only if the project is not a dynamic web project and you can't know where is the webroot. Otherwise (as in the example below) webroot relative paths should be used.
My idea was to encode the path to the webroot in one of the parameters in the URL instead of the project name.
{quote}Do you know is there any API for getting the web root of the project?{quote}
We have some useful util methods for this stuff. But they are in common component. So we have to add this dependency to the VPV plugins.

> Drag&Drop of image to VPE source part doesn't insert proper link
> ----------------------------------------------------------------
>
>                 Key: JBIDE-17450
>                 URL: https://issues.jboss.org/browse/JBIDE-17450
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: visual-page-editor-core
>    Affects Versions: 4.2.0.Beta2
>         Environment: JBDS 8.0.0.Beta2-v20140525-2146-B104 Linux 64bit
>            Reporter: Vlado Pakan
>            Assignee: Alexey Kazakov
>             Fix For: 4.2.0.Beta3
>
>
> 1. Import HTML 5 project from JBoss Central
> 2. Open index.html page
> 3. Drag&drop some image from img subdirectory to source part of VPE
> ERROR: Dropped image is not shown in visual part of VPE. Inserted img tag contains src attribute starting with '/'. Once this character is removed image is properly displayed in visual preview.



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jbosstools-issues mailing list