private function setPlaceHolder($file, &$_data, &$_files)
    {
        //urls to be matched...
        //'/file/resource/media/([^']+)#'
        //'/resource/open/([^/]+)/([^']+)'
        $text = file_get_contents($file);
        $baseUrl = $this->router->getContext()->getBaseUrl();

        //first regex
        $regex = '#' . $baseUrl . '/file/resource/media/([^\'"]+)#';

        preg_match_all($regex, $text, $matches, PREG_SET_ORDER);

        if (count($matches) > 0) {
            foreach ($matches as $match) {

                if (!$this->getItemFromUid($match[1], $_data)) {
                    $this->createDataFolder($_data);
                    $node = $this->resourceManager->getNode($match[1]);

                    if ($node && $node->getResourceType()->getName() === 'file') {
                        $el = $this->getImporterByName('resource_manager')->getResourceElement(
                            $node,
                            $node->getWorkspace(),
                            $_files,
                            $_data,
                            true
                        );
                        $el['item']['parent'] = 'data_folder';
                        $el['item']['roles'] = array(array('role' => array(
                            'name'   => 'ROLE_USER',
                            'rights' => $this->maskManager->decodeMask(7, $this->resourceManager->getResourceTypeByName('file'))
                        )));
                        $_data['data']['items'][] = $el;
                    }
                }

                $text = $this->replaceLink($text, $match[0], $match[1], $_data);
            }
        }

        //second regex
        $regex = '#' . $baseUrl . '/resource/open/([^/]+)/([^\'"]+)#';
        preg_match_all($regex, $text, $matches, PREG_SET_ORDER);

        if (count($matches) > 0) {
            foreach ($matches as $match) {
                $text = $this->replaceLink($text, $match[0], $match[2]);
            }
        }

        $event = $this->eventDispatcher->dispatch('rich_text_format_event_export', 'RichTextFormat', array($text, $_data, $_files));
        $text = $event->getText();

        return $text;
    }