我正在尝试为用户提供一个选项,以编辑预加载的文本,如下图所示:
我提供了使用以下代码向用户添加新文本的选项,但预载的文本未显示(我的情况是[KAYLE JACKSON]
HTML
<div entity_id="52912" style="left: 97.5px; top: 26.9915px; ">
<textarea style="font-family: open_sans_condensedbold;">
</textarea>
</div>
脚本
var cardConfig = "fields":[{"id":52912,"text":"K A Y L E E J A C K S O N","align":"center","font":"open_sans_condensedbold","color":"ffffff","rotation":0.0000000000,"size":22.6100000000,"x":92.2500000000,"y":28.9400000000}];
if (editorMode == "cards" || editorMode == "ecards") {
$('#overlay_front_card').show().append($('<img>').attr('src', cardConfig.thumbnail));
}
if (cardConfig.pages !== null) {
//CARD ORIGINAL DESIGN
for (card_idx = 0; card_idx < cardConfig.pages.length; card_idx++) {
var textFields = cardConfig.pages[card_idx].fields;
$(textFields).each(function () {
if ($.inArray(this.font, fontNames) < 0) {
fontNames.push(getFontName(this.font));
}
});
}
}