I am currently trying to write a GUI extension to insert some html into a component, I have managed to get it working correctly in the content manager but am struggling to get it to work in experience manager.
I have read the question How to pass data from custom Popup to currently selected text editor in Tridion UI 2012 (SiteEdit)? and can now get it to overwrite the data. However is there a method of just inserting the data rather than replacing it completely?
$context = $display.getView();
if ($context.getId() == "ComponentView") {
target.editor.applyHTML(functionData);
}
else
{
$selection = $display.getView().getSelectionWithFieldData();
$fieldData = $selection.properties.fieldData
$item = $models.getItem($selection.getItems()[0]);
$context.applyFieldValue($item, $fieldData.xpath, functionData, $context);
}
Is there a method in Anguilla that can replicate applyHTML in experience manager or will I need to insert the next html into the old code in my code and then replace the lot?
Also where is best to look for resources on Anguilla functions? I have downloaded the "SDL Tridion 2013 SP1 GUI Extensions API zip" but it's not the easiest to use as it has 10,000 odd html pages with no search functionality.
Thanks for looking!