我需要在开始{text}之前和end{text}.If之后保存内容,我有两个名为“保存”和“恢复”的按钮。如果我单击“保存”按钮,上面的整个文本将开始{ text },在end{text}之后将复制到某个txt文件。编辑后,如果单击“还原”按钮,保存的整个文档将位于相同的位置。有可能吗?我正在使用这个代码来替换
put the htmlText of field "MytextField" into myHtml
set the caseSensitive to true
replace searchStr with "<strike><font bgcolor=" & quote & "yellow" & quote & ">" & searchStr & "</font></strike><font bgcolor=" & quote & "green" & quote & ">" & replaceStr & "</font>" in myHtml
set the htmlText of fld "MytextField" to myHtml在“开始前”{text}和“结束”{text}之后,我没有任何编辑。这样我就能节省时间和准确性
发布于 2015-05-19 20:54:40
也许你是在找这个:
put the htmlText of field "MytextField" into myHtml
put offset("begin{text}",myHtml) into startchar
put offset("end{text}",myHtml) into endchar
put char startchar to endchar of myHtml into text_to_preserve
put char 1 to (startchar - 1) into text_toEdit1
put char (endchar + 1) to -1 into text_toEdit2https://stackoverflow.com/questions/29538587
复制相似问题